From c471b9d31049de30567dc856502ed6f8bde8ddd7 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 efec6b0e9de96..61255e7b06053 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)) {