forked from Archive/PX4-Autopilot
ekf2: fix barometer kconfig
This commit is contained in:
parent
fe3314e33e
commit
4eaa932389
|
@ -65,7 +65,12 @@ void Ekf::initialiseCovariance()
|
|||
P.uncorrelateCovarianceSetVariance<State::vel.dof>(State::vel.idx, Vector3f(vel_var, vel_var, sq(1.5f) * vel_var));
|
||||
|
||||
// position
|
||||
#if defined(CONFIG_EKF2_BAROMETER)
|
||||
float z_pos_var = sq(fmaxf(_params.baro_noise, 0.01f));
|
||||
#else
|
||||
float z_pos_var = sq(1.f);
|
||||
#endif // CONFIG_EKF2_BAROMETER
|
||||
|
||||
#if defined(CONFIG_EKF2_GNSS)
|
||||
const float xy_pos_var = sq(fmaxf(_params.gps_pos_noise, 0.01f));
|
||||
|
||||
|
|
|
@ -563,10 +563,12 @@ bool EstimatorInterface::initialise_interface(uint64_t timestamp)
|
|||
max_time_delay_ms = math::max(_params.auxvel_delay_ms, max_time_delay_ms);
|
||||
#endif // CONFIG_EKF2_AUXVEL
|
||||
|
||||
#if defined(CONFIG_EKF2_BAROMETER)
|
||||
// using baro
|
||||
if (_params.baro_ctrl > 0) {
|
||||
max_time_delay_ms = math::max(_params.baro_delay_ms, max_time_delay_ms);
|
||||
}
|
||||
#endif // CONFIG_EKF2_BAROMETER
|
||||
|
||||
#if defined(CONFIG_EKF2_AIRSPEED)
|
||||
// using airspeed
|
||||
|
|
|
@ -230,7 +230,9 @@ EKF2::~EKF2()
|
|||
perf_free(_ecl_ekf_update_perf);
|
||||
perf_free(_ecl_ekf_update_full_perf);
|
||||
perf_free(_msg_missed_imu_perf);
|
||||
#if defined(CONFIG_EKF2_BAROMETER)
|
||||
perf_free(_msg_missed_air_data_perf);
|
||||
#endif // CONFIG_EKF2_BAROMETER
|
||||
#if defined(CONFIG_EKF2_AIRSPEED)
|
||||
perf_free(_msg_missed_airspeed_perf);
|
||||
#endif // CONFIG_EKF2_AIRSPEED
|
||||
|
@ -399,7 +401,9 @@ int EKF2::print_status()
|
|||
perf_print_counter(_ecl_ekf_update_perf);
|
||||
perf_print_counter(_ecl_ekf_update_full_perf);
|
||||
perf_print_counter(_msg_missed_imu_perf);
|
||||
#if defined(CONFIG_EKF2_BAROMETER)
|
||||
perf_print_counter(_msg_missed_air_data_perf);
|
||||
#endif // CONFIG_EKF2_BAROMETER
|
||||
#if defined(CONFIG_EKF2_AIRSPEED)
|
||||
perf_print_counter(_msg_missed_airspeed_perf);
|
||||
#endif // CONFIG_EKF2_AIRSPEED
|
||||
|
|
Loading…
Reference in New Issue