mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Stop overwriting fault status with false if one component is true
This commit is contained in:
parent
e5ddd912a4
commit
9e211d6ca1
@ -172,6 +172,7 @@ void Ekf::fuseVelPosHeight(const float innov, const float innov_var, const int o
|
||||
// if the covariance correction will result in a negative variance, then
|
||||
// the covariance matrix is unhealthy and must be corrected
|
||||
bool healthy = true;
|
||||
setVelPosFaultStatus(obs_index, false);
|
||||
|
||||
for (int i = 0; i < _k_num_states; i++) {
|
||||
if (P(i, i) < KHP(i, i)) {
|
||||
@ -181,9 +182,6 @@ void Ekf::fuseVelPosHeight(const float innov, const float innov_var, const int o
|
||||
healthy = false;
|
||||
|
||||
setVelPosFaultStatus(obs_index, true);
|
||||
|
||||
} else {
|
||||
setVelPosFaultStatus(obs_index, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user