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_AHRS/LogStructure.h
Views: 1798
#pragma once12#include <AP_Logger/LogStructure.h>34#define LOG_IDS_FROM_AHRS \5LOG_AHR2_MSG, \6LOG_AOA_SSA_MSG, \7LOG_ATTITUDE_MSG, \8LOG_ORGN_MSG, \9LOG_POS_MSG, \10LOG_RATE_MSG, \11LOG_ATSC_MSG1213// @LoggerMessage: AHR214// @Description: Backup AHRS data15// @Field: TimeUS: Time since system startup16// @Field: Roll: Estimated roll17// @Field: Pitch: Estimated pitch18// @Field: Yaw: Estimated yaw19// @Field: Alt: Estimated altitude20// @Field: Lat: Estimated latitude21// @Field: Lng: Estimated longitude22// @Field: Q1: Estimated attitude quaternion component 123// @Field: Q2: Estimated attitude quaternion component 224// @Field: Q3: Estimated attitude quaternion component 325// @Field: Q4: Estimated attitude quaternion component 426struct PACKED log_AHRS {27LOG_PACKET_HEADER;28uint64_t time_us;29int16_t roll;30int16_t pitch;31uint16_t yaw;32float alt;33int32_t lat;34int32_t lng;35float q1, q2, q3, q4;36};3738// @LoggerMessage: AOA39// @Description: Angle of attack and Side Slip Angle values40// @Field: TimeUS: Time since system startup41// @Field: AOA: Angle of Attack calculated from airspeed, wind vector,velocity vector42// @Field: SSA: Side Slip Angle calculated from airspeed, wind vector,velocity vector43struct PACKED log_AOA_SSA {44LOG_PACKET_HEADER;45uint64_t time_us;46float AOA;47float SSA;48};4950// @LoggerMessage: ATT51// @Description: Canonical vehicle attitude52// @Field: TimeUS: Time since system startup53// @Field: DesRoll: vehicle desired roll54// @Field: Roll: achieved vehicle roll55// @Field: DesPitch: vehicle desired pitch56// @Field: Pitch: achieved vehicle pitch57// @Field: DesYaw: vehicle desired yaw58// @Field: Yaw: achieved vehicle yaw59// @Field: AEKF: active EKF type60struct PACKED log_Attitude {61LOG_PACKET_HEADER;62uint64_t time_us;63float control_roll;64float roll;65float control_pitch;66float pitch;67float control_yaw;68float yaw;69uint8_t active;70};7172// @LoggerMessage: ORGN73// @Description: Vehicle navigation origin or other notable position74// @Field: TimeUS: Time since system startup75// @Field: Type: Position type76// @FieldValueEnum: Type: AP_AHRS::LogOriginType77// @Field: Lat: Position latitude78// @Field: Lng: Position longitude79// @Field: Alt: Position altitude80struct PACKED log_ORGN {81LOG_PACKET_HEADER;82uint64_t time_us;83uint8_t origin_type;84int32_t latitude;85int32_t longitude;86int32_t altitude;87};8889// @LoggerMessage: POS90// @Description: Canonical vehicle position91// @Field: TimeUS: Time since system startup92// @Field: Lat: Canonical vehicle latitude93// @Field: Lng: Canonical vehicle longitude94// @Field: Alt: Canonical vehicle altitude95// @Field: RelHomeAlt: Canonical vehicle altitude relative to home96// @Field: RelOriginAlt: Canonical vehicle altitude relative to navigation origin97struct PACKED log_POS {98LOG_PACKET_HEADER;99uint64_t time_us;100int32_t lat;101int32_t lng;102float alt;103float rel_home_alt;104float rel_origin_alt;105};106107// @LoggerMessage: VSTB108// @Description: Log message for video stabilisation software such as Gyroflow109// @Field: TimeUS: Time since system startup110// @Field: GyrX: measured rotation rate about X axis111// @Field: GyrY: measured rotation rate about Y axis112// @Field: GyrZ: measured rotation rate about Z axis113// @Field: AccX: acceleration along X axis114// @Field: AccY: acceleration along Y axis115// @Field: AccZ: acceleration along Z axis116// @Field: Q1: Estimated attitude quaternion component 1117// @Field: Q2: Estimated attitude quaternion component 2118// @Field: Q3: Estimated attitude quaternion component 3119// @Field: Q4: Estimated attitude quaternion component 4120121struct PACKED log_Video_Stabilisation {122LOG_PACKET_HEADER;123uint64_t time_us;124float gyro_x;125float gyro_y;126float gyro_z;127float accel_x;128float accel_y;129float accel_z;130float Q1;131float Q2;132float Q3;133float Q4;134};135136// @LoggerMessage: ATSC137// @Description: Scale factors for attitude controller138// @Field: TimeUS: Time since system startup139// @Field: AngPScX: Angle P scale X140// @Field: AngPScY: Angle P scale Y141// @Field: AngPScZ: Angle P scale Z142// @Field: PDScX: PD scale X143// @Field: PDScY: PD scale Y144// @Field: PDScZ: PD scale Z145struct PACKED log_ATSC {146LOG_PACKET_HEADER;147uint64_t time_us;148float scaleP_x;149float scaleP_y;150float scaleP_z;151float scalePD_x;152float scalePD_y;153float scalePD_z;154};155156157#define LOG_STRUCTURE_FROM_AHRS \158{ LOG_AHR2_MSG, sizeof(log_AHRS), \159"AHR2","QccCfLLffff","TimeUS,Roll,Pitch,Yaw,Alt,Lat,Lng,Q1,Q2,Q3,Q4","sddhmDU----", "FBBB0GG----" , true }, \160{ LOG_AOA_SSA_MSG, sizeof(log_AOA_SSA), \161"AOA", "Qff", "TimeUS,AOA,SSA", "sdd", "F00" , true }, \162{ LOG_ATTITUDE_MSG, sizeof(log_Attitude),\163"ATT", "QffffffB", "TimeUS,DesRoll,Roll,DesPitch,Pitch,DesYaw,Yaw,AEKF", "sddddhh-", "F000000-" , true }, \164{ LOG_ORGN_MSG, sizeof(log_ORGN), \165"ORGN","QBLLe","TimeUS,Type,Lat,Lng,Alt", "s#DUm", "F-GGB" }, \166{ LOG_POS_MSG, sizeof(log_POS), \167"POS","QLLfff","TimeUS,Lat,Lng,Alt,RelHomeAlt,RelOriginAlt", "sDUmmm", "FGG000" , true }, \168{ LOG_ATSC_MSG, sizeof(log_ATSC), \169"ATSC", "Qffffff", "TimeUS,AngPScX,AngPScY,AngPScZ,PDScX,PDScY,PDScZ", "s------", "F000000" , true }, \170{ LOG_VIDEO_STABILISATION_MSG, sizeof(log_Video_Stabilisation), \171"VSTB", "Qffffffffff", "TimeUS,GyrX,GyrY,GyrZ,AccX,AccY,AccZ,Q1,Q2,Q3,Q4", "sEEEooo----", "F0000000000" },172173174175