mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-21 20:53:52 +08:00
AP_NavEKF: Improve rate of accel bias learning before flight
This commit is contained in:
committed by
Randy Mackay
parent
8dc6354a54
commit
d273302ce7
@@ -2048,7 +2048,12 @@ void NavEKF::FuseVelPosNED()
|
||||
// calculate weighting used by fuseVelPosNED to do IMU accel data blending
|
||||
// this is used to detect and compensate for aliasing errors with the accelerometers
|
||||
// provide for a first order lowpass filter to reduce noise on the weighting if required
|
||||
IMU1_weighting = 1.0f * (K1 / (K1 + K2)) + 0.0f * IMU1_weighting; // filter currently inactive
|
||||
// set weighting to 0.5 when on ground to allow more rapid learning of bias errors without 'ringing' in bias estimates
|
||||
if (vehicleArmed) {
|
||||
IMU1_weighting = 1.0f * (K1 / (K1 + K2)) + 0.0f * IMU1_weighting; // filter currently inactive
|
||||
} else {
|
||||
IMU1_weighting = 0.5f;
|
||||
}
|
||||
// apply an innovation consistency threshold test, but don't fail if bad IMU data
|
||||
// calculate the test ratio
|
||||
velTestRatio = innovVelSumSq / (varVelSum * sq(_gpsVelInnovGate));
|
||||
|
||||
Reference in New Issue
Block a user