mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-03 23:10:46 +08:00
style(modules_drivers): name parameter members after their parameter name
Produced by make format with the new parameter member name check, plus the AFBRS50 calibration offsets used outside the declaring files.
This commit is contained in:
1 parent
9a4fef9c02
commit
dbe4cd3e2e
176 files changed
+1100
-1100
No files matched your search
@@ -179,7 +179,7 @@ float BatterySimulator::fullDischargeTime(int battery_index) const
|
||||
float BatterySimulator::minimumPercentage(int battery_index) const
|
||||
{
|
||||
// Only a negative override means: use the floor shared by all batteries. Zero is a valid floor.
|
||||
return (_min_pct_override[battery_index] >= 0.f) ? _min_pct_override[battery_index] : _param_bat_min_pct.get();
|
||||
return (_min_pct_override[battery_index] >= 0.f) ? _min_pct_override[battery_index] : _param_sim_bat_min_pct.get();
|
||||
}
|
||||
|
||||
int BatterySimulator::task_spawn(int argc, char *argv[])
|
||||
|
||||
@@ -103,6 +103,6 @@ private:
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamFloat<px4::params::SIM_BAT_DRAIN>) _param_sim_bat_drain, ///< battery drain interval
|
||||
(ParamFloat<px4::params::SIM_BAT_MIN_PCT>) _param_bat_min_pct //< minimum battery percentage
|
||||
(ParamFloat<px4::params::SIM_BAT_MIN_PCT>) _param_sim_bat_min_pct //< minimum battery percentage
|
||||
)
|
||||
};
|
||||
@@ -85,55 +85,55 @@ int GZBridge::init()
|
||||
}
|
||||
|
||||
// OPTIONAL:
|
||||
if (_sim_gz_en_imu.get()) {
|
||||
if (_param_sim_gz_en_imu.get()) {
|
||||
if (!subscribeImu(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (_sim_gz_en_mag.get()) {
|
||||
if (_param_sim_gz_en_mag.get()) {
|
||||
if (!subscribeMag(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (_sim_gz_en_gps.get()) {
|
||||
if (_param_sim_gz_en_gps.get()) {
|
||||
if (!subscribeNavsat(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (_sim_gz_en_baro.get()) {
|
||||
if (_param_sim_gz_en_baro.get()) {
|
||||
if (!subscribeAirPressure(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (_sim_gz_en_lidar.get()) {
|
||||
if (_param_sim_gz_en_lidar.get()) {
|
||||
if (!subscribeDistanceSensor(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (_sim_gz_en_aspd.get()) {
|
||||
if (_param_sim_gz_en_aspd.get()) {
|
||||
if (!subscribeAirspeed(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (_sim_gz_en_flow.get()) {
|
||||
if (_param_sim_gz_en_flow.get()) {
|
||||
if (!subscribeOpticalFlow(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (_sim_gz_en_odom.get()) {
|
||||
if (_param_sim_gz_en_odom.get()) {
|
||||
if (!subscribeOdometry(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (_sim_gz_en_lidar.get()) {
|
||||
if (_param_sim_gz_en_lidar.get()) {
|
||||
if (!subscribeLaserScan(false)) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
@@ -226,7 +226,7 @@ bool GZBridge::subscribePoseInfo(bool required)
|
||||
|
||||
bool GZBridge::subscribeImu(bool required)
|
||||
{
|
||||
uint8_t count = math::min(_MAX_IMU_SENSORS, static_cast<uint8_t>(_sim_gz_en_imu.get()));
|
||||
uint8_t count = math::min(_MAX_IMU_SENSORS, static_cast<uint8_t>(_param_sim_gz_en_imu.get()));
|
||||
|
||||
for (uint8_t i = 0; i < _MAX_IMU_SENSORS; i++) {
|
||||
std::string imu_topic;
|
||||
@@ -262,7 +262,7 @@ bool GZBridge::subscribeImu(bool required)
|
||||
|
||||
bool GZBridge::subscribeMag(bool required)
|
||||
{
|
||||
uint8_t count = math::min(_MAX_MAG_SENSORS, static_cast<uint8_t>(_sim_gz_en_mag.get()));
|
||||
uint8_t count = math::min(_MAX_MAG_SENSORS, static_cast<uint8_t>(_param_sim_gz_en_mag.get()));
|
||||
|
||||
for (uint8_t i = 0; i < _MAX_MAG_SENSORS; i++) {
|
||||
std::string mag_topic;
|
||||
@@ -389,7 +389,7 @@ bool GZBridge::subscribeAirspeed(bool required)
|
||||
|
||||
bool GZBridge::subscribeAirPressure(bool required)
|
||||
{
|
||||
uint8_t count = math::min(_MAX_BARO_SENSORS, static_cast<uint8_t>(_sim_gz_en_baro.get()));
|
||||
uint8_t count = math::min(_MAX_BARO_SENSORS, static_cast<uint8_t>(_param_sim_gz_en_baro.get()));
|
||||
|
||||
for (uint8_t i = 0; i < _MAX_BARO_SENSORS; i++) {
|
||||
std::string baro_topic;
|
||||
@@ -425,7 +425,7 @@ bool GZBridge::subscribeAirPressure(bool required)
|
||||
|
||||
bool GZBridge::subscribeNavsat(bool required)
|
||||
{
|
||||
uint8_t count = math::min(_MAX_GNSS_SENSORS, static_cast<uint8_t>(_sim_gz_en_gps.get()));
|
||||
uint8_t count = math::min(_MAX_GNSS_SENSORS, static_cast<uint8_t>(_param_sim_gz_en_gps.get()));
|
||||
|
||||
for (uint8_t i = 0; i < _MAX_GNSS_SENSORS; i++) {
|
||||
std::string gnss_topic;
|
||||
@@ -526,7 +526,7 @@ void GZBridge::opticalFlowCallback(const px4::msgs::OpticalFlow &msg)
|
||||
void GZBridge::magnetometerCallback(const gz::msgs::Magnetometer &msg, uint8_t instance_index)
|
||||
{
|
||||
// Bounds check and safety guard
|
||||
uint8_t count = math::min(_MAX_MAG_SENSORS, static_cast<uint8_t>(_sim_gz_en_mag.get()));
|
||||
uint8_t count = math::min(_MAX_MAG_SENSORS, static_cast<uint8_t>(_param_sim_gz_en_mag.get()));
|
||||
|
||||
if (instance_index >= count) {
|
||||
return;
|
||||
@@ -568,7 +568,7 @@ void GZBridge::magnetometerCallback(const gz::msgs::Magnetometer &msg, uint8_t i
|
||||
void GZBridge::airPressureCallback(const gz::msgs::FluidPressure &msg, uint8_t instance_index)
|
||||
{
|
||||
// Bounds check and safety guard
|
||||
uint8_t count = math::min(_MAX_BARO_SENSORS, static_cast<uint8_t>(_sim_gz_en_baro.get()));
|
||||
uint8_t count = math::min(_MAX_BARO_SENSORS, static_cast<uint8_t>(_param_sim_gz_en_baro.get()));
|
||||
|
||||
if (instance_index >= count) {
|
||||
return;
|
||||
@@ -602,7 +602,7 @@ void GZBridge::airspeedCallback(const gz::msgs::AirSpeed &msg)
|
||||
void GZBridge::imuCallback(const gz::msgs::IMU &msg, uint8_t instance_index)
|
||||
{
|
||||
// Bounds check and safety guard
|
||||
uint8_t count = math::min(_MAX_IMU_SENSORS, static_cast<uint8_t>(_sim_gz_en_imu.get()));
|
||||
uint8_t count = math::min(_MAX_IMU_SENSORS, static_cast<uint8_t>(_param_sim_gz_en_imu.get()));
|
||||
|
||||
if (instance_index >= count) {
|
||||
return;
|
||||
@@ -822,7 +822,7 @@ void GZBridge::addGpsNoise(double &latitude, double &longitude, double &altitude
|
||||
|
||||
void GZBridge::navSatCallback(const gz::msgs::NavSat &msg, uint8_t instance_index)
|
||||
{
|
||||
uint8_t count = math::min(_MAX_GNSS_SENSORS, static_cast<uint8_t>(_sim_gz_en_gps.get()));
|
||||
uint8_t count = math::min(_MAX_GNSS_SENSORS, static_cast<uint8_t>(_param_sim_gz_en_gps.get()));
|
||||
|
||||
if (instance_index >= count) {
|
||||
return;
|
||||
@@ -867,7 +867,7 @@ void GZBridge::navSatCallback(const gz::msgs::NavSat &msg, uint8_t instance_inde
|
||||
|
||||
sensor_gnss_s sensor_gnss{};
|
||||
|
||||
if (_sim_gps_used.get() >= 4) {
|
||||
if (_param_sim_gps_used.get() >= 4) {
|
||||
// fix
|
||||
sensor_gnss.fix_type = 3; // 3D fix
|
||||
sensor_gnss.speed_accuracy = 0.4f;
|
||||
@@ -908,7 +908,7 @@ void GZBridge::navSatCallback(const gz::msgs::NavSat &msg, uint8_t instance_inde
|
||||
sensor_gnss.jamming_state = 0;
|
||||
sensor_gnss.spoofing_state = 0;
|
||||
sensor_gnss.vel_ned_valid = true;
|
||||
sensor_gnss.satellites_used = _sim_gps_used.get();
|
||||
sensor_gnss.satellites_used = _param_sim_gps_used.get();
|
||||
|
||||
if (failure_injection::process_gnss(_failure_config, instance_index, sensor_gnss, _gnss_stuck[instance_index])) {
|
||||
_sensor_gnss_pub[instance_index].publish(sensor_gnss);
|
||||
|
||||
@@ -227,14 +227,14 @@ private:
|
||||
const float _vel_markov_time = 0.85f; // Velocity Markov process coefficient
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamInt<px4::params::SIM_GPS_USED>) _sim_gps_used,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_LIDAR>) _sim_gz_en_lidar,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_FLOW>) _sim_gz_en_flow,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_ASPD>) _sim_gz_en_aspd,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_BARO>) _sim_gz_en_baro,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_ODOM>) _sim_gz_en_odom,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_GPS>) _sim_gz_en_gps,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_IMU>) _sim_gz_en_imu,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_MAG>) _sim_gz_en_mag
|
||||
(ParamInt<px4::params::SIM_GPS_USED>) _param_sim_gps_used,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_LIDAR>) _param_sim_gz_en_lidar,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_FLOW>) _param_sim_gz_en_flow,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_ASPD>) _param_sim_gz_en_aspd,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_BARO>) _param_sim_gz_en_baro,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_ODOM>) _param_sim_gz_en_odom,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_GPS>) _param_sim_gz_en_gps,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_IMU>) _param_sim_gz_en_imu,
|
||||
(ParamInt<px4::params::SIM_GZ_EN_MAG>) _param_sim_gz_en_mag
|
||||
)
|
||||
};
|
||||
@@ -42,21 +42,21 @@ GZMixingInterfaceServo::get_servo_angle_max(const size_t index)
|
||||
float angle;
|
||||
|
||||
switch (index) {
|
||||
case 0: {angle = _servo_max_angle_1.get(); break;}
|
||||
case 0: {angle = _param_sim_gz_sv_maxa1.get(); break;}
|
||||
|
||||
case 1: {angle = _servo_max_angle_2.get(); break;}
|
||||
case 1: {angle = _param_sim_gz_sv_maxa2.get(); break;}
|
||||
|
||||
case 2: {angle = _servo_max_angle_3.get(); break;}
|
||||
case 2: {angle = _param_sim_gz_sv_maxa3.get(); break;}
|
||||
|
||||
case 3: {angle = _servo_max_angle_4.get(); break;}
|
||||
case 3: {angle = _param_sim_gz_sv_maxa4.get(); break;}
|
||||
|
||||
case 4: {angle = _servo_max_angle_5.get(); break;}
|
||||
case 4: {angle = _param_sim_gz_sv_maxa5.get(); break;}
|
||||
|
||||
case 5: {angle = _servo_max_angle_6.get(); break;}
|
||||
case 5: {angle = _param_sim_gz_sv_maxa6.get(); break;}
|
||||
|
||||
case 6: {angle = _servo_max_angle_7.get(); break;}
|
||||
case 6: {angle = _param_sim_gz_sv_maxa7.get(); break;}
|
||||
|
||||
case 7: {angle = _servo_max_angle_8.get(); break;}
|
||||
case 7: {angle = _param_sim_gz_sv_maxa8.get(); break;}
|
||||
|
||||
default: {angle = NAN; break;}
|
||||
}
|
||||
@@ -75,21 +75,21 @@ GZMixingInterfaceServo::get_servo_angle_min(const size_t index)
|
||||
float angle;
|
||||
|
||||
switch (index) {
|
||||
case 0: {angle = _servo_min_angle_1.get(); break;}
|
||||
case 0: {angle = _param_sim_gz_sv_mina1.get(); break;}
|
||||
|
||||
case 1: {angle = _servo_min_angle_2.get(); break;}
|
||||
case 1: {angle = _param_sim_gz_sv_mina2.get(); break;}
|
||||
|
||||
case 2: {angle = _servo_min_angle_3.get(); break;}
|
||||
case 2: {angle = _param_sim_gz_sv_mina3.get(); break;}
|
||||
|
||||
case 3: {angle = _servo_min_angle_4.get(); break;}
|
||||
case 3: {angle = _param_sim_gz_sv_mina4.get(); break;}
|
||||
|
||||
case 4: {angle = _servo_min_angle_5.get(); break;}
|
||||
case 4: {angle = _param_sim_gz_sv_mina5.get(); break;}
|
||||
|
||||
case 5: {angle = _servo_min_angle_6.get(); break;}
|
||||
case 5: {angle = _param_sim_gz_sv_mina6.get(); break;}
|
||||
|
||||
case 6: {angle = _servo_min_angle_7.get(); break;}
|
||||
case 6: {angle = _param_sim_gz_sv_mina7.get(); break;}
|
||||
|
||||
case 7: {angle = _servo_min_angle_8.get(); break;}
|
||||
case 7: {angle = _param_sim_gz_sv_mina8.get(); break;}
|
||||
|
||||
default: {angle = NAN; break;}
|
||||
|
||||
|
||||
@@ -90,21 +90,21 @@ private:
|
||||
std::vector<double> _angular_range_rad;
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA1>) _servo_max_angle_1,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA1>) _servo_min_angle_1,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA2>) _servo_max_angle_2,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA2>) _servo_min_angle_2,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA3>) _servo_max_angle_3,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA3>) _servo_min_angle_3,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA4>) _servo_max_angle_4,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA4>) _servo_min_angle_4,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA5>) _servo_max_angle_5,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA5>) _servo_min_angle_5,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA6>) _servo_max_angle_6,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA6>) _servo_min_angle_6,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA7>) _servo_max_angle_7,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA7>) _servo_min_angle_7,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA8>) _servo_max_angle_8,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA8>) _servo_min_angle_8
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA1>) _param_sim_gz_sv_maxa1,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA1>) _param_sim_gz_sv_mina1,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA2>) _param_sim_gz_sv_maxa2,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA2>) _param_sim_gz_sv_mina2,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA3>) _param_sim_gz_sv_maxa3,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA3>) _param_sim_gz_sv_mina3,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA4>) _param_sim_gz_sv_maxa4,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA4>) _param_sim_gz_sv_mina4,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA5>) _param_sim_gz_sv_maxa5,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA5>) _param_sim_gz_sv_mina5,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA6>) _param_sim_gz_sv_maxa6,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA6>) _param_sim_gz_sv_mina6,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA7>) _param_sim_gz_sv_maxa7,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA7>) _param_sim_gz_sv_mina7,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MAXA8>) _param_sim_gz_sv_maxa8,
|
||||
(ParamFloat<px4::params::SIM_GZ_SV_MINA8>) _param_sim_gz_sv_mina8
|
||||
)
|
||||
};
|
||||
@@ -126,10 +126,10 @@ void SensorBaroSim::Run()
|
||||
const float absolute_pressure_noisy = absolute_pressure + abs_pressure_noise + _baro_drift_pa;
|
||||
|
||||
// Apply pressure offset
|
||||
float pressure = absolute_pressure_noisy + _sim_baro_off_p.get();
|
||||
float pressure = absolute_pressure_noisy + _param_sim_baro_off_p.get();
|
||||
|
||||
// calculate temperature in Celsius
|
||||
float temperature = temperature_local - 273.0f + _sim_baro_off_t.get();
|
||||
float temperature = temperature_local - 273.0f + _param_sim_baro_off_t.get();
|
||||
|
||||
// Store values for stuck mode
|
||||
_last_pressure = pressure;
|
||||
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
perf_counter_t _loop_perf{perf_alloc(PC_ELAPSED, MODULE_NAME": cycle")};
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamFloat<px4::params::SIM_BARO_OFF_P>) _sim_baro_off_p,
|
||||
(ParamFloat<px4::params::SIM_BARO_OFF_T>) _sim_baro_off_t
|
||||
(ParamFloat<px4::params::SIM_BARO_OFF_P>) _param_sim_baro_off_p,
|
||||
(ParamFloat<px4::params::SIM_BARO_OFF_T>) _param_sim_baro_off_t
|
||||
)
|
||||
};
|
||||
@@ -122,7 +122,7 @@ void SensorGpsSim::Run()
|
||||
|
||||
sensor_gnss_s sensor_gnss{};
|
||||
|
||||
if (_sim_gps_used.get() >= 4) {
|
||||
if (_param_sim_gps_used.get() >= 4) {
|
||||
// fix: RTK fixed while corrections are flowing, 3D otherwise
|
||||
sensor_gnss.fix_type = rtk ? sensor_gnss_s::FIX_TYPE_RTK_FIXED : sensor_gnss_s::FIX_TYPE_3D;
|
||||
sensor_gnss.speed_accuracy = 0.4f;
|
||||
@@ -163,12 +163,12 @@ void SensorGpsSim::Run()
|
||||
sensor_gnss.jamming_state = 0;
|
||||
sensor_gnss.spoofing_state = 0;
|
||||
sensor_gnss.vel_ned_valid = true;
|
||||
sensor_gnss.satellites_used = _sim_gps_used.get();
|
||||
sensor_gnss.satellites_used = _param_sim_gps_used.get();
|
||||
|
||||
publishWithFailures(0, sensor_gnss, _sensor_gnss_pub);
|
||||
|
||||
const float gnss1_offx = _param_gnss1_offx.get();
|
||||
const float gnss1_offy = _param_gnss1_offy.get();
|
||||
const float gnss1_offx = _param_sens_gnss1_offx.get();
|
||||
const float gnss1_offy = _param_sens_gnss1_offy.get();
|
||||
|
||||
if (fabsf(gnss1_offx) > 0.f || fabsf(gnss1_offy) > 0.f) {
|
||||
sensor_gnss_s gnss1 = sensor_gnss;
|
||||
|
||||
@@ -119,8 +119,8 @@ private:
|
||||
static constexpr float _vel_markov_time{0.54f};
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamInt<px4::params::SIM_GPS_USED>) _sim_gps_used,
|
||||
(ParamFloat<px4::params::SENS_GNSS1_OFFX>) _param_gnss1_offx,
|
||||
(ParamFloat<px4::params::SENS_GNSS1_OFFY>) _param_gnss1_offy
|
||||
(ParamInt<px4::params::SIM_GPS_USED>) _param_sim_gps_used,
|
||||
(ParamFloat<px4::params::SENS_GNSS1_OFFX>) _param_sens_gnss1_offx,
|
||||
(ParamFloat<px4::params::SENS_GNSS1_OFFY>) _param_sens_gnss1_offy
|
||||
)
|
||||
};
|
||||
@@ -119,9 +119,9 @@ void SensorMagSim::Run()
|
||||
Vector3f expected_field = Dcmf{Quatf{attitude.q}} .transpose() * _mag_earth_pred;
|
||||
|
||||
expected_field += math::noiseGauss3f(0.02f, 0.02f, 0.03f);
|
||||
expected_field += Vector3f(_sim_mag_offset_x.get(),
|
||||
_sim_mag_offset_y.get(),
|
||||
_sim_mag_offset_z.get());
|
||||
expected_field += Vector3f(_param_sim_mag_offset_x.get(),
|
||||
_param_sim_mag_offset_y.get(),
|
||||
_param_sim_mag_offset_z.get());
|
||||
|
||||
if (_mag_stuck && _last_field_valid) {
|
||||
// Replay the last field seen before the failure was injected
|
||||
|
||||
@@ -93,8 +93,8 @@ private:
|
||||
perf_counter_t _loop_perf{perf_alloc(PC_ELAPSED, MODULE_NAME": cycle")};
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamFloat<px4::params::SIM_MAG_OFFSET_X>) _sim_mag_offset_x,
|
||||
(ParamFloat<px4::params::SIM_MAG_OFFSET_Y>) _sim_mag_offset_y,
|
||||
(ParamFloat<px4::params::SIM_MAG_OFFSET_Z>) _sim_mag_offset_z
|
||||
(ParamFloat<px4::params::SIM_MAG_OFFSET_X>) _param_sim_mag_offset_x,
|
||||
(ParamFloat<px4::params::SIM_MAG_OFFSET_Y>) _param_sim_mag_offset_y,
|
||||
(ParamFloat<px4::params::SIM_MAG_OFFSET_Z>) _param_sim_mag_offset_z
|
||||
)
|
||||
};
|
||||
@@ -105,13 +105,13 @@ void Sih::run()
|
||||
_px4_gyro.set_temperature(T1_C);
|
||||
|
||||
// the vehicle type is needed by parameters_updated() to place the vehicle on the terrain
|
||||
_vehicle = static_cast<VehicleType>(constrain(_sih_vtype.get(),
|
||||
_vehicle = static_cast<VehicleType>(constrain(_param_sih_vehicle_type.get(),
|
||||
static_cast<int32_t>(VehicleType::First),
|
||||
static_cast<int32_t>(VehicleType::Last)));
|
||||
|
||||
parameters_updated();
|
||||
|
||||
if (_sih_optical_flow_en.get()) {
|
||||
if (_param_sih_of_en.get()) {
|
||||
// Advertise before the simulated clock starts running: the sensors module brings up its
|
||||
// optical flow pipeline when the topic first appears, and it only looks for it while
|
||||
// updating its parameters. Advertising here makes it visible for the startup scan even
|
||||
@@ -145,7 +145,7 @@ static uint64_t micros()
|
||||
|
||||
void Sih::lockstep_loop()
|
||||
{
|
||||
int rate = math::min(_imu_gyro_ratemax.get(), _imu_integration_rate.get());
|
||||
int rate = math::min(_param_imu_gyro_ratemax.get(), _param_imu_integ_rate.get());
|
||||
|
||||
// default to 400Hz (2500 us interval)
|
||||
if (rate <= 0) {
|
||||
@@ -235,7 +235,7 @@ static void timer_callback(void *sem)
|
||||
|
||||
void Sih::realtime_loop()
|
||||
{
|
||||
int rate = _imu_gyro_ratemax.get();
|
||||
int rate = _param_imu_gyro_ratemax.get();
|
||||
|
||||
// default to 250 Hz (4000 us interval)
|
||||
if (rate <= 0) {
|
||||
@@ -333,7 +333,7 @@ void Sih::sensor_step()
|
||||
}
|
||||
|
||||
// distance sensor published at 50 Hz
|
||||
if (_sih_distance_snsr_en.get() && now - _dist_snsr_time >= 20_ms) {
|
||||
if (_param_sih_distsnsr_en.get() && now - _dist_snsr_time >= 20_ms) {
|
||||
_dist_snsr_time = now;
|
||||
send_dist_snsr(now);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ void Sih::sensor_step()
|
||||
// once the control pipeline is alive. Publishing while the system is still starting up
|
||||
// races with the sensors module bringing up its optical flow pipeline and deadlocks the
|
||||
// simulation, as this thread is the one advancing the lockstep clock.
|
||||
if (_sih_optical_flow_en.get()) {
|
||||
if (_param_sih_of_en.get()) {
|
||||
if (_last_actuator_output_time > 0) {
|
||||
accumulate_optical_flow(dt);
|
||||
|
||||
@@ -370,54 +370,54 @@ void Sih::sensor_step()
|
||||
|
||||
void Sih::parameters_updated()
|
||||
{
|
||||
_T_MAX = _sih_t_max.get();
|
||||
_Q_MAX = _sih_q_max.get();
|
||||
_L_ROLL = _sih_l_roll.get();
|
||||
_L_PITCH = _sih_l_pitch.get();
|
||||
_KDV = _sih_kdv.get();
|
||||
_KDW = _sih_kdw.get();
|
||||
_F_T_MAX = _sih_f_thrust_max.get();
|
||||
_F_Q_MAX = _sih_f_torque_max.get();
|
||||
_T_MAX = _param_sih_t_max.get();
|
||||
_Q_MAX = _param_sih_q_max.get();
|
||||
_L_ROLL = _param_sih_l_roll.get();
|
||||
_L_PITCH = _param_sih_l_pitch.get();
|
||||
_KDV = _param_sih_kdv.get();
|
||||
_KDW = _param_sih_kdw.get();
|
||||
_F_T_MAX = _param_sih_f_t_max.get();
|
||||
_F_Q_MAX = _param_sih_f_q_max.get();
|
||||
|
||||
// update the thruster models
|
||||
for (size_t i = 0; i < NUM_DYN_THRUSTER; i++) {
|
||||
if (_sih_f_ct0.get() > 0.0f && _sih_f_cp0.get() > 0.0f) {
|
||||
_thruster[i] = Thruster(_sih_forward_diameter_inch.get(), _sih_forward_rpm_max.get(),
|
||||
_sih_f_ct0.get(), _sih_f_ct1.get(), _sih_f_ct2.get(),
|
||||
_sih_f_cp0.get(), _sih_f_cp1.get(), _sih_f_cp2.get());
|
||||
if (_param_sih_f_ct0.get() > 0.0f && _param_sih_f_cp0.get() > 0.0f) {
|
||||
_thruster[i] = Thruster(_param_sih_f_dia_inch.get(), _param_sih_f_rpm_max.get(),
|
||||
_param_sih_f_ct0.get(), _param_sih_f_ct1.get(), _param_sih_f_ct2.get(),
|
||||
_param_sih_f_cp0.get(), _param_sih_f_cp1.get(), _param_sih_f_cp2.get());
|
||||
|
||||
} else {
|
||||
_thruster[i] = Thruster(_F_T_MAX, _F_Q_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
if (_sih_f_ct0.get() > 0.0f && _sih_f_cp0.get() > 0.0f) {
|
||||
if (_param_sih_f_ct0.get() > 0.0f && _param_sih_f_cp0.get() > 0.0f) {
|
||||
_F_T_MAX = _thruster[0].get_T_max();
|
||||
_F_Q_MAX = _thruster[0].get_Q_max();
|
||||
|
||||
if (fabsf(_F_T_MAX - _sih_f_thrust_max.get()) > 1.0e-5f) {
|
||||
_sih_f_thrust_max.set(_F_T_MAX);
|
||||
_sih_f_thrust_max.commit();
|
||||
if (fabsf(_F_T_MAX - _param_sih_f_t_max.get()) > 1.0e-5f) {
|
||||
_param_sih_f_t_max.set(_F_T_MAX);
|
||||
_param_sih_f_t_max.commit();
|
||||
PX4_INFO("SIH_F_CT0 > 0, using propeller dynamic model, overriding SIH_F_T_MAX");
|
||||
}
|
||||
|
||||
if (fabsf(_F_Q_MAX - _sih_f_torque_max.get()) > 1.0e-5f) {
|
||||
_sih_f_torque_max.set(_F_Q_MAX);
|
||||
_sih_f_torque_max.commit();
|
||||
if (fabsf(_F_Q_MAX - _param_sih_f_q_max.get()) > 1.0e-5f) {
|
||||
_param_sih_f_q_max.set(_F_Q_MAX);
|
||||
_param_sih_f_q_max.commit();
|
||||
PX4_INFO("SIH_F_CP0 > 0, using propeller dynamic model, overriding SIH_F_Q_MAX");
|
||||
}
|
||||
}
|
||||
|
||||
if (!_lpos_ref.isInitialized()
|
||||
|| (fabsf(static_cast<float>(_lpos_ref.getProjectionReferenceLat()) - _sih_lat0.get()) > FLT_EPSILON)
|
||||
|| (fabsf(static_cast<float>(_lpos_ref.getProjectionReferenceLon()) - _sih_lon0.get()) > FLT_EPSILON)
|
||||
|| (fabsf(_terrain.defaultAltitude() - _sih_h0.get()) > FLT_EPSILON)) {
|
||||
const double lat0 = static_cast<double>(_sih_lat0.get());
|
||||
const double lon0 = static_cast<double>(_sih_lon0.get());
|
||||
|| (fabsf(static_cast<float>(_lpos_ref.getProjectionReferenceLat()) - _param_sih_loc_lat0.get()) > FLT_EPSILON)
|
||||
|| (fabsf(static_cast<float>(_lpos_ref.getProjectionReferenceLon()) - _param_sih_loc_lon0.get()) > FLT_EPSILON)
|
||||
|| (fabsf(_terrain.defaultAltitude() - _param_sih_loc_h0.get()) > FLT_EPSILON)) {
|
||||
const double lat0 = static_cast<double>(_param_sih_loc_lat0.get());
|
||||
const double lon0 = static_cast<double>(_param_sih_loc_lon0.get());
|
||||
_lpos_ref.initReference(lat0, lon0);
|
||||
|
||||
// start on the ground: flat at SIH_LOC_H0, or on the terrain model
|
||||
_terrain.setDefaultAltitude(_sih_h0.get());
|
||||
_terrain.setDefaultAltitude(_param_sih_loc_h0.get());
|
||||
_lpos_ref_alt = _terrain.vehicleGroundAltitude(lat0, lon0);
|
||||
_ground_alt = _lpos_ref_alt;
|
||||
|
||||
@@ -430,33 +430,33 @@ void Sih::parameters_updated()
|
||||
const Dcmf R_E2N = _lla.computeRotEcefToNed();
|
||||
_R_N2E = R_E2N.transpose();
|
||||
_v_E = _R_N2E * _v_N;
|
||||
_q = Quatf(Eulerf(0.f, 0.f, _sih_yaw0.get()));
|
||||
_q = Quatf(Eulerf(0.f, 0.f, _param_sih_loc_yaw0.get()));
|
||||
_q_E = Quatf(_R_N2E) * _q;
|
||||
_q_E.normalize();
|
||||
}
|
||||
|
||||
_MASS = _sih_mass.get();
|
||||
_MASS = _param_sih_mass.get();
|
||||
|
||||
_I = diag(Vector3f(_sih_ixx.get(), _sih_iyy.get(), _sih_izz.get()));
|
||||
_I(0, 1) = _I(1, 0) = _sih_ixy.get();
|
||||
_I(0, 2) = _I(2, 0) = _sih_ixz.get();
|
||||
_I(1, 2) = _I(2, 1) = _sih_iyz.get();
|
||||
_I = diag(Vector3f(_param_sih_ixx.get(), _param_sih_iyy.get(), _param_sih_izz.get()));
|
||||
_I(0, 1) = _I(1, 0) = _param_sih_ixy.get();
|
||||
_I(0, 2) = _I(2, 0) = _param_sih_ixz.get();
|
||||
_I(1, 2) = _I(2, 1) = _param_sih_iyz.get();
|
||||
|
||||
// guards against too small determinants
|
||||
_Im1 = 100.0f * inv(static_cast<typeof _I>(100.0f * _I));
|
||||
|
||||
_distance_snsr_min = _sih_distance_snsr_min.get();
|
||||
_distance_snsr_max = _sih_distance_snsr_max.get();
|
||||
_distance_snsr_override = _sih_distance_snsr_override.get();
|
||||
_distance_snsr_noise = _sih_distance_snsr_noise.get();
|
||||
_distance_snsr_min = _param_sih_distsnsr_min.get();
|
||||
_distance_snsr_max = _param_sih_distsnsr_max.get();
|
||||
_distance_snsr_override = _param_sih_distsnsr_ovr.get();
|
||||
_distance_snsr_noise = _param_sih_distsnsr_noi.get();
|
||||
_px4_rangefinder.set_min_distance(_distance_snsr_min);
|
||||
_px4_rangefinder.set_max_distance(_distance_snsr_max);
|
||||
|
||||
_optical_flow_interval_us = static_cast<hrt_abstime>(roundf(1e6f / math::max(_sih_optical_flow_rate.get(), 1.f)));
|
||||
_optical_flow_interval_us = static_cast<hrt_abstime>(roundf(1e6f / math::max(_param_sih_of_rate.get(), 1.f)));
|
||||
|
||||
_T_TAU = _sih_thrust_tau.get();
|
||||
_T_TAU = _param_sih_t_tau.get();
|
||||
|
||||
_v_wind_N = Vector3f(_sih_wind_n.get(), _sih_wind_e.get(), 0.f);
|
||||
_v_wind_N = Vector3f(_param_sih_wind_n.get(), _param_sih_wind_e.get(), 0.f);
|
||||
}
|
||||
|
||||
void Sih::read_motors(const float dt)
|
||||
@@ -534,7 +534,7 @@ void Sih::publish_esc_status()
|
||||
float max_rpm = 10000.f;
|
||||
|
||||
if (_vehicle == VehicleType::FixedWing || _vehicle == VehicleType::TailsitterVTOL || _vehicle == VehicleType::StandardVTOL) {
|
||||
max_rpm = _sih_forward_rpm_max.get();
|
||||
max_rpm = _param_sih_f_rpm_max.get();
|
||||
}
|
||||
|
||||
for (int i = 0; i < NUM_ACTUATORS_MAX && motor_idx < num_motors(); i++) {
|
||||
@@ -713,10 +713,10 @@ void Sih::generate_rover_ackermann_dynamics(const float throttle_cmd, const floa
|
||||
// Link: https://srianumakonda.medium.com/everything-you-need-to-know-about-self-driving-in-30-minutes-b38d68bd3427
|
||||
const float a_y = C * delta / _MASS - fabsf(v_B(0)) * _w_B(2)
|
||||
- 2 * C * v_B(1) / (_MASS * fabsf(v_B(0))); // [m/s^2] Lateral acceleration
|
||||
const float psi_dot_dot = WHEEL_BASE * C * delta / _sih_izz.get()
|
||||
- C * WHEEL_BASE * WHEEL_BASE * _w_B(2) / (_sih_izz.get() * fabsf(v_B(0))); // [rad/s^2] Yaw acceleration
|
||||
const float psi_dot_dot = WHEEL_BASE * C * delta / _param_sih_izz.get()
|
||||
- C * WHEEL_BASE * WHEEL_BASE * _w_B(2) / (_param_sih_izz.get() * fabsf(v_B(0))); // [rad/s^2] Yaw acceleration
|
||||
F_y = _MASS * a_y; // Lateral force [N]
|
||||
M_z = _sih_izz.get() * psi_dot_dot; // [Nm] Yaw moment
|
||||
M_z = _param_sih_izz.get() * psi_dot_dot; // [Nm] Yaw moment
|
||||
}
|
||||
|
||||
_T_B = Vector3f(F_x, F_y, 0.f);
|
||||
@@ -1096,9 +1096,9 @@ void Sih::accumulate_optical_flow(const float dt)
|
||||
// value is produced by a right handed rotation of the sensor about the body axis, which
|
||||
// gives the translation over the ground the opposite sign (see the flow observation model
|
||||
// in the EKF).
|
||||
const float distance = ground_distance(_sih_optical_flow_h_max.get());
|
||||
const float distance = ground_distance(_param_sih_of_h_max.get());
|
||||
|
||||
if (!PX4_ISFINITE(distance) || distance > _sih_optical_flow_h_max.get()) {
|
||||
if (!PX4_ISFINITE(distance) || distance > _param_sih_of_h_max.get()) {
|
||||
// too high above the ground, or not looking at it: no image to track
|
||||
_optical_flow_tracking = false;
|
||||
_optical_flow_dt += dt;
|
||||
@@ -1142,7 +1142,7 @@ void Sih::send_optical_flow(const hrt_abstime &time_now_us)
|
||||
|
||||
if (tracking) {
|
||||
// white noise on the flow rate estimate, integrated over the interval
|
||||
pixel_flow += Vector2f(generate_wgn(), generate_wgn()) * (_sih_optical_flow_noise.get() * integration_time);
|
||||
pixel_flow += Vector2f(generate_wgn(), generate_wgn()) * (_param_sih_of_noise.get() * integration_time);
|
||||
flow.quality = UINT8_MAX;
|
||||
|
||||
} else {
|
||||
@@ -1162,7 +1162,7 @@ void Sih::send_optical_flow(const hrt_abstime &time_now_us)
|
||||
|
||||
flow.max_flow_rate = FLOW_MAX_RATE;
|
||||
flow.min_ground_distance = 0.f;
|
||||
flow.max_ground_distance = _sih_optical_flow_h_max.get();
|
||||
flow.max_ground_distance = _param_sih_of_h_max.get();
|
||||
flow.mode = sensor_optical_flow_s::MODE_LOWLIGHT;
|
||||
flow.error_count = 0;
|
||||
|
||||
@@ -1180,7 +1180,7 @@ void Sih::send_ranging_beacon(const hrt_abstime &time_now_us)
|
||||
for (uint8_t i = 0; i < NUM_RANGING_BEACONS; i++) {
|
||||
_lpos_ref.reproject(RANGING_BEACON_OFFSETS[i].north_m, RANGING_BEACON_OFFSETS[i].east_m,
|
||||
_ranging_beacons[i].lat_deg, _ranging_beacons[i].lon_deg);
|
||||
_ranging_beacons[i].alt_m = _sih_h0.get() + RANGING_BEACON_OFFSETS[i].alt_offset_m;
|
||||
_ranging_beacons[i].alt_m = _param_sih_loc_h0.get() + RANGING_BEACON_OFFSETS[i].alt_offset_m;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1192,7 +1192,7 @@ void Sih::send_ranging_beacon(const hrt_abstime &time_now_us)
|
||||
const matrix::Vector3d delta_ecef = beacon_ecef - _p_E;
|
||||
const double true_range_m = delta_ecef.norm();
|
||||
|
||||
const float noise_std = _sih_ranging_beacon_noise.get();
|
||||
const float noise_std = _param_sih_rngbc_noise.get();
|
||||
const float noise_m = (noise_std > 0.f) ? math::generate_wgn() * noise_std : 0.f;
|
||||
const double measured_range_m = math::max(0.0, true_range_m + static_cast<double>(noise_m));
|
||||
|
||||
|
||||
@@ -383,50 +383,50 @@ private:
|
||||
|
||||
// parameters defined in sih_params.c
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamInt<px4::params::IMU_GYRO_RATEMAX>) _imu_gyro_ratemax,
|
||||
(ParamInt<px4::params::IMU_INTEG_RATE>) _imu_integration_rate,
|
||||
(ParamFloat<px4::params::SIH_MASS>) _sih_mass,
|
||||
(ParamFloat<px4::params::SIH_IXX>) _sih_ixx,
|
||||
(ParamFloat<px4::params::SIH_IYY>) _sih_iyy,
|
||||
(ParamFloat<px4::params::SIH_IZZ>) _sih_izz,
|
||||
(ParamFloat<px4::params::SIH_IXY>) _sih_ixy,
|
||||
(ParamFloat<px4::params::SIH_IXZ>) _sih_ixz,
|
||||
(ParamFloat<px4::params::SIH_IYZ>) _sih_iyz,
|
||||
(ParamFloat<px4::params::SIH_T_MAX>) _sih_t_max,
|
||||
(ParamFloat<px4::params::SIH_Q_MAX>) _sih_q_max,
|
||||
(ParamFloat<px4::params::SIH_L_ROLL>) _sih_l_roll,
|
||||
(ParamFloat<px4::params::SIH_L_PITCH>) _sih_l_pitch,
|
||||
(ParamFloat<px4::params::SIH_KDV>) _sih_kdv,
|
||||
(ParamFloat<px4::params::SIH_KDW>) _sih_kdw,
|
||||
(ParamFloat<px4::params::SIH_LOC_LAT0>) _sih_lat0,
|
||||
(ParamFloat<px4::params::SIH_LOC_LON0>) _sih_lon0,
|
||||
(ParamFloat<px4::params::SIH_LOC_H0>) _sih_h0,
|
||||
(ParamFloat<px4::params::SIH_LOC_YAW0>) _sih_yaw0,
|
||||
(ParamInt<px4::params::SIH_DISTSNSR_EN>) _sih_distance_snsr_en,
|
||||
(ParamFloat<px4::params::SIH_DISTSNSR_MIN>) _sih_distance_snsr_min,
|
||||
(ParamFloat<px4::params::SIH_DISTSNSR_MAX>) _sih_distance_snsr_max,
|
||||
(ParamFloat<px4::params::SIH_DISTSNSR_OVR>) _sih_distance_snsr_override,
|
||||
(ParamFloat<px4::params::SIH_DISTSNSR_NOI>) _sih_distance_snsr_noise,
|
||||
(ParamInt<px4::params::SIH_OF_EN>) _sih_optical_flow_en,
|
||||
(ParamFloat<px4::params::SIH_OF_RATE>) _sih_optical_flow_rate,
|
||||
(ParamFloat<px4::params::SIH_OF_NOISE>) _sih_optical_flow_noise,
|
||||
(ParamFloat<px4::params::SIH_OF_H_MAX>) _sih_optical_flow_h_max,
|
||||
(ParamFloat<px4::params::SIH_T_TAU>) _sih_thrust_tau,
|
||||
(ParamInt<px4::params::IMU_GYRO_RATEMAX>) _param_imu_gyro_ratemax,
|
||||
(ParamInt<px4::params::IMU_INTEG_RATE>) _param_imu_integ_rate,
|
||||
(ParamFloat<px4::params::SIH_MASS>) _param_sih_mass,
|
||||
(ParamFloat<px4::params::SIH_IXX>) _param_sih_ixx,
|
||||
(ParamFloat<px4::params::SIH_IYY>) _param_sih_iyy,
|
||||
(ParamFloat<px4::params::SIH_IZZ>) _param_sih_izz,
|
||||
(ParamFloat<px4::params::SIH_IXY>) _param_sih_ixy,
|
||||
(ParamFloat<px4::params::SIH_IXZ>) _param_sih_ixz,
|
||||
(ParamFloat<px4::params::SIH_IYZ>) _param_sih_iyz,
|
||||
(ParamFloat<px4::params::SIH_T_MAX>) _param_sih_t_max,
|
||||
(ParamFloat<px4::params::SIH_Q_MAX>) _param_sih_q_max,
|
||||
(ParamFloat<px4::params::SIH_L_ROLL>) _param_sih_l_roll,
|
||||
(ParamFloat<px4::params::SIH_L_PITCH>) _param_sih_l_pitch,
|
||||
(ParamFloat<px4::params::SIH_KDV>) _param_sih_kdv,
|
||||
(ParamFloat<px4::params::SIH_KDW>) _param_sih_kdw,
|
||||
(ParamFloat<px4::params::SIH_LOC_LAT0>) _param_sih_loc_lat0,
|
||||
(ParamFloat<px4::params::SIH_LOC_LON0>) _param_sih_loc_lon0,
|
||||
(ParamFloat<px4::params::SIH_LOC_H0>) _param_sih_loc_h0,
|
||||
(ParamFloat<px4::params::SIH_LOC_YAW0>) _param_sih_loc_yaw0,
|
||||
(ParamInt<px4::params::SIH_DISTSNSR_EN>) _param_sih_distsnsr_en,
|
||||
(ParamFloat<px4::params::SIH_DISTSNSR_MIN>) _param_sih_distsnsr_min,
|
||||
(ParamFloat<px4::params::SIH_DISTSNSR_MAX>) _param_sih_distsnsr_max,
|
||||
(ParamFloat<px4::params::SIH_DISTSNSR_OVR>) _param_sih_distsnsr_ovr,
|
||||
(ParamFloat<px4::params::SIH_DISTSNSR_NOI>) _param_sih_distsnsr_noi,
|
||||
(ParamInt<px4::params::SIH_OF_EN>) _param_sih_of_en,
|
||||
(ParamFloat<px4::params::SIH_OF_RATE>) _param_sih_of_rate,
|
||||
(ParamFloat<px4::params::SIH_OF_NOISE>) _param_sih_of_noise,
|
||||
(ParamFloat<px4::params::SIH_OF_H_MAX>) _param_sih_of_h_max,
|
||||
(ParamFloat<px4::params::SIH_T_TAU>) _param_sih_t_tau,
|
||||
// forward propeller
|
||||
(ParamFloat<px4::params::SIH_F_T_MAX>) _sih_f_thrust_max,
|
||||
(ParamFloat<px4::params::SIH_F_Q_MAX>) _sih_f_torque_max,
|
||||
(ParamFloat<px4::params::SIH_F_CT0>) _sih_f_ct0,
|
||||
(ParamFloat<px4::params::SIH_F_CT1>) _sih_f_ct1,
|
||||
(ParamFloat<px4::params::SIH_F_CT2>) _sih_f_ct2,
|
||||
(ParamFloat<px4::params::SIH_F_CP0>) _sih_f_cp0,
|
||||
(ParamFloat<px4::params::SIH_F_CP1>) _sih_f_cp1,
|
||||
(ParamFloat<px4::params::SIH_F_CP2>) _sih_f_cp2,
|
||||
(ParamFloat<px4::params::SIH_F_DIA_INCH>) _sih_forward_diameter_inch,
|
||||
(ParamFloat<px4::params::SIH_F_RPM_MAX>) _sih_forward_rpm_max,
|
||||
(ParamInt<px4::params::BAT1_SOURCE>) _bat1_source,
|
||||
(ParamInt<px4::params::SIH_VEHICLE_TYPE>) _sih_vtype,
|
||||
(ParamFloat<px4::params::SIH_WIND_N>) _sih_wind_n,
|
||||
(ParamFloat<px4::params::SIH_WIND_E>) _sih_wind_e,
|
||||
(ParamFloat<px4::params::SIH_RNGBC_NOISE>) _sih_ranging_beacon_noise
|
||||
(ParamFloat<px4::params::SIH_F_T_MAX>) _param_sih_f_t_max,
|
||||
(ParamFloat<px4::params::SIH_F_Q_MAX>) _param_sih_f_q_max,
|
||||
(ParamFloat<px4::params::SIH_F_CT0>) _param_sih_f_ct0,
|
||||
(ParamFloat<px4::params::SIH_F_CT1>) _param_sih_f_ct1,
|
||||
(ParamFloat<px4::params::SIH_F_CT2>) _param_sih_f_ct2,
|
||||
(ParamFloat<px4::params::SIH_F_CP0>) _param_sih_f_cp0,
|
||||
(ParamFloat<px4::params::SIH_F_CP1>) _param_sih_f_cp1,
|
||||
(ParamFloat<px4::params::SIH_F_CP2>) _param_sih_f_cp2,
|
||||
(ParamFloat<px4::params::SIH_F_DIA_INCH>) _param_sih_f_dia_inch,
|
||||
(ParamFloat<px4::params::SIH_F_RPM_MAX>) _param_sih_f_rpm_max,
|
||||
(ParamInt<px4::params::BAT1_SOURCE>) _param_bat1_source,
|
||||
(ParamInt<px4::params::SIH_VEHICLE_TYPE>) _param_sih_vehicle_type,
|
||||
(ParamFloat<px4::params::SIH_WIND_N>) _param_sih_wind_n,
|
||||
(ParamFloat<px4::params::SIH_WIND_E>) _param_sih_wind_e,
|
||||
(ParamFloat<px4::params::SIH_RNGBC_NOISE>) _param_sih_rngbc_noise
|
||||
)
|
||||
};
|
||||
Reference in new issue
Block a user