Add missing checks for flags.ev_vel

This commit is contained in:
kamilritz
2019-09-24 07:48:46 +10:00
committed by Paul Riseborough
parent e7d927c899
commit 4511b9ff5e
4 changed files with 23 additions and 16 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ bool Ekf::collect_gps(const gps_message &gps)
map_projection_init_timestamped(&_pos_ref, lat, lon, _time_last_imu);
// if we are already doing aiding, correct for the change in position since the EKF started navigationg
if (_control_status.flags.opt_flow || _control_status.flags.gps || _control_status.flags.ev_pos) {
if (_control_status.flags.opt_flow || _control_status.flags.gps || _control_status.flags.ev_pos || _control_status.flags.ev_vel) {
double est_lat, est_lon;
map_projection_reproject(&_pos_ref, -_state.pos(0), -_state.pos(1), &est_lat, &est_lon);
map_projection_init_timestamped(&_pos_ref, est_lat, est_lon, _time_last_imu);