From b5240942164dbdf2da4a5f91270348f012b38453 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 25 Aug 2021 22:02:09 +0900 Subject: [PATCH] AP_NavEKF2: init rngOnGnd to 5cm to avoid div-by-zero --- libraries/AP_NavEKF2/AP_NavEKF2_core.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_core.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_core.cpp index e53d9cc9d8..d04b0f5313 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_core.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_core.cpp @@ -194,6 +194,7 @@ void NavEKF2_core::InitialiseVariables() gpsPosAccuracy = 0.0f; gpsHgtAccuracy = 0.0f; baroHgtOffset = 0.0f; + rngOnGnd = 0.05f; yawResetAngle = 0.0f; lastYawReset_ms = 0; tiltErrFilt = 1.0f;