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:
Daniel Agar
2023-01-18 10:59:34 -05:00
committed by GitHub
parent c054ca20cc
commit 95300d5637
39 changed files with 855 additions and 618 deletions
-18
View File
@@ -178,20 +178,6 @@ struct gpsMessage {
float pdop{}; ///< position dilution of precision
};
struct outputSample {
uint64_t time_us{}; ///< timestamp of the measurement (uSec)
Quatf quat_nominal{}; ///< nominal quaternion describing vehicle attitude
Vector3f vel{}; ///< NED velocity estimate in earth frame (m/sec)
Vector3f pos{}; ///< NED position estimate in earth frame (m/sec)
};
struct outputVert {
uint64_t time_us{}; ///< timestamp of the measurement (uSec)
float vert_vel{}; ///< Vertical velocity calculated using alternative algorithm (m/sec)
float vert_vel_integ{}; ///< Integral of vertical velocity (m)
float dt{}; ///< delta time (sec)
};
struct imuSample {
uint64_t time_us{}; ///< timestamp of the measurement (uSec)
Vector3f delta_ang{}; ///< delta angle in body frame (integrated gyro measurements) (rad)
@@ -424,10 +410,6 @@ struct parameters {
Vector3f flow_pos_body{}; ///< xyz position of range sensor focal point in body frame (m)
Vector3f ev_pos_body{}; ///< xyz position of VI-sensor focal point in body frame (m)
// output complementary filter tuning
float vel_Tau{0.25f}; ///< velocity state correction time constant (1/sec)
float pos_Tau{0.25f}; ///< position state correction time constant (1/sec)
// accel bias learning control
float acc_bias_lim{0.4f}; ///< maximum accel bias magnitude (m/sec**2)
float acc_bias_learn_acc_lim{25.0f}; ///< learning is disabled if the magnitude of the IMU acceleration vector is greater than this (m/sec**2)