EKF: Make average update rate of EKF closer to target

With the EKF, the average update rate is more important than the instantaneous value as it affects tuning. This patch ensures that the EKF prediction cycle will be performed early if the previous one was late in an attempt to maintain the target update rate.
This commit is contained in:
Paul Riseborough
2016-05-05 21:23:03 +10:00
parent 1daa6c7866
commit f1b7e7714e
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -159,6 +159,7 @@ private:
uint64_t _time_last_arsp_fuse; // time the last fusion of airspeed measurements were performed (usec)
Vector2f _last_known_posNE; // last known local NE position vector (m)
float _last_disarmed_posD; // vertical position recorded at arming (m)
float _last_dt_overrun; // the amount of time the last IMU collection over-ran the target set by FILTER_UPDATE_PERRIOD_MS (sec)
Vector3f _earth_rate_NED; // earth rotation vector (NED) in rad/s