Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/libraries/AP_GPS/LogStructure_SBP.h
Views: 1798
#pragma once12#include <AP_Logger/LogStructure.h>3#include "AP_GPS_config.h"45#define LOG_IDS_FROM_GPS_SBP \6LOG_MSG_SBPHEALTH, \7LOG_MSG_SBPRAWH, \8LOG_MSG_SBPRAWM, \9LOG_MSG_SBPEVENT1011// @LoggerMessage: SBPH12// @Description: Swift Health Data13// @Field: TimeUS: Time since system startup14// @Field: CrcError: Number of packet CRC errors on serial connection15// @Field: LastInject: Timestamp of last raw data injection to GPS16// @Field: IARhyp: Current number of integer ambiguity hypotheses1718struct PACKED log_SbpHealth {19LOG_PACKET_HEADER;20uint64_t time_us;21uint32_t crc_error_counter;22uint32_t last_injected_data_ms;23uint32_t last_iar_num_hypotheses;24};2526// @LoggerMessage: SBRH27// @Description: Swift Raw Message Data28// @Field: TimeUS: Time since system startup29// @Field: msg_flag: Swift message type30// @Field: 1: Sender ID31// @Field: 2: index; always 132// @Field: 3: pages; number of pages received33// @Field: 4: msg length; number of bytes received34// @Field: 5: unused; always zero35// @Field: 6: data received from device3637struct PACKED log_SbpRAWH {38LOG_PACKET_HEADER;39uint64_t time_us;40uint16_t msg_type;41uint16_t sender_id;42uint8_t index;43uint8_t pages;44uint8_t msg_len;45uint8_t res;46uint8_t data[48];47};4849struct PACKED log_SbpRAWM {50LOG_PACKET_HEADER;51uint64_t time_us;52uint16_t msg_type;53uint16_t sender_id;54uint8_t index;55uint8_t pages;56uint8_t msg_len;57uint8_t res;58uint8_t data[104];59};6061struct PACKED log_SbpEvent {62LOG_PACKET_HEADER;63uint64_t time_us;64uint16_t wn;65uint32_t tow;66int32_t ns_residual;67uint8_t level;68uint8_t quality;69};7071#if AP_GPS_SBP_ENABLED72#define LOG_STRUCTURE_FROM_GPS_SBP \73{ LOG_MSG_SBPHEALTH, sizeof(log_SbpHealth), \74"SBPH", "QIII", "TimeUS,CrcError,LastInject,IARhyp", "s---", "F---" , true }, \75{ LOG_MSG_SBPRAWH, sizeof(log_SbpRAWH), \76"SBRH", "QQQQQQQQ", "TimeUS,msg_flag,1,2,3,4,5,6", "s-------", "F-------" , true }, \77{ LOG_MSG_SBPRAWM, sizeof(log_SbpRAWM), \78"SBRM", "QQQQQQQQQQQQQQQ", "TimeUS,msg_flag,1,2,3,4,5,6,7,8,9,10,11,12,13", "s??????????????", "F??????????????" , true }, \79{ LOG_MSG_SBPEVENT, sizeof(log_SbpEvent), \80"SBRE", "QHIiBB", "TimeUS,GWk,GMS,ns_residual,level,quality", "s?????", "F?????" },81#else82#define LOG_STRUCTURE_FROM_GPS_SBP83#endif848586