From e7d927c89959d48758d6d7de0c82b293b0fb0dec Mon Sep 17 00:00:00 2001 From: kamilritz Date: Tue, 17 Sep 2019 13:47:18 +0200 Subject: [PATCH] Stop using bad GPS when we have vision velocity --- EKF/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/control.cpp b/EKF/control.cpp index a599ee7c7d..0fa5fe10b3 100644 --- a/EKF/control.cpp +++ b/EKF/control.cpp @@ -652,7 +652,7 @@ void Ekf::controlGpsFusion() } // Handle the case where we are using GPS and another source of aiding and GPS is failing checks - if (_control_status.flags.gps && gps_checks_failing && (_control_status.flags.opt_flow || _control_status.flags.ev_pos)) { + if (_control_status.flags.gps && gps_checks_failing && (_control_status.flags.opt_flow || _control_status.flags.ev_pos || _control_status.flags.ev_vel)) { _control_status.flags.gps = false; // Reset position state to external vision if we are going to use absolute values if (_control_status.flags.ev_pos && !(_params.fusion_mode & MASK_ROTATE_EV)) {