From fe943cf10492833fdbaa9bd131c4a2a69ec8ef32 Mon Sep 17 00:00:00 2001 From: bresch Date: Tue, 11 May 2021 12:04:00 +0200 Subject: [PATCH] mag reset: force align in MC custom mode (aka. indoor mode) Checking the parameter is enough to decide if we want to force the yaw alignment or not --- EKF/ekf_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/ekf_helper.cpp b/EKF/ekf_helper.cpp index 0f39a9aec9..68d01bfbf2 100644 --- a/EKF/ekf_helper.cpp +++ b/EKF/ekf_helper.cpp @@ -503,7 +503,7 @@ bool Ekf::resetMagHeading(const Vector3f &mag_init, bool increase_yaw_var, bool yaw_new_variance = sq(fmaxf(_params.mag_heading_noise, 1.0e-2f)); } - } else if (_params.mag_fusion_type == MAG_FUSE_TYPE_INDOOR && _is_yaw_fusion_inhibited) { + } else if (_params.mag_fusion_type == MAG_FUSE_TYPE_INDOOR) { // we are operating temporarily without knowing the earth frame yaw angle return true;