AP_NavEKF : Fix bug in reset of GPS glitch offset

The GPS glitch offset was being zeroed during position resets. This caused the filter to reject subsequent GPS measurements if the GPS error persisted long enough to invoke a timeout and a position reset.
This commit is contained in:
priseborough 2014-10-03 05:51:24 +10:00 committed by Andrew Tridgell
parent b3bbec24e4
commit 8aa267f75f

View File

@ -411,8 +411,6 @@ void NavEKF::ResetPosition(void)
state.position.x = gpsPosNE.x + gpsPosGlitchOffsetNE.x + 0.001f*velNED.x*float(_msecPosDelay);
state.position.y = gpsPosNE.y + gpsPosGlitchOffsetNE.y + 0.001f*velNED.y*float(_msecPosDelay);
}
// reset the glitch ofset correction states
gpsPosGlitchOffsetNE.zero();
// stored horizontal position states to prevent subsequent GPS measurements from being rejected
for (uint8_t i=0; i<=49; i++){
storedStates[i].position[0] = state.position[0];