EKF: Fix bug when resetting position and velocities for fw due to something else than bad yaw estimate

Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
This commit is contained in:
CarlOlsson
2017-10-17 15:08:09 +02:00
parent 410697cb0c
commit c81cdfa1ce
2 changed files with 2 additions and 4 deletions
+2
View File
@@ -454,6 +454,8 @@ void Ekf::controlGpsFusion()
if (_control_status.flags.fixed_wing) {
// if flying a fixed wing aircraft, do a complete reset that includes yaw, velocity and position
realignYawGPS();
resetVelocity();
resetPosition();
} else {
resetVelocity();
resetPosition();