diff --git a/src/modules/ekf2/test/test_EKF_gnss_yaw.cpp b/src/modules/ekf2/test/test_EKF_gnss_yaw.cpp index 93dd222375..665fa8e8c9 100644 --- a/src/modules/ekf2/test/test_EKF_gnss_yaw.cpp +++ b/src/modules/ekf2/test/test_EKF_gnss_yaw.cpp @@ -281,7 +281,8 @@ TEST_F(EkfGpsHeadingTest, yawJmpOnGround) EXPECT_EQ(_ekf_wrapper.getQuaternionResetCounter(), initial_quat_reset_counter + 1); // AND THEN: restart GNSS yaw fusion - _sensor_simulator.runSeconds(5); + // The strict checks on ground require min_health_time_us (10s) to pass again. + _sensor_simulator.runSeconds(11); EXPECT_TRUE(_ekf_wrapper.isIntendingGpsHeadingFusion()); EXPECT_EQ(_ekf_wrapper.getQuaternionResetCounter(), initial_quat_reset_counter + 2); EXPECT_LT(fabsf(matrix::wrap_pi(_ekf_wrapper.getYawAngle() - gps_heading)), math::radians(1.f)); diff --git a/src/modules/ekf2/test/test_EKF_gps.cpp b/src/modules/ekf2/test/test_EKF_gps.cpp index debfec6560..ebd024e363 100644 --- a/src/modules/ekf2/test/test_EKF_gps.cpp +++ b/src/modules/ekf2/test/test_EKF_gps.cpp @@ -81,6 +81,10 @@ TEST_F(EkfGpsTest, gpsTimeout) // GIVEN:EKF that fuses GPS EXPECT_TRUE(_ekf_wrapper.isIntendingGpsFusion()); + // In air the simplified checks are used which do not include satellite count + _ekf->set_in_air_status(true); + _ekf->set_vehicle_at_rest(false); + // WHEN: the number of satellites drops below the minimum _sensor_simulator._gps.setNumberOfSatellites(3); @@ -174,7 +178,7 @@ TEST_F(EkfGpsTest, resetToGpsPosition) const Vector3f simulated_position_change(20.0f, -1.0f, 0.f); _sensor_simulator._gps.stepHorizontalPositionByMeters( Vector2f(simulated_position_change)); - _sensor_simulator.runSeconds(6); + _sensor_simulator.runSeconds(11); // THEN: a reset to the new GPS position should be done const Vector3f estimated_position = _ekf->getPosition();