mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 00:53:34 +08:00
Bug: stop overwriting fault status of index 0 with index 1
This commit is contained in:
committed by
Mathieu Bresciani
parent
9e211d6ca1
commit
122f58b94d
@@ -428,6 +428,9 @@ void Ekf::fuseOptFlow()
|
||||
|
||||
}
|
||||
|
||||
_fault_status.flags.bad_optflow_X = false;
|
||||
_fault_status.flags.bad_optflow_Y = false;
|
||||
|
||||
for (uint8_t obs_index = 0; obs_index <= 1; obs_index++) {
|
||||
|
||||
// copy the Kalman gain vector for the axis we are fusing
|
||||
@@ -468,8 +471,6 @@ void Ekf::fuseOptFlow()
|
||||
// if the covariance correction will result in a negative variance, then
|
||||
// the covariance matrix is unhealthy and must be corrected
|
||||
bool healthy = true;
|
||||
_fault_status.flags.bad_optflow_X = false;
|
||||
_fault_status.flags.bad_optflow_Y = false;
|
||||
|
||||
for (int i = 0; i < _k_num_states; i++) {
|
||||
if (P(i,i) < KHP(i,i)) {
|
||||
|
||||
Reference in New Issue
Block a user