local mavlink_msgs = {} function mavlink_msgs.get_msgid(msgname) local message_map = require("MAVLink/mavlink_msg_" .. msgname) if not message_map then error("Unknown MAVLink message " .. msgname) end return message_map.id end function mavlink_msgs.decode_header(message) -- build up a map of the result local result = {} local read_marker = 3 -- id the MAVLink version result.protocol_version, read_marker = string.unpack("