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 -1
View File
@@ -68,7 +68,7 @@ void Ekf::controlBetaFusion(const imuSample &imu_delayed)
_control_status.flags.wind = true;
// reset the timeout timers to prevent repeated resets
_aid_src_sideslip.time_last_fuse = imu_delayed.time_us;
resetWind();
resetWindToZero();
}
if (Vector2f(Vector2f(_state.vel) - _state.wind_vel).longerThan(7.f)) {