ekf2: EKFGSF_yaw delete unnecessary internal state

This commit is contained in:
Daniel Agar
2022-03-25 11:33:29 -04:00
parent 3889b79342
commit 21b1c933dc
2 changed files with 2 additions and 4 deletions
+2 -3
View File
@@ -23,7 +23,6 @@ void EKFGSF_yaw::update(const imuSample &imu_sample,
_delta_vel = imu_sample.delta_vel;
_delta_ang_dt = imu_sample.delta_ang_dt;
_delta_vel_dt = imu_sample.delta_vel_dt;
_run_ekf_gsf = run_EKF;
_true_airspeed = airspeed;
// to reduce effect of vibration, filter using an LPF whose time constant is 1/10 of the AHRS tilt correction time constant
@@ -60,7 +59,7 @@ void EKFGSF_yaw::update(const imuSample &imu_sample,
}
// The 3-state EKF models only run when flying to avoid corrupted estimates due to operator handling and GPS interference
if (_run_ekf_gsf && _vel_data_updated) {
if (run_EKF && _vel_data_updated) {
if (!_ekf_gsf_vel_fuse_started) {
initialiseEKFGSF();
ahrsAlignYaw();
@@ -111,7 +110,7 @@ void EKFGSF_yaw::update(const imuSample &imu_sample,
}
}
} else if (_ekf_gsf_vel_fuse_started && !_run_ekf_gsf) {
} else if (_ekf_gsf_vel_fuse_started && !run_EKF) {
// wait to fly again
_ekf_gsf_vel_fuse_started = false;
}
-1
View File
@@ -108,7 +108,6 @@ private:
} _ekf_gsf[N_MODELS_EKFGSF] {};
bool _vel_data_updated{}; // true when velocity data has been updated
bool _run_ekf_gsf{}; // true when operating condition is suitable for to run the GSF and EKF models and fuse velocity data
Vector2f _vel_NE{}; // NE velocity observations (m/s)
float _vel_accuracy{}; // 1-sigma accuracy of velocity observations (m/s)
bool _ekf_gsf_vel_fuse_started{}; // true when the EKF's have started fusing velocity data and the prediction and update processing is active