-
Notifications
You must be signed in to change notification settings - Fork 0
/
tracking.h
228 lines (204 loc) · 8.1 KB
/
tracking.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
/*
* Copyright (C) 2015-2018 Swift Navigation Inc.
* Contact: Swift Navigation <[email protected]>
*
* This source is subject to the license found in the file 'LICENSE' which must
* be be distributed together with this source. All other rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
*/
/*****************************************************************************
* Automatically generated from yaml/swiftnav/sbp/tracking.yaml
* with generate.py. Please do not hand edit!
*****************************************************************************/
/** \defgroup tracking Tracking
*
* * Satellite code and carrier-phase tracking messages from the device.
* \{ */
#ifndef LIBSBP_TRACKING_MESSAGES_H
#define LIBSBP_TRACKING_MESSAGES_H
#include "common.h"
#include "gnss.h"
/** Detailed signal tracking channel states. DEPRECATED.
*
* The tracking message returns a set tracking channel parameters for a
* single tracking channel useful for debugging issues.
*/
#define SBP_MSG_TRACKING_STATE_DETAILED_DEP_A 0x0021
typedef struct {
u64 recv_time; /**< Receiver clock time. [ns] */
sbp_gps_time_t
tot; /**< Time of transmission of signal from satellite. TOW only valid when
TOW status is decoded or propagated. WN only valid when week
number valid flag is set.
*/
u32 P; /**< Pseudorange observation. Valid only when pseudorange valid flag is
set.
[2 cm] */
u16 P_std; /**< Pseudorange observation standard deviation. Valid only when
pseudorange valid flag is set.
[2 cm] */
carrier_phase_t
L; /**< Carrier phase observation with typical sign convention. Valid only
when PLL pessimistic lock is achieved.
[cycles] */
u8 cn0; /**< Carrier-to-Noise density [dB Hz / 4] */
u16 lock; /**< Lock time. It is encoded according to DF402 from the RTCM 10403.2
Amendment 2 specification. Valid values range from 0 to 15.
*/
sbp_gnss_signal_t sid; /**< GNSS signal identifier. */
s32 doppler; /**< Carrier Doppler frequency. [Hz / 16] */
u16 doppler_std; /**< Carrier Doppler frequency standard deviation. [Hz / 16] */
u32 uptime; /**< Number of seconds of continuous tracking. Specifies how much time
signal is in continuous track.
[s] */
s16 clock_offset; /**< TCXO clock offset. Valid only when valid clock valid flag is set.
[s / (2 ^ 20)] */
s16 clock_drift; /**< TCXO clock drift. Valid only when valid clock valid flag is set.
[(s / s) / (2 ^ 31)] */
u16 corr_spacing; /**< Early-Prompt (EP) and Prompt-Late (PL) correlators spacing. [ns] */
s8 acceleration; /**< Acceleration. Valid only when acceleration valid flag is set. [g / 8] */
u8 sync_flags; /**< Synchronization status flags. */
u8 tow_flags; /**< TOW status flags. */
u8 track_flags; /**< Tracking loop status flags. */
u8 nav_flags; /**< Navigation data status flags. */
u8 pset_flags; /**< Parameters sets flags. */
u8 misc_flags; /**< Miscellaneous flags. */
} msg_tracking_state_detailed_dep_a_t;
/** Deprecated
*
* Deprecated.
*/
#define SBP_MSG_TRACKING_STATE_DETAILED_DEP 0x0011
typedef struct {
u64 recv_time; /**< Receiver clock time. [ns] */
gps_time_dep_t
tot; /**< Time of transmission of signal from satellite. TOW only valid when
TOW status is decoded or propagated. WN only valid when week
number valid flag is set.
*/
u32 P; /**< Pseudorange observation. Valid only when pseudorange valid flag is
set.
[2 cm] */
u16 P_std; /**< Pseudorange observation standard deviation. Valid only when
pseudorange valid flag is set.
[2 cm] */
carrier_phase_t
L; /**< Carrier phase observation with typical sign convention. Valid only
when PLL pessimistic lock is achieved.
[cycles] */
u8 cn0; /**< Carrier-to-Noise density [dB Hz / 4] */
u16 lock; /**< Lock time. It is encoded according to DF402 from the RTCM 10403.2
Amendment 2 specification. Valid values range from 0 to 15.
*/
gnss_signal_dep_t sid; /**< GNSS signal identifier. */
s32 doppler; /**< Carrier Doppler frequency. [Hz / 16] */
u16 doppler_std; /**< Carrier Doppler frequency standard deviation. [Hz / 16] */
u32 uptime; /**< Number of seconds of continuous tracking. Specifies how much time
signal is in continuous track.
[s] */
s16 clock_offset; /**< TCXO clock offset. Valid only when valid clock valid flag is set.
[s / (2 ^ 20)] */
s16 clock_drift; /**< TCXO clock drift. Valid only when valid clock valid flag is set.
[(s / s) / (2 ^ 31)] */
u16 corr_spacing; /**< Early-Prompt (EP) and Prompt-Late (PL) correlators spacing. [ns] */
s8 acceleration; /**< Acceleration. Valid only when acceleration valid flag is set. [g / 8] */
u8 sync_flags; /**< Synchronization status flags. */
u8 tow_flags; /**< TOW status flags. */
u8 track_flags; /**< Tracking loop status flags. */
u8 nav_flags; /**< Navigation data status flags. */
u8 pset_flags; /**< Parameters sets flags. */
u8 misc_flags; /**< Miscellaneous flags. */
} msg_tracking_state_detailed_dep_t;
/** Signal tracking channel state
*
* Tracking channel state for a specific satellite signal and
* measured signal power.
*/
typedef struct {
sbp_gnss_signal_t sid; /**< GNSS signal being tracked */
u8 fcn; /**< Frequency channel number (GLONASS only) */
u8 cn0; /**< Carrier-to-Noise density. Zero implies invalid cn0. [dB Hz / 4] */
} tracking_channel_state_t;
/** Signal tracking channel states
*
* The tracking message returns a variable-length array of tracking
* channel states. It reports status and carrier-to-noise density
* measurements for all tracked satellites.
*/
#define SBP_MSG_TRACKING_STATE 0x0041
typedef struct {
tracking_channel_state_t
states[0]; /**< Signal tracking channel state */
} msg_tracking_state_t;
/** Complex correlation structure
*
* Structure containing in-phase and quadrature correlation components.
*/
typedef struct {
s32 I; /**< In-phase correlation */
s32 Q; /**< Quadrature correlation */
} tracking_channel_correlation_t;
/** Tracking channel correlations
*
* When enabled, a tracking channel can output the correlations at each
* update interval.
*/
#define SBP_MSG_TRACKING_IQ 0x002C
typedef struct {
u8 channel; /**< Tracking channel of origin */
sbp_gnss_signal_t sid; /**< GNSS signal identifier */
tracking_channel_correlation_t
corrs[3]; /**< Early, Prompt and Late correlations */
} msg_tracking_iq_t;
/** Deprecated
*
* Deprecated.
*/
#define SBP_MSG_TRACKING_IQ_DEP 0x001C
typedef struct {
u8 channel; /**< Tracking channel of origin */
gnss_signal_dep_t sid; /**< GNSS signal identifier */
tracking_channel_correlation_t
corrs[3]; /**< Early, Prompt and Late correlations */
} msg_tracking_iq_dep_t;
/** Deprecated
*
* Deprecated.
*/
typedef struct {
u8 state; /**< Status of tracking channel */
u8 prn; /**< PRN-1 being tracked */
float cn0; /**< Carrier-to-noise density [dB Hz] */
} tracking_channel_state_dep_a_t;
/** Deprecated
*
* Deprecated.
*/
#define SBP_MSG_TRACKING_STATE_DEP_A 0x0016
typedef struct {
tracking_channel_state_dep_a_t
states[0]; /**< Satellite tracking channel state */
} msg_tracking_state_dep_a_t;
/** Deprecated.
*
* Deprecated.
*/
typedef struct {
u8 state; /**< Status of tracking channel */
gnss_signal_dep_t sid; /**< GNSS signal being tracked */
float cn0; /**< Carrier-to-noise density [dB Hz] */
} tracking_channel_state_dep_b_t;
/** Deprecated.
*
* Deprecated.
*/
#define SBP_MSG_TRACKING_STATE_DEP_B 0x0013
typedef struct {
tracking_channel_state_dep_b_t
states[0]; /**< Signal tracking channel state */
} msg_tracking_state_dep_b_t;
/** \} */
#endif /* LIBSBP_TRACKING_MESSAGES_H */