From 19a2b4ec315c080b2076477a985cb79ab843995d Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 14 Mar 2023 10:45:56 -0400 Subject: [PATCH] ekf2: GNSS yaw only reset test ratio for new samples - otherwise external test ratio monitoring could trigger a false positive --- src/modules/ekf2/EKF/gps_yaw_fusion.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/ekf2/EKF/gps_yaw_fusion.cpp b/src/modules/ekf2/EKF/gps_yaw_fusion.cpp index d85d08cba0..7ddfb391ee 100644 --- a/src/modules/ekf2/EKF/gps_yaw_fusion.cpp +++ b/src/modules/ekf2/EKF/gps_yaw_fusion.cpp @@ -48,10 +48,11 @@ void Ekf::updateGpsYaw(const gpsSample &gps_sample) { - auto &gnss_yaw = _aid_src_gnss_yaw; - resetEstimatorAidStatus(gnss_yaw); - if (PX4_ISFINITE(gps_sample.yaw)) { + + auto &gnss_yaw = _aid_src_gnss_yaw; + resetEstimatorAidStatus(gnss_yaw); + // initially populate for estimator_aid_src_gnss_yaw logging // calculate the observed yaw angle of antenna array, converting a from body to antenna yaw measurement