-
Notifications
You must be signed in to change notification settings - Fork 0
/
observation.h
975 lines (901 loc) · 40.1 KB
/
observation.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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
/*
* 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/observation.yaml
* with generate.py. Please do not hand edit!
*****************************************************************************/
/** \defgroup observation Observation
*
* * Satellite observation messages from the device.
* \{ */
#ifndef LIBSBP_OBSERVATION_MESSAGES_H
#define LIBSBP_OBSERVATION_MESSAGES_H
#include "common.h"
#include "gnss.h"
/** Header for observation message.
*
* Header of a GNSS observation message.
*/
typedef struct {
sbp_gps_time_t t; /**< GNSS time of this observation */
u8 n_obs; /**< Total number of observations. First nibble is the size
of the sequence (n), second nibble is the zero-indexed
counter (ith packet of n)
*/
} observation_header_t;
/** GNSS doppler measurement.
*
* Doppler measurement in Hz represented as a 24-bit
* fixed point number with Q16.8 layout, i.e. 16-bits of whole
* doppler and 8-bits of fractional doppler. This doppler is defined
* as positive for approaching satellites.
*/
typedef struct {
s16 i; /**< Doppler whole Hz [Hz] */
u8 f; /**< Doppler fractional part [Hz / 256] */
} doppler_t;
/** GNSS observations for a particular satellite signal.
*
* Pseudorange and carrier phase observation for a satellite being
* tracked. The observations are interoperable with 3rd party
* receivers and conform with typical RTCMv3 GNSS observations.
*/
typedef struct {
u32 P; /**< Pseudorange observation [2 cm] */
carrier_phase_t
L; /**< Carrier phase observation with typical sign convention. [cycles] */
doppler_t
D; /**< Doppler observation with typical sign convention. [Hz] */
u8 cn0; /**< Carrier-to-Noise density. Zero implies invalid cn0. [dB Hz / 4] */
u8 lock; /**< Lock timer. This value gives an indication of the time
for which a signal has maintained continuous phase lock.
Whenever a signal has lost and regained lock, this
value is reset to zero. It is encoded according to DF402 from
the RTCM 10403.2 Amendment 2 specification. Valid values range
from 0 to 15 and the most significant nibble is reserved for future use.
*/
u8 flags; /**< Measurement status flags. A bit field of flags providing the
status of this observation. If this field is 0 it means only the Cn0
estimate for the signal is valid.
*/
sbp_gnss_signal_t sid; /**< GNSS signal identifier (16 bit) */
} packed_obs_content_t;
/** GPS satellite observations
*
* The GPS observations message reports all the raw pseudorange and
* carrier phase observations for the satellites being tracked by
* the device. Carrier phase observation here is represented as a
* 40-bit fixed point number with Q32.8 layout (i.e. 32-bits of
* whole cycles and 8-bits of fractional cycles). The observations
* are be interoperable with 3rd party receivers and conform
* with typical RTCMv3 GNSS observations.
*/
#define SBP_MSG_OBS 0x004A
typedef struct {
observation_header_t header; /**< Header of a GPS observation message */
packed_obs_content_t
obs[0]; /**< Pseudorange and carrier phase observation for a
satellite being tracked.
*/
} msg_obs_t;
/** Base station position
*
* The base station position message is the position reported by
* the base station itself. It is used for pseudo-absolute RTK
* positioning, and is required to be a high-accuracy surveyed
* location of the base station. Any error here will result in an
* error in the pseudo-absolute position output.
*/
#define SBP_MSG_BASE_POS_LLH 0x0044
typedef struct {
double lat; /**< Latitude [deg] */
double lon; /**< Longitude [deg] */
double height; /**< Height [m] */
} msg_base_pos_llh_t;
/** Base station position in ECEF
*
* The base station position message is the position reported by
* the base station itself in absolute Earth Centered Earth Fixed
* coordinates. It is used for pseudo-absolute RTK positioning, and
* is required to be a high-accuracy surveyed location of the base
* station. Any error here will result in an error in the
* pseudo-absolute position output.
*/
#define SBP_MSG_BASE_POS_ECEF 0x0048
typedef struct {
double x; /**< ECEF X coodinate [m] */
double y; /**< ECEF Y coordinate [m] */
double z; /**< ECEF Z coordinate [m] */
} msg_base_pos_ecef_t;
typedef struct {
sbp_gnss_signal_t sid; /**< GNSS signal identifier (16 bit) */
gps_time_sec_t toe; /**< Time of Ephemerides */
double ura; /**< User Range Accuracy [m] */
u32 fit_interval; /**< Curve fit interval [s] */
u8 valid; /**< Status of ephemeris, 1 = valid, 0 = invalid */
u8 health_bits; /**< Satellite health status.
GPS: ICD-GPS-200, chapter 20.3.3.3.1.4
SBAS: 0 = valid, non-zero = invalid
GLO: 0 = valid, non-zero = invalid
*/
} ephemeris_common_content_t;
typedef struct {
gnss_signal_dep_t sid; /**< GNSS signal identifier */
gps_time_dep_t toe; /**< Time of Ephemerides */
double ura; /**< User Range Accuracy [m] */
u32 fit_interval; /**< Curve fit interval [s] */
u8 valid; /**< Status of ephemeris, 1 = valid, 0 = invalid */
u8 health_bits; /**< Satellite health status.
GPS: ICD-GPS-200, chapter 20.3.3.3.1.4
SBAS: 0 = valid, non-zero = invalid
GLO: 0 = valid, non-zero = invalid
*/
} ephemeris_common_content_dep_a_t;
/** Satellite broadcast ephemeris for GPS
*
* The ephemeris message returns a set of satellite orbit
* parameters that is used to calculate GPS satellite position,
* velocity, and clock offset. Please see the Navstar GPS
* Space Segment/Navigation user interfaces (ICD-GPS-200, Table
* 20-III) for more details.
*/
#define SBP_MSG_EPHEMERIS_GPS_DEP_E 0x0081
typedef struct {
ephemeris_common_content_dep_a_t
common; /**< Values common for all ephemeris types */
double tgd; /**< Group delay differential between L1 and L2 [s] */
double
c_rs; /**< Amplitude of the sine harmonic correction term to the orbit radius [m] */
double
c_rc; /**< Amplitude of the cosine harmonic correction term to the orbit radius [m] */
double
c_uc; /**< Amplitude of the cosine harmonic correction term to the argument of latitude [rad] */
double
c_us; /**< Amplitude of the sine harmonic correction term to the argument of latitude [rad] */
double
c_ic; /**< Amplitude of the cosine harmonic correction term to the angle of inclination [rad] */
double
c_is; /**< Amplitude of the sine harmonic correction term to the angle of inclination [rad] */
double dn; /**< Mean motion difference [rad/s] */
double m0; /**< Mean anomaly at reference time [rad] */
double ecc; /**< Eccentricity of satellite orbit */
double
sqrta; /**< Square root of the semi-major axis of orbit [m^(1/2)] */
double
omega0; /**< Longitude of ascending node of orbit plane at weekly epoch [rad] */
double omegadot; /**< Rate of right ascension [rad/s] */
double w; /**< Argument of perigee [rad] */
double inc; /**< Inclination [rad] */
double inc_dot; /**< Inclination first derivative [rad/s] */
double
af0; /**< Polynomial clock correction coefficient (clock bias) [s] */
double
af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
double
af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
gps_time_dep_t toc; /**< Clock reference */
u8 iode; /**< Issue of ephemeris data */
u16 iodc; /**< Issue of clock data */
} msg_ephemeris_gps_dep_e_t;
/** Satellite broadcast ephemeris for GPS
*
* The ephemeris message returns a set of satellite orbit
* parameters that is used to calculate GPS satellite position,
* velocity, and clock offset. Please see the Navstar GPS
* Space Segment/Navigation user interfaces (ICD-GPS-200, Table
* 20-III) for more details.
*/
#define SBP_MSG_EPHEMERIS_GPS 0x0086
typedef struct {
ephemeris_common_content_t
common; /**< Values common for all ephemeris types */
double tgd; /**< Group delay differential between L1 and L2 [s] */
double
c_rs; /**< Amplitude of the sine harmonic correction term to the orbit radius [m] */
double
c_rc; /**< Amplitude of the cosine harmonic correction term to the orbit radius [m] */
double
c_uc; /**< Amplitude of the cosine harmonic correction term to the argument of latitude [rad] */
double
c_us; /**< Amplitude of the sine harmonic correction term to the argument of latitude [rad] */
double
c_ic; /**< Amplitude of the cosine harmonic correction term to the angle of inclination [rad] */
double
c_is; /**< Amplitude of the sine harmonic correction term to the angle of inclination [rad] */
double dn; /**< Mean motion difference [rad/s] */
double m0; /**< Mean anomaly at reference time [rad] */
double ecc; /**< Eccentricity of satellite orbit */
double
sqrta; /**< Square root of the semi-major axis of orbit [m^(1/2)] */
double
omega0; /**< Longitude of ascending node of orbit plane at weekly epoch [rad] */
double omegadot; /**< Rate of right ascension [rad/s] */
double w; /**< Argument of perigee [rad] */
double inc; /**< Inclination [rad] */
double inc_dot; /**< Inclination first derivative [rad/s] */
double
af0; /**< Polynomial clock correction coefficient (clock bias) [s] */
double
af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
double
af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
gps_time_sec_t toc; /**< Clock reference */
u8 iode; /**< Issue of ephemeris data */
u16 iodc; /**< Issue of clock data */
} msg_ephemeris_gps_t;
#define SBP_MSG_EPHEMERIS_SBAS_DEP_A 0x0082
typedef struct {
ephemeris_common_content_dep_a_t
common; /**< Values common for all ephemeris types */
double pos[3]; /**< Position of the GEO at time toe [m] */
double vel[3]; /**< Velocity of the GEO at time toe [m/s] */
double acc[3]; /**< Acceleration of the GEO at time toe [m/s^2] */
double
a_gf0; /**< Time offset of the GEO clock w.r.t. SBAS Network Time [s] */
double
a_gf1; /**< Drift of the GEO clock w.r.t. SBAS Network Time [s/s] */
} msg_ephemeris_sbas_dep_a_t;
/** Satellite broadcast ephemeris for GLO
*
* The ephemeris message returns a set of satellite orbit
* parameters that is used to calculate GLO satellite position,
* velocity, and clock offset. Please see the GLO ICD 5.1 "Table 4.5
* Characteristics of words of immediate information (ephemeris parameters)"
* for more details.
*/
#define SBP_MSG_EPHEMERIS_GLO_DEP_A 0x0083
typedef struct {
ephemeris_common_content_dep_a_t
common; /**< Values common for all ephemeris types */
double
gamma; /**< Relative deviation of predicted carrier frequency from nominal */
double tau; /**< Correction to the SV time [s] */
double pos
[3]; /**< Position of the SV at tb in PZ-90.02 coordinates system [m] */
double vel
[3]; /**< Velocity vector of the SV at tb in PZ-90.02 coordinates system [m/s] */
double acc
[3]; /**< Acceleration vector of the SV at tb in PZ-90.02 coordinates sys [m/s^2] */
} msg_ephemeris_glo_dep_a_t;
#define SBP_MSG_EPHEMERIS_SBAS 0x0084
typedef struct {
ephemeris_common_content_t
common; /**< Values common for all ephemeris types */
double pos[3]; /**< Position of the GEO at time toe [m] */
double vel[3]; /**< Velocity of the GEO at time toe [m/s] */
double acc[3]; /**< Acceleration of the GEO at time toe [m/s^2] */
double
a_gf0; /**< Time offset of the GEO clock w.r.t. SBAS Network Time [s] */
double
a_gf1; /**< Drift of the GEO clock w.r.t. SBAS Network Time [s/s] */
} msg_ephemeris_sbas_t;
/** Satellite broadcast ephemeris for GLO
*
* The ephemeris message returns a set of satellite orbit
* parameters that is used to calculate GLO satellite position,
* velocity, and clock offset. Please see the GLO ICD 5.1 "Table 4.5
* Characteristics of words of immediate information (ephemeris parameters)"
* for more details.
*/
#define SBP_MSG_EPHEMERIS_GLO_DEP_B 0x0085
typedef struct {
ephemeris_common_content_t
common; /**< Values common for all ephemeris types */
double
gamma; /**< Relative deviation of predicted carrier frequency from nominal */
double tau; /**< Correction to the SV time [s] */
double pos
[3]; /**< Position of the SV at tb in PZ-90.02 coordinates system [m] */
double vel
[3]; /**< Velocity vector of the SV at tb in PZ-90.02 coordinates system [m/s] */
double acc
[3]; /**< Acceleration vector of the SV at tb in PZ-90.02 coordinates sys [m/s^2] */
} msg_ephemeris_glo_dep_b_t;
/** Satellite broadcast ephemeris for GLO
*
* The ephemeris message returns a set of satellite orbit
* parameters that is used to calculate GLO satellite position,
* velocity, and clock offset. Please see the GLO ICD 5.1 "Table 4.5
* Characteristics of words of immediate information (ephemeris parameters)"
* for more details.
*/
#define SBP_MSG_EPHEMERIS_GLO_DEP_C 0x0087
typedef struct {
ephemeris_common_content_t
common; /**< Values common for all ephemeris types */
double
gamma; /**< Relative deviation of predicted carrier frequency from nominal */
double tau; /**< Correction to the SV time [s] */
double d_tau; /**< Equipment delay between L1 and L2 [s] */
double pos
[3]; /**< Position of the SV at tb in PZ-90.02 coordinates system [m] */
double vel
[3]; /**< Velocity vector of the SV at tb in PZ-90.02 coordinates system [m/s] */
double acc
[3]; /**< Acceleration vector of the SV at tb in PZ-90.02 coordinates sys [m/s^2] */
u8 fcn; /**< Frequency slot. FCN+8 (that is [1..14]). 0 or 0xFF for invalid */
} msg_ephemeris_glo_dep_c_t;
/** Satellite broadcast ephemeris for GLO
*
* The ephemeris message returns a set of satellite orbit
* parameters that is used to calculate GLO satellite position,
* velocity, and clock offset. Please see the GLO ICD 5.1 "Table 4.5
* Characteristics of words of immediate information (ephemeris parameters)"
* for more details.
*/
#define SBP_MSG_EPHEMERIS_GLO 0x0088
typedef struct {
ephemeris_common_content_t
common; /**< Values common for all ephemeris types */
double
gamma; /**< Relative deviation of predicted carrier frequency from nominal */
double tau; /**< Correction to the SV time [s] */
double d_tau; /**< Equipment delay between L1 and L2 [s] */
double pos
[3]; /**< Position of the SV at tb in PZ-90.02 coordinates system [m] */
double vel
[3]; /**< Velocity vector of the SV at tb in PZ-90.02 coordinates system [m/s] */
double acc
[3]; /**< Acceleration vector of the SV at tb in PZ-90.02 coordinates sys [m/s^2] */
u8 fcn; /**< Frequency slot. FCN+8 (that is [1..14]). 0 or 0xFF for invalid */
u8 iod; /**< Issue of ephemeris data */
} msg_ephemeris_glo_t;
/** Satellite broadcast ephemeris
*
* The ephemeris message returns a set of satellite orbit
* parameters that is used to calculate GPS satellite position,
* velocity, and clock offset. Please see the Navstar GPS
* Space Segment/Navigation user interfaces (ICD-GPS-200, Table
* 20-III) for more details.
*/
#define SBP_MSG_EPHEMERIS_DEP_D 0x0080
typedef struct {
double tgd; /**< Group delay differential between L1 and L2 [s] */
double
c_rs; /**< Amplitude of the sine harmonic correction term to the orbit radius [m] */
double
c_rc; /**< Amplitude of the cosine harmonic correction term to the orbit radius [m] */
double
c_uc; /**< Amplitude of the cosine harmonic correction term to the argument of latitude [rad] */
double
c_us; /**< Amplitude of the sine harmonic correction term to the argument of latitude [rad] */
double
c_ic; /**< Amplitude of the cosine harmonic correction term to the angle of inclination [rad] */
double
c_is; /**< Amplitude of the sine harmonic correction term to the angle of inclination [rad] */
double dn; /**< Mean motion difference [rad/s] */
double m0; /**< Mean anomaly at reference time [rad] */
double ecc; /**< Eccentricity of satellite orbit */
double
sqrta; /**< Square root of the semi-major axis of orbit [m^(1/2)] */
double
omega0; /**< Longitude of ascending node of orbit plane at weekly epoch [rad] */
double omegadot; /**< Rate of right ascension [rad/s] */
double w; /**< Argument of perigee [rad] */
double inc; /**< Inclination [rad] */
double inc_dot; /**< Inclination first derivative [rad/s] */
double
af0; /**< Polynomial clock correction coefficient (clock bias) [s] */
double
af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
double
af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
double toe_tow; /**< Time of week [s] */
u16 toe_wn; /**< Week number [week] */
double toc_tow; /**< Clock reference time of week [s] */
u16 toc_wn; /**< Clock reference week number [week] */
u8 valid; /**< Is valid? */
u8 healthy; /**< Satellite is healthy? */
gnss_signal_dep_t sid; /**< GNSS signal identifier */
u8 iode; /**< Issue of ephemeris data */
u16 iodc; /**< Issue of clock data */
u32 reserved; /**< Reserved field */
} msg_ephemeris_dep_d_t;
/** Deprecated
*
* Deprecated.
*/
#define SBP_MSG_EPHEMERIS_DEP_A 0x001A
typedef struct {
double tgd; /**< Group delay differential between L1 and L2 [s] */
double
c_rs; /**< Amplitude of the sine harmonic correction term to the orbit radius [m] */
double
c_rc; /**< Amplitude of the cosine harmonic correction term to the orbit radius [m] */
double
c_uc; /**< Amplitude of the cosine harmonic correction term to the argument of latitude [rad] */
double
c_us; /**< Amplitude of the sine harmonic correction term to the argument of latitude [rad] */
double
c_ic; /**< Amplitude of the cosine harmonic correction term to the angle of inclination [rad] */
double
c_is; /**< Amplitude of the sine harmonic correction term to the angle of inclination [rad] */
double dn; /**< Mean motion difference [rad/s] */
double m0; /**< Mean anomaly at reference time [rad] */
double ecc; /**< Eccentricity of satellite orbit */
double
sqrta; /**< Square root of the semi-major axis of orbit [m^(1/2)] */
double
omega0; /**< Longitude of ascending node of orbit plane at weekly epoch [rad] */
double omegadot; /**< Rate of right ascension [rad/s] */
double w; /**< Argument of perigee [rad] */
double inc; /**< Inclination [rad] */
double inc_dot; /**< Inclination first derivative [rad/s] */
double
af0; /**< Polynomial clock correction coefficient (clock bias) [s] */
double
af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
double
af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
double toe_tow; /**< Time of week [s] */
u16 toe_wn; /**< Week number [week] */
double toc_tow; /**< Clock reference time of week [s] */
u16 toc_wn; /**< Clock reference week number [week] */
u8 valid; /**< Is valid? */
u8 healthy; /**< Satellite is healthy? */
u8 prn; /**< PRN being tracked */
} msg_ephemeris_dep_a_t;
/** Deprecated
*
* Deprecated.
*/
#define SBP_MSG_EPHEMERIS_DEP_B 0x0046
typedef struct {
double tgd; /**< Group delay differential between L1 and L2 [s] */
double
c_rs; /**< Amplitude of the sine harmonic correction term to the orbit radius [m] */
double
c_rc; /**< Amplitude of the cosine harmonic correction term to the orbit radius [m] */
double
c_uc; /**< Amplitude of the cosine harmonic correction term to the argument of latitude [rad] */
double
c_us; /**< Amplitude of the sine harmonic correction term to the argument of latitude [rad] */
double
c_ic; /**< Amplitude of the cosine harmonic correction term to the angle of inclination [rad] */
double
c_is; /**< Amplitude of the sine harmonic correction term to the angle of inclination [rad] */
double dn; /**< Mean motion difference [rad/s] */
double m0; /**< Mean anomaly at reference time [rad] */
double ecc; /**< Eccentricity of satellite orbit */
double
sqrta; /**< Square root of the semi-major axis of orbit [m^(1/2)] */
double
omega0; /**< Longitude of ascending node of orbit plane at weekly epoch [rad] */
double omegadot; /**< Rate of right ascension [rad/s] */
double w; /**< Argument of perigee [rad] */
double inc; /**< Inclination [rad] */
double inc_dot; /**< Inclination first derivative [rad/s] */
double
af0; /**< Polynomial clock correction coefficient (clock bias) [s] */
double
af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
double
af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
double toe_tow; /**< Time of week [s] */
u16 toe_wn; /**< Week number [week] */
double toc_tow; /**< Clock reference time of week [s] */
u16 toc_wn; /**< Clock reference week number [week] */
u8 valid; /**< Is valid? */
u8 healthy; /**< Satellite is healthy? */
u8 prn; /**< PRN being tracked */
u8 iode; /**< Issue of ephemeris data */
} msg_ephemeris_dep_b_t;
/** Satellite broadcast ephemeris
*
* The ephemeris message returns a set of satellite orbit
* parameters that is used to calculate GPS satellite position,
* velocity, and clock offset. Please see the Navstar GPS
* Space Segment/Navigation user interfaces (ICD-GPS-200, Table
* 20-III) for more details.
*/
#define SBP_MSG_EPHEMERIS_DEP_C 0x0047
typedef struct {
double tgd; /**< Group delay differential between L1 and L2 [s] */
double
c_rs; /**< Amplitude of the sine harmonic correction term to the orbit radius [m] */
double
c_rc; /**< Amplitude of the cosine harmonic correction term to the orbit radius [m] */
double
c_uc; /**< Amplitude of the cosine harmonic correction term to the argument of latitude [rad] */
double
c_us; /**< Amplitude of the sine harmonic correction term to the argument of latitude [rad] */
double
c_ic; /**< Amplitude of the cosine harmonic correction term to the angle of inclination [rad] */
double
c_is; /**< Amplitude of the sine harmonic correction term to the angle of inclination [rad] */
double dn; /**< Mean motion difference [rad/s] */
double m0; /**< Mean anomaly at reference time [rad] */
double ecc; /**< Eccentricity of satellite orbit */
double
sqrta; /**< Square root of the semi-major axis of orbit [m^(1/2)] */
double
omega0; /**< Longitude of ascending node of orbit plane at weekly epoch [rad] */
double omegadot; /**< Rate of right ascension [rad/s] */
double w; /**< Argument of perigee [rad] */
double inc; /**< Inclination [rad] */
double inc_dot; /**< Inclination first derivative [rad/s] */
double
af0; /**< Polynomial clock correction coefficient (clock bias) [s] */
double
af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
double
af2; /**< Polynomial clock correction coefficient (rate of clock drift) [s/s^2] */
double toe_tow; /**< Time of week [s] */
u16 toe_wn; /**< Week number [week] */
double toc_tow; /**< Clock reference time of week [s] */
u16 toc_wn; /**< Clock reference week number [week] */
u8 valid; /**< Is valid? */
u8 healthy; /**< Satellite is healthy? */
gnss_signal_dep_t sid; /**< GNSS signal identifier */
u8 iode; /**< Issue of ephemeris data */
u16 iodc; /**< Issue of clock data */
u32 reserved; /**< Reserved field */
} msg_ephemeris_dep_c_t;
/** Header for observation message.
*
* Header of a GPS observation message.
*/
typedef struct {
gps_time_dep_t t; /**< GPS time of this observation */
u8 n_obs; /**< Total number of observations. First nibble is the size
of the sequence (n), second nibble is the zero-indexed
counter (ith packet of n)
*/
} observation_header_dep_t;
/** GPS carrier phase measurement.
*
* Carrier phase measurement in cycles represented as a 40-bit
* fixed point number with Q32.8 layout, i.e. 32-bits of whole
* cycles and 8-bits of fractional cycles. This has the opposite
* sign convention than a typical GPS receiver and the phase has
* the opposite sign as the pseudorange.
*/
typedef struct {
s32 i; /**< Carrier phase whole cycles [cycles] */
u8 f; /**< Carrier phase fractional part [cycles / 256] */
} carrier_phase_dep_a_t;
/** Deprecated
*
* Deprecated.
*/
typedef struct {
u32 P; /**< Pseudorange observation [cm] */
carrier_phase_dep_a_t
L; /**< Carrier phase observation with opposite sign from typical convention */
u8 cn0; /**< Carrier-to-Noise density [dB Hz / 4] */
u16 lock; /**< Lock indicator. This value changes whenever a satellite
signal has lost and regained lock, indicating that the
carrier phase ambiguity may have changed.
*/
u8 prn; /**< PRN-1 identifier of the satellite signal */
} packed_obs_content_dep_a_t;
/** GPS observations for a particular satellite signal.
*
* Pseudorange and carrier phase observation for a satellite being
* tracked. Pseudoranges are referenced to a nominal pseudorange.
*/
typedef struct {
u32 P; /**< Pseudorange observation [cm] */
carrier_phase_dep_a_t
L; /**< Carrier phase observation with opposite sign from typical convention. */
u8 cn0; /**< Carrier-to-Noise density [dB Hz / 4] */
u16 lock; /**< Lock indicator. This value changes whenever a satellite
signal has lost and regained lock, indicating that the
carrier phase ambiguity may have changed.
*/
gnss_signal_dep_t sid; /**< GNSS signal identifier */
} packed_obs_content_dep_b_t;
/** GPS observations for a particular satellite signal.
*
* Pseudorange and carrier phase observation for a satellite being
* tracked. The observations are be interoperable with 3rd party
* receivers and conform with typical RTCMv3 GNSS observations.
*/
typedef struct {
u32 P; /**< Pseudorange observation [2 cm] */
carrier_phase_t
L; /**< Carrier phase observation with typical sign convention. [cycles] */
u8 cn0; /**< Carrier-to-Noise density [dB Hz / 4] */
u16 lock; /**< Lock indicator. This value changes whenever a satellite
signal has lost and regained lock, indicating that the
carrier phase ambiguity may have changed.
*/
gnss_signal_dep_t sid; /**< GNSS signal identifier */
} packed_obs_content_dep_c_t;
/** Deprecated
*
* Deprecated.
*/
#define SBP_MSG_OBS_DEP_A 0x0045
typedef struct {
observation_header_dep_t
header; /**< Header of a GPS observation message */
packed_obs_content_dep_a_t
obs[0]; /**< Pseudorange and carrier phase observation for a
satellite being tracked.
*/
} msg_obs_dep_a_t;
/** Deprecated
*
* This observation message has been deprecated in favor of
* observations that are more interoperable. This message
* should be used for observations referenced to
* a nominal pseudorange which are not interoperable with
* most 3rd party GNSS receievers or typical RTCMv3
* observations.
*/
#define SBP_MSG_OBS_DEP_B 0x0043
typedef struct {
observation_header_dep_t
header; /**< Header of a GPS observation message */
packed_obs_content_dep_b_t
obs[0]; /**< Pseudorange and carrier phase observation for a
satellite being tracked.
*/
} msg_obs_dep_b_t;
/** Deprecated
*
* The GPS observations message reports all the raw pseudorange and
* carrier phase observations for the satellites being tracked by
* the device. Carrier phase observation here is represented as a
* 40-bit fixed point number with Q32.8 layout (i.e. 32-bits of
* whole cycles and 8-bits of fractional cycles). The observations
* are interoperable with 3rd party receivers and conform
* with typical RTCMv3 GNSS observations.
*/
#define SBP_MSG_OBS_DEP_C 0x0049
typedef struct {
observation_header_dep_t
header; /**< Header of a GPS observation message */
packed_obs_content_dep_c_t
obs[0]; /**< Pseudorange and carrier phase observation for a
satellite being tracked.
*/
} msg_obs_dep_c_t;
/** Iono corrections
*
* The ionospheric parameters which allow the "L1 only" or "L2 only" user to
* utilize the ionospheric model for computation of the ionospheric delay.
* Please see ICD-GPS-200 (Chapter 20.3.3.5.1.7) for more details.
*/
#define SBP_MSG_IONO 0x0090
typedef struct {
gps_time_sec_t
t_nmct; /**< Navigation Message Correction Table Valitidy Time */
double a0;
double a1;
double a2;
double a3;
double b0;
double b1;
double b2;
double b3;
} msg_iono_t;
/** L2C capability mask
*
* Please see ICD-GPS-200 (Chapter 20.3.3.5.1.4) for more details.
*/
#define SBP_MSG_SV_CONFIGURATION_GPS 0x0091
typedef struct {
gps_time_sec_t
t_nmct; /**< Navigation Message Correction Table Valitidy Time */
u32 l2c_mask; /**< L2C capability mask, SV32 bit being MSB, SV1 bit being LSB */
} msg_sv_configuration_gps_t;
/** Group Delay
*
* Please see ICD-GPS-200 (30.3.3.3.1.1) for more details.
*/
#define SBP_MSG_GROUP_DELAY_DEP_A 0x0092
typedef struct {
gps_time_dep_t t_op; /**< Data Predict Time of Week */
u8 prn; /**< Satellite number */
u8 valid; /**< bit-field indicating validity of the values,
LSB indicating tgd validity etc.
1 = value is valid, 0 = value is not valid.
*/
s16 tgd;
s16 isc_l1ca;
s16 isc_l2c;
} msg_group_delay_dep_a_t;
/** Group Delay
*
* Please see ICD-GPS-200 (30.3.3.3.1.1) for more details.
*/
#define SBP_MSG_GROUP_DELAY_DEP_B 0x0093
typedef struct {
gps_time_sec_t t_op; /**< Data Predict Time of Week */
gnss_signal_dep_t sid; /**< GNSS signal identifier */
u8 valid; /**< bit-field indicating validity of the values,
LSB indicating tgd validity etc.
1 = value is valid, 0 = value is not valid.
*/
s16 tgd;
s16 isc_l1ca;
s16 isc_l2c;
} msg_group_delay_dep_b_t;
/** Group Delay
*
* Please see ICD-GPS-200 (30.3.3.3.1.1) for more details.
*/
#define SBP_MSG_GROUP_DELAY 0x0094
typedef struct {
gps_time_sec_t t_op; /**< Data Predict Time of Week */
sbp_gnss_signal_t sid; /**< GNSS signal identifier */
u8 valid; /**< bit-field indicating validity of the values,
LSB indicating tgd validity etc.
1 = value is valid, 0 = value is not valid.
*/
s16 tgd;
s16 isc_l1ca;
s16 isc_l2c;
} msg_group_delay_t;
typedef struct {
sbp_gnss_signal_t sid; /**< GNSS signal identifier */
gps_time_sec_t toa; /**< Reference time of almanac */
double ura; /**< User Range Accuracy [m] */
u32 fit_interval; /**< Curve fit interval [s] */
u8 valid; /**< Status of almanac, 1 = valid, 0 = invalid */
u8 health_bits; /**< Satellite health status for GPS:
- bits 5-7: NAV data health status. See IS-GPS-200H
Table 20-VII: NAV Data Health Indications.
- bits 0-4: Signal health status. See IS-GPS-200H
Table 20-VIII. Codes for Health of SV Signal
Components.
Satellite health status for GLO:
See GLO ICD 5.1 table 5.1 for details
- bit 0: C(n), "unhealthy" flag that is transmitted within
non-immediate data and indicates overall constellation status
at the moment of almanac uploading.
'0' indicates malfunction of n-satellite.
'1' indicates that n-satellite is operational.
- bit 1: Bn(ln), '0' indicates the satellite is operational
and suitable for navigation.
*/
} almanac_common_content_t;
typedef struct {
gnss_signal_dep_t sid; /**< GNSS signal identifier */
gps_time_sec_t toa; /**< Reference time of almanac */
double ura; /**< User Range Accuracy [m] */
u32 fit_interval; /**< Curve fit interval [s] */
u8 valid; /**< Status of almanac, 1 = valid, 0 = invalid */
u8 health_bits; /**< Satellite health status for GPS:
- bits 5-7: NAV data health status. See IS-GPS-200H
Table 20-VII: NAV Data Health Indications.
- bits 0-4: Signal health status. See IS-GPS-200H
Table 20-VIII. Codes for Health of SV Signal
Components.
Satellite health status for GLO:
See GLO ICD 5.1 table 5.1 for details
- bit 0: C(n), "unhealthy" flag that is transmitted within
non-immediate data and indicates overall constellation status
at the moment of almanac uploading.
'0' indicates malfunction of n-satellite.
'1' indicates that n-satellite is operational.
- bit 1: Bn(ln), '0' indicates the satellite is operational
and suitable for navigation.
*/
} almanac_common_content_dep_t;
/** Satellite broadcast ephemeris for GPS
*
* The almanac message returns a set of satellite orbit parameters. Almanac
* data is not very precise and is considered valid for up to several months.
* Please see the Navstar GPS Space Segment/Navigation user interfaces
* (ICD-GPS-200, Chapter 20.3.3.5.1.2 Almanac Data) for more details.
*/
#define SBP_MSG_ALMANAC_GPS_DEP 0x0070
typedef struct {
almanac_common_content_dep_t
common; /**< Values common for all almanac types */
double m0; /**< Mean anomaly at reference time [rad] */
double ecc; /**< Eccentricity of satellite orbit */
double
sqrta; /**< Square root of the semi-major axis of orbit [m^(1/2)] */
double
omega0; /**< Longitude of ascending node of orbit plane at weekly epoch [rad] */
double omegadot; /**< Rate of right ascension [rad/s] */
double w; /**< Argument of perigee [rad] */
double inc; /**< Inclination [rad] */
double
af0; /**< Polynomial clock correction coefficient (clock bias) [s] */
double
af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
} msg_almanac_gps_dep_t;
/** Satellite broadcast ephemeris for GPS
*
* The almanac message returns a set of satellite orbit parameters. Almanac
* data is not very precise and is considered valid for up to several months.
* Please see the Navstar GPS Space Segment/Navigation user interfaces
* (ICD-GPS-200, Chapter 20.3.3.5.1.2 Almanac Data) for more details.
*/
#define SBP_MSG_ALMANAC_GPS 0x0072
typedef struct {
almanac_common_content_t
common; /**< Values common for all almanac types */
double m0; /**< Mean anomaly at reference time [rad] */
double ecc; /**< Eccentricity of satellite orbit */
double
sqrta; /**< Square root of the semi-major axis of orbit [m^(1/2)] */
double
omega0; /**< Longitude of ascending node of orbit plane at weekly epoch [rad] */
double omegadot; /**< Rate of right ascension [rad/s] */
double w; /**< Argument of perigee [rad] */
double inc; /**< Inclination [rad] */
double
af0; /**< Polynomial clock correction coefficient (clock bias) [s] */
double
af1; /**< Polynomial clock correction coefficient (clock drift) [s/s] */
} msg_almanac_gps_t;
/** Satellite broadcast ephemeris for GLO
*
* The almanac message returns a set of satellite orbit parameters. Almanac
* data is not very precise and is considered valid for up to several months.
* Please see the GLO ICD 5.1 "Chapter 4.5 Non-immediate information and
* almanac" for details.
*/
#define SBP_MSG_ALMANAC_GLO_DEP 0x0071
typedef struct {
almanac_common_content_dep_t
common; /**< Values common for all almanac types */
double
lambda_na; /**< Longitude of the first ascending node of the orbit in PZ-90.02
coordinate system
[rad] */
double t_lambda_na; /**< Time of the first ascending node passage [s] */
double i; /**< Value of inclination at instant of t_lambda [rad] */
double
t; /**< Value of Draconian period at instant of t_lambda [s/orbital period] */
double
t_dot; /**< Rate of change of the Draconian period [s/(orbital period^2)] */
double epsilon; /**< Eccentricity at instant of t_lambda */
double omega; /**< Argument of perigee at instant of t_lambda [rad] */
} msg_almanac_glo_dep_t;
/** Satellite broadcast ephemeris for GLO
*
* The almanac message returns a set of satellite orbit parameters. Almanac
* data is not very precise and is considered valid for up to several months.
* Please see the GLO ICD 5.1 "Chapter 4.5 Non-immediate information and
* almanac" for details.
*/
#define SBP_MSG_ALMANAC_GLO 0x0073
typedef struct {
almanac_common_content_t
common; /**< Values common for all almanac types */
double
lambda_na; /**< Longitude of the first ascending node of the orbit in PZ-90.02
coordinate system
[rad] */
double t_lambda_na; /**< Time of the first ascending node passage [s] */
double i; /**< Value of inclination at instant of t_lambda [rad] */
double
t; /**< Value of Draconian period at instant of t_lambda [s/orbital period] */
double
t_dot; /**< Rate of change of the Draconian period [s/(orbital period^2)] */
double epsilon; /**< Eccentricity at instant of t_lambda */
double omega; /**< Argument of perigee at instant of t_lambda [rad] */
} msg_almanac_glo_t;
/** GLONASS L1/L2 Code-Phase biases
*
* The GLONASS L1/L2 Code-Phase biases allows to perform
* GPS+GLONASS integer ambiguity resolution for baselines
* with mixed receiver types (e.g. receiver of different
* manufacturers)
*/
#define SBP_MSG_GLO_BIASES 0x0075
typedef struct {
u8 mask; /**< GLONASS FDMA signals mask [boolean] */
s16 l1ca_bias; /**< GLONASS L1 C/A Code-Phase Bias [m * 0.02] */
s16 l1p_bias; /**< GLONASS L1 P Code-Phase Bias [m * 0.02] */
s16 l2ca_bias; /**< GLONASS L2 C/A Code-Phase Bias [m * 0.02] */
s16 l2p_bias; /**< GLONASS L2 P Code-Phase Bias [m * 0.02] */
} msg_glo_biases_t;
/** \} */
#endif /* LIBSBP_OBSERVATION_MESSAGES_H */