From f208986d4351ad34a63243756f71e991f226bdad Mon Sep 17 00:00:00 2001 From: priseborough Date: Thu, 27 Apr 2017 16:39:49 +1000 Subject: [PATCH] AP_NavEKF3: Reset covariance if bad mag fusion update --- libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp b/libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp index 82ef731ef7..7f1dcfb195 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp +++ b/libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp @@ -695,6 +695,8 @@ void NavEKF3_core::FuseMagnetometer() } else if (obsIndex == 2) { faultStatus.bad_zmag = true; } + CovarianceInit(); + return; } } }