ekf2: consolidate airspeed fusion logic and helpers

- pass new airspeed sample around when available
 - can't completely eliminate _airspeed_sample_delayed until resetWind()
called from sideslip fusion is updated
This commit is contained in:
Daniel Agar
2023-02-22 09:08:33 -05:00
parent 241cee2bb7
commit 08f111f694
6 changed files with 91 additions and 98 deletions
+1 -3
View File
@@ -50,11 +50,9 @@ void Ekf::controlDragFusion()
if (!_control_status.flags.wind) {
// reset the wind states and covariances when starting drag accel fusion
_control_status.flags.wind = true;
resetWind();
resetWindToZero();
}
dragSample drag_sample;
if (_drag_buffer->pop_first_older_than(_time_delayed_us, &drag_sample)) {