mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
AP_NavEKF: Correctly report position timeout when GPS is lost
This commit is contained in:
parent
3e583e3650
commit
1789dc08a3
@ -1928,7 +1928,10 @@ void NavEKF::FuseVelPosNED()
|
|||||||
// use position data if healthy, timed out, or in constant position mode
|
// use position data if healthy, timed out, or in constant position mode
|
||||||
if (posHealth || posTimeout || constPosMode) {
|
if (posHealth || posTimeout || constPosMode) {
|
||||||
posHealth = true;
|
posHealth = true;
|
||||||
posFailTime = imuSampleTime_ms;
|
// We don't reset the failed time if we are in constant position mode
|
||||||
|
if (!constPosMode) {
|
||||||
|
posFailTime = imuSampleTime_ms;
|
||||||
|
}
|
||||||
// if timed out or outside the specified glitch radius, increment the offset applied to GPS data to compensate for large GPS position jumps
|
// if timed out or outside the specified glitch radius, increment the offset applied to GPS data to compensate for large GPS position jumps
|
||||||
if (posTimeout || (maxPosInnov2 > sq(float(_gpsGlitchRadiusMax)))) {
|
if (posTimeout || (maxPosInnov2 > sq(float(_gpsGlitchRadiusMax)))) {
|
||||||
gpsPosGlitchOffsetNE.x += posInnov[0];
|
gpsPosGlitchOffsetNE.x += posInnov[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user