CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_Baro/LogStructure.h
Views: 1798
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: Health: true if barometer is considered healthy
22
struct PACKED log_BARO {
23
LOG_PACKET_HEADER;
24
uint64_t time_us;
25
uint8_t instance;
26
float altitude;
27
float altitude_AMSL;
28
float pressure;
29
int16_t temperature;
30
float climbrate;
31
uint32_t sample_time_ms;
32
float drift_offset;
33
float ground_temp;
34
uint8_t healthy;
35
};
36
37
// @LoggerMessage: BARD
38
// @Description: Barometer dynamic data
39
// @Field: TimeUS: Time since system startup
40
// @Field: I: barometer sensor instance number
41
// @Field: DynPrX: calculated dynamic pressure in the bodyframe X-axis
42
// @Field: DynPrY: calculated dynamic pressure in the bodyframe Y-axis
43
// @Field: DynPrZ: calculated dynamic pressure in the bodyframe Z-axis
44
struct PACKED log_BARD {
45
LOG_PACKET_HEADER;
46
uint64_t time_us;
47
uint8_t instance;
48
float dyn_pressure_x;
49
float dyn_pressure_y;
50
float dyn_pressure_z;
51
};
52
53
#define LOG_STRUCTURE_FROM_BARO \
54
{ LOG_BARO_MSG, sizeof(log_BARO), \
55
"BARO", \
56
"Q" "B" "f" "f" "f" "c" "f" "I" "f" "f" "B", \
57
"TimeUS," "I," "Alt," "AltAMSL," "Press," "Temp," "CRt," "SMS," "Offset," "GndTemp," "Health", \
58
"s" "#" "m" "m" "P" "O" "n" "s" "m" "O" "-", \
59
"F" "-" "0" "0" "0" "B" "0" "C" "?" "0" "-", \
60
true \
61
}, \
62
{ LOG_BARD_MSG, sizeof(log_BARD), \
63
"BARD", \
64
"Q" "B" "fff", \
65
"TimeUS," "I," "DynPrX,DynPrY,DynPrZ", \
66
"s" "#" "PPP", \
67
"F" "-" "000", \
68
true \
69
},
70
71