mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 12:13:34 +08:00
EKF: Ensure mag field state covariance data is always available for re-use
Prevents use of _saved_mag_ef_covmat and _saved_mag_bf_variance before being initialised or when stale.
This commit is contained in:
committed by
Daniel Agar
parent
8839e4e1f4
commit
708c79eb8f
@@ -892,6 +892,9 @@ void Ekf::resetMagCovariance()
|
||||
|
||||
// Fuse the declination angle to prevent rapid rotation of earth field vector estimates
|
||||
fuseDeclination(0.02f);
|
||||
|
||||
// save covariance data for re-use when auto-switching between heading and 3-axis fusion
|
||||
save_mag_cov_data();
|
||||
}
|
||||
|
||||
void Ekf::resetWindCovariance()
|
||||
|
||||
Reference in New Issue
Block a user