123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782 |
- #pragma once
- // if you add any new types, units or multipliers, please update README.md
- /*
- Format characters in the format string for binary log messages
- a : int16_t[32]
- b : int8_t
- B : uint8_t
- h : int16_t
- H : uint16_t
- i : int32_t
- I : uint32_t
- f : float
- d : double
- n : char[4]
- N : char[16]
- Z : char[64]
- c : int16_t * 100
- C : uint16_t * 100
- e : int32_t * 100
- E : uint32_t * 100
- L : int32_t latitude/longitude
- M : uint8_t flight mode
- q : int64_t
- Q : uint64_t
- */
- struct UnitStructure {
- const char ID;
- const char *unit;
- };
- struct MultiplierStructure {
- const char ID;
- const double multiplier;
- };
- // all units here should be base units
- // This does mean battery capacity is here as "amp*second"
- // Please keep the names consistent with Tools/autotest/param_metadata/param.py:33
- const struct UnitStructure log_Units[] = {
- { '-', "" }, // no units e.g. Pi, or a string
- { '?', "UNKNOWN" }, // Units which haven't been worked out yet....
- { 'A', "A" }, // Ampere
- { 'd', "deg" }, // of the angular variety, -180 to 180
- { 'b', "B" }, // bytes
- { 'k', "deg/s" }, // degrees per second. Degrees are NOT SI, but is some situations more user-friendly than radians
- { 'D', "deglatitude" }, // degrees of latitude
- { 'e', "deg/s/s" }, // degrees per second per second. Degrees are NOT SI, but is some situations more user-friendly than radians
- { 'E', "rad/s" }, // radians per second
- { 'G', "Gauss" }, // Gauss is not an SI unit, but 1 tesla = 10000 gauss so a simple replacement is not possible here
- { 'h', "degheading" }, // 0.? to 359.?
- { 'i', "A.s" }, // Ampere second
- { 'J', "W.s" }, // Joule (Watt second)
- // { 'l', "l" }, // litres
- { 'L', "rad/s/s" }, // radians per second per second
- { 'm', "m" }, // metres
- { 'n', "m/s" }, // metres per second
- // { 'N', "N" }, // Newton
- { 'o', "m/s/s" }, // metres per second per second
- { 'O', "degC" }, // degrees Celsius. Not SI, but Kelvin is too cumbersome for most users
- { '%', "%" }, // percent
- { 'S', "satellites" }, // number of satellites
- { 's', "s" }, // seconds
- { 'q', "rpm" }, // rounds per minute. Not SI, but sometimes more intuitive than Hertz
- { 'r', "rad" }, // radians
- { 'U', "deglongitude" }, // degrees of longitude
- { 'u', "ppm" }, // pulses per minute
- { 'v', "V" }, // Volt
- { 'P', "Pa" }, // Pascal
- { 'w', "Ohm" }, // Ohm
- // { 'W', "Watt" }, // Watt
- { 'Y', "us" }, // pulse width modulation in microseconds
- { 'z', "Hz" }, // Hertz
- { '#', "instance" } // (e.g.)Sensor instance number
- };
- // this multiplier information applies to the raw value present in the
- // log. Any adjustment implied by the format field (e.g. the "centi"
- // in "centidegrees" is *IGNORED* for the purposes of scaling.
- // Essentially "format" simply tells you the C-type, and format-type h
- // (int16_t) is equivalent to format-type c (int16_t*100)
- // tl;dr a GCS shouldn't/mustn't infer any scaling from the unit name
- const struct MultiplierStructure log_Multipliers[] = {
- { '-', 0 }, // no multiplier e.g. a string
- { '?', 1 }, // multipliers which haven't been worked out yet....
- // <leave a gap here, just in case....>
- { '2', 1e2 },
- { '1', 1e1 },
- { '0', 1e0 },
- { 'A', 1e-1 },
- { 'B', 1e-2 },
- { 'C', 1e-3 },
- { 'D', 1e-4 },
- { 'E', 1e-5 },
- { 'F', 1e-6 },
- { 'G', 1e-7 },
- // <leave a gap here, just in case....>
- { '!', 3.6 }, // (ampere*second => milliampere*hour) and (km/h => m/s)
- { '/', 3600 }, // (ampere*second => ampere*hour)
- };
- /*
- unfortunately these need to be macros because of a limitation of
- named member structure initialisation in g++
- */
- #define LOG_PACKET_HEADER uint8_t head1, head2, msgid;
- #define LOG_PACKET_HEADER_INIT(id) head1 : HEAD_BYTE1, head2 : HEAD_BYTE2, msgid : id
- #define LOG_PACKET_HEADER_LEN 3 // bytes required for LOG_PACKET_HEADER
- // once the logging code is all converted we will remove these from
- // this header
- #define HEAD_BYTE1 0xA3 // Decimal 163
- #define HEAD_BYTE2 0x95 // Decimal 149
- // structure used to define logging format
- struct LogStructure {
- uint8_t msg_type;
- uint8_t msg_len;
- const char *name;
- const char *format;
- const char *labels;
- const char *units;
- const char *multipliers;
- };
- // maximum lengths of fields in LogStructure, including trailing nulls
- static const uint8_t LS_NAME_SIZE = 5;
- static const uint8_t LS_FORMAT_SIZE = 17;
- static const uint8_t LS_LABELS_SIZE = 65;
- static const uint8_t LS_UNITS_SIZE = 17;
- static const uint8_t LS_MULTIPLIERS_SIZE = 17;
- /*
- log structures common to all vehicle types
- */
- struct PACKED log_Format {
- LOG_PACKET_HEADER;
- uint8_t type;
- uint8_t length;
- char name[4];
- char format[16];
- char labels[64];
- };
- struct PACKED log_Unit {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- char type;
- char unit[64]; // you know, this might be overkill...
- };
- struct PACKED log_Format_Multiplier {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- char type;
- double multiplier;
- };
- struct PACKED log_Format_Units {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t format_type;
- char units[16];
- char multipliers[16];
- };
- struct PACKED log_Parameter {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- char name[16];
- float value;
- };
- struct PACKED log_DSF {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint32_t dropped;
- uint16_t blocks;
- uint32_t bytes;
- uint32_t buf_space_min;
- uint32_t buf_space_max;
- uint32_t buf_space_avg;
- };
- struct PACKED log_Event {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t id;
- };
- struct PACKED log_Error {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t sub_system;
- uint8_t error_code;
- };
- struct PACKED log_GPS {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t status;
- uint32_t gps_week_ms;
- uint16_t gps_week;
- uint8_t num_sats;
- uint16_t hdop;
- int32_t latitude;
- int32_t longitude;
- int32_t altitude;
- float ground_speed;
- float ground_course;
- float vel_z;
- float yaw;
- uint8_t used;
- };
- struct PACKED log_GPA {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t vdop;
- uint16_t hacc;
- uint16_t vacc;
- uint16_t sacc;
- uint8_t have_vv;
- uint32_t sample_ms;
- uint16_t delta_ms;
- };
- struct PACKED log_Message {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- char msg[64];
- };
- struct PACKED log_IMU {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float gyro_x, gyro_y, gyro_z;
- float accel_x, accel_y, accel_z;
- uint32_t gyro_error, accel_error;
- float temperature;
- uint8_t gyro_health, accel_health;
- uint16_t gyro_rate, accel_rate;
- };
- struct PACKED log_IMUDT {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float delta_time, delta_vel_dt, delta_ang_dt;
- float delta_ang_x, delta_ang_y, delta_ang_z;
- float delta_vel_x, delta_vel_y, delta_vel_z;
- };
- struct PACKED log_ISBH {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t seqno;
- uint8_t sensor_type; // e.g. GYRO or ACCEL
- uint8_t instance;
- uint16_t multiplier;
- uint16_t sample_count;
- uint64_t sample_us;
- float sample_rate_hz;
- };
- static_assert(sizeof(log_ISBH) < 256, "log_ISBH is over-size");
- struct PACKED log_ISBD {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t isb_seqno;
- uint16_t seqno; // seqno within isb_seqno
- int16_t x[32];
- int16_t y[32];
- int16_t z[32];
- };
- static_assert(sizeof(log_ISBD) < 256, "log_ISBD is over-size");
- struct PACKED log_Vibe {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float vibe_x, vibe_y, vibe_z;
- uint32_t clipping_0, clipping_1, clipping_2;
- };
- struct PACKED log_Gimbal1 {
- LOG_PACKET_HEADER;
- uint32_t time_ms;
- float delta_time;
- float delta_angles_x;
- float delta_angles_y;
- float delta_angles_z;
- float delta_velocity_x;
- float delta_velocity_y;
- float delta_velocity_z;
- float joint_angles_x;
- float joint_angles_y;
- float joint_angles_z;
- };
- struct PACKED log_Gimbal2 {
- LOG_PACKET_HEADER;
- uint32_t time_ms;
- uint8_t est_sta;
- float est_x;
- float est_y;
- float est_z;
- float rate_x;
- float rate_y;
- float rate_z;
- float target_x;
- float target_y;
- float target_z;
- };
- struct PACKED log_Gimbal3 {
- LOG_PACKET_HEADER;
- uint32_t time_ms;
- int16_t rl_torque_cmd;
- int16_t el_torque_cmd;
- int16_t az_torque_cmd;
- };
- struct PACKED log_RCIN {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t chan1;
- uint16_t chan2;
- uint16_t chan3;
- uint16_t chan4;
- uint16_t chan5;
- uint16_t chan6;
- uint16_t chan7;
- uint16_t chan8;
- uint16_t chan9;
- uint16_t chan10;
- uint16_t chan11;
- uint16_t chan12;
- uint16_t chan13;
- uint16_t chan14;
- };
- struct PACKED log_RCOUT {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t chan1;
- uint16_t chan2;
- uint16_t chan3;
- uint16_t chan4;
- uint16_t chan5;
- uint16_t chan6;
- uint16_t chan7;
- uint16_t chan8;
- uint16_t chan9;
- uint16_t chan10;
- uint16_t chan11;
- uint16_t chan12;
- uint16_t chan13;
- uint16_t chan14;
- };
- struct PACKED log_MAV {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t chan;
- uint16_t packet_tx_count;
- uint16_t packet_rx_success_count;
- uint16_t packet_rx_drop_count;
- };
- struct PACKED log_RSSI {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float RXRSSI;
- };
- struct PACKED log_BARO {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float altitude;
- float pressure;
- int16_t temperature;
- float climbrate;
- uint32_t sample_time_ms;
- float drift_offset;
- float ground_temp;
- uint8_t healthy;
- };
- struct PACKED log_Optflow {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t surface_quality;
- float flow_x;
- float flow_y;
- float body_x;
- float body_y;
- };
- struct PACKED log_AHRS {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t roll;
- int16_t pitch;
- uint16_t yaw;
- float alt;
- int32_t lat;
- int32_t lng;
- float q1, q2, q3, q4;
- };
- struct PACKED log_POS {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int32_t lat;
- int32_t lng;
- float alt;
- float rel_home_alt;
- float rel_origin_alt;
- };
- struct PACKED log_POWR {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float Vcc;
- float Vservo;
- uint16_t flags;
- uint8_t safety_and_arm;
- };
- struct PACKED log_EKF1 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t roll;
- int16_t pitch;
- uint16_t yaw;
- float velN;
- float velE;
- float velD;
- float posD_dot;
- float posN;
- float posE;
- float posD;
- int16_t gyrX;
- int16_t gyrY;
- int16_t gyrZ;
- int32_t originHgt;
- };
- struct PACKED log_EKF2 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int8_t Ratio;
- int8_t AZ1bias;
- int8_t AZ2bias;
- int16_t windN;
- int16_t windE;
- int16_t magN;
- int16_t magE;
- int16_t magD;
- int16_t magX;
- int16_t magY;
- int16_t magZ;
- };
- struct PACKED log_NKF2 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int8_t AZbias;
- int16_t scaleX;
- int16_t scaleY;
- int16_t scaleZ;
- int16_t windN;
- int16_t windE;
- int16_t magN;
- int16_t magE;
- int16_t magD;
- int16_t magX;
- int16_t magY;
- int16_t magZ;
- uint8_t index;
- };
- struct PACKED log_NKF2a {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t accBiasX;
- int16_t accBiasY;
- int16_t accBiasZ;
- int16_t windN;
- int16_t windE;
- int16_t magN;
- int16_t magE;
- int16_t magD;
- int16_t magX;
- int16_t magY;
- int16_t magZ;
- uint8_t index;
- };
- struct PACKED log_EKF3 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t innovVN;
- int16_t innovVE;
- int16_t innovVD;
- int16_t innovPN;
- int16_t innovPE;
- int16_t innovPD;
- int16_t innovMX;
- int16_t innovMY;
- int16_t innovMZ;
- int16_t innovVT;
- };
- struct PACKED log_NKF3 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t innovVN;
- int16_t innovVE;
- int16_t innovVD;
- int16_t innovPN;
- int16_t innovPE;
- int16_t innovPD;
- int16_t innovMX;
- int16_t innovMY;
- int16_t innovMZ;
- int16_t innovYaw;
- int16_t innovVT;
- };
- struct PACKED log_EKF4 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t sqrtvarV;
- int16_t sqrtvarP;
- int16_t sqrtvarH;
- int16_t sqrtvarMX;
- int16_t sqrtvarMY;
- int16_t sqrtvarMZ;
- int16_t sqrtvarVT;
- int8_t offsetNorth;
- int8_t offsetEast;
- uint16_t faults;
- uint8_t timeouts;
- uint16_t solution;
- uint16_t gps;
- };
- struct PACKED log_NKF4 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t sqrtvarV;
- int16_t sqrtvarP;
- int16_t sqrtvarH;
- int16_t sqrtvarM;
- int16_t sqrtvarVT;
- float tiltErr;
- int8_t offsetNorth;
- int8_t offsetEast;
- uint16_t faults;
- uint8_t timeouts;
- uint16_t solution;
- uint16_t gps;
- int8_t primary;
- };
- struct PACKED log_EKF5 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t normInnov;
- int16_t FIX;
- int16_t FIY;
- int16_t AFI;
- int16_t HAGL;
- int16_t offset;
- int16_t RI;
- uint16_t meaRng;
- uint16_t errHAGL;
- };
- struct PACKED log_NKF5 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t normInnov;
- int16_t FIX;
- int16_t FIY;
- int16_t AFI;
- int16_t HAGL;
- int16_t offset;
- int16_t RI;
- uint16_t meaRng;
- uint16_t errHAGL;
- float angErr;
- float velErr;
- float posErr;
- };
- struct PACKED log_Quaternion {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float q1;
- float q2;
- float q3;
- float q4;
- };
- struct PACKED log_RngBcnDebug {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t ID; // beacon identifier
- int16_t rng; // beacon range (cm)
- int16_t innov; // beacon range innovation (cm)
- uint16_t sqrtInnovVar; // sqrt of beacon range innovation variance (cm)
- uint16_t testRatio; // beacon range innovation consistency test ratio *100
- int16_t beaconPosN; // beacon north position (cm)
- int16_t beaconPosE; // beacon east position (cm)
- int16_t beaconPosD; // beacon down position (cm)
- int16_t offsetHigh; // high estimate of vertical position offset of beacons rel to EKF origin (cm)
- int16_t offsetLow; // low estimate of vertical position offset of beacons rel to EKF origin (cm)
- int16_t posN; // North position of receiver rel to EKF origin (cm)
- int16_t posE; // East position of receiver rel to EKF origin (cm)
- int16_t posD; // Down position of receiver rel to EKF origin (cm)
- };
- // visual odometry sensor data
- struct PACKED log_VisualOdom {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float time_delta;
- float angle_delta_x;
- float angle_delta_y;
- float angle_delta_z;
- float position_delta_x;
- float position_delta_y;
- float position_delta_z;
- float confidence;
- };
- struct PACKED log_ekfBodyOdomDebug {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float velInnovX;
- float velInnovY;
- float velInnovZ;
- float velInnovVarX;
- float velInnovVarY;
- float velInnovVarZ;
- };
- struct PACKED log_ekfStateVar {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float v00;
- float v01;
- float v02;
- float v03;
- float v04;
- float v05;
- float v06;
- float v07;
- float v08;
- float v09;
- float v10;
- float v11;
- };
- struct PACKED log_Cmd {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t command_total;
- uint16_t sequence;
- uint16_t command;
- float param1;
- float param2;
- float param3;
- float param4;
- int32_t latitude;
- int32_t longitude;
- float altitude;
- uint8_t frame;
- };
- struct PACKED log_MAVLink_Command {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t target_system;
- uint8_t target_component;
- uint8_t frame;
- uint16_t command;
- uint8_t current;
- uint8_t autocontinue;
- float param1;
- float param2;
- float param3;
- float param4;
- int32_t x;
- int32_t y;
- float z;
- uint8_t result;
- bool was_command_long;
- };
- struct PACKED log_Radio {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t rssi;
- uint8_t remrssi;
- uint8_t txbuf;
- uint8_t noise;
- uint8_t remnoise;
- uint16_t rxerrors;
- uint16_t fixed;
- };
- struct PACKED log_Camera {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint32_t gps_time;
- uint16_t gps_week;
- int32_t latitude;
- int32_t longitude;
- int32_t altitude;
- int32_t altitude_rel;
- int32_t altitude_gps;
- int16_t roll;
- int16_t pitch;
- uint16_t yaw;
- };
- struct PACKED log_Attitude {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t control_roll;
- int16_t roll;
- int16_t control_pitch;
- int16_t pitch;
- uint16_t control_yaw;
- uint16_t yaw;
- uint16_t error_rp;
- uint16_t error_yaw;
- };
- struct PACKED log_PID {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float target;
- float actual;
- float error;
- float P;
- float I;
- float D;
- float FF;
- };
- struct PACKED log_Current {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float voltage;
- float voltage_resting;
- float current_amps;
- float current_total;
- float consumed_wh;
- int16_t temperature; // degrees C * 100
- float resistance;
- };
- struct PACKED log_WheelEncoder {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float distance_0;
- uint8_t quality_0;
- float distance_1;
- 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;
- float voltage;
- uint16_t cell_voltages[10];
- };
- struct PACKED log_Compass {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int16_t mag_x;
- int16_t mag_y;
- int16_t mag_z;
- int16_t offset_x;
- int16_t offset_y;
- int16_t offset_z;
- int16_t motor_offset_x;
- int16_t motor_offset_y;
- int16_t motor_offset_z;
- uint8_t health;
- uint32_t SUS;
- };
- struct PACKED log_Mode {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t mode;
- uint8_t mode_num;
- uint8_t mode_reason;
- };
- /*
- rangefinder - support for 4 sensors
- */
- struct PACKED log_RFND {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t instance;
- uint16_t dist;
- uint8_t status;
- uint8_t orient;
- };
- /*
- terrain log structure
- */
- struct PACKED log_TERRAIN {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t status;
- int32_t lat;
- int32_t lng;
- uint16_t spacing;
- float terrain_height;
- float current_height;
- uint16_t pending;
- uint16_t loaded;
- };
- /*
- UBlox logging
- */
- struct PACKED log_Ubx1 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t instance;
- uint16_t noisePerMS;
- uint8_t jamInd;
- uint8_t aPower;
- uint16_t agcCnt;
- uint32_t config;
- };
- struct PACKED log_Ubx2 {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t instance;
- int8_t ofsI;
- uint8_t magI;
- int8_t ofsQ;
- uint8_t magQ;
- };
- struct PACKED log_GPS_RAW {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int32_t iTOW;
- int16_t week;
- uint8_t numSV;
- uint8_t sv;
- double cpMes;
- double prMes;
- float doMes;
- int8_t mesQI;
- int8_t cno;
- uint8_t lli;
- };
- struct PACKED log_GPS_RAWH {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- double rcvTow;
- uint16_t week;
- int8_t leapS;
- uint8_t numMeas;
- uint8_t recStat;
- };
- struct PACKED log_GPS_RAWS {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- double prMes;
- double cpMes;
- float doMes;
- uint8_t gnssId;
- uint8_t svId;
- uint8_t freqId;
- uint16_t locktime;
- uint8_t cno;
- uint8_t prStdev;
- uint8_t cpStdev;
- uint8_t doStdev;
- uint8_t trkStat;
- };
- struct PACKED log_GPS_SBF_EVENT {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint32_t TOW;
- uint16_t WNc;
- uint8_t Mode;
- uint8_t Error;
- double Latitude;
- double Longitude;
- double Height;
- float Undulation;
- float Vn;
- float Ve;
- float Vu;
- float COG;
- };
- struct PACKED log_Esc {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- int32_t rpm;
- uint16_t voltage;
- uint16_t current;
- int16_t temperature;
- uint16_t current_tot;
- };
- struct PACKED log_AIRSPEED {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float airspeed;
- float diffpressure;
- int16_t temperature;
- float rawpressure;
- float offset;
- bool use;
- bool healthy;
- float health_prob;
- uint8_t primary;
- };
- struct PACKED log_ACCEL {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint64_t sample_us;
- float AccX, AccY, AccZ;
- };
- struct PACKED log_GYRO {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint64_t sample_us;
- float GyrX, GyrY, GyrZ;
- };
- struct PACKED log_MAV_Stats {
- LOG_PACKET_HEADER;
- uint32_t timestamp;
- uint32_t seqno;
- uint32_t dropped;
- uint32_t retries;
- uint32_t resends;
- uint8_t state_free_avg;
- uint8_t state_free_min;
- uint8_t state_free_max;
- uint8_t state_pending_avg;
- uint8_t state_pending_min;
- uint8_t state_pending_max;
- uint8_t state_sent_avg;
- uint8_t state_sent_min;
- uint8_t state_sent_max;
- // uint8_t state_retry_avg;
- // uint8_t state_retry_min;
- // uint8_t state_retry_max;
- };
- struct PACKED log_ORGN {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t origin_type;
- int32_t latitude;
- int32_t longitude;
- int32_t altitude;
- };
- struct PACKED log_RPM {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float rpm1;
- float rpm2;
- };
- struct PACKED log_Rate {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float control_roll;
- float roll;
- float roll_out;
- float control_pitch;
- float pitch;
- float pitch_out;
- float control_yaw;
- float yaw;
- float yaw_out;
- float control_accel;
- float accel;
- float accel_out;
- };
- struct PACKED log_SbpLLH {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint32_t tow;
- int32_t lat;
- int32_t lon;
- int32_t alt;
- uint8_t n_sats;
- uint8_t flags;
- };
- struct PACKED log_SbpHealth {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint32_t crc_error_counter;
- uint32_t last_injected_data_ms;
- uint32_t last_iar_num_hypotheses;
- };
- struct PACKED log_SbpRAWH {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t msg_type;
- uint16_t sender_id;
- uint8_t index;
- uint8_t pages;
- uint8_t msg_len;
- uint8_t res;
- uint8_t data[48];
- };
- struct PACKED log_SbpRAWM {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t msg_type;
- uint16_t sender_id;
- uint8_t index;
- uint8_t pages;
- uint8_t msg_len;
- uint8_t res;
- uint8_t data[104];
- };
- struct PACKED log_SbpEvent {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t wn;
- uint32_t tow;
- int32_t ns_residual;
- uint8_t level;
- uint8_t quality;
- };
- struct PACKED log_Rally {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t total;
- uint8_t sequence;
- int32_t latitude;
- int32_t longitude;
- int16_t altitude;
- };
- struct PACKED log_AOA_SSA {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- float AOA;
- float SSA;
- };
- struct PACKED log_Beacon {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t health;
- uint8_t count;
- float dist0;
- float dist1;
- float dist2;
- float dist3;
- float posx;
- float posy;
- float posz;
- };
- // proximity sensor logging
- struct PACKED log_Proximity {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t health;
- float dist0;
- float dist45;
- float dist90;
- float dist135;
- float dist180;
- float dist225;
- float dist270;
- float dist315;
- float distup;
- float closest_angle;
- float closest_dist;
- };
- struct PACKED log_Performance {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint16_t num_long_running;
- uint16_t num_loops;
- uint32_t max_time;
- uint32_t mem_avail;
- uint16_t load;
- uint32_t internal_errors;
- uint32_t internal_error_count;
- uint32_t spi_count;
- uint32_t i2c_count;
- uint32_t i2c_isr_count;
- uint32_t extra_loop_us;
- };
- struct PACKED log_SRTL {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t active;
- uint16_t num_points;
- uint16_t max_points;
- uint8_t action;
- float N;
- float E;
- float D;
- };
- struct PACKED log_OABendyRuler {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t active;
- uint16_t target_yaw;
- uint16_t yaw;
- float margin;
- int32_t final_lat;
- int32_t final_lng;
- int32_t oa_lat;
- int32_t oa_lng;
- };
- struct PACKED log_OADijkstra {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t state;
- uint8_t curr_point;
- uint8_t tot_points;
- int32_t final_lat;
- int32_t final_lng;
- int32_t oa_lat;
- int32_t oa_lng;
- };
- struct PACKED log_DSTL {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t stage;
- float target_heading;
- int32_t target_lat;
- int32_t target_lng;
- int32_t target_alt;
- int16_t crosstrack_error;
- int16_t travel_distance;
- float l1_i;
- int32_t loiter_sum_cd;
- float desired;
- float P;
- float I;
- float D;
- };
- struct PACKED log_Arm_Disarm {
- LOG_PACKET_HEADER;
- uint64_t time_us;
- uint8_t arm_state;
- uint16_t arm_checks;
- };
- // FMT messages define all message formats other than FMT
- // UNIT messages define units which can be referenced by FMTU messages
- // FMTU messages associate types (e.g. centimeters/second/second) to FMT message fields
- #define ACC_LABELS "TimeUS,SampleUS,AccX,AccY,AccZ"
- #define ACC_FMT "QQfff"
- #define ACC_UNITS "ssnnn"
- #define ACC_MULTS "FF000"
- // see "struct sensor" in AP_Baro.h and "Write_Baro":
- #define BARO_LABELS "TimeUS,Alt,Press,Temp,CRt,SMS,Offset,GndTemp,Health"
- #define BARO_FMT "QffcfIffB"
- #define BARO_UNITS "smPOnsmO-"
- #define BARO_MULTS "F00B0C?0-"
- #define ESC_LABELS "TimeUS,RPM,Volt,Curr,Temp,CTot"
- #define ESC_FMT "QeCCcH"
- #define ESC_UNITS "sqvAO-"
- #define ESC_MULTS "FBBBB-"
- #define GPA_LABELS "TimeUS,VDop,HAcc,VAcc,SAcc,VV,SMS,Delta"
- #define GPA_FMT "QCCCCBIH"
- #define GPA_UNITS "smmmn-ss"
- #define GPA_MULTS "FBBBB-CC"
- // see "struct GPS_State" and "Write_GPS":
- #define GPS_LABELS "TimeUS,Status,GMS,GWk,NSats,HDop,Lat,Lng,Alt,Spd,GCrs,VZ,Yaw,U"
- #define GPS_FMT "QBIHBcLLeffffB"
- #define GPS_UNITS "s---SmDUmnhnh-"
- #define GPS_MULTS "F---0BGGB000--"
- #define GYR_LABELS "TimeUS,SampleUS,GyrX,GyrY,GyrZ"
- #define GYR_FMT "QQfff"
- #define GYR_UNITS "ssEEE"
- #define GYR_MULTS "FF000"
- #define IMT_LABELS "TimeUS,DelT,DelvT,DelaT,DelAX,DelAY,DelAZ,DelVX,DelVY,DelVZ"
- #define IMT_FMT "Qfffffffff"
- #define IMT_UNITS "ssssrrrnnn"
- #define IMT_MULTS "FF00000000"
- #define ISBH_LABELS "TimeUS,N,type,instance,mul,smp_cnt,SampleUS,smp_rate"
- #define ISBH_FMT "QHBBHHQf"
- #define ISBH_UNITS "s-----sz"
- #define ISBH_MULTS "F-----F-"
- #define ISBD_LABELS "TimeUS,N,seqno,x,y,z"
- #define ISBD_FMT "QHHaaa"
- #define ISBD_UNITS "s--ooo"
- #define ISBD_MULTS "F--???"
- #define IMU_LABELS "TimeUS,GyrX,GyrY,GyrZ,AccX,AccY,AccZ,EG,EA,T,GH,AH,GHz,AHz"
- #define IMU_FMT "QffffffIIfBBHH"
- #define IMU_UNITS "sEEEooo--O--zz"
- #define IMU_MULTS "F000000-----00"
- #define MAG_LABELS "TimeUS,MagX,MagY,MagZ,OfsX,OfsY,OfsZ,MOfsX,MOfsY,MOfsZ,Health,S"
- #define MAG_FMT "QhhhhhhhhhBI"
- #define MAG_UNITS "sGGGGGGGGG-s"
- #define MAG_MULTS "FCCCCCCCCC-F"
- #define PID_LABELS "TimeUS,Tar,Act,Err,P,I,D,FF"
- #define PID_FMT "Qfffffff"
- #define PID_UNITS "s-------"
- #define PID_MULTS "F-------"
- #define QUAT_LABELS "TimeUS,Q1,Q2,Q3,Q4"
- #define QUAT_FMT "Qffff"
- #define QUAT_UNITS "s????"
- #define QUAT_MULTS "F????"
- #define CURR_LABELS "TimeUS,Volt,VoltR,Curr,CurrTot,EnrgTot,Temp,Res"
- #define CURR_FMT "Qfffffcf"
- #define CURR_UNITS "svvA?JOw"
- #define CURR_MULTS "F000?/?0"
- #define CURR_CELL_LABELS "TimeUS,Volt,V1,V2,V3,V4,V5,V6,V7,V8,V9,V10"
- #define CURR_CELL_FMT "QfHHHHHHHHHH"
- #define CURR_CELL_UNITS "svvvvvvvvvvv"
- #define CURR_CELL_MULTS "F00000000000"
- #define ARSP_LABELS "TimeUS,Airspeed,DiffPress,Temp,RawPress,Offset,U,Health,Hfp,Pri"
- #define ARSP_FMT "QffcffBBfB"
- #define ARSP_UNITS "snPOPP----"
- #define ARSP_MULTS "F00B00----"
- // messages for all boards
- #define LOG_BASE_STRUCTURES \
- { LOG_FORMAT_MSG, sizeof(log_Format), \
- "FMT", "BBnNZ", "Type,Length,Name,Format,Columns", "-b---", "-----" }, \
- { LOG_UNIT_MSG, sizeof(log_Unit), \
- "UNIT", "QbZ", "TimeUS,Id,Label", "s--","F--" }, \
- { LOG_FORMAT_UNITS_MSG, sizeof(log_Format_Units), \
- "FMTU", "QBNN", "TimeUS,FmtType,UnitIds,MultIds","s---", "F---" }, \
- { LOG_MULT_MSG, sizeof(log_Format_Multiplier), \
- "MULT", "Qbd", "TimeUS,Id,Mult", "s--","F--" }, \
- { LOG_PARAMETER_MSG, sizeof(log_Parameter), \
- "PARM", "QNf", "TimeUS,Name,Value", "s--", "F--" }, \
- { LOG_GPS_MSG, sizeof(log_GPS), \
- "GPS", GPS_FMT, GPS_LABELS, GPS_UNITS, GPS_MULTS }, \
- { LOG_GPS2_MSG, sizeof(log_GPS), \
- "GPS2", GPS_FMT, GPS_LABELS, GPS_UNITS, GPS_MULTS }, \
- { LOG_GPSB_MSG, sizeof(log_GPS), \
- "GPSB", GPS_FMT, GPS_LABELS, GPS_UNITS, GPS_MULTS }, \
- { LOG_GPA_MSG, sizeof(log_GPA), \
- "GPA", GPA_FMT, GPA_LABELS, GPA_UNITS, GPA_MULTS }, \
- { LOG_GPA2_MSG, sizeof(log_GPA), \
- "GPA2", GPA_FMT, GPA_LABELS, GPA_UNITS, GPA_MULTS }, \
- { LOG_GPAB_MSG, sizeof(log_GPA), \
- "GPAB", GPA_FMT, GPA_LABELS, GPA_UNITS, GPA_MULTS }, \
- { LOG_IMU_MSG, sizeof(log_IMU), \
- "IMU", IMU_FMT, IMU_LABELS, IMU_UNITS, IMU_MULTS }, \
- { LOG_MESSAGE_MSG, sizeof(log_Message), \
- "MSG", "QZ", "TimeUS,Message", "s-", "F-"}, \
- { LOG_RCIN_MSG, sizeof(log_RCIN), \
- "RCIN", "QHHHHHHHHHHHHHH", "TimeUS,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14", "sYYYYYYYYYYYYYY", "F--------------" }, \
- { LOG_RCOUT_MSG, sizeof(log_RCOUT), \
- "RCOU", "QHHHHHHHHHHHHHH", "TimeUS,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14", "sYYYYYYYYYYYYYY", "F--------------" }, \
- { LOG_RSSI_MSG, sizeof(log_RSSI), \
- "RSSI", "Qf", "TimeUS,RXRSSI", "s-", "F-" }, \
- { LOG_BARO_MSG, sizeof(log_BARO), \
- "BARO", BARO_FMT, BARO_LABELS, BARO_UNITS, BARO_MULTS }, \
- { LOG_POWR_MSG, sizeof(log_POWR), \
- "POWR","QffHB","TimeUS,Vcc,VServo,Flags,Safety", "svv--", "F00--" }, \
- { LOG_CMD_MSG, sizeof(log_Cmd), \
- "CMD", "QHHHffffLLfB","TimeUS,CTot,CNum,CId,Prm1,Prm2,Prm3,Prm4,Lat,Lng,Alt,Frame", "s-------DUm-", "F-------GG0-" }, \
- { LOG_MAVLINK_COMMAND_MSG, sizeof(log_MAVLink_Command), \
- "MAVC", "QBBBHBBffffiifBB","TimeUS,TS,TC,Fr,Cmd,Cur,AC,P1,P2,P3,P4,X,Y,Z,Res,WL", "s---------------", "F---------------" }, \
- { LOG_RADIO_MSG, sizeof(log_Radio), \
- "RAD", "QBBBBBHH", "TimeUS,RSSI,RemRSSI,TxBuf,Noise,RemNoise,RxErrors,Fixed", "s-------", "F-------" }, \
- { LOG_CAMERA_MSG, sizeof(log_Camera), \
- "CAM", "QIHLLeeeccC","TimeUS,GPSTime,GPSWeek,Lat,Lng,Alt,RelAlt,GPSAlt,Roll,Pitch,Yaw", "s--DUmmmddd", "F--GGBBBBBB" }, \
- { LOG_TRIGGER_MSG, sizeof(log_Camera), \
- "TRIG", "QIHLLeeeccC","TimeUS,GPSTime,GPSWeek,Lat,Lng,Alt,RelAlt,GPSAlt,Roll,Pitch,Yaw", "s--DUmmmddd", "F--GGBBBBBB" }, \
- { LOG_ARSP_MSG, sizeof(log_AIRSPEED), "ARSP", ARSP_FMT, ARSP_LABELS, ARSP_UNITS, ARSP_MULTS }, \
- { LOG_ASP2_MSG, sizeof(log_AIRSPEED), "ASP2", ARSP_FMT, ARSP_LABELS, ARSP_UNITS, ARSP_MULTS }, \
- { LOG_CURRENT_MSG, sizeof(log_Current), \
- "BAT", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT2_MSG, sizeof(log_Current), \
- "BAT2", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT3_MSG, sizeof(log_Current), \
- "BAT3", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT4_MSG, sizeof(log_Current), \
- "BAT4", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT5_MSG, sizeof(log_Current), \
- "BAT5", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT6_MSG, sizeof(log_Current), \
- "BAT6", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT7_MSG, sizeof(log_Current), \
- "BAT7", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT8_MSG, sizeof(log_Current), \
- "BAT8", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT9_MSG, sizeof(log_Current), \
- "BAT9", CURR_FMT,CURR_LABELS,CURR_UNITS,CURR_MULTS }, \
- { LOG_CURRENT_CELLS_MSG, sizeof(log_Current_Cells), \
- "BCL", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_CURRENT_CELLS2_MSG, sizeof(log_Current_Cells), \
- "BCL2", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_CURRENT_CELLS3_MSG, sizeof(log_Current_Cells), \
- "BCL3", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_CURRENT_CELLS4_MSG, sizeof(log_Current_Cells), \
- "BCL4", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_CURRENT_CELLS5_MSG, sizeof(log_Current_Cells), \
- "BCL5", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_CURRENT_CELLS6_MSG, sizeof(log_Current_Cells), \
- "BCL6", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_CURRENT_CELLS7_MSG, sizeof(log_Current_Cells), \
- "BCL7", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_CURRENT_CELLS8_MSG, sizeof(log_Current_Cells), \
- "BCL8", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_CURRENT_CELLS9_MSG, sizeof(log_Current_Cells), \
- "BCL9", CURR_CELL_FMT, CURR_CELL_LABELS, CURR_CELL_UNITS, CURR_CELL_MULTS }, \
- { LOG_ATTITUDE_MSG, sizeof(log_Attitude),\
- "ATT", "QccccCCCC", "TimeUS,DesRoll,Roll,DesPitch,Pitch,DesYaw,Yaw,ErrRP,ErrYaw", "sddddhhdh", "FBBBBBBBB" }, \
- { LOG_COMPASS_MSG, sizeof(log_Compass), \
- "MAG", MAG_FMT, MAG_LABELS, MAG_UNITS, MAG_MULTS }, \
- { LOG_MODE_MSG, sizeof(log_Mode), \
- "MODE", "QMBB", "TimeUS,Mode,ModeNum,Rsn", "s---", "F---" }, \
- { LOG_RFND_MSG, sizeof(log_RFND), \
- "RFND", "QBCBB", "TimeUS,Instance,Dist,Stat,Orient", "s#m--", "F-B--" }, \
- { LOG_MAV_STATS, sizeof(log_MAV_Stats), \
- "DMS", "IIIIIBBBBBBBBB", "TimeMS,N,Dp,RT,RS,Fa,Fmn,Fmx,Pa,Pmn,Pmx,Sa,Smn,Smx", "s-------------", "C-------------" }, \
- { LOG_BEACON_MSG, sizeof(log_Beacon), \
- "BCN", "QBBfffffff", "TimeUS,Health,Cnt,D0,D1,D2,D3,PosX,PosY,PosZ", "s--mmmmmmm", "F--BBBBBBB" }, \
- { LOG_PROXIMITY_MSG, sizeof(log_Proximity), \
- "PRX", "QBfffffffffff", "TimeUS,Health,D0,D45,D90,D135,D180,D225,D270,D315,DUp,CAn,CDis", "s-mmmmmmmmmhm", "F-00000000000" }, \
- { LOG_PERFORMANCE_MSG, sizeof(log_Performance), \
- "PM", "QHHIIHIIIIII", "TimeUS,NLon,NLoop,MaxT,Mem,Load,IntE,IntEC,SPIC,I2CC,I2CI,ExUS", "s---b%-----s", "F---0A-----F" }, \
- { LOG_SRTL_MSG, sizeof(log_SRTL), \
- "SRTL", "QBHHBfff", "TimeUS,Active,NumPts,MaxPts,Action,N,E,D", "s----mmm", "F----000" }, \
- { LOG_OA_BENDYRULER_MSG, sizeof(log_OABendyRuler), \
- "OABR","QBHHfLLLL","TimeUS,Active,DesYaw,Yaw,Mar,DLat,DLng,OALat,OALng", "sbddmDUDU", "F----GGGG" }, \
- { LOG_OA_DIJKSTRA_MSG, sizeof(log_OADijkstra), \
- "OADJ","QBBBLLLL","TimeUS,State,CurrPoint,TotPoints,DLat,DLng,OALat,OALng", "sbbbDUDU", "F---GGGG" }
- // messages for more advanced boards
- #define LOG_EXTRA_STRUCTURES \
- { LOG_IMU2_MSG, sizeof(log_IMU), \
- "IMU2", IMU_FMT, IMU_LABELS, IMU_UNITS, IMU_MULTS }, \
- { LOG_IMU3_MSG, sizeof(log_IMU), \
- "IMU3", IMU_FMT, IMU_LABELS, IMU_UNITS, IMU_MULTS }, \
- { LOG_AHR2_MSG, sizeof(log_AHRS), \
- "AHR2","QccCfLLffff","TimeUS,Roll,Pitch,Yaw,Alt,Lat,Lng,Q1,Q2,Q3,Q4","sddhmDU????", "FBBB0GG????" }, \
- { LOG_POS_MSG, sizeof(log_POS), \
- "POS","QLLfff","TimeUS,Lat,Lng,Alt,RelHomeAlt,RelOriginAlt", "sDUmmm", "FGG000" }, \
- { LOG_SIMSTATE_MSG, sizeof(log_AHRS), \
- "SIM","QccCfLLffff","TimeUS,Roll,Pitch,Yaw,Alt,Lat,Lng,Q1,Q2,Q3,Q4", "sddhmDU????", "FBBB0GG????" }, \
- { LOG_NKF1_MSG, sizeof(log_EKF1), \
- "NKF1","QccCfffffffccce","TimeUS,Roll,Pitch,Yaw,VN,VE,VD,dPD,PN,PE,PD,GX,GY,GZ,OH", "sddhnnnnmmmkkkm", "FBBB0000000BBBB" }, \
- { LOG_NKF2_MSG, sizeof(log_NKF2), \
- "NKF2","QbccccchhhhhhB","TimeUS,AZbias,GSX,GSY,GSZ,VWN,VWE,MN,ME,MD,MX,MY,MZ,MI", "s----nnGGGGGG-", "F----BBCCCCCC-" }, \
- { LOG_NKF3_MSG, sizeof(log_NKF3), \
- "NKF3","Qcccccchhhcc","TimeUS,IVN,IVE,IVD,IPN,IPE,IPD,IMX,IMY,IMZ,IYAW,IVT", "snnnmmmGGG??", "FBBBBBBCCCBB" }, \
- { LOG_NKF4_MSG, sizeof(log_NKF4), \
- "NKF4","QcccccfbbHBHHb","TimeUS,SV,SP,SH,SM,SVT,errRP,OFN,OFE,FS,TS,SS,GPS,PI", "s------??-----", "F------??-----" }, \
- { LOG_NKF5_MSG, sizeof(log_NKF5), \
- "NKF5","QBhhhcccCCfff","TimeUS,NI,FIX,FIY,AFI,HAGL,offset,RI,rng,Herr,eAng,eVel,ePos", "s----m???mrnm", "F----BBBBB000" }, \
- { LOG_NKF6_MSG, sizeof(log_EKF1), \
- "NKF6","QccCfffffffccce","TimeUS,Roll,Pitch,Yaw,VN,VE,VD,dPD,PN,PE,PD,GX,GY,GZ,OH", "sddhnnn-mmmkkkm", "FBBB000-000BBBB" }, \
- { LOG_NKF7_MSG, sizeof(log_NKF2), \
- "NKF7","QbccccchhhhhhB","TimeUS,AZbias,GSX,GSY,GSZ,VWN,VWE,MN,ME,MD,MX,MY,MZ,MI", "s----nnGGGGGG-", "F----BBCCCCCC-" }, \
- { LOG_NKF8_MSG, sizeof(log_NKF3), \
- "NKF8","Qcccccchhhcc","TimeUS,IVN,IVE,IVD,IPN,IPE,IPD,IMX,IMY,IMZ,IYAW,IVT", "snnnmmmGGGd?", "FBBBBBBCCCBB" }, \
- { LOG_NKF9_MSG, sizeof(log_NKF4), \
- "NKF9","QcccccfbbHBHHb","TimeUS,SV,SP,SH,SM,SVT,errRP,OFN,OFE,FS,TS,SS,GPS,PI", "s-----???-----", "F-----???-----" }, \
- { LOG_NKF10_MSG, sizeof(log_RngBcnDebug), \
- "NKF0","QBccCCcccccccc","TimeUS,ID,rng,innov,SIV,TR,BPN,BPE,BPD,OFH,OFL,OFN,OFE,OFD", "s-m---mmmmmmmm", "F-B---BBBBBBBB" }, \
- { LOG_NKF11_MSG, sizeof(log_EKF1), \
- "NK11","QccCfffffffccce","TimeUS,Roll,Pitch,Yaw,VN,VE,VD,dPD,PN,PE,PD,GX,GY,GZ,OH", "sddhnnn-mmmkkkm", "FBBB000-000BBBB" }, \
- { LOG_NKF12_MSG, sizeof(log_NKF2), \
- "NK12","QbccccchhhhhhB","TimeUS,AZbias,GSX,GSY,GSZ,VWN,VWE,MN,ME,MD,MX,MY,MZ,MI", "s----nnGGGGGG-", "F----BBCCCCCC-" }, \
- { LOG_NKF13_MSG, sizeof(log_NKF3), \
- "NK13","Qcccccchhhcc","TimeUS,IVN,IVE,IVD,IPN,IPE,IPD,IMX,IMY,IMZ,IYAW,IVT", "snnnmmmGGGd?", "FBBBBBBCCCBB" }, \
- { LOG_NKF14_MSG, sizeof(log_NKF4), \
- "NK14","QcccccfbbHBHHb","TimeUS,SV,SP,SH,SM,SVT,errRP,OFN,OFE,FS,TS,SS,GPS,PI", "s-----???-----", "F-----???-----" }, \
- { LOG_NKQ1_MSG, sizeof(log_Quaternion), "NKQ1", QUAT_FMT, QUAT_LABELS, QUAT_UNITS, QUAT_MULTS }, \
- { LOG_NKQ2_MSG, sizeof(log_Quaternion), "NKQ2", QUAT_FMT, QUAT_LABELS, QUAT_UNITS, QUAT_MULTS }, \
- { LOG_NKQ3_MSG, sizeof(log_Quaternion), "NKQ3", QUAT_FMT, QUAT_LABELS, QUAT_UNITS, QUAT_MULTS }, \
- { LOG_XKF1_MSG, sizeof(log_EKF1), \
- "XKF1","QccCfffffffccce","TimeUS,Roll,Pitch,Yaw,VN,VE,VD,dPD,PN,PE,PD,GX,GY,GZ,OH", "sddhnnnnmmmkkkm", "FBBB0000000BBBB" }, \
- { LOG_XKF2_MSG, sizeof(log_NKF2a), \
- "XKF2","QccccchhhhhhB","TimeUS,AX,AY,AZ,VWN,VWE,MN,ME,MD,MX,MY,MZ,MI", "s---nnGGGGGG-", "F---BBCCCCCC-" }, \
- { LOG_XKF3_MSG, sizeof(log_NKF3), \
- "XKF3","Qcccccchhhcc","TimeUS,IVN,IVE,IVD,IPN,IPE,IPD,IMX,IMY,IMZ,IYAW,IVT", "snnnmmmGGG??", "FBBBBBBCCCBB" }, \
- { LOG_XKF4_MSG, sizeof(log_NKF4), \
- "XKF4","QcccccfbbHBHHb","TimeUS,SV,SP,SH,SM,SVT,errRP,OFN,OFE,FS,TS,SS,GPS,PI", "s------??-----", "F------??-----" }, \
- { LOG_XKF5_MSG, sizeof(log_NKF5), \
- "XKF5","QBhhhcccCCfff","TimeUS,NI,FIX,FIY,AFI,HAGL,offset,RI,rng,Herr,eAng,eVel,ePos", "s----m???mrnm", "F----BBBBB000" }, \
- { LOG_XKF6_MSG, sizeof(log_EKF1), \
- "XKF6","QccCfffffffccce","TimeUS,Roll,Pitch,Yaw,VN,VE,VD,dPD,PN,PE,PD,GX,GY,GZ,OH", "sddhnnn-mmmkkkm", "FBBB000-000BBBB" }, \
- { LOG_XKF7_MSG, sizeof(log_NKF2a), \
- "XKF7","QccccchhhhhhB","TimeUS,AX,AY,AZ,VWN,VWE,MN,ME,MD,MX,MY,MZ,MI", "s---nnGGGGGG-", "F---BBCCCCCC-" }, \
- { LOG_XKF8_MSG, sizeof(log_NKF3), \
- "XKF8","Qcccccchhhcc","TimeUS,IVN,IVE,IVD,IPN,IPE,IPD,IMX,IMY,IMZ,IYAW,IVT", "snnnmmmGGGd?", "FBBBBBBCCCBB" }, \
- { LOG_XKF9_MSG, sizeof(log_NKF4), \
- "XKF9","QcccccfbbHBHHb","TimeUS,SV,SP,SH,SM,SVT,errRP,OFN,OFE,FS,TS,SS,GPS,PI", "s-----???-----", "F-----???-----" }, \
- { LOG_XKF10_MSG, sizeof(log_RngBcnDebug), \
- "XKF0","QBccCCcccccccc","TimeUS,ID,rng,innov,SIV,TR,BPN,BPE,BPD,OFH,OFL,OFN,OFE,OFD", "s-m---mmmmmmmm", "F-B---BBBBBBBB" }, \
- { LOG_XKF11_MSG, sizeof(log_EKF1), \
- "XK11","QccCfffffffccce","TimeUS,Roll,Pitch,Yaw,VN,VE,VD,dPD,PN,PE,PD,GX,GY,GZ,OH", "sddhnnn-mmmkkkm", "FBBB000-000BBBB" }, \
- { LOG_XKF12_MSG, sizeof(log_NKF2a), \
- "XK12","QccccchhhhhhB","TimeUS,AX,AY,AZ,VWN,VWE,MN,ME,MD,MX,MY,MZ,MI", "s---nnGGGGGG-", "F---BBCCCCCC-" }, \
- { LOG_XKF13_MSG, sizeof(log_NKF3), \
- "XK13","Qcccccchhhcc","TimeUS,IVN,IVE,IVD,IPN,IPE,IPD,IMX,IMY,IMZ,IYAW,IVT", "snnnmmmGGGd?", "FBBBBBBCCCBB" }, \
- { LOG_XKF14_MSG, sizeof(log_NKF4), \
- "XK14","QcccccfbbHBHHb","TimeUS,SV,SP,SH,SM,SVT,errRP,OFN,OFE,FS,TS,SS,GPS,PI", "s-----???-----", "F-----???-----" }, \
- { LOG_XKQ1_MSG, sizeof(log_Quaternion), "XKQ1", QUAT_FMT, QUAT_LABELS, QUAT_UNITS, QUAT_MULTS }, \
- { LOG_XKQ2_MSG, sizeof(log_Quaternion), "XKQ2", QUAT_FMT, QUAT_LABELS, QUAT_UNITS, QUAT_MULTS }, \
- { LOG_XKQ3_MSG, sizeof(log_Quaternion), "XKQ3", QUAT_FMT, QUAT_LABELS, QUAT_UNITS, QUAT_MULTS }, \
- { LOG_XKFD_MSG, sizeof(log_ekfBodyOdomDebug), \
- "XKFD","Qffffff","TimeUS,IX,IY,IZ,IVX,IVY,IVZ", "s------", "F------" }, \
- { LOG_XKV1_MSG, sizeof(log_ekfStateVar), \
- "XKV1","Qffffffffffff","TimeUS,V00,V01,V02,V03,V04,V05,V06,V07,V08,V09,V10,V11", "s------------", "F------------" }, \
- { LOG_XKV2_MSG, sizeof(log_ekfStateVar), \
- "XKV2","Qffffffffffff","TimeUS,V12,V13,V14,V15,V16,V17,V18,V19,V20,V21,V22,V23", "s------------", "F------------" }, \
- { LOG_TERRAIN_MSG, sizeof(log_TERRAIN), \
- "TERR","QBLLHffHH","TimeUS,Status,Lat,Lng,Spacing,TerrH,CHeight,Pending,Loaded", "s-DU-mm--", "F-GG-00--" }, \
- { LOG_GPS_UBX1_MSG, sizeof(log_Ubx1), \
- "UBX1", "QBHBBHI", "TimeUS,Instance,noisePerMS,jamInd,aPower,agcCnt,config", "s------", "F------" }, \
- { LOG_GPS_UBX2_MSG, sizeof(log_Ubx2), \
- "UBX2", "QBbBbB", "TimeUS,Instance,ofsI,magI,ofsQ,magQ", "s-----", "F-----" }, \
- { LOG_GPS2_UBX1_MSG, sizeof(log_Ubx1), \
- "UBY1", "QBHBBHI", "TimeUS,Instance,noisePerMS,jamInd,aPower,agcCnt,config", "s------", "F------" }, \
- { LOG_GPS2_UBX2_MSG, sizeof(log_Ubx2), \
- "UBY2", "QBbBbB", "TimeUS,Instance,ofsI,magI,ofsQ,magQ", "s-----", "F-----" }, \
- { LOG_GPS_RAW_MSG, sizeof(log_GPS_RAW), \
- "GRAW", "QIHBBddfBbB", "TimeUS,WkMS,Week,numSV,sv,cpMes,prMes,doMes,mesQI,cno,lli", "s--S-------", "F--0-------" }, \
- { LOG_GPS_RAWH_MSG, sizeof(log_GPS_RAWH), \
- "GRXH", "QdHbBB", "TimeUS,rcvTime,week,leapS,numMeas,recStat", "s-----", "F-----" }, \
- { LOG_GPS_RAWS_MSG, sizeof(log_GPS_RAWS), \
- "GRXS", "QddfBBBHBBBBB", "TimeUS,prMes,cpMes,doMes,gnss,sv,freq,lock,cno,prD,cpD,doD,trk", "s------------", "F------------" }, \
- { LOG_GPS_SBF_EVENT_MSG, sizeof(log_GPS_SBF_EVENT), \
- "SBFE", "QIHBBdddfffff", "TimeUS,TOW,WN,Mode,Err,Lat,Lng,Height,Undul,Vn,Ve,Vu,COG", "s----DUm-nnnh", "F----000-0000" }, \
- { LOG_ESC1_MSG, sizeof(log_Esc), \
- "ESC1", ESC_FMT, ESC_LABELS, ESC_UNITS, ESC_MULTS }, \
- { LOG_ESC2_MSG, sizeof(log_Esc), \
- "ESC2", ESC_FMT, ESC_LABELS, ESC_UNITS, ESC_MULTS }, \
- { LOG_ESC3_MSG, sizeof(log_Esc), \
- "ESC3", ESC_FMT, ESC_LABELS, ESC_UNITS, ESC_MULTS }, \
- { LOG_ESC4_MSG, sizeof(log_Esc), \
- "ESC4", ESC_FMT, ESC_LABELS, ESC_UNITS, ESC_MULTS }, \
- { LOG_ESC5_MSG, sizeof(log_Esc), \
- "ESC5", ESC_FMT, ESC_LABELS, ESC_UNITS, ESC_MULTS }, \
- { LOG_ESC6_MSG, sizeof(log_Esc), \
- "ESC6", ESC_FMT, ESC_LABELS, ESC_UNITS, ESC_MULTS }, \
- { LOG_ESC7_MSG, sizeof(log_Esc), \
- "ESC7", ESC_FMT, ESC_LABELS, ESC_UNITS, ESC_MULTS }, \
- { LOG_ESC8_MSG, sizeof(log_Esc), \
- "ESC8", ESC_FMT, ESC_LABELS, ESC_UNITS, ESC_MULTS }, \
- { LOG_COMPASS2_MSG, sizeof(log_Compass), \
- "MAG2",MAG_FMT, MAG_LABELS, MAG_UNITS, MAG_MULTS }, \
- { LOG_COMPASS3_MSG, sizeof(log_Compass), \
- "MAG3",MAG_FMT, MAG_LABELS, MAG_UNITS, MAG_MULTS }, \
- { LOG_ACC1_MSG, sizeof(log_ACCEL), \
- "ACC1", ACC_FMT, ACC_LABELS, ACC_UNITS, ACC_MULTS }, \
- { LOG_ACC2_MSG, sizeof(log_ACCEL), \
- "ACC2", ACC_FMT, ACC_LABELS, ACC_UNITS, ACC_MULTS }, \
- { LOG_ACC3_MSG, sizeof(log_ACCEL), \
- "ACC3", ACC_FMT, ACC_LABELS, ACC_UNITS, ACC_MULTS }, \
- { LOG_GYR1_MSG, sizeof(log_GYRO), \
- "GYR1", GYR_FMT, GYR_LABELS, GYR_UNITS, GYR_MULTS }, \
- { LOG_GYR2_MSG, sizeof(log_GYRO), \
- "GYR2", GYR_FMT, GYR_LABELS, GYR_UNITS, GYR_MULTS }, \
- { LOG_GYR3_MSG, sizeof(log_GYRO), \
- "GYR3", GYR_FMT, GYR_LABELS, GYR_UNITS, GYR_MULTS }, \
- { LOG_PIDR_MSG, sizeof(log_PID), \
- "PIDR", PID_FMT, PID_LABELS, PID_UNITS, PID_MULTS }, \
- { LOG_PIDP_MSG, sizeof(log_PID), \
- "PIDP", PID_FMT, PID_LABELS, PID_UNITS, PID_MULTS }, \
- { LOG_PIDY_MSG, sizeof(log_PID), \
- "PIDY", PID_FMT, PID_LABELS, PID_UNITS, PID_MULTS }, \
- { LOG_PIDA_MSG, sizeof(log_PID), \
- "PIDA", PID_FMT, PID_LABELS, PID_UNITS, PID_MULTS }, \
- { LOG_PIDS_MSG, sizeof(log_PID), \
- "PIDS", PID_FMT, PID_LABELS, PID_UNITS, PID_MULTS }, \
- { LOG_DSTL_MSG, sizeof(log_DSTL), \
- "DSTL", "QBfLLeccfeffff", "TimeUS,Stg,THdg,Lat,Lng,Alt,XT,Travel,L1I,Loiter,Des,P,I,D", "s??DUm--------", "F??000--------" }, \
- { LOG_BAR2_MSG, sizeof(log_BARO), \
- "BAR2", BARO_FMT, BARO_LABELS, BARO_UNITS, BARO_MULTS }, \
- { LOG_BAR3_MSG, sizeof(log_BARO), \
- "BAR3", BARO_FMT, BARO_LABELS, BARO_UNITS, BARO_MULTS }, \
- { LOG_VIBE_MSG, sizeof(log_Vibe), \
- "VIBE", "QfffIII", "TimeUS,VibeX,VibeY,VibeZ,Clip0,Clip1,Clip2", "s------", "F------" }, \
- { LOG_IMUDT_MSG, sizeof(log_IMUDT), \
- "IMT",IMT_FMT,IMT_LABELS, IMT_UNITS, IMT_MULTS }, \
- { LOG_IMUDT2_MSG, sizeof(log_IMUDT), \
- "IMT2",IMT_FMT,IMT_LABELS, IMT_UNITS, IMT_MULTS }, \
- { LOG_IMUDT3_MSG, sizeof(log_IMUDT), \
- "IMT3",IMT_FMT,IMT_LABELS, IMT_UNITS, IMT_MULTS }, \
- { LOG_ISBH_MSG, sizeof(log_ISBH), \
- "ISBH",ISBH_FMT,ISBH_LABELS,ISBH_UNITS,ISBH_MULTS }, \
- { LOG_ISBD_MSG, sizeof(log_ISBD), \
- "ISBD",ISBD_FMT,ISBD_LABELS, ISBD_UNITS, ISBD_MULTS }, \
- { LOG_ORGN_MSG, sizeof(log_ORGN), \
- "ORGN","QBLLe","TimeUS,Type,Lat,Lng,Alt", "s-DUm", "F-GGB" }, \
- { LOG_DF_FILE_STATS, sizeof(log_DSF), \
- "DSF", "QIHIIII", "TimeUS,Dp,Blk,Bytes,FMn,FMx,FAv", "s--b---", "F--0---" }, \
- { LOG_RPM_MSG, sizeof(log_RPM), \
- "RPM", "Qff", "TimeUS,rpm1,rpm2", "sqq", "F00" }, \
- { LOG_GIMBAL1_MSG, sizeof(log_Gimbal1), \
- "GMB1", "Iffffffffff", "TimeMS,dt,dax,day,daz,dvx,dvy,dvz,jx,jy,jz", "ssrrrEEELLL", "CC000000000" }, \
- { LOG_GIMBAL2_MSG, sizeof(log_Gimbal2), \
- "GMB2", "IBfffffffff", "TimeMS,es,ex,ey,ez,rx,ry,rz,tx,ty,tz", "s-rrrEEELLL", "C-000000000" }, \
- { LOG_GIMBAL3_MSG, sizeof(log_Gimbal3), \
- "GMB3", "Ihhh", "TimeMS,rl_torque_cmd,el_torque_cmd,az_torque_cmd", "s???", "C???" }, \
- { LOG_RATE_MSG, sizeof(log_Rate), \
- "RATE", "Qffffffffffff", "TimeUS,RDes,R,ROut,PDes,P,POut,YDes,Y,YOut,ADes,A,AOut", "skk-kk-kk-oo-", "F?????????BB-" }, \
- { LOG_RALLY_MSG, sizeof(log_Rally), \
- "RALY", "QBBLLh", "TimeUS,Tot,Seq,Lat,Lng,Alt", "s--DUm", "F--GGB" }, \
- { LOG_MAV_MSG, sizeof(log_MAV), \
- "MAV", "QBHHH", "TimeUS,chan,txp,rxp,rxdp", "s#---", "F-000" }, \
- { LOG_VISUALODOM_MSG, sizeof(log_VisualOdom), \
- "VISO", "Qffffffff", "TimeUS,dt,AngDX,AngDY,AngDZ,PosDX,PosDY,PosDZ,conf", "ssrrrmmm-", "FF000000-" }, \
- { 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-" }, \
- { LOG_ADSB_MSG, sizeof(log_ADSB), \
- "ADSB", "QIiiiHHhH", "TimeUS,ICAO_address,Lat,Lng,Alt,Heading,Hor_vel,Ver_vel,Squark", "s-DUmhnn-", "F-GGCBCC-" }
- #define LOG_SBP_STRUCTURES \
- { LOG_MSG_SBPHEALTH, sizeof(log_SbpHealth), \
- "SBPH", "QIII", "TimeUS,CrcError,LastInject,IARhyp", "s---", "F---" }, \
- { LOG_MSG_SBPRAWH, sizeof(log_SbpRAWH), \
- "SBRH", "QQQQQQQQ", "TimeUS,msg_flag,1,2,3,4,5,6", "s--b----", "F--0----" }, \
- { LOG_MSG_SBPRAWM, sizeof(log_SbpRAWM), \
- "SBRM", "QQQQQQQQQQQQQQQ", "TimeUS,msg_flag,1,2,3,4,5,6,7,8,9,10,11,12,13", "s??????????????", "F??????????????" }, \
- { LOG_EVENT_MSG, sizeof(log_Event), \
- "EV", "QB", "TimeUS,Id", "s-", "F-" }, \
- { LOG_MSG_SBPEVENT, sizeof(log_SbpEvent), \
- "SBRE", "QHIiBB", "TimeUS,GWk,GMS,ns_residual,level,quality", "s?????", "F?????" }, \
- { LOG_ARM_DISARM_MSG, sizeof(log_Arm_Disarm), \
- "ARM", "QBH", "TimeUS,ArmState,ArmChecks", "s--", "F--" }, \
- { LOG_ERROR_MSG, sizeof(log_Error), \
- "ERR", "QBB", "TimeUS,Subsys,ECode", "s--", "F--" }
- #define LOG_COMMON_STRUCTURES LOG_BASE_STRUCTURES, LOG_EXTRA_STRUCTURES, LOG_SBP_STRUCTURES
- // message types 0 to 63 reserved for vehicle specific use
- // message types for common messages
- enum LogMessages : uint8_t {
- LOG_NKF1_MSG = 64,
- LOG_NKF2_MSG,
- LOG_NKF3_MSG,
- LOG_NKF4_MSG,
- LOG_NKF5_MSG,
- LOG_NKF6_MSG,
- LOG_NKF7_MSG,
- LOG_NKF8_MSG,
- LOG_NKF9_MSG,
- LOG_NKF10_MSG,
- LOG_NKF11_MSG,
- LOG_NKF12_MSG,
- LOG_NKF13_MSG,
- LOG_NKF14_MSG,
- LOG_NKQ1_MSG,
- LOG_NKQ2_MSG,
- LOG_NKQ3_MSG,
- LOG_XKF1_MSG,
- LOG_XKF2_MSG,
- LOG_XKF3_MSG,
- LOG_XKF4_MSG,
- LOG_XKF5_MSG,
- LOG_XKF6_MSG,
- LOG_XKF7_MSG,
- LOG_XKF8_MSG,
- LOG_XKF9_MSG,
- LOG_XKF10_MSG,
- LOG_XKF11_MSG,
- LOG_XKF12_MSG,
- LOG_XKF13_MSG,
- LOG_XKF14_MSG,
- LOG_XKQ1_MSG,
- LOG_XKQ2_MSG,
- LOG_XKQ3_MSG,
- LOG_XKFD_MSG,
- LOG_XKV1_MSG,
- LOG_XKV2_MSG,
- LOG_FORMAT_MSG = 128, // this must remain #128
- LOG_PARAMETER_MSG,
- LOG_GPS_MSG,
- LOG_GPS2_MSG,
- LOG_GPSB_MSG,
- LOG_IMU_MSG,
- LOG_MESSAGE_MSG,
- LOG_RCIN_MSG,
- LOG_RCOUT_MSG,
- LOG_RSSI_MSG,
- LOG_IMU2_MSG,
- LOG_BARO_MSG,
- LOG_POWR_MSG,
- LOG_AHR2_MSG,
- LOG_SIMSTATE_MSG,
- LOG_CMD_MSG,
- LOG_MAVLINK_COMMAND_MSG,
- LOG_RADIO_MSG,
- LOG_ATRP_MSG,
- LOG_CAMERA_MSG,
- LOG_IMU3_MSG,
- LOG_TERRAIN_MSG,
- LOG_GPS_UBX1_MSG,
- LOG_GPS_UBX2_MSG,
- LOG_GPS2_UBX1_MSG,
- LOG_GPS2_UBX2_MSG,
- LOG_ESC1_MSG,
- LOG_ESC2_MSG,
- LOG_ESC3_MSG,
- LOG_ESC4_MSG,
- LOG_ESC5_MSG,
- LOG_ESC6_MSG,
- LOG_ESC7_MSG,
- LOG_ESC8_MSG,
- LOG_BAR2_MSG,
- LOG_ARSP_MSG,
- LOG_ATTITUDE_MSG,
- LOG_CURRENT_MSG,
- LOG_CURRENT2_MSG,
- LOG_CURRENT3_MSG,
- LOG_CURRENT4_MSG,
- LOG_CURRENT5_MSG,
- LOG_CURRENT6_MSG,
- LOG_CURRENT7_MSG,
- LOG_CURRENT8_MSG,
- LOG_CURRENT9_MSG,
- LOG_CURRENT_CELLS_MSG,
- LOG_CURRENT_CELLS2_MSG,
- LOG_CURRENT_CELLS3_MSG,
- LOG_CURRENT_CELLS4_MSG,
- LOG_CURRENT_CELLS5_MSG,
- LOG_CURRENT_CELLS6_MSG,
- LOG_CURRENT_CELLS7_MSG,
- LOG_CURRENT_CELLS8_MSG,
- LOG_CURRENT_CELLS9_MSG,
- LOG_COMPASS_MSG,
- LOG_COMPASS2_MSG,
- LOG_COMPASS3_MSG,
- LOG_MODE_MSG,
- LOG_GPS_RAW_MSG,
- LOG_GPS_RAWH_MSG,
- LOG_GPS_RAWS_MSG,
- LOG_GPS_SBF_EVENT_MSG,
- LOG_ACC1_MSG,
- LOG_ACC2_MSG,
- LOG_ACC3_MSG,
- LOG_GYR1_MSG,
- LOG_GYR2_MSG,
- LOG_GYR3_MSG,
- LOG_POS_MSG,
- LOG_PIDR_MSG,
- LOG_PIDP_MSG,
- LOG_PIDY_MSG,
- LOG_PIDA_MSG,
- LOG_PIDS_MSG,
- LOG_DSTL_MSG,
- LOG_VIBE_MSG,
- LOG_IMUDT_MSG,
- LOG_IMUDT2_MSG,
- LOG_IMUDT3_MSG,
- LOG_ORGN_MSG,
- LOG_RPM_MSG,
- LOG_GPA_MSG,
- LOG_GPA2_MSG,
- LOG_GPAB_MSG,
- LOG_RFND_MSG,
- LOG_BAR3_MSG,
- LOG_MAV_STATS,
- LOG_FORMAT_UNITS_MSG,
- LOG_UNIT_MSG,
- LOG_MULT_MSG,
- LOG_MSG_SBPHEALTH,
- LOG_MSG_SBPLLH,
- LOG_MSG_SBPBASELINE,
- LOG_MSG_SBPTRACKING1,
- LOG_MSG_SBPTRACKING2,
- LOG_MSG_SBPRAWH,
- LOG_MSG_SBPRAWM,
- LOG_MSG_SBPEVENT,
- LOG_TRIGGER_MSG,
- LOG_GIMBAL1_MSG,
- LOG_GIMBAL2_MSG,
- LOG_GIMBAL3_MSG,
- LOG_RATE_MSG,
- LOG_RALLY_MSG,
- LOG_VISUALODOM_MSG,
- LOG_AOA_SSA_MSG,
- LOG_BEACON_MSG,
- LOG_PROXIMITY_MSG,
- LOG_DF_FILE_STATS,
- LOG_SRTL_MSG,
- LOG_ISBH_MSG,
- LOG_ISBD_MSG,
- LOG_ASP2_MSG,
- LOG_PERFORMANCE_MSG,
- LOG_OPTFLOW_MSG,
- LOG_EVENT_MSG,
- LOG_WHEELENCODER_MSG,
- LOG_MAV_MSG,
- LOG_ERROR_MSG,
- LOG_ADSB_MSG,
- LOG_ARM_DISARM_MSG,
- LOG_OA_BENDYRULER_MSG,
- LOG_OA_DIJKSTRA_MSG,
- _LOG_LAST_MSG_
- };
- static_assert(_LOG_LAST_MSG_ <= 255, "Too many message formats");
- enum LogOriginType {
- ekf_origin = 0,
- ahrs_home = 1
- };
|