move vehicle at rest detection ekf2 -> land_detector

- move vehicle at reset detection ekf2 -> land_detector
 - ekf_unit: reduce init period
   - Fake fusion is when at rest is quite strong and makes the variance reduce rapidly. Reduce the amount of time we wait before checking if the variances are still large enough.
 - ekf_unit: reduce minimum vel/pos variance required after init
   - Fake pos fusion has a low observation noise, making the vel/pos variances reduce quickly.

Co-authored-by:: bresch <brescianimathieu@gmail.com>
This commit is contained in:
Daniel Agar
2022-02-01 17:50:19 -05:00
committed by GitHub
co-authored by : bresch
parent e387f302f9
commit f3e2a197ad
19 changed files with 408 additions and 441 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ void Ekf::fuseFakePosition()
if (_control_status.flags.in_air && _control_status.flags.tilt_align) {
fake_pos_obs_var(0) = fake_pos_obs_var(1) = sq(fmaxf(_params.pos_noaid_noise, _params.gps_pos_noise));
} else if (_control_status.flags.vehicle_at_rest) {
} else if (!_control_status.flags.in_air && _control_status.flags.vehicle_at_rest) {
// Accelerate tilt fine alignment by fusing more
// aggressively when the vehicle is at rest
fake_pos_obs_var(0) = fake_pos_obs_var(1) = sq(0.1f);