From cfd76b8dd97f73b3bcfc8269a5c964d528717b75 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 7 Mar 2024 13:03:09 +1100 Subject: [PATCH] SITL: name fields when assembling vision_position_delta message --- libraries/SITL/SIM_Vicon.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libraries/SITL/SIM_Vicon.cpp b/libraries/SITL/SIM_Vicon.cpp index 0b2e0e0a3c..df55518ab0 100644 --- a/libraries/SITL/SIM_Vicon.cpp +++ b/libraries/SITL/SIM_Vicon.cpp @@ -277,13 +277,14 @@ void Vicon::update_vicon_position_estimate(const Location &loc, // confidence: Normalized confidence level [0, 100] if (should_send(ViconTypeMask::VISION_POSITION_DELTA) && get_free_msg_buf_index(msg_buf_index)) { const mavlink_vision_position_delta_t vision_position_delta{ - now_us + time_offset_us, - time_delta, - { attitude_curr_prev.get_euler_roll(), - attitude_curr_prev.get_euler_pitch(), - attitude_curr_prev.get_euler_yaw() - }, - {pos_delta.x, pos_delta.y, pos_delta.z} + time_usec: now_us + time_offset_us, + time_delta_usec: time_delta, + angle_delta: { attitude_curr_prev.get_euler_roll(), + attitude_curr_prev.get_euler_pitch(), + attitude_curr_prev.get_euler_yaw() + }, + position_delta: {pos_delta.x, pos_delta.y, pos_delta.z}, + confidence: 0 }; mavlink_msg_vision_position_delta_encode_status( system_id,