From f7c8ee807c5db23959707b4959543f90878a482a Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Mon, 8 Jun 2020 08:43:51 +1000 Subject: [PATCH] AP_NavEKF3: Reset yaw estimator bias states at start of flight Enables yaw bias to be learned when sitting stationary on ground. --- libraries/AP_NavEKF3/AP_NavEKF3_VehicleStatus.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_NavEKF3/AP_NavEKF3_VehicleStatus.cpp b/libraries/AP_NavEKF3/AP_NavEKF3_VehicleStatus.cpp index de9bb75884..ac82c39a11 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3_VehicleStatus.cpp +++ b/libraries/AP_NavEKF3/AP_NavEKF3_VehicleStatus.cpp @@ -418,6 +418,9 @@ void NavEKF3_core::detectFlight() EKFGSF_yaw_reset_request_ms = 0; EKFGSF_yaw_reset_count = 0; EKFGSF_run_filterbank = true; + Vector3f gyroBias; + getGyroBias(gyroBias); + yawEstimator->setGyroBias(gyroBias); } // store current on-ground and in-air status for next time