mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 00:31:36 +08:00
ekf2_test: adjust airspeed unit test
an airpseed of > 2m/s is required to start the fusion (set by param) fw mode is also required Given the larger estimated windspeed after those changes, the change of static pressure is larger and the height estimate takes more time to reach the final value
This commit is contained in:
committed by
Mathieu Bresciani
parent
6e8f0e92ff
commit
3927c183de
@@ -75,12 +75,13 @@ TEST_F(EkfAirspeedTest, testWindVelocityEstimation)
|
||||
{
|
||||
|
||||
const Vector3f simulated_velocity_earth(0.0f, 1.5f, 0.0f);
|
||||
const Vector2f airspeed_body(0.4f, 0.0f);
|
||||
const Vector2f airspeed_body(2.4f, 0.0f);
|
||||
_ekf_wrapper.enableExternalVisionVelocityFusion();
|
||||
_sensor_simulator._vio.setVelocity(simulated_velocity_earth);
|
||||
_sensor_simulator.startExternalVision();
|
||||
|
||||
_ekf->set_in_air_status(true);
|
||||
_ekf->set_is_fixed_wing(true);
|
||||
_sensor_simulator.startAirspeedSensor();
|
||||
_sensor_simulator._airspeed.setData(airspeed_body(0), airspeed_body(0));
|
||||
|
||||
@@ -116,6 +117,6 @@ TEST_F(EkfAirspeedTest, testWindVelocityEstimation)
|
||||
const float expected_height_after_pressure_correction = height_before_pressure_correction -
|
||||
expected_height_difference;
|
||||
|
||||
EXPECT_NEAR(height_after_pressure_correction, expected_height_after_pressure_correction, 1e-3f);
|
||||
EXPECT_NEAR(height_after_pressure_correction, expected_height_after_pressure_correction, 1e-2f);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user