mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 13:41:37 +08:00
EKF: handle air data fusion covariance reset consistently
Both the sideslip and airspeed fusion should not be resetting covariances for states they do not modify.
This commit is contained in:
+13
-2
@@ -98,8 +98,19 @@ void Ekf::fuseAirspeed()
|
|||||||
|
|
||||||
} else { // Reset the estimator covarinace matrix
|
} else { // Reset the estimator covarinace matrix
|
||||||
_fault_status.flags.bad_airspeed = true;
|
_fault_status.flags.bad_airspeed = true;
|
||||||
initialiseCovariance();
|
|
||||||
ECL_ERR("EKF airspeed fusion numerical error - covariance reset");
|
// if we are getting aiding from other sources, warn and reset the wind states and covariances only
|
||||||
|
if (update_wind_only) {
|
||||||
|
resetWindStates();
|
||||||
|
resetWindCovariance();
|
||||||
|
ECL_ERR("EKF airspeed fusion badly conditioned - wind covariance reset");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
initialiseCovariance();
|
||||||
|
_state.wind_vel.setZero();
|
||||||
|
ECL_ERR("EKF airspeed fusion badly conditioned - full covariance reset");
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user