Skip to content

Commit

Permalink
AP_NavEKF2: switch to optflow if gps is jammed
Browse files Browse the repository at this point in the history
  • Loading branch information
chobitsfan committed Oct 4, 2019
1 parent 49bf0a3 commit 71f83a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ void NavEKF2_core::setAidingMode()
tasTimeout = true;
gpsNotAvailable = true;
} else if (posAidLossCritical) {
if ((frontend->_flowUse & FLOW_USE_NAV) && optFlowDataPresent()) {
PV_AidingMode = AID_NONE;
}
// if the loss of position is critical, declare all sources of position aiding as being timed out
posTimeout = true;
velTimeout = true;
Expand Down

0 comments on commit 71f83a1

Please sign in to comment.