From 03ae94706ebf05934826906e28fef052ab3e3a46 Mon Sep 17 00:00:00 2001 From: njwhite Date: Tue, 5 Dec 2023 10:04:41 +0200 Subject: [PATCH] AP_AHRS: Don't Switch to DCM to get Better GPS if DCM Isn't Using GPS Look at the parameter to see if DCM uses GPS; if not don't prefer DCM for using GPS. --- libraries/AP_AHRS/AP_AHRS.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_AHRS/AP_AHRS.cpp b/libraries/AP_AHRS/AP_AHRS.cpp index efec6b0e9d..61255e7b06 100644 --- a/libraries/AP_AHRS/AP_AHRS.cpp +++ b/libraries/AP_AHRS/AP_AHRS.cpp @@ -1974,6 +1974,7 @@ AP_AHRS::EKFType AP_AHRS::_active_EKF_type(void) const // Handle loss of global position when we still have a GPS fix if (hal.util->get_soft_armed() && + (_gps_use != GPSUse::Disable) && should_use_gps && AP::gps().status() >= AP_GPS::GPS_OK_FIX_3D && (!filt_state.flags.using_gps || !filt_state.flags.horiz_pos_abs)) {