ekf2: add kconfig for barometer support (enabled by default)

This commit is contained in:
Daniel Agar
2023-09-15 10:02:09 -04:00
parent f0224c5104
commit 1e9f0ad2c6
13 changed files with 168 additions and 64 deletions
@@ -51,7 +51,12 @@ void Ekf::controlBaroHeightFusion()
if (_baro_buffer && _baro_buffer->pop_first_older_than(_time_delayed_us, &baro_sample)) {
#if defined(CONFIG_EKF2_BARO_COMPENSATION)
const float measurement = compensateBaroForDynamicPressure(baro_sample.hgt);
#else
const float measurement = baro_sample.hgt;
#endif
const float measurement_var = sq(_params.baro_noise);
const float innov_gate = fmaxf(_params.baro_innov_gate, 1.f);