mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 19:43:34 +08:00
ekf2: refactor output predictor to class
- refactor all EKF backend output predictor pieces into new OutputPredictor class - output states are now calculated immediately with new high rate IMU rather than after EKF update - IMU delayed sample is passed as around as control data to avoid storing an extra copy and make the requirement clear
This commit is contained in:
@@ -239,7 +239,7 @@ bool Ekf::gps_is_good(const gpsMessage &gps)
|
||||
|
||||
// assume failed first time through
|
||||
if (_last_gps_fail_us == 0) {
|
||||
_last_gps_fail_us = _imu_sample_delayed.time_us;
|
||||
_last_gps_fail_us = _time_delayed_us;
|
||||
}
|
||||
|
||||
// if any user selected checks have failed, record the fail time
|
||||
@@ -255,10 +255,10 @@ bool Ekf::gps_is_good(const gpsMessage &gps)
|
||||
(_gps_check_fail_status.flags.hspeed && (_params.gps_check_mask & MASK_GPS_HSPD)) ||
|
||||
(_gps_check_fail_status.flags.vspeed && (_params.gps_check_mask & MASK_GPS_VSPD))
|
||||
) {
|
||||
_last_gps_fail_us = _imu_sample_delayed.time_us;
|
||||
_last_gps_fail_us = _time_delayed_us;
|
||||
|
||||
} else {
|
||||
_last_gps_pass_us = _imu_sample_delayed.time_us;
|
||||
_last_gps_pass_us = _time_delayed_us;
|
||||
}
|
||||
|
||||
// continuous period without fail of x seconds required to return a healthy status
|
||||
|
||||
Reference in New Issue
Block a user