From f97f0b6ea3daa4c3737c6ddfc3d79698705b2f41 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Sat, 30 Mar 2019 13:46:16 +1100 Subject: [PATCH] EKF: Remove unnecessary code _flt_mag_align_start_time is set on initial alignment and will always be >0 before this check can run --- EKF/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/control.cpp b/EKF/control.cpp index c2de181739..98b602a1aa 100644 --- a/EKF/control.cpp +++ b/EKF/control.cpp @@ -1533,7 +1533,7 @@ void Ekf::controlMagFusion() } } else if (_params.mag_fusion_type == MAG_FUSE_TYPE_3D) { - if (!_control_status.flags.mag_3D && _control_status.flags.yaw_align && (_flt_mag_align_start_time > 0)) { + if (!_control_status.flags.mag_3D && _control_status.flags.yaw_align) { // only commence 3-axis fusion when yaw is aligned and field states set _control_status.flags.mag_3D = true; }