Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_GPS/LogStructure_SBP.h
9594 views
1
#pragma once
2
3
#include <AP_Logger/LogStructure.h>
4
#include "AP_GPS_config.h"
5
6
#define LOG_IDS_FROM_GPS_SBP \
7
LOG_MSG_SBPHEALTH, \
8
LOG_MSG_SBPEVENT
9
10
// @LoggerMessage: SBPH
11
// @Description: Swift Health Data
12
// @Field: TimeUS: Time since system startup
13
// @Field: CrcError: Number of packet CRC errors on serial connection
14
// @Field: LastInject: Timestamp of last raw data injection to GPS
15
// @Field: IARhyp: Current number of integer ambiguity hypotheses
16
17
struct PACKED log_SbpHealth {
18
LOG_PACKET_HEADER;
19
uint64_t time_us;
20
uint32_t crc_error_counter;
21
uint32_t last_injected_data_ms;
22
uint32_t last_iar_num_hypotheses;
23
};
24
25
// @LoggerMessage: SBRE
26
// @Description: Swift Time Data
27
// @Field: TimeUS: Time since system startup
28
// @Field: GWk: GPS week number
29
// @Field: GMS: Milliseconds through GPS week
30
// @Field: ns_residual: residual of milliseconds rounding in ns
31
// @Field: level: GPIO pin levels
32
// @Field: quality: time quality
33
34
struct PACKED log_SbpEvent {
35
LOG_PACKET_HEADER;
36
uint64_t time_us;
37
uint16_t wn;
38
uint32_t tow;
39
int32_t ns_residual;
40
uint8_t level;
41
uint8_t quality;
42
};
43
44
#if AP_GPS_SBP_ENABLED
45
#define LOG_STRUCTURE_FROM_GPS_SBP \
46
{ LOG_MSG_SBPHEALTH, sizeof(log_SbpHealth), \
47
"SBPH", "QIII", "TimeUS,CrcError,LastInject,IARhyp", "s---", "F---" , true }, \
48
{ LOG_MSG_SBPEVENT, sizeof(log_SbpEvent), \
49
"SBRE", "QHIiBB", "TimeUS,GWk,GMS,ns_residual,level,quality", "s?????", "F?????" },
50
#else
51
#define LOG_STRUCTURE_FROM_GPS_SBP
52
#endif
53
54