Skip to content

Commit

Permalink
AP_AHRS: don't switch to DCM to get Better GPS if DCM Isn't Using GPS
Browse files Browse the repository at this point in the history
Look at the parameter to see if DCM uses GPS; if not don't prefer DCM for using GPS.
  • Loading branch information
njwhite authored and tridge committed Dec 11, 2023
1 parent 75fca4c commit 8d2d663
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/AP_AHRS/AP_AHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1948,6 +1948,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)) {
Expand Down

0 comments on commit 8d2d663

Please sign in to comment.