diff --git a/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp b/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp index 6d2c9baba6..6bbddd549c 100644 --- a/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp +++ b/libraries/AP_OpenDroneID/AP_OpenDroneID.cpp @@ -595,6 +595,20 @@ void AP_OpenDroneID::handle_msg(mavlink_channel_t chan, const mavlink_message_t mavlink_msg_open_drone_id_system_decode(&msg, &pkt_system); last_system_ms = AP_HAL::millis(); break; + case MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_UPDATE: { + mavlink_open_drone_id_system_update_t pkt_system_update; + mavlink_msg_open_drone_id_system_update_decode(&msg, &pkt_system_update); + pkt_system.operator_latitude = pkt_system_update.operator_latitude; + pkt_system.operator_longitude = pkt_system_update.operator_longitude; + pkt_system.operator_altitude_geo = pkt_system_update.operator_altitude_geo; + pkt_system.timestamp = pkt_system_update.timestamp; + if (last_system_ms != 0) { + // we can only mark this as updated if we have the other + // information already + last_system_ms = AP_HAL::millis(); + } + break; + } } }