EKF: replace fault status struct with a union to facilitate logging

This commit is contained in:
Paul Riseborough
2016-05-07 21:11:16 +10:00
parent 7f5669fb2d
commit 020b87933e
7 changed files with 57 additions and 54 deletions
+2 -2
View File
@@ -161,7 +161,7 @@ void Ekf::fuseAirspeed()
// if the covariance correction will result in a negative variance, then
// the covariance marix is unhealthy and must be corrected
bool healthy = true;
_fault_status.bad_airspeed = false;
_fault_status.flags.bad_airspeed = false;
for (int i = 0; i < _k_num_states; i++) {
if (P[i][i] < KHP[i][i]) {
// zero rows and columns
@@ -172,7 +172,7 @@ void Ekf::fuseAirspeed()
healthy = false;
// update individual measurement health status
_fault_status.bad_airspeed = true;
_fault_status.flags.bad_airspeed = true;
}
}