commander: increase nav_test_failed hysteresis time

This is to avoid race condition with the yaw emergency estimator having
the same trigger delay of 1 second. Commander will now give more time to
EKF2 to reset itself before switching to altitude mode.
This commit is contained in:
bresch 2021-03-04 13:03:46 +01:00 committed by Daniel Agar
parent beadae6dfc
commit 2c5342acd4

View File

@ -3849,7 +3849,7 @@ void Commander::estimator_check()
} else if (innovation_fail) {
_time_last_innov_fail = hrt_absolute_time();
if (!_nav_test_failed && hrt_elapsed_time(&_time_last_innov_pass) > 1_s) {
if (!_nav_test_failed && hrt_elapsed_time(&_time_last_innov_pass) > 2_s) {
// if the innovation test has failed continuously, declare the nav as failed
_nav_test_failed = true;
mavlink_log_emergency(&_mavlink_log_pub, "Navigation failure! Land and recalibrate sensors");