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.h
Views: 1798
#pragma once12#include <AP_Logger/LogStructure.h>3#include "LogStructure_SBP.h"45#define LOG_IDS_FROM_GPS \6LOG_GPS_MSG, \7LOG_GPA_MSG, \8LOG_GPS_RAW_MSG, \9LOG_GPS_RAWH_MSG, \10LOG_GPS_RAWS_MSG, \11LOG_GPS_UBX1_MSG, \12LOG_GPS_UBX2_MSG, \13LOG_IDS_FROM_GPS_SBP141516// @LoggerMessage: GPS17// @Description: Information received from GNSS systems attached to the autopilot18// @Field: TimeUS: Time since system startup19// @Field: I: GPS instance number20// @Field: Status: GPS Fix type; 2D fix, 3D fix etc.21// @FieldValueEnum: Status: AP_GPS::GPS_Status22// @Field: GMS: milliseconds since start of GPS Week23// @Field: GWk: weeks since 5 Jan 198024// @Field: NSats: number of satellites visible25// @Field: HDop: horizontal dilution of precision26// @Field: Lat: latitude27// @Field: Lng: longitude28// @Field: Alt: altitude29// @Field: Spd: ground speed30// @Field: GCrs: ground course31// @Field: VZ: vertical speed32// @Field: Yaw: vehicle yaw33// @Field: U: boolean value indicating whether this GPS is in use34struct PACKED log_GPS {35LOG_PACKET_HEADER;36uint64_t time_us;37uint8_t instance;38uint8_t status;39uint32_t gps_week_ms;40uint16_t gps_week;41uint8_t num_sats;42uint16_t hdop;43int32_t latitude;44int32_t longitude;45int32_t altitude;46float ground_speed;47float ground_course;48float vel_z;49float yaw;50uint8_t used;51};5253// @LoggerMessage: GPA54// @Description: GPS accuracy information55// @Field: I: GPS instance number56// @Field: TimeUS: Time since system startup57// @Field: VDop: vertical dilution of precision58// @Field: HAcc: horizontal position accuracy59// @Field: VAcc: vertical position accuracy60// @Field: SAcc: speed accuracy61// @Field: YAcc: yaw accuracy62// @Field: VV: true if vertical velocity is available63// @Field: SMS: time since system startup this sample was taken64// @Field: Delta: system time delta between the last two reported positions65// @Field: Und: Undulation66// @Field: RTCMFU: RTCM fragments used67// @Field: RTCMFD: RTCM fragments discarded68struct PACKED log_GPA {69LOG_PACKET_HEADER;70uint64_t time_us;71uint8_t instance;72uint16_t vdop;73uint16_t hacc;74uint16_t vacc;75uint16_t sacc;76float yaw_accuracy;77uint8_t have_vv;78uint32_t sample_ms;79uint16_t delta_ms;80float undulation;81uint16_t rtcm_fragments_used;82uint16_t rtcm_fragments_discarded;83};8485/*86UBlox logging87*/8889// @LoggerMessage: UBX190// @Description: uBlox-specific GPS information (part 1)91// @Field: TimeUS: Time since system startup92// @Field: Instance: GPS instance number93// @Field: noisePerMS: noise level as measured by GPS94// @Field: jamInd: jamming indicator; higher is more likely jammed95// @Field: aPower: antenna power indicator; 2 is don't know96// @Field: agcCnt: automatic gain control monitor97// @Field: config: bitmask for messages which haven't been seen98struct PACKED log_Ubx1 {99LOG_PACKET_HEADER;100uint64_t time_us;101uint8_t instance;102uint16_t noisePerMS;103uint8_t jamInd;104uint8_t aPower;105uint16_t agcCnt;106uint32_t config;107};108109// @LoggerMessage: UBX2110// @Description: uBlox-specific GPS information (part 2)111// @Field: TimeUS: Time since system startup112// @Field: Instance: GPS instance number113// @Field: ofsI: imbalance of I part of complex signal114// @Field: magI: magnitude of I part of complex signal115// @Field: ofsQ: imbalance of Q part of complex signal116// @Field: magQ: magnitude of Q part of complex signal117struct PACKED log_Ubx2 {118LOG_PACKET_HEADER;119uint64_t time_us;120uint8_t instance;121int8_t ofsI;122uint8_t magI;123int8_t ofsQ;124uint8_t magQ;125};126127// @LoggerMessage: GRAW128// @Description: Raw uBlox data129// @Field: TimeUS: Time since system startup130// @Field: WkMS: receiver TimeOfWeek measurement131// @Field: Week: GPS week132// @Field: numSV: number of space vehicles seen133// @Field: sv: space vehicle number of first vehicle134// @Field: cpMes: carrier phase measurement135// @Field: prMes: pseudorange measurement136// @Field: doMes: Doppler measurement137// @Field: mesQI: measurement quality index138// @Field: cno: carrier-to-noise density ratio139// @Field: lli: loss of lock indicator140struct PACKED log_GPS_RAW {141LOG_PACKET_HEADER;142uint64_t time_us;143int32_t iTOW;144int16_t week;145uint8_t numSV;146uint8_t sv;147double cpMes;148double prMes;149float doMes;150int8_t mesQI;151int8_t cno;152uint8_t lli;153};154155// @LoggerMessage: GRXH156// @Description: Raw uBlox data - header157// @Field: TimeUS: Time since system startup158// @Field: rcvTime: receiver TimeOfWeek measurement159// @Field: week: GPS week160// @Field: leapS: GPS leap seconds161// @Field: numMeas: number of space-vehicle measurements to follow162// @Field: recStat: receiver tracking status bitfield163struct PACKED log_GPS_RAWH {164LOG_PACKET_HEADER;165uint64_t time_us;166double rcvTow;167uint16_t week;168int8_t leapS;169uint8_t numMeas;170uint8_t recStat;171};172173// @LoggerMessage: GRXS174// @Description: Raw uBlox data - space-vehicle data175// @Field: TimeUS: Time since system startup176// @Field: prMes: Pseudorange measurement177// @Field: cpMes: Carrier phase measurement178// @Field: doMes: Doppler measurement179// @Field: gnss: GNSS identifier180// @Field: sv: Satellite identifier181// @Field: freq: GLONASS frequency slot182// @Field: lock: carrier phase locktime counter183// @Field: cno: carrier-to-noise density ratio184// @Field: prD: estimated pseudorange measurement standard deviation185// @Field: cpD: estimated carrier phase measurement standard deviation186// @Field: doD: estimated Doppler measurement standard deviation187// @Field: trk: tracking status bitfield188struct PACKED log_GPS_RAWS {189LOG_PACKET_HEADER;190uint64_t time_us;191double prMes;192double cpMes;193float doMes;194uint8_t gnssId;195uint8_t svId;196uint8_t freqId;197uint16_t locktime;198uint8_t cno;199uint8_t prStdev;200uint8_t cpStdev;201uint8_t doStdev;202uint8_t trkStat;203};204205#define LOG_STRUCTURE_FROM_GPS \206{ LOG_GPS_MSG, sizeof(log_GPS), \207"GPS", "QBBIHBcLLeffffB", "TimeUS,I,Status,GMS,GWk,NSats,HDop,Lat,Lng,Alt,Spd,GCrs,VZ,Yaw,U", "s#-s-S-DUmnhnh-", "F--C-0BGGB000--" , true }, \208{ LOG_GPA_MSG, sizeof(log_GPA), \209"GPA", "QBCCCCfBIHfHH", "TimeUS,I,VDop,HAcc,VAcc,SAcc,YAcc,VV,SMS,Delta,Und,RTCMFU,RTCMFD", "s#-mmnd-ssm--", "F-BBBB0-CC0--" , true }, \210{ LOG_GPS_UBX1_MSG, sizeof(log_Ubx1), \211"UBX1", "QBHBBHI", "TimeUS,Instance,noisePerMS,jamInd,aPower,agcCnt,config", "s#-----", "F------" , true }, \212{ LOG_GPS_UBX2_MSG, sizeof(log_Ubx2), \213"UBX2", "QBbBbB", "TimeUS,Instance,ofsI,magI,ofsQ,magQ", "s#----", "F-----" , true }, \214{ LOG_GPS_RAW_MSG, sizeof(log_GPS_RAW), \215"GRAW", "QIHBBddfBbB", "TimeUS,WkMS,Week,numSV,sv,cpMes,prMes,doMes,mesQI,cno,lli", "ss-S-------", "FC-0-------" , true }, \216{ LOG_GPS_RAWH_MSG, sizeof(log_GPS_RAWH), \217"GRXH", "QdHbBB", "TimeUS,rcvTime,week,leapS,numMeas,recStat", "s-----", "F-----" , true }, \218{ LOG_GPS_RAWS_MSG, sizeof(log_GPS_RAWS), \219"GRXS", "QddfBBBHBBBBB", "TimeUS,prMes,cpMes,doMes,gnss,sv,freq,lock,cno,prD,cpD,doD,trk", "s------------", "F------------" , true }, \220LOG_STRUCTURE_FROM_GPS_SBP221222223