-
Notifications
You must be signed in to change notification settings - Fork 2
/
neo_m8_ubx_structs.h
144 lines (122 loc) · 5.78 KB
/
neo_m8_ubx_structs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*
* neo_m8_ubx_structs.h
*
* Created on: Jul 17, 2018
* Author: alexis
*/
#ifndef NEO_M8_UBX_STRUCTS_H_
#define NEO_M8_UBX_STRUCTS_H_
#include <stdint.h>
#include <stdbool.h>
/* See the page 309 of UBX-13003221 - R15 for details */
typedef enum {
PSM_NOT_ACTIVE = 0,
PSM_ENABLED = 1,
PSM_ACQUISITION = 2,
PSM_TRACKING = 3,
PSM_OPT_TRACKING = 4,
PSM_INACTIVE = 5
} ubx_power_save_mode;
/* See the page 309 of UBX-13003221 - R15 for details */
typedef enum {
NO_CARRIER_PHASE_RANGE_SOLUTION = 0,
FLOAT_SOLUTION = 1,
FIXED_SOLUTION = 2
} ubx_carrier_phase_range;
/* See the page 307 of UBX-13003221 - R15 for the units and scalings */
typedef struct {
unsigned long iTOW; /*(ms) GPS time of week of the navigation epoch. */
unsigned short year; /* Year (UTC) */
unsigned char month; /* Month, range 1..12 (UTC) */
unsigned char day; /* Day of month, range 1..31 (UTC) */
unsigned char hour; /* Hour of day, range 0..23 (UTC) */
unsigned char min; /* Minute of hour, range 0..59 (UTC) */
unsigned char sec; /* Seconds of minute, range 0..60 (UTC) */
unsigned char valid; /* Validity flags */
unsigned long tAcc; /* GPS time of week of the navigation epoch. */
signed long nano; /* Fraction of second, range -1e9 .. 1e9 (UTC) */
unsigned char fixType; /* GNSSfix Type: 0: no fix ; 1: dead reckoning only 2: 2D-fix
3: 3D-fix 4: GNSS + dead reckoning combined
5: time only fix */
unsigned char flags; /* Fix status flags (see graphic below) */
unsigned char flags2; /* Additional flags (see graphic below) */
unsigned char numSV; /* Number of satellites used in Nav Solution */
signed long lon; /* Longitude */
signed long lat; /* Latitude (deg) */
signed long height; /* Height above ellipsoid */
signed long hMSL; /* Height above mean sea level */
signed long hAcc; /* Horizontal accuracy estimate */
unsigned long vAcc; /* Vertical accuracy estimate */
signed long velN; /* NED north velocity */
signed long velE; /* NED east velocity */
signed long velD; /* NED down velocity */
signed long gSpeed; /* Ground Speed (2-D) */
signed long headMot; /* Heading of motion (2-D) */
unsigned long sAcc; /* Speed accuracy estimate */
unsigned long headAcc; /* Heading accuracy estimate (both motion and vehicle) */
unsigned short pDOP; /* Position DOP */
/* unsigned char reserved;*/ /* Byte offset 78 is reserved, this is only here to indicate it */
signed long headVeh; /* Heading of vehicle (2-D) */
signed short magDec; /* Magnetic declination */
unsigned short magAcc; /* Magnetic declination accuracy */
/* Bitfield valid */
bool validDate; /* 1 = valid UTC Date (see Time Validity section for details) */
bool validTime; /* 1 = valid UTC Time of Day (see Time Validity section for details) */
bool fullyResolved; /* 1 = UTC Time of Day has been fully resolved (no seconds uncertainty) */
bool validMag; /* 1 = valid Magnetic declination */
/* Bitfield flags */
bool gnssFixOK; /* 1 = valid fix (i.e within DOP & accuracy masks) */
bool diffSoln; /* 1 = differential corrections were applied */
bool headVehValid; /* 1 = heading of vehicle is valid */
ubx_power_save_mode psmState; /* Power Save Mode state (see Power Management) */
ubx_carrier_phase_range carrSoln; /* Carrier phase range solution status */
/* Bitfield flags2 */
bool confirmedAvai; /* 1 = information about UTC Date and Time of Day validity confirmation is available */
bool confirmedDate; /* 1 = UTC Date validity could be confirmed (see Time Validity section for details) */
bool confirmedTime; /* 1 = UTC Time of Day could be confirmed (see Time Validity section for details) */
} ubx_nav_pvt_msg_t;
/* See the page 296 of UBX-13003221 - R15 for the units and scalings */
typedef struct {
unsigned long iTOW; /*(ms) GPS time of week of the navigation epoch. */
unsigned char version; /* Message version (0 for this version) */
/* unsigned char reserved1[3]; */
signed long roll; /* Vehicle roll. */
signed long pitch; /* Vehicle pitch */
signed long heading; /* Vehicle heading */
unsigned long accRoll; /* Vehicle roll accuracy */
unsigned long accPitch; /* Vehicle pitch accuracy */
unsigned long accHeading; /* Vehicle heading accuracy */
}ubx_nav_att_msg_t;
/* See the page 298 and 299 of UBX-13003221 - R15 for the units and scalings */
/* Description Dilution of precision */
/* Comment:
* • DOP values are dimensionless.
* • All DOP values are scaled by a factor of 100. If the unit transmits a value of e.g. 156, the
DOP value is 1.56
*/
typedef struct {
unsigned long iTOW; /*(ms) GPS time of week of the navigation epoch. */
unsigned short gDOP; /* Geometric DOP */
unsigned short pDOP; /* Position DOP */
unsigned short tDOP; /* Time DOP */
unsigned short vDOP; /* Vertical DOP */
unsigned short hDOP; /* Horizontal DOP */
unsigned short nDOP; /* Northing DOP */
unsigned short eDOP; /* Easting DOP */
}ubx_nav_dop_msg_t;
/* NAV-ODO: Odometer Solution */
/* See the page 302 of UBX-13003221 - R15 for the units and scalings */
/* Comment:
* This message outputs the traveled distance since last reset (see NAV-RESETODO) together
* with an associated estimated accuracy and the total cumulated ground distance (can only
* be reset by a cold start of the receiver).
*/
typedef struct {
unsigned char version; /* Message version (0 for this version) */
/* unsigned char reserved1[3]; */
unsigned long iTOW; /*(ms) GPS time of week of the navigation epoch. */
unsigned long distance; /* Ground distance since last reset */
unsigned long totalDistance; /* Total cumulative ground distance */
unsigned long distanceStd; /* Ground distance accuracy (1-sigma) */
}ubx_nav_odo_msg_t;
#endif /* NEO_M8_UBX_STRUCTS_H_ */