ekf2: filter flow vel (used for flow velocity reset)

- individual flow samples can be quite erratic
This commit is contained in:
Daniel Agar
2024-08-27 10:38:17 -04:00
parent 5ff4eea870
commit 6c24413888
5 changed files with 29 additions and 9 deletions
+2 -4
View File
@@ -203,10 +203,8 @@ TEST_F(EkfFlowTest, inAirConvergence)
_sensor_simulator.setTrajectoryTargetVelocity(simulated_velocity);
_ekf_wrapper.enableFlowFusion();
_sensor_simulator.startFlow();
// Let it reset but not fuse more measurements. We actually need to send 2
// samples to get a reset because the first one cannot be used as the gyro
// compensation needs to be accumulated between two samples.
_sensor_simulator.runTrajectorySeconds(0.14);
_sensor_simulator.runTrajectorySeconds(1.0);
// THEN: estimated velocity should match simulated velocity
Vector3f estimated_velocity = _ekf->getVelocity();