mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-03 06:50:59 +08:00
fix(ekf2): dont adjust inactive height bias estimators on altitude reset
This commit is contained in:
1 parent
242d63f437
commit
854c43dde8
1 file changed
+15
-3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user