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:
Paul Riseborough
2019-01-31 09:53:57 -05:00
committed by Daniel Agar
parent 8839e4e1f4
commit 708c79eb8f
4 changed files with 35 additions and 12 deletions
+3
View File
@@ -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()