mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 22:33:34 +08:00
ekf: robustify bad_acc_vertical check
when the vertical pos or vel innov ratio is above the threshold, the other one needs to be significant too and not just positive to trigger the failure
This commit is contained in:
@@ -785,8 +785,8 @@ void Ekf::checkVerticalAccelerationHealth()
|
||||
const bool using_gps_for_both = _control_status.flags.gps_hgt && _control_status.flags.gps;
|
||||
const bool using_ev_for_both = _control_status.flags.ev_hgt && _control_status.flags.ev_vel;
|
||||
are_vertical_pos_and_vel_independant = !(using_gps_for_both || using_ev_for_both);
|
||||
is_inertial_nav_falling |= _vert_vel_innov_ratio > _params.vert_innov_test_lim && _vert_pos_innov_ratio > 0.0f;
|
||||
is_inertial_nav_falling |= _vert_pos_innov_ratio > _params.vert_innov_test_lim && _vert_vel_innov_ratio > 0.0f;
|
||||
is_inertial_nav_falling |= _vert_vel_innov_ratio > _params.vert_innov_test_lim && _vert_pos_innov_ratio > _params.vert_innov_test_min;
|
||||
is_inertial_nav_falling |= _vert_pos_innov_ratio > _params.vert_innov_test_lim && _vert_vel_innov_ratio > _params.vert_innov_test_min;
|
||||
|
||||
} else {
|
||||
// only height sensing available
|
||||
|
||||
Reference in New Issue
Block a user