mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 12:53:35 +08:00
sensor_simulator: update EKF at IMU rate
This is how it is also done in ekf2_main. Otherwise, this leads to multiple integration of the same IMU data due to asynchronous sensor updates triggering a prediction step between IMU updates. Fix unit tests that broke because of this fix
This commit is contained in:
committed by
Mathieu Bresciani
parent
59183f70ba
commit
6126c190b2
@@ -61,7 +61,7 @@ class EkfAirspeedTest : public ::testing::Test {
|
||||
{
|
||||
_ekf->init(0);
|
||||
_sensor_simulator.simulateOrientation(_quat_sim);
|
||||
_sensor_simulator.runSeconds(2);
|
||||
_sensor_simulator.runSeconds(7);
|
||||
}
|
||||
|
||||
// Use this method to clean up any memory, network etc. after each test
|
||||
@@ -113,6 +113,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-5f);
|
||||
EXPECT_NEAR(height_after_pressure_correction, expected_height_after_pressure_correction, 1e-3f);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user