|
|
@ -517,6 +517,7 @@ void NavEKF2_core::readGpsData() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gpsSpdAccuracy = MAX(gpsSpdAccuracy,gpsSpdAccRaw); |
|
|
|
gpsSpdAccuracy = MAX(gpsSpdAccuracy,gpsSpdAccRaw); |
|
|
|
gpsSpdAccuracy = MIN(gpsSpdAccuracy,50.0f); |
|
|
|
gpsSpdAccuracy = MIN(gpsSpdAccuracy,50.0f); |
|
|
|
|
|
|
|
gpsSpdAccuracy = MAX(gpsSpdAccuracy,frontend->_gpsHorizVelNoise); |
|
|
|
} |
|
|
|
} |
|
|
|
gpsPosAccuracy *= (1.0f - alpha); |
|
|
|
gpsPosAccuracy *= (1.0f - alpha); |
|
|
|
float gpsPosAccRaw; |
|
|
|
float gpsPosAccRaw; |
|
|
@ -525,6 +526,7 @@ void NavEKF2_core::readGpsData() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gpsPosAccuracy = MAX(gpsPosAccuracy,gpsPosAccRaw); |
|
|
|
gpsPosAccuracy = MAX(gpsPosAccuracy,gpsPosAccRaw); |
|
|
|
gpsPosAccuracy = MIN(gpsPosAccuracy,100.0f); |
|
|
|
gpsPosAccuracy = MIN(gpsPosAccuracy,100.0f); |
|
|
|
|
|
|
|
gpsPosAccuracy = MAX(gpsPosAccuracy, frontend->_gpsHorizPosNoise); |
|
|
|
} |
|
|
|
} |
|
|
|
gpsHgtAccuracy *= (1.0f - alpha); |
|
|
|
gpsHgtAccuracy *= (1.0f - alpha); |
|
|
|
float gpsHgtAccRaw; |
|
|
|
float gpsHgtAccRaw; |
|
|
@ -533,6 +535,7 @@ void NavEKF2_core::readGpsData() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gpsHgtAccuracy = MAX(gpsHgtAccuracy,gpsHgtAccRaw); |
|
|
|
gpsHgtAccuracy = MAX(gpsHgtAccuracy,gpsHgtAccRaw); |
|
|
|
gpsHgtAccuracy = MIN(gpsHgtAccuracy,100.0f); |
|
|
|
gpsHgtAccuracy = MIN(gpsHgtAccuracy,100.0f); |
|
|
|
|
|
|
|
gpsHgtAccuracy = MAX(gpsHgtAccuracy, 1.5f * frontend->_gpsHorizPosNoise); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// check if we have enough GPS satellites and increase the gps noise scaler if we don't
|
|
|
|
// check if we have enough GPS satellites and increase the gps noise scaler if we don't
|
|
|
|