Skip to content

Commit

Permalink
AP_NavEKF3: check GPS used before resetting pos due to GPS receiver c…
Browse files Browse the repository at this point in the history
…hange
  • Loading branch information
rmackay9 committed Apr 30, 2020
1 parent f79d5d2 commit 183ce50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ void NavEKF3_core::SelectVelPosFusion()
selectHeightForFusion();

// if we are using GPS, check for a change in receiver and reset position and height
if (gpsDataToFuse && PV_AidingMode == AID_ABSOLUTE && gpsDataDelayed.sensor_idx != last_gps_idx) {
if (gpsDataToFuse && (PV_AidingMode == AID_ABSOLUTE) && (frontend->_fusionModeGPS != 3) && (gpsDataDelayed.sensor_idx != last_gps_idx)) {
// record the ID of the GPS that we are using for the reset
last_gps_idx = gpsDataDelayed.sensor_idx;

Expand Down

0 comments on commit 183ce50

Please sign in to comment.