diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 109f1f70cd5e..d379485810e1 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -2349,6 +2349,7 @@ MavlinkReceiver::handle_message_hil_gps(mavlink_message_t *msg) // Publish GPS groundtruth vehicle_global_position_s hil_global_position_groundtruth{}; hil_global_position_groundtruth.timestamp_sample = hrt_absolute_time(); + hil_global_position_groundtruth.timestamp = hrt_absolute_time(); hil_global_position_groundtruth.lat = hil_gps.lat / 1e7; hil_global_position_groundtruth.lon = hil_gps.lon / 1e7; hil_global_position_groundtruth.alt = hil_gps.alt / 1e3f; diff --git a/src/modules/simulation/gz_bridge/GZBridge.cpp b/src/modules/simulation/gz_bridge/GZBridge.cpp index 19d75db8e298..265e94bb9980 100644 --- a/src/modules/simulation/gz_bridge/GZBridge.cpp +++ b/src/modules/simulation/gz_bridge/GZBridge.cpp @@ -714,8 +714,10 @@ void GZBridge::navSatCallback(const gz::msgs::NavSat &nav_sat) vehicle_global_position_s global_position_groundtruth{}; #if defined(ENABLE_LOCKSTEP_SCHEDULER) global_position_groundtruth.timestamp_sample = time_us; + global_position_groundtruth.timestamp = time_us; #else global_position_groundtruth.timestamp_sample = hrt_absolute_time(); + global_position_groundtruth.timestamp = hrt_absolute_time(); #endif global_position_groundtruth.lat = nav_sat.latitude_deg(); global_position_groundtruth.lon = nav_sat.longitude_deg();