From 3fb449295e007676b86d48da865ba51e3507de74 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Mon, 23 May 2016 14:23:08 +1000 Subject: [PATCH] EKF: capture yaw innovation test failures --- EKF/mag_fusion.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EKF/mag_fusion.cpp b/EKF/mag_fusion.cpp index 4356b7a159..966db4172c 100644 --- a/EKF/mag_fusion.cpp +++ b/EKF/mag_fusion.cpp @@ -604,6 +604,7 @@ void Ekf::fuseHeading() // set the magnetometer unhealthy if the test fails if (_yaw_test_ratio > 1.0f) { _mag_healthy = false; + _sensor_fault_status.flags.reject_yaw = true; // if we are in air we don't want to fuse the measurement // we allow to use it when on the ground because the large innovation could be caused @@ -619,6 +620,7 @@ void Ekf::fuseHeading() } else { _mag_healthy = true; + _sensor_fault_status.flags.reject_yaw = false; } // apply covariance correction via P_new = (I -K*H)*P