Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_Baro/LogStructure.h
9542 views
1
#pragma once
2
3
#include <AP_Logger/LogStructure.h>
4
5
#define LOG_IDS_FROM_BARO \
6
LOG_BARO_MSG, \
7
LOG_BARD_MSG
8
9
// @LoggerMessage: BARO
10
// @Description: Gathered Barometer data
11
// @Field: TimeUS: Time since system startup
12
// @Field: I: barometer sensor instance number
13
// @Field: Alt: calculated altitude
14
// @Field: AltAMSL: altitude AMSL
15
// @Field: Press: measured atmospheric pressure
16
// @Field: Temp: measured atmospheric temperature
17
// @Field: CRt: derived climb rate from primary barometer
18
// @Field: SMS: time last sample was taken
19
// @Field: Offset: raw adjustment of barometer altitude, zeroed on calibration, possibly set by GCS
20
// @Field: GndTemp: temperature on ground, specified by parameter or measured while on ground
21
// @Field: H: true if barometer is considered healthy
22
// @Field: CPress: compensated atmospheric pressure
23
struct PACKED log_BARO {
24
LOG_PACKET_HEADER;
25
uint64_t time_us;
26
uint8_t instance;
27
float altitude;
28
float altitude_AMSL;
29
float pressure;
30
int16_t temperature;
31
float climbrate;
32
uint32_t sample_time_ms;
33
float drift_offset;
34
float ground_temp;
35
uint8_t healthy;
36
float corrected_pressure;
37
};
38
39
// @LoggerMessage: BARD
40
// @Description: Barometer dynamic data
41
// @Field: TimeUS: Time since system startup
42
// @Field: I: barometer sensor instance number
43
// @Field: DynPrX: calculated dynamic pressure in the bodyframe X-axis
44
// @Field: DynPrY: calculated dynamic pressure in the bodyframe Y-axis
45
// @Field: DynPrZ: calculated dynamic pressure in the bodyframe Z-axis
46
struct PACKED log_BARD {
47
LOG_PACKET_HEADER;
48
uint64_t time_us;
49
uint8_t instance;
50
float dyn_pressure_x;
51
float dyn_pressure_y;
52
float dyn_pressure_z;
53
};
54
55
#define LOG_STRUCTURE_FROM_BARO \
56
{ LOG_BARO_MSG, sizeof(log_BARO), \
57
"BARO", \
58
"Q" "B" "f" "f" "f" "c" "f" "I" "f" "f" "B" "f", \
59
"TimeUS," "I," "Alt," "AltAMSL," "Press," "Temp," "CRt," "SMS," "Offset," "GndTemp," "H," "CPress", \
60
"s" "#" "m" "m" "P" "O" "n" "s" "m" "O" "-" "P", \
61
"F" "-" "0" "0" "0" "B" "0" "C" "?" "0" "-" "0", \
62
true \
63
}, \
64
{ LOG_BARD_MSG, sizeof(log_BARD), \
65
"BARD", \
66
"Q" "B" "fff", \
67
"TimeUS," "I," "DynPrX,DynPrY,DynPrZ", \
68
"s" "#" "PPP", \
69
"F" "-" "000", \
70
true \
71
},
72
73