|
|
|
@ -1988,7 +1988,7 @@ void NavEKF::FuseVelPosNED()
@@ -1988,7 +1988,7 @@ void NavEKF::FuseVelPosNED()
|
|
|
|
|
// calculate max valid position innovation squared based on a maximum horizontal inertial nav accel error and GPS noise parameter
|
|
|
|
|
// max inertial nav error is scaled with horizontal g to allow for increased errors when manoeuvring
|
|
|
|
|
float accelScale = (1.0f + 0.1f * accNavMag); |
|
|
|
|
float maxPosInnov2 = sq(_gpsPosInnovGate * _gpsHorizPosNoise + 0.005f * accelScale * float(_gpsGlitchAccelMax) * sq(0.001f * float(imuSampleTime_ms - lastPosPassTime))); |
|
|
|
|
float maxPosInnov2 = sq(_gpsPosInnovGate * _gpsHorizPosNoise) + sq(0.005f * accelScale * float(_gpsGlitchAccelMax) * sq(0.001f * float(imuSampleTime_ms - lastPosPassTime))); |
|
|
|
|
posTestRatio = (sq(innovVelPos[3]) + sq(innovVelPos[4])) / maxPosInnov2; |
|
|
|
|
posHealth = ((posTestRatio < 1.0f) || badIMUdata); |
|
|
|
|
// declare a timeout condition if we have been too long without data or not aiding
|
|
|
|
|