From 4889e8432ce838d70b9fe0355cdf313c91c50e35 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Tue, 15 May 2018 10:28:00 +1000 Subject: [PATCH] EKF: Don't fuse multi rotor drag if yaw angle is bad --- EKF/control.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EKF/control.cpp b/EKF/control.cpp index 3300bef2ae..70779b4c11 100644 --- a/EKF/control.cpp +++ b/EKF/control.cpp @@ -1199,7 +1199,8 @@ void Ekf::controlBetaFusion() void Ekf::controlDragFusion() { if (_params.fusion_mode & MASK_USE_DRAG) { - if (_control_status.flags.in_air) { + if (_control_status.flags.in_air + && !_mag_inhibit_yaw_reset_req) { if (!_control_status.flags.wind) { // reset the wind states and covariances when starting drag accel fusion _control_status.flags.wind = true;