mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 03:23:37 +08:00
ekf2: rng only reset vz as a last resort
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user