Skip to content

Commit

Permalink
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 nick-white-helsing committed Dec 10, 2023
1 parent 273e079 commit 16146cb
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 16146cb

Please sign in to comment.