- Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathu-blox_structs.h
2787 lines (2514 loc) · 94.5 KB
/
u-blox_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
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
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
This is a library written for the u-blox ZED-F9P and NEO-M8P-2
SparkFun sells these at its website: www.sparkfun.com
Do you like this library? Help support SparkFun. Buy a board!
https://www.sparkfun.com/products/16481
https://www.sparkfun.com/products/15136
https://www.sparkfun.com/products/15005
https://www.sparkfun.com/products/15733
https://www.sparkfun.com/products/15193
https://www.sparkfun.com/products/15210
Original version by Nathan Seidle @ SparkFun Electronics, September 6th, 2018
v2.0 rework by Paul Clark @ SparkFun Electronics, December 31st, 2020
This library handles configuring and handling the responses
from a u-blox GPS module. Works with most modules from u-blox including
the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others.
https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library
Development environment specifics:
Arduino IDE 1.8.13
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
The MIT License (MIT)
Copyright (c) 2016 SparkFun Electronics
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to
do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef__u_blox_structs_h__
#define__u_blox_structs_h__
#include"SparkFun_u-blox_GNSS_Arduino_Library.h"
#ifndefDEF_NUM_SENS
#defineDEF_NUM_SENS 7 // The maximum number of ESF sensors
#endif
#ifndefDEF_MAX_NUM_ESF_RAW_REPEATS
#defineDEF_MAX_NUM_ESF_RAW_REPEATS 10 // The NEO-M8U sends ESF RAW data in blocks / sets of ten readings. (The ZED-F9R sends them one at a time.)
#endif
#ifndefDEF_MAX_NUM_ESF_MEAS
#defineDEF_MAX_NUM_ESF_MEAS 31 // numMeas is 5 bits, indicating up to 31 groups could be received
#endif
// Additional flags and pointers that need to be stored with each message type
structubxAutomaticFlags
{
union
{
uint8_tall;
struct
{
uint8_tautomatic : 1; // Will this message be delivered and parsed "automatically" (without polling)
uint8_timplicitUpdate : 1; // Is the update triggered by accessing stale data (=true) or by a call to checkUblox (=false)
uint8_taddToFileBuffer : 1; // Should the raw UBX data be added to the file buffer?
uint8_tcallbackCopyValid : 1; // Is the copy of the data struct used by the callback valid/fresh?
} bits;
} flags;
};
// NAV-specific structs
// UBX-NAV-POSECEF (0x01 0x01): Position solution in ECEF
constuint16_tUBX_NAV_POSECEF_LEN=20;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
int32_tecefX; // ECEF X coordinate: cm
int32_tecefY; // ECEF Y coordinate: cm
int32_tecefZ; // ECEF Z coordinate: cm
uint32_tpAcc; // Position Accuracy Estimate: cm
} UBX_NAV_POSECEF_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tecefX : 1;
uint32_tecefY : 1;
uint32_tecefZ : 1;
uint32_tpAcc : 1;
} bits;
} moduleQueried;
} UBX_NAV_POSECEF_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_POSECEF_data_tdata;
UBX_NAV_POSECEF_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_POSECEF_data_t);
void (*callbackPointerPtr)(UBX_NAV_POSECEF_data_t*);
UBX_NAV_POSECEF_data_t*callbackData;
} UBX_NAV_POSECEF_t;
// UBX-NAV-POSLLH (0x01 0x02): Geodetic position solution
constuint16_tUBX_NAV_POSLLH_LEN=28;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
int32_tlon; // Longitude: Degrees * 1e-7
int32_tlat; // Latitude: Degrees * 1e-7
int32_theight; // Height above ellipsoid: mm
int32_thMSL; // Height above mean sea level: mm
uint32_thAcc; // Horizontal Accuracy Estimate: mm
uint32_tvAcc; // Vertical Accuracy Estimate: mm
} UBX_NAV_POSLLH_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tlon : 1;
uint32_tlat : 1;
uint32_theight : 1;
uint32_thMSL : 1;
uint32_thAcc : 1;
uint32_tvAcc : 1;
} bits;
} moduleQueried;
} UBX_NAV_POSLLH_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_POSLLH_data_tdata;
UBX_NAV_POSLLH_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_POSLLH_data_t);
void (*callbackPointerPtr)(UBX_NAV_POSLLH_data_t*);
UBX_NAV_POSLLH_data_t*callbackData;
} UBX_NAV_POSLLH_t;
// UBX-NAV-STATUS (0x01 0x03): Receiver navigation status
constuint16_tUBX_NAV_STATUS_LEN=16;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
uint8_tgpsFix; // GPSfix Type: 0x00 = no fix; 0x01 = dead reckoning only; 0x02 = 2D-fix; 0x03 = 3D-fix
// 0x04 = GPS + dead reckoning combined; 0x05 = Time only fix; 0x06..0xff = reserved
union
{
uint8_tall;
struct
{
uint8_tgpsFixOk : 1; // 1 = position and velocity valid and within DOP and ACC Masks.
uint8_tdiffSoln : 1; // 1 = differential corrections were applied
uint8_twknSet : 1; // 1 = Week Number valid (see Time Validity section for details)
uint8_ttowSet : 1; // 1 = Time of Week valid (see Time Validity section for details)
} bits;
} flags;
union
{
uint8_tall;
struct
{
uint8_tdiffCorr : 1; // 1 = differential corrections available
uint8_tcarrSolnValid : 1; // 1 = valid carrSoln
uint8_treserved : 4;
uint8_tmapMatching : 2; // map matching status: 00: none
// 01: valid but not used, i.e. map matching data was received, but was too old
// 10: valid and used, map matching data was applied
// 11: valid and used, map matching data was applied.
} bits;
} fixStat;
union
{
uint8_tall;
struct
{
uint8_tpsmState : 2; // power save mode state
// 0: ACQUISITION [or when psm disabled]
// 1: TRACKING
// 2: POWER OPTIMIZED TRACKING
// 3: INACTIVE
uint8_treserved1 : 1;
uint8_tspoofDetState : 2; // Spoofing detection state
// 0: Unknown or deactivated
// 1: No spoofing indicated
// 2: Spoofing indicated
// 3: Multiple spoofing indications
uint8_treserved2 : 1;
uint8_tcarrSoln : 2; // Carrier phase range solution status:
// 0: no carrier phase range solution
// 1: carrier phase range solution with floating ambiguities
// 2: carrier phase range solution with fixed ambiguities
} bits;
} flags2;
uint32_tttff; // Time to first fix (millisecond time tag): ms
uint32_tmsss; // Milliseconds since Startup / Reset: ms
} UBX_NAV_STATUS_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tgpsFix : 1;
uint32_tgpsFixOk : 1;
uint32_tdiffSoln : 1;
uint32_twknSet : 1;
uint32_ttowSet : 1;
uint32_tdiffCorr : 1;
uint32_tcarrSolnValid : 1;
uint32_tmapMatching : 1;
uint32_tpsmState : 1;
uint32_tspoofDetState : 1;
uint32_tcarrSoln : 1;
uint32_tttff : 1;
uint32_tmsss : 1;
} bits;
} moduleQueried;
} UBX_NAV_STATUS_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_STATUS_data_tdata;
UBX_NAV_STATUS_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_STATUS_data_t);
void (*callbackPointerPtr)(UBX_NAV_STATUS_data_t*);
UBX_NAV_STATUS_data_t*callbackData;
} UBX_NAV_STATUS_t;
// UBX-NAV-DOP (0x01 0x04): Dilution of precision
constuint16_tUBX_NAV_DOP_LEN=18;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
uint16_tgDOP; // Geometric DOP: * 0.01
uint16_tpDOP; // Position DOP: * 0.01
uint16_ttDOP; // Time DOP: * 0.01
uint16_tvDOP; // Vertical DOP: * 0.01
uint16_thDOP; // Horizontal DOP: * 0.01
uint16_tnDOP; // Northing DOP: * 0.01
uint16_teDOP; // Easting DOP: * 0.01
} UBX_NAV_DOP_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tgDOP : 1;
uint32_tpDOP : 1;
uint32_ttDOP : 1;
uint32_tvDOP : 1;
uint32_thDOP : 1;
uint32_tnDOP : 1;
uint32_teDOP : 1;
} bits;
} moduleQueried;
} UBX_NAV_DOP_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_DOP_data_tdata;
UBX_NAV_DOP_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_DOP_data_t);
void (*callbackPointerPtr)(UBX_NAV_DOP_data_t*);
UBX_NAV_DOP_data_t*callbackData;
} UBX_NAV_DOP_t;
// UBX-NAV-ATT (0x01 0x05): Attitude solution
constuint16_tUBX_NAV_ATT_LEN=32;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
uint8_tversion; // Message version (0x00 for this version)
uint8_treserved1[3];
int32_troll; // Vehicle roll: Degrees * 1e-5
int32_tpitch; // Vehicle pitch: Degrees * 1e-5
int32_theading; // Vehicle heading: Degrees * 1e-5
uint32_taccRoll; // Vehicle roll accuracy (if null, roll angle is not available): Degrees * 1e-5
uint32_taccPitch; // Vehicle pitch accuracy (if null, roll angle is not available): Degrees * 1e-5
uint32_taccHeading; // Vehicle heading accuracy (if null, roll angle is not available): Degrees * 1e-5
} UBX_NAV_ATT_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tversion : 1;
uint32_troll : 1;
uint32_tpitch : 1;
uint32_theading : 1;
uint32_taccRoll : 1;
uint32_taccPitch : 1;
uint32_taccHeading : 1;
} bits;
} moduleQueried;
} UBX_NAV_ATT_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_ATT_data_tdata;
UBX_NAV_ATT_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_ATT_data_t);
void (*callbackPointerPtr)(UBX_NAV_ATT_data_t*);
UBX_NAV_ATT_data_t*callbackData;
} UBX_NAV_ATT_t;
// UBX-NAV-PVT (0x01 0x07): Navigation position velocity time solution
constuint16_tUBX_NAV_PVT_LEN=92;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
uint16_tyear; // Year (UTC)
uint8_tmonth; // Month, range 1..12 (UTC)
uint8_tday; // Day of month, range 1..31 (UTC)
uint8_thour; // Hour of day, range 0..23 (UTC)
uint8_tmin; // Minute of hour, range 0..59 (UTC)
uint8_tsec; // Seconds of minute, range 0..60 (UTC)
union
{
uint8_tall;
struct
{
uint8_tvalidDate : 1; // 1 = valid UTC Date
uint8_tvalidTime : 1; // 1 = valid UTC time of day
uint8_tfullyResolved : 1; // 1 = UTC time of day has been fully resolved (no seconds uncertainty).
uint8_tvalidMag : 1; // 1 = valid magnetic declination
} bits;
} valid;
uint32_ttAcc; // Time accuracy estimate (UTC): ns
int32_tnano; // Fraction of second, range -1e9 .. 1e9 (UTC): ns
uint8_tfixType; // GNSSfix Type:
// 0: no fix
// 1: dead reckoning only
// 2: 2D-fix
// 3: 3D-fix
// 4: GNSS + dead reckoning combined
// 5: time only fix
union
{
uint8_tall;
struct
{
uint8_tgnssFixOK : 1; // 1 = valid fix (i.e within DOP & accuracy masks)
uint8_tdiffSoln : 1; // 1 = differential corrections were applied
uint8_tpsmState : 3;
uint8_theadVehValid : 1; // 1 = heading of vehicle is valid, only set if the receiver is in sensor fusion mode
uint8_tcarrSoln : 2; // Carrier phase range solution status:
// 0: no carrier phase range solution
// 1: carrier phase range solution with floating ambiguities
// 2: carrier phase range solution with fixed ambiguities
} bits;
} flags;
union
{
uint8_tall;
struct
{
uint8_treserved : 5;
uint8_tconfirmedAvai : 1; // 1 = information about UTC Date and Time of Day validity confirmation is available
uint8_tconfirmedDate : 1; // 1 = UTC Date validity could be confirmed
uint8_tconfirmedTime : 1; // 1 = UTC Time of Day could be confirmed
} bits;
} flags2;
uint8_tnumSV; // Number of satellites used in Nav Solution
int32_tlon; // Longitude: deg * 1e-7
int32_tlat; // Latitude: deg * 1e-7
int32_theight; // Height above ellipsoid: mm
int32_thMSL; // Height above mean sea level: mm
uint32_thAcc; // Horizontal accuracy estimate: mm
uint32_tvAcc; // Vertical accuracy estimate: mm
int32_tvelN; // NED north velocity: mm/s
int32_tvelE; // NED east velocity: mm/s
int32_tvelD; // NED down velocity: mm/s
int32_tgSpeed; // Ground Speed (2-D): mm/s
int32_theadMot; // Heading of motion (2-D): deg * 1e-5
uint32_tsAcc; // Speed accuracy estimate: mm/s
uint32_theadAcc; // Heading accuracy estimate (both motion and vehicle): deg * 1e-5
uint16_tpDOP; // Position DOP * 0.01
union
{
uint8_tall;
struct
{
uint8_tinvalidLlh : 1; // 1 = Invalid lon, lat, height and hMSL
} bits;
} flags3;
uint8_treserved1[5];
int32_theadVeh; // Heading of vehicle (2-D): deg * 1e-5
int16_tmagDec; // Magnetic declination: deg * 1e-2
uint16_tmagAcc; // Magnetic declination accuracy: deg * 1e-2
} UBX_NAV_PVT_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tyear : 1;
uint32_tmonth : 1;
uint32_tday : 1;
uint32_thour : 1;
uint32_tmin : 1;
uint32_tsec : 1;
uint32_tvalidDate : 1;
uint32_tvalidTime : 1;
uint32_tfullyResolved : 1;
uint32_tvalidMag : 1;
uint32_ttAcc : 1;
uint32_tnano : 1;
uint32_tfixType : 1;
uint32_tgnssFixOK : 1;
uint32_tdiffSoln : 1;
uint32_tpsmState : 1;
uint32_theadVehValid : 1;
uint32_tcarrSoln : 1;
uint32_tconfirmedAvai : 1;
uint32_tconfirmedDate : 1;
uint32_tconfirmedTime : 1;
uint32_tnumSV : 1;
uint32_tlon : 1;
uint32_tlat : 1;
uint32_theight : 1;
uint32_thMSL : 1;
uint32_thAcc : 1;
uint32_tvAcc : 1;
uint32_tvelN : 1;
uint32_tvelE : 1;
} bits;
} moduleQueried1;
union
{
uint32_tall;
struct
{
uint32_tvelD : 1;
uint32_tgSpeed : 1;
uint32_theadMot : 1;
uint32_tsAcc : 1;
uint32_theadAcc : 1;
uint32_tpDOP : 1;
uint32_tinvalidLlh : 1;
uint32_theadVeh : 1;
uint32_tmagDec : 1;
uint32_tmagAcc : 1;
} bits;
} moduleQueried2;
} UBX_NAV_PVT_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_PVT_data_tdata;
UBX_NAV_PVT_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_PVT_data_t);
void (*callbackPointerPtr)(UBX_NAV_PVT_data_t*);
UBX_NAV_PVT_data_t*callbackData;
} UBX_NAV_PVT_t;
// UBX-NAV-ODO (0x01 0x09): Odometer solution
constuint16_tUBX_NAV_ODO_LEN=20;
typedefstruct
{
uint8_tversion; // Message version (0x00 for this version)
uint8_treserved1[3];
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
uint32_tdistance; // Ground distance since last reset: m
uint32_ttotalDistance; // Total cumulative ground distance: m
uint32_tdistanceStd; // Ground distance accuracy (1-sigma): m
} UBX_NAV_ODO_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tversion : 1;
uint32_tiTOW : 1;
uint32_tdistance : 1;
uint32_ttotalDistance : 1;
uint32_tdistanceStd : 1;
} bits;
} moduleQueried;
} UBX_NAV_ODO_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_ODO_data_tdata;
UBX_NAV_ODO_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_ODO_data_t);
void (*callbackPointerPtr)(UBX_NAV_ODO_data_t*);
UBX_NAV_ODO_data_t*callbackData;
} UBX_NAV_ODO_t;
// UBX-NAV-VELECEF (0x01 0x11): Velocity solution in ECEF
constuint16_tUBX_NAV_VELECEF_LEN=20;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
int32_tecefVX; // ECEF X velocity: cm/s
int32_tecefVY; // ECEF Y velocity: cm/s
int32_tecefVZ; // ECEF Z velocity: cm/s
uint32_tsAcc; // Speed accuracy estimate: cm/s
} UBX_NAV_VELECEF_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tecefVX : 1;
uint32_tecefVY : 1;
uint32_tecefVZ : 1;
uint32_tsAcc : 1;
} bits;
} moduleQueried;
} UBX_NAV_VELECEF_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_VELECEF_data_tdata;
UBX_NAV_VELECEF_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_VELECEF_data_t);
void (*callbackPointerPtr)(UBX_NAV_VELECEF_data_t*);
UBX_NAV_VELECEF_data_t*callbackData;
} UBX_NAV_VELECEF_t;
// UBX-NAV-VELNED (0x01 0x12): Velocity solution in NED frame
constuint16_tUBX_NAV_VELNED_LEN=36;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
int32_tvelN; // North velocity component: cm/s
int32_tvelE; // East velocity component: cm/s
int32_tvelD; // Down velocity component: cm/s
uint32_tspeed; // Speed (3-D): cm/s
uint32_tgSpeed; // Ground Speed (2-D): cm/s
int32_theading; // Heading of motion 2-D: Degrees * 1e-5
uint32_tsAcc; // Speed accuracy estimate: cm/s
uint32_tcAcc; // Course/Heading accuracy estimate: Degrees * 1e-5
} UBX_NAV_VELNED_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tvelN : 1;
uint32_tvelE : 1;
uint32_tvelD : 1;
uint32_tspeed : 1;
uint32_tgSpeed : 1;
uint32_theading : 1;
uint32_tsAcc : 1;
uint32_tcAcc : 1;
} bits;
} moduleQueried;
} UBX_NAV_VELNED_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_VELNED_data_tdata;
UBX_NAV_VELNED_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_VELNED_data_t);
void (*callbackPointerPtr)(UBX_NAV_VELNED_data_t*);
UBX_NAV_VELNED_data_t*callbackData;
} UBX_NAV_VELNED_t;
// UBX-NAV-HPPOSECEF (0x01 0x13): High precision position solution in ECEF
constuint16_tUBX_NAV_HPPOSECEF_LEN=28;
typedefstruct
{
uint8_tversion; // Message version (0x00 for this version)
uint8_treserved1[3];
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
int32_tecefX; // ECEF X coordinate: cm
int32_tecefY; // ECEF Y coordinate: cm
int32_tecefZ; // ECEF Z coordinate: cm
int8_tecefXHp; // High precision component of ECEF X coordinate: mm * 0.1
int8_tecefYHp; // High precision component of ECEF Y coordinate: mm * 0.1
int8_tecefZHp; // High precision component of ECEF Z coordinate: mm * 0.1
union
{
uint8_tall;
struct
{
uint8_tinvalidEcef : 1; // 1 = Invalid ecefX, ecefY, ecefZ, ecefXHp, ecefYHp and ecefZHp
} bits;
} flags;
uint32_tpAcc; // Position Accuracy Estimate: mm * 0.1
} UBX_NAV_HPPOSECEF_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tversion : 1;
uint32_tiTOW : 1;
uint32_tecefX : 1;
uint32_tecefY : 1;
uint32_tecefZ : 1;
uint32_tecefXHp : 1;
uint32_tecefYHp : 1;
uint32_tecefZHp : 1;
uint32_tinvalidEcef : 1;
uint32_tpAcc : 1;
} bits;
} moduleQueried;
} UBX_NAV_HPPOSECEF_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_HPPOSECEF_data_tdata;
UBX_NAV_HPPOSECEF_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_HPPOSECEF_data_t);
void (*callbackPointerPtr)(UBX_NAV_HPPOSECEF_data_t*);
UBX_NAV_HPPOSECEF_data_t*callbackData;
} UBX_NAV_HPPOSECEF_t;
// UBX-NAV-HPPOSLLH (0x01 0x14): High precision geodetic position solution
constuint16_tUBX_NAV_HPPOSLLH_LEN=36;
typedefstruct
{
uint8_tversion; // Message version (0x00 for this version)
uint8_treserved1[2];
union
{
uint8_tall;
struct
{
uint8_tinvalidLlh : 1; // 1 = Invalid lon, lat, height, hMSL, lonHp, latHp, heightHp and hMSLHp
} bits;
} flags;
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
int32_tlon; // Longitude: deg * 1e-7
int32_tlat; // Latitude: deg * 1e-7
int32_theight; // Height above ellipsoid: mm
int32_thMSL; // Height above mean sea level: mm
int8_tlonHp; // High precision component of longitude: deg * 1e-9
int8_tlatHp; // High precision component of latitude: deg * 1e-9
int8_theightHp; // High precision component of height above ellipsoid: mm * 0.1
int8_thMSLHp; // High precision component of height above mean sea level: mm * 0.1
uint32_thAcc; // Horizontal accuracy estimate: mm * 0.1
uint32_tvAcc; // Vertical accuracy estimate: mm * 0.1
} UBX_NAV_HPPOSLLH_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tversion : 1;
uint32_tinvalidLlh : 1;
uint32_tiTOW : 1;
uint32_tlon : 1;
uint32_tlat : 1;
uint32_theight : 1;
uint32_thMSL : 1;
uint32_tlonHp : 1;
uint32_tlatHp : 1;
uint32_theightHp : 1;
uint32_thMSLHp : 1;
uint32_thAcc : 1;
uint32_tvAcc : 1;
} bits;
} moduleQueried;
} UBX_NAV_HPPOSLLH_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_HPPOSLLH_data_tdata;
UBX_NAV_HPPOSLLH_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_HPPOSLLH_data_t);
void (*callbackPointerPtr)(UBX_NAV_HPPOSLLH_data_t*);
UBX_NAV_HPPOSLLH_data_t*callbackData;
} UBX_NAV_HPPOSLLH_t;
// UBX-NAV-PVAT (0x01 0x17): Navigation position velocity attitude time solution
constuint16_tUBX_NAV_PVAT_LEN=116;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
uint8_tversion; // Message version (0x00 for this version)
union
{
uint8_tall;
struct
{
uint8_tvalidDate : 1; // 1 = valid UTC Date
uint8_tvalidTime : 1; // 1 = valid UTC time of day
uint8_tfullyResolved : 1; // 1 = UTC time of day has been fully resolved (no seconds uncertainty).
uint8_tvalidMag : 1; // 1 = valid magnetic declination
} bits;
} valid;
uint16_tyear; // Year (UTC)
uint8_tmonth; // Month, range 1..12 (UTC)
uint8_tday; // Day of month, range 1..31 (UTC)
uint8_thour; // Hour of day, range 0..23 (UTC)
uint8_tmin; // Minute of hour, range 0..59 (UTC)
uint8_tsec; // Seconds of minute, range 0..60 (UTC)
uint8_treserved0;
uint8_treserved1[2];
uint32_ttAcc; // Time accuracy estimate (UTC): ns
int32_tnano; // Fraction of second, range -1e9 .. 1e9 (UTC): ns
uint8_tfixType; // GNSSfix Type:
// 0: no fix
// 1: dead reckoning only
// 2: 2D-fix
// 3: 3D-fix
// 4: GNSS + dead reckoning combined
// 5: time only fix
union
{
uint8_tall;
struct
{
uint8_tgnssFixOK : 1; // 1 = valid fix (i.e within DOP & accuracy masks)
uint8_tdiffSoln : 1; // 1 = differential corrections were applied
uint8_treserved : 1;
uint8_tvehRollValid : 1; // 1 = roll of vehicle is valid, only set if the receiver is in sensor fusion mode
uint8_tvehPitchValid : 1; // 1 = pitch of vehicle is valid, only set if the receiver is in sensor fusion mode
uint8_tvehHeadingValid : 1; // 1 = heading of vehicle is valid, only set if the receiver is in sensor fusion mode
uint8_tcarrSoln : 2; // Carrier phase range solution status:
// 0: no carrier phase range solution
// 1: carrier phase range solution with floating ambiguities
// 2: carrier phase range solution with fixed ambiguities
} bits;
} flags;
union
{
uint8_tall;
struct
{
uint8_treserved : 5;
uint8_tconfirmedAvai : 1; // 1 = information about UTC Date and Time of Day validity confirmation is available
uint8_tconfirmedDate : 1; // 1 = UTC Date validity could be confirmed
uint8_tconfirmedTime : 1; // 1 = UTC Time of Day could be confirmed
} bits;
} flags2;
uint8_tnumSV; // Number of satellites used in Nav Solution
int32_tlon; // Longitude: deg * 1e-7
int32_tlat; // Latitude: deg * 1e-7
int32_theight; // Height above ellipsoid: mm
int32_thMSL; // Height above mean sea level: mm
uint32_thAcc; // Horizontal accuracy estimate: mm
uint32_tvAcc; // Vertical accuracy estimate: mm
int32_tvelN; // NED north velocity: mm/s
int32_tvelE; // NED east velocity: mm/s
int32_tvelD; // NED down velocity: mm/s
int32_tgSpeed; // Ground Speed (2-D): mm/s
uint32_tsAcc; // Speed accuracy estimate: mm/s
int32_tvehRoll; // Vehicle roll: 1e-5 deg
int32_tvehPitch; // Vehicle pitch: 1e-5 deg
int32_tvehHeading; // Vehicle heading: 1e-5 deg
int32_tmotHeading; // Motion heading.: 1e-5 deg
uint16_taccRoll; // Vehicle roll accuracy (if null, roll angle is not available): 1e-2 deg
uint16_taccPitch; // Vehicle pitch accuracy (if null, pitch angle is not available): 1e-2 deg
uint16_taccHeading; // Vehicle heading accuracy (if null, heading angle is not available): 1e-2 deg
int16_tmagDec; // Magnetic declination: 1e-2 deg
uint16_tmagAcc; // Magnetic declination accuracy: 1e-2 deg
uint16_terrEllipseOrient; // Orientation of semi-major axis of error ellipse (degrees from true north): 1e-2 deg
uint32_terrEllipseMajor; // Semi-major axis of error ellipse: mm
uint32_terrEllipseMinor; // Semi-minor axis of error ellipse: mm
uint8_treserved2[4];
uint8_treserved3[4];
} UBX_NAV_PVAT_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_tversion : 1;
uint32_tvalidDate : 1;
uint32_tvalidTime : 1;
uint32_tfullyResolved : 1;
uint32_tvalidMag : 1;
uint32_tyear : 1;
uint32_tmonth : 1;
uint32_tday : 1;
uint32_thour : 1;
uint32_tmin : 1;
uint32_tsec : 1;
uint32_ttAcc : 1;
uint32_tnano : 1;
uint32_tfixType : 1;
uint32_tgnssFixOK : 1;
uint32_tdiffSoln : 1;
uint32_tvehRollValid : 1;
uint32_tvehPitchValid : 1;
uint32_tvehHeadingValid : 1;
uint32_tcarrSoln : 1;
uint32_tconfirmedAvai : 1;
uint32_tconfirmedDate : 1;
uint32_tconfirmedTime : 1;
uint32_tnumSV : 1;
uint32_tlon : 1;
uint32_tlat : 1;
uint32_theight : 1;
uint32_thMSL : 1;
uint32_thAcc : 1;
uint32_tvAcc : 1;
} bits;
} moduleQueried1;
union
{
uint32_tall;
struct
{
uint32_tvelN : 1;
uint32_tvelE : 1;
uint32_tvelD : 1;
uint32_tgSpeed : 1;
uint32_tsAcc : 1;
uint32_tvehRoll : 1;
uint32_tvehPitch : 1;
uint32_tvehHeading : 1;
uint32_tmotHeading : 1;
uint32_taccRoll : 1;
uint32_taccPitch : 1;
uint32_taccHeading : 1;
uint32_tmagDec : 1;
uint32_tmagAcc : 1;
uint32_terrEllipseOrient : 1;
uint32_terrEllipseMajor : 1;
uint32_terrEllipseMinor : 1;
} bits;
} moduleQueried2;
} UBX_NAV_PVAT_moduleQueried_t;
typedefstruct
{
ubxAutomaticFlagsautomaticFlags;
UBX_NAV_PVAT_data_tdata;
UBX_NAV_PVAT_moduleQueried_tmoduleQueried;
void (*callbackPointer)(UBX_NAV_PVAT_data_t);
void (*callbackPointerPtr)(UBX_NAV_PVAT_data_t*);
UBX_NAV_PVAT_data_t*callbackData;
} UBX_NAV_PVAT_t;
// UBX-NAV-TIMEUTC (0x01 0x21): UTC time solution
constuint16_tUBX_NAV_TIMEUTC_LEN=20;
typedefstruct
{
uint32_tiTOW; // GPS time of week of the navigation epoch: ms
uint32_ttAcc; // Time accuracy estimate (UTC): ns
int32_tnano; // Fraction of second, range -1e9 .. 1e9 (UTC): ns
uint16_tyear; // Year (UTC)
uint8_tmonth; // Month, range 1..12 (UTC)
uint8_tday; // Day of month, range 1..31 (UTC)
uint8_thour; // Hour of day, range 0..23 (UTC)
uint8_tmin; // Minute of hour, range 0..59 (UTC)
uint8_tsec; // Seconds of minute, range 0..60 (UTC)
union
{
uint8_tall;
struct
{
uint8_tvalidTOW : 1; // 1 = Valid Time of Week
uint8_tvalidWKN : 1; // 1 = Valid Week Number
uint8_tvalidUTC : 1; // 1 = Valid UTC Time
uint8_treserved : 1;
uint8_tutcStandard : 4; // UTC standard identifier
} bits;
} valid;
} UBX_NAV_TIMEUTC_data_t;
typedefstruct
{
union
{
uint32_tall;
struct
{
uint32_tall : 1;
uint32_tiTOW : 1;
uint32_ttAcc : 1;
uint32_tnano : 1;
uint32_tyear : 1;
uint32_tmonth : 1;
uint32_tday : 1;
uint32_thour : 1;
uint32_tmin : 1;
uint32_tsec : 1;
uint32_tvalidTOW : 1;
uint32_tvalidWKN : 1;
uint32_tvalidUTC : 1;
uint32_tutcStandard : 1;