From 7a11871566546bc5b1a064fc806f0a28178d12b3 Mon Sep 17 00:00:00 2001 From: bresch Date: Tue, 4 May 2021 11:34:05 +0200 Subject: [PATCH] GNSS yaw tests: adjust timing the starting condition needs more than 1 sample to determine if the data comes regularly the timeout on "no data" is defined by the fusion reset timeout parameter (7 seconds) --- test/test_EKF_gps_yaw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_EKF_gps_yaw.cpp b/test/test_EKF_gps_yaw.cpp index f694654b11..416d8ba4e9 100644 --- a/test/test_EKF_gps_yaw.cpp +++ b/test/test_EKF_gps_yaw.cpp @@ -105,7 +105,7 @@ TEST_F(EkfGpsHeadingTest, fusionStartWithReset) _sensor_simulator._gps.setYaw(gps_heading); _ekf_wrapper.enableGpsHeadingFusion(); const int initial_quat_reset_counter = _ekf_wrapper.getQuaternionResetCounter(); - _sensor_simulator.runSeconds(0.2); + _sensor_simulator.runSeconds(0.4); // THEN: GPS heading fusion should have started; EXPECT_TRUE(_ekf_wrapper.isIntendingGpsHeadingFusion()); @@ -203,7 +203,7 @@ TEST_F(EkfGpsHeadingTest, fallBackToMag) // BUT WHEN: the GPS yaw is suddenly invalid gps_heading = NAN; _sensor_simulator._gps.setYaw(gps_heading); - _sensor_simulator.runSeconds(6); + _sensor_simulator.runSeconds(7.5); // THEN: after a few seconds, the fusion should stop and // the estimator should fall back to mag fusion