ekf2: allow filter init with only IMU (#21041)

- if mag enabled heading init is now pushed to controlMagFusion()
This commit is contained in:
Daniel Agar
2023-02-13 22:07:15 -05:00
committed by GitHub
parent d69d99b191
commit 2ea25804a1
9 changed files with 798 additions and 800 deletions
+6
View File
@@ -556,6 +556,12 @@ void Ekf::resetQuatCov()
rot_vec_var.setAll(sq(_params.initial_tilt_err));
initialiseQuatCovariances(rot_vec_var);
// update the yaw angle variance using the variance of the measurement
if (_params.mag_fusion_type <= MagFuseType::MAG_3D) {
// using magnetic heading tuning parameter
increaseQuatYawErrVariance(sq(fmaxf(_params.mag_heading_noise, 1.0e-2f)));
}
}
void Ekf::zeroQuatCov()