fix(ekf2): dont adjust inactive height bias estimators on altitude reset

This commit is contained in:
Marco Hauswirth authored and Marco Hauswirth committed 2026-04-27 09:49:24 +02:00
1 parent 242d63f437
commit 854c43dde8
1 file changed
+15 -3
+15 -3
View File
@@ -201,13 +201,25 @@ void Ekf::resetAltitudeTo(const float new_altitude, float new_vert_pos_var)
updateVerticalPositionResetStatus(delta_z);
#if defined(CONFIG_EKF2_BAROMETER)
_baro_b_est.setBias(_baro_b_est.getBias() + delta_z);
if (_control_status.flags.baro_hgt) {
_baro_b_est.setBias(_baro_b_est.getBias() + delta_z);
}
#endif // CONFIG_EKF2_BAROMETER
#if defined(CONFIG_EKF2_EXTERNAL_VISION)
_ev_hgt_b_est.setBias(_ev_hgt_b_est.getBias() - delta_z);
if (_control_status.flags.ev_hgt) {
_ev_hgt_b_est.setBias(_ev_hgt_b_est.getBias() - delta_z);
}
#endif // CONFIG_EKF2_EXTERNAL_VISION
#if defined(CONFIG_EKF2_GNSS)
_gps_hgt_b_est.setBias(_gps_hgt_b_est.getBias() + delta_z);
if (_control_status.flags.gps_hgt) {
_gps_hgt_b_est.setBias(_gps_hgt_b_est.getBias() + delta_z);
}
#endif // CONFIG_EKF2_GNSS
#if defined(CONFIG_EKF2_TERRAIN)