ekf2: vehicle_local_position add dead_reckoning flag

This commit is contained in:
Daniel Agar 2022-07-12 09:53:04 -04:00 committed by Silvan Fuhrer
parent 9886660862
commit ac209c2e78
2 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,8 @@ float32 epv # Standard deviation of vertical position error, (metres)
float32 evh # Standard deviation of horizontal velocity error, (metres/sec)
float32 evv # Standard deviation of horizontal velocity error, (metres/sec)
bool dead_reckoning # True if this position is estimated through dead-reckoning
# estimator specified vehicle limits
float32 vxy_max # maximum horizontal speed - set to 0 when limiting not required (meters/sec)
float32 vz_max # maximum vertical speed - set to 0 when limiting not required (meters/sec)

View File

@ -1019,6 +1019,9 @@ void EKF2::PublishLocalPosition(const hrt_abstime &timestamp)
_ekf.get_posNE_reset(&lpos.delta_xy[0], &lpos.xy_reset_counter);
_ekf.get_velNE_reset(&lpos.delta_vxy[0], &lpos.vxy_reset_counter);
lpos.dead_reckoning = _ekf.control_status_flags().inertial_dead_reckoning
|| _ekf.control_status_flags().wind_dead_reckoning;
// get control limit information
_ekf.get_ekf_ctrl_limits(&lpos.vxy_max, &lpos.vz_max, &lpos.hagl_min, &lpos.hagl_max);