ekf2: rng only reset vz as a last resort

This commit is contained in:
Daniel Agar
2024-07-15 11:39:56 -04:00
parent 80ee622f77
commit 8e5f28f834
2 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -207,9 +207,9 @@ TEST_F(EkfTerrainTest, testHeightReset)
const float new_baro_height = _sensor_simulator._baro.getData() + 50.f;
_sensor_simulator._baro.setData(new_baro_height);
_sensor_simulator.stopGps(); // prevent from switching to GNSS height
_sensor_simulator.runSeconds(6);
_sensor_simulator.runSeconds(10);
// THEN: a height reset occured and the estimated distance to the ground remains constant
// THEN: a height reset occurred and the estimated distance to the ground remains constant
reset_logging_checker.capturePostResetState();
EXPECT_TRUE(reset_logging_checker.isVerticalPositionResetCounterIncreasedBy(1));
EXPECT_NEAR(estimated_distance_to_ground, _ekf->getHagl(), 1e-3f);