From 827d871c859d6aa3b5c25914a8ea85c5a8a796a9 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Tue, 13 Jul 2021 21:29:38 +1000 Subject: [PATCH] AP_NavEKF3: Fix bug preventing learning of XY IMU dvel bias in flight --- libraries/AP_NavEKF3/AP_NavEKF3_core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_NavEKF3/AP_NavEKF3_core.cpp b/libraries/AP_NavEKF3/AP_NavEKF3_core.cpp index 40187c6523..646f45dfc9 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3_core.cpp +++ b/libraries/AP_NavEKF3/AP_NavEKF3_core.cpp @@ -1143,7 +1143,7 @@ void NavEKF3_core::CovariancePrediction(Vector3F *rotVarVecPtr) const uint8_t index = stateIndex - 13; // Don't attempt learning of IMU delta velocty bias if on ground and not aligned with the gravity vector - const bool is_bias_observable = (fabsF(prevTnb[index][2]) > 0.8f) && onGround; + const bool is_bias_observable = (fabsF(prevTnb[index][2]) > 0.8f) || !onGround; if (!is_bias_observable && !dvelBiasAxisInhibit[index]) { // store variances to be reinstated wben learning can commence later