From ade554b3f79630592b25038ca32571536609c57d Mon Sep 17 00:00:00 2001 From: IamPete1 <33176108+IamPete1@users.noreply.github.com> Date: Sat, 23 Feb 2019 19:31:20 +0000 Subject: [PATCH] AP_logger: add ADSB log --- libraries/AP_Logger/LogStructure.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Logger/LogStructure.h b/libraries/AP_Logger/LogStructure.h index 64f83d3125..990b8a3add 100644 --- a/libraries/AP_Logger/LogStructure.h +++ b/libraries/AP_Logger/LogStructure.h @@ -725,6 +725,19 @@ struct PACKED log_WheelEncoder { uint8_t quality_1; }; +struct PACKED log_ADSB { + LOG_PACKET_HEADER; + uint64_t time_us; + uint32_t ICAO_address; + int32_t lat; + int32_t lng; + int32_t alt; + uint16_t heading; + uint16_t hor_velocity; + int16_t ver_velocity; + uint16_t squawk; +}; + struct PACKED log_Current_Cells { LOG_PACKET_HEADER; uint64_t time_us; @@ -1484,7 +1497,9 @@ Format characters in the format string for binary log messages { LOG_OPTFLOW_MSG, sizeof(log_Optflow), \ "OF", "QBffff", "TimeUS,Qual,flowX,flowY,bodyX,bodyY", "s-EEEE", "F-0000" }, \ { LOG_WHEELENCODER_MSG, sizeof(log_WheelEncoder), \ - "WENC", "Qfbfb", "TimeUS,Dist0,Qual0,Dist1,Qual1", "sm-m-", "F0-0-" } + "WENC", "Qfbfb", "TimeUS,Dist0,Qual0,Dist1,Qual1", "sm-m-", "F0-0-" }, \ + { LOG_ADSB_MSG, sizeof(log_ADSB), \ + "ADSB", "QIiiiHHhH", "TimeUS,ICAO_address,Lat,Lng,Alt,Heading,Hor_vel,Ver_vel,Squark", "s-DUmhnn-", "F-GGCBCC-" } // #if SBP_HW_LOGGING @@ -1660,6 +1675,7 @@ enum LogMessages : uint8_t { LOG_WHEELENCODER_MSG, LOG_MAV_MSG, LOG_ERROR_MSG, + LOG_ADSB_MSG, _LOG_LAST_MSG_ };