mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 22:33:34 +08:00
ekf2: estimator aid source status (baro height)
This commit is contained in:
@@ -55,11 +55,10 @@ void Ekf::updateGpsVel(const gpsSample &gps_sample)
|
||||
|
||||
gps_vel.innovation[i] = _state.vel(i) - gps_sample.vel(i);
|
||||
gps_vel.innovation_variance[i] = P(4 + i, 4 + i) + obs_var(i);
|
||||
gps_vel.test_ratio[i] = sq(gps_vel.innovation[i]) / (sq(innov_gate) * gps_vel.innovation_variance[i]);
|
||||
|
||||
gps_vel.innovation_rejected[i] = (gps_vel.test_ratio[i] > 1.f);
|
||||
}
|
||||
|
||||
setEstimatorAidStatusTestRatio(gps_vel, innov_gate);
|
||||
|
||||
// vz special case if there is bad vertical acceleration data, then don't reject measurement,
|
||||
// but limit innovation to prevent spikes that could destabilise the filter
|
||||
if (_fault_status.flags.bad_acc_vertical && gps_vel.innovation_rejected[2]) {
|
||||
@@ -109,11 +108,10 @@ void Ekf::updateGpsPos(const gpsSample &gps_sample)
|
||||
|
||||
gps_pos.innovation[i] = _state.pos(i) - position(i);
|
||||
gps_pos.innovation_variance[i] = P(7 + i, 7 + i) + obs_var(i);
|
||||
gps_pos.test_ratio[i] = sq(gps_pos.innovation[i]) / (sq(innov_gate) * gps_pos.innovation_variance[i]);
|
||||
|
||||
gps_pos.innovation_rejected[i] = (gps_pos.test_ratio[i] > 1.f);
|
||||
}
|
||||
|
||||
setEstimatorAidStatusTestRatio(gps_pos, innov_gate);
|
||||
|
||||
// z special case if there is bad vertical acceleration data, then don't reject measurement,
|
||||
// but limit innovation to prevent spikes that could destabilise the filter
|
||||
if (_fault_status.flags.bad_acc_vertical && gps_pos.innovation_rejected[2]) {
|
||||
|
||||
Reference in New Issue
Block a user