mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
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:
@@ -3849,7 +3849,7 @@ void Commander::estimator_check()
|
|||||||
} else if (innovation_fail) {
|
} else if (innovation_fail) {
|
||||||
_time_last_innov_fail = hrt_absolute_time();
|
_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
|
// if the innovation test has failed continuously, declare the nav as failed
|
||||||
_nav_test_failed = true;
|
_nav_test_failed = true;
|
||||||
mavlink_log_emergency(&_mavlink_log_pub, "Navigation failure! Land and recalibrate sensors");
|
mavlink_log_emergency(&_mavlink_log_pub, "Navigation failure! Land and recalibrate sensors");
|
||||||
|
|||||||
Reference in New Issue
Block a user