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_Beacon/LogStructure.h
Views: 1798
1
#pragma once
2
3
#include <AP_Logger/LogStructure.h>
4
#include "AP_Beacon_config.h"
5
6
#define LOG_IDS_FROM_BEACON \
7
LOG_BEACON_MSG
8
9
// @LoggerMessage: BCN
10
// @Description: Beacon information
11
// @Field: TimeUS: Time since system startup
12
// @Field: Health: True if beacon sensor is healthy
13
// @Field: Cnt: Number of beacons being used
14
// @Field: D0: Distance to first beacon
15
// @Field: D1: Distance to second beacon
16
// @Field: D2: Distance to third beacon
17
// @Field: D3: Distance to fourth beacon
18
// @Field: PosX: Calculated beacon position, x-axis
19
// @Field: PosY: Calculated beacon position, y-axis
20
// @Field: PosZ: Calculated beacon position, z-axis
21
22
struct PACKED log_Beacon {
23
LOG_PACKET_HEADER;
24
uint64_t time_us;
25
uint8_t health;
26
uint8_t count;
27
float dist0;
28
float dist1;
29
float dist2;
30
float dist3;
31
float posx;
32
float posy;
33
float posz;
34
};
35
36
#if AP_BEACON_ENABLED
37
#define LOG_STRUCTURE_FROM_BEACON \
38
{ LOG_BEACON_MSG, sizeof(log_Beacon), \
39
"BCN", "QBBfffffff", "TimeUS,Health,Cnt,D0,D1,D2,D3,PosX,PosY,PosZ", "s--mmmmmmm", "F--0000000", true },
40
#else
41
#define LOG_STRUCTURE_FROM_BEACON
42
#endif
43
44