forked from Archive/PX4-Autopilot
Ekf2Selector: declare filter unhealthy when high test ratio
Request a switch to another instance when the combined test ratio is too high.
This commit is contained in:
parent
43fb076828
commit
fc155bc57e
|
@ -293,7 +293,7 @@ bool EKF2Selector::UpdateErrorScores()
|
|||
float combined_test_ratio = fmaxf(0.5f * (status.vel_test_ratio + status.pos_test_ratio), status.hgt_test_ratio);
|
||||
|
||||
_instance[i].combined_test_ratio = combined_test_ratio;
|
||||
_instance[i].healthy = (status.filter_fault_flags == 0) && (combined_test_ratio > 0.f);
|
||||
_instance[i].healthy = (status.filter_fault_flags == 0) && (combined_test_ratio > 0.f) && (combined_test_ratio < 1.f);
|
||||
_instance[i].filter_fault = (status.filter_fault_flags != 0);
|
||||
_instance[i].timeout = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue