mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 05:58:30 -04:00
AP_NavEKF: fix bug in small EKF velocity fusion
This commit is contained in:
parent
8d6f0d08c9
commit
925d625ed1
@ -566,7 +566,9 @@ void SmallEKF::fuseVelocity(bool yawInit)
|
||||
// Calculate the velocity measurement innovation using the SmallEKF estimate as the observation
|
||||
// if heading isn't aligned, use zero velocity (static assumption)
|
||||
if (yawInit) {
|
||||
innovation[obsIndex] = state.velocity[obsIndex] - state.velocity[obsIndex];
|
||||
Vector3f measVelNED;
|
||||
_main_ekf.getVelNED(measVelNED);
|
||||
innovation[obsIndex] = state.velocity[obsIndex] - measVelNED[obsIndex];
|
||||
} else {
|
||||
innovation[obsIndex] = state.velocity[obsIndex];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user