-
Notifications
You must be signed in to change notification settings - Fork 3
/
ubx_messageDef.h
executable file
·2837 lines (2042 loc) · 124 KB
/
ubx_messageDef.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
/*******************************************************************************
*
* Copyright (C) u-blox AG
* u-blox AG, Thalwil, Switzerland
*
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice
* is included in all copies of any software which is or includes a copy
* or modification of this software and in all copies of the supporting
* documentation for such software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR U-BLOX MAKES ANY
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*
*******************************************************************************
*
* Project: PE_ANS
*
******************************************************************************/
/*!
\file
\brief UBX message definitions
*/
/***********************************************************
* $Id: ubx_messageDef.h 63615 2012-11-27 10:12:42Z andrea.foni $
***********************************************************/
#ifndef __PROTO_UBX_STRUCT_DEF_H_10174BF8_39D22F9A
#define __PROTO_UBX_STRUCT_DEF_H_10174BF8_39D22F9A
#include <stdint.h>
/*----------------*/
/* Standard types */
/*----------------*/
#if !defined __STD_TYPES_H__
typedef signed int I; //!< = I4
typedef unsigned int U; //!< = U4
typedef unsigned long BL; //!< = L4 (TRUE or FALSE only)
typedef signed char I1; //!< signed 1 byte integer
typedef signed short I2; //!< signed 2 byte integer
typedef signed int I4; //!< signed 4 byte integer
typedef int64_t I8; //!< signed 8 byte integer
typedef unsigned char U1; //!< unsigned 1 byte integer
typedef unsigned short U2; //!< unsigned 2 byte integer
typedef unsigned int U4; //!< unsigned 4 byte integer
typedef uint64_t U8; //!< unsigned 8 byte integer
typedef float R4; //!< 4 byte floating point
typedef double R8; //!< 8 byte floating point
typedef char CH; //!< ASCII character
typedef unsigned char L1; //!< 1 byte logical (TRUE or FALSE only)
typedef unsigned short L2; //!< 2 byte logical (TRUE or FALSE only)
typedef unsigned int L4; //!< 4 byte logical (TRUE or FALSE only)
typedef unsigned int L; //!< 4 byte logical (TRUE or FALSE only)
#define TRUE 1
#define FALSE 0
#endif
typedef unsigned char X1; //!< unsigned 1 byte integer, to be interpreted as bitmask
typedef unsigned short X2; //!< unsigned 2 byte integer, to be interpreted as bitmask
typedef unsigned int X4; //!< unsigned 4 byte integer, to be interpreted as bitmask
//! UBX Protocol Header
typedef struct GPS_UBX_HEAD_s
{
U2 prefix; //!< Prefix, always #GPS_UBX_PREFIX
U1 classId; //!< UBX Class Id
U1 msgId; //!< UBX Message Id
U2 size; //!< Payload Size
} GPS_UBX_HEAD_t, *GPS_UBX_HEAD_pt;
#define GPS_UBX_SYNC_CHAR_1 0xB5u //!< First synchronization character of UBX Protocol
#define GPS_UBX_SYNC_CHAR_2 0x62u //!< Second synchronization character of UBX Protocol
#define GPS_UBX_PREFIX (GPS_UBX_SYNC_CHAR_2<<8|GPS_UBX_SYNC_CHAR_1) //!< UBX Protocol Prefix
#define GPS_UBX_PREFIX_SIZE 2u //!< UBX Protocol Prefix Size in bytes
#define GPS_UBX_CHKSUM_SIZE 2u //!< UBX Protocol Checksum Size in bytes
#define GPS_UBX_HEAD_SIZE sizeof(GPS_UBX_HEAD_t) //!< UBX Protocol Header Size
#define GPS_UBX_FRAME_SIZE (GPS_UBX_HEAD_SIZE+GPS_UBX_CHKSUM_SIZE) //!< Total size of the UBX Frame
//================================================================
//! NAV_POSECEF: Periodic/Polled
/*!
Position Solution in ECEF
-
This Message's id is #UBXID_NAV_POSECEF
*/
//================================================================
typedef struct GPS_UBX_NAV_POSECEF_s
{
U4 iTOW; //!< GPS Millisecond Time of Week
I4 ecefX; //!< ECEF X coordinate
I4 ecefY; //!< ECEF Y coordinate
I4 ecefZ; //!< ECEF Z coordinate
U4 pAcc; //!< Position Accuracy Estimate
} GPS_UBX_NAV_POSECEF_t,*GPS_UBX_NAV_POSECEF_pt;
#define UBXID_NAV_POSECEF 0x0101 //!< message id for NAV-POSECEF
//================================================================
//! NAV_POSLLH: Periodic/Polled
/*!
Geodetic Position Solution
This message outputs the Geodetic position in the currently selected Ellipsoid. The default is the WGS84 Ellipsoid, but can be changed with the message <r href=\"CFG-DAT'>CFG-DAT</r>.
This Message's id is #UBXID_NAV_POSLLH
*/
//================================================================
typedef struct GPS_UBX_NAV_POSLLH_s
{
U4 iTOW; //!< GPS Millisecond Time of Week
I4 lon; //!< Longitude
I4 lat; //!< Latitude
I4 height; //!< Height above Ellipsoid
I4 hMSL; //!< Height above mean sea level
U4 hAcc; //!< Horizontal Accuracy Estimate
U4 vAcc; //!< Vertical Accuracy Estimate
} GPS_UBX_NAV_POSLLH_t,*GPS_UBX_NAV_POSLLH_pt;
#define UBXID_NAV_POSLLH 0x0102 //!< message id for NAV-POSLLH
//================================================================
//! NAV_STATUS: Periodic/Polled
/*!
Receiver Navigation Status
-
This Message's id is #UBXID_NAV_STATUS
*/
//================================================================
typedef struct GPS_UBX_NAV_STATUS_s
{
U4 iTOW; //!< GPS Millisecond Time of Week
U1 gpsFix; //!< GPSfix Type
X1 flags; //!< Navigation Status Flags
X1 diffStat; //!< Differential Status
U1 res; //!< Reserved
U4 ttff; //!< Time to first fix (millisecond time tag)
U4 msss; //!< Milliseconds since Startup / Reset
} GPS_UBX_NAV_STATUS_t,*GPS_UBX_NAV_STATUS_pt;
//! \name Bit Definitions for #GPS_UBX_NAV_STATUS_s::flags
//@{
#define GPS_UBX_NAV_STATUS_FLAGS_GPSFIXOK_MASK 0x01 //!< Mask for field gpsFixOk in bitmask flags
#define GPS_UBX_NAV_STATUS_FLAGS_GPSFIXOK_GET(val) (U)(((val)&GPS_UBX_NAV_STATUS_FLAGS_GPSFIXOK_MASK)>>0) //!< Get gpsFixOk from bitmask flags
#define GPS_UBX_NAV_STATUS_FLAGS_DIFFSOLN_MASK 0x02 //!< Mask for field diffSoln in bitmask flags
#define GPS_UBX_NAV_STATUS_FLAGS_DIFFSOLN_GET(val) (U)(((val)&GPS_UBX_NAV_STATUS_FLAGS_DIFFSOLN_MASK)>>1) //!< Get diffSoln from bitmask flags
#define GPS_UBX_NAV_STATUS_FLAGS_WKNSET_MASK 0x04 //!< Mask for field wknSet in bitmask flags
#define GPS_UBX_NAV_STATUS_FLAGS_WKNSET_GET(val) (U)(((val)&GPS_UBX_NAV_STATUS_FLAGS_WKNSET_MASK)>>2) //!< Get wknSet from bitmask flags
#define GPS_UBX_NAV_STATUS_FLAGS_TOWSET_MASK 0x08 //!< Mask for field towSet in bitmask flags
#define GPS_UBX_NAV_STATUS_FLAGS_TOWSET_GET(val) (U)(((val)&GPS_UBX_NAV_STATUS_FLAGS_TOWSET_MASK)>>3) //!< Get towSet from bitmask flags
//@}
//! \name Bit Definitions for #GPS_UBX_NAV_STATUS_s::diffStat
//@{
#define GPS_UBX_NAV_STATUS_DIFFSTAT_DGPSISTAT_MASK 0x03 //!< Mask for field dgpsIStat in bitmask diffStat
#define GPS_UBX_NAV_STATUS_DIFFSTAT_DGPSISTAT_GET(val) (U)(((val)&GPS_UBX_NAV_STATUS_DIFFSTAT_DGPSISTAT_MASK)>>0) //!< Get dgpsIStat from bitmask diffStat
//@}
#define UBXID_NAV_STATUS 0x0103 //!< message id for NAV-STATUS
//================================================================
//! NAV_DOP: Periodic/Polled
/*!
Dilution of precision
* DOP values are dimensionless.
* All DOP values are scaled by a factor of 100. that is, if the unit transmits a value of e.g. 156, it means that the DOP value is 1.56.
This Message's id is #UBXID_NAV_DOP
*/
//================================================================
typedef struct GPS_UBX_NAV_DOP_s
{
U4 iTOW; //!< GPS Millisecond Time of Week
U2 gDOP; //!< Geometric DOP
U2 pDOP; //!< Position DOP
U2 tDOP; //!< Time DOP
U2 vDOP; //!< Vertical DOP
U2 hDOP; //!< Horizontal DOP
U2 nDOP; //!< Northing DOP
U2 eDOP; //!< Easting DOP
} GPS_UBX_NAV_DOP_t,*GPS_UBX_NAV_DOP_pt;
#define UBXID_NAV_DOP 0x0104 //!< message id for NAV-DOP
//================================================================
//! NAV_SOL: Periodic/Polled
/*!
Navigation Solution Information
This message is combiningPosition, velocity and time solution in ECEF,including accuracy figures
This Message's id is #UBXID_NAV_SOL
*/
//================================================================
typedef struct GPS_UBX_NAV_SOL_s
{
U4 iTOW; //!< GPS Millisecond Time of Week
I4 fTOW; //!< Fractional Nanoseconds remainder of rounded ms above, range -500000 .. 500000
I2 week; //!< GPS week (GPS time)
U1 gpsFix; //!< GPSfix Type, range 0..4
X1 flags; //!< Fix Status Flags
I4 ecefX; //!< ECEF X coordinate
I4 ecefY; //!< ECEF Y coordinate
I4 ecefZ; //!< ECEF Z coordinate
U4 pAcc; //!< 3D Position Accuracy Estimate
I4 ecefVX; //!< ECEF X velocity
I4 ecefVY; //!< ECEF Y velocity
I4 ecefVZ; //!< ECEF Z velocity
U4 sAcc; //!< Speed Accuracy Estimate
U2 pDOP; //!< Position DOP
U1 res1; //!< reserved
U1 numSV; //!< Number of SVs used in Nav Solution
U4 res2; //!< reserved
} GPS_UBX_NAV_SOL_t,*GPS_UBX_NAV_SOL_pt;
//! \name Bit Definitions for #GPS_UBX_NAV_SOL_s::flags
//@{
#define GPS_UBX_NAV_SOL_FLAGS_GPSFIXOK_MASK 0x01 //!< Mask for field GPSfixOK in bitmask flags
#define GPS_UBX_NAV_SOL_FLAGS_GPSFIXOK_GET(val) (U)(((val)&GPS_UBX_NAV_SOL_FLAGS_GPSFIXOK_MASK)>>0) //!< Get GPSfixOK from bitmask flags
#define GPS_UBX_NAV_SOL_FLAGS_DIFFSOLN_MASK 0x02 //!< Mask for field DiffSoln in bitmask flags
#define GPS_UBX_NAV_SOL_FLAGS_DIFFSOLN_GET(val) (U)(((val)&GPS_UBX_NAV_SOL_FLAGS_DIFFSOLN_MASK)>>1) //!< Get DiffSoln from bitmask flags
#define GPS_UBX_NAV_SOL_FLAGS_WKNSET_MASK 0x04 //!< Mask for field WKNSET in bitmask flags
#define GPS_UBX_NAV_SOL_FLAGS_WKNSET_GET(val) (U)(((val)&GPS_UBX_NAV_SOL_FLAGS_WKNSET_MASK)>>2) //!< Get WKNSET from bitmask flags
#define GPS_UBX_NAV_SOL_FLAGS_TOWSET_MASK 0x08 //!< Mask for field TOWSET in bitmask flags
#define GPS_UBX_NAV_SOL_FLAGS_TOWSET_GET(val) (U)(((val)&GPS_UBX_NAV_SOL_FLAGS_TOWSET_MASK)>>3) //!< Get TOWSET from bitmask flags
//@}
#define UBXID_NAV_SOL 0x0106 //!< message id for NAV-SOL
//================================================================
//! NAV_VELECEF: Periodic/Polled
/*!
Velocity Solution in ECEF
-
This Message's id is #UBXID_NAV_VELECEF
*/
//================================================================
typedef struct GPS_UBX_NAV_VELECEF_s
{
U4 iTOW; //!< GPS Millisecond Time of Week
I4 ecefVX; //!< ECEF X velocity
I4 ecefVY; //!< ECEF Y velocity
I4 ecefVZ; //!< ECEF Z velocity
U4 sAcc; //!< Speed Accuracy Estimate
} GPS_UBX_NAV_VELECEF_t,*GPS_UBX_NAV_VELECEF_pt;
#define UBXID_NAV_VELECEF 0x0111 //!< message id for NAV-VELECEF
//================================================================
//! NAV_VELNED: Periodic/Polled
/*!
Velocity Solution in NED
-
This Message's id is #UBXID_NAV_VELNED
*/
//================================================================
typedef struct GPS_UBX_NAV_VELNED_s
{
U4 iTOW; //!< GPS Millisecond Time of Week
I4 velN; //!< NED north velocity
I4 velE; //!< NED east velocity
I4 velD; //!< NED down velocity
U4 speed; //!< Speed (3-D)
U4 gSpeed; //!< Ground Speed (2-D)
I4 heading; //!< Heading 2-D
U4 sAcc; //!< Speed Accuracy Estimate
U4 cAcc; //!< Course / Heading Accuracy Estimate
} GPS_UBX_NAV_VELNED_t,*GPS_UBX_NAV_VELNED_pt;
#define UBXID_NAV_VELNED 0x0112 //!< message id for NAV-VELNED
//================================================================
//! NAV_TIMEGPS: Periodic/Polled
/*!
GPS Time Solution
-
This Message's id is #UBXID_NAV_TIMEGPS
*/
//================================================================
typedef struct GPS_UBX_NAV_TIMEGPS_s
{
U4 iTOW; //!< GPS Millisecond time of Week
I4 fTOW; //!< Fractional Nanoseconds remainder of rounded ms above, range -500000 .. 500000
I2 week; //!< GPS week (GPS time)
I1 leapS; //!< Leap Seconds (GPS-UTC)
X1 valid; //!< Validity Flags
U4 tAcc; //!< Time Accuracy Estimate
} GPS_UBX_NAV_TIMEGPS_t,*GPS_UBX_NAV_TIMEGPS_pt;
//! \name Bit Definitions for #GPS_UBX_NAV_TIMEGPS_s::valid
//@{
#define GPS_UBX_NAV_TIMEGPS_VALID_TOW_MASK 0x01 //!< Mask for field tow in bitmask valid
#define GPS_UBX_NAV_TIMEGPS_VALID_TOW_GET(val) (U)(((val)&GPS_UBX_NAV_TIMEGPS_VALID_TOW_MASK)>>0) //!< Get tow from bitmask valid
#define GPS_UBX_NAV_TIMEGPS_VALID_WEEK_MASK 0x02 //!< Mask for field week in bitmask valid
#define GPS_UBX_NAV_TIMEGPS_VALID_WEEK_GET(val) (U)(((val)&GPS_UBX_NAV_TIMEGPS_VALID_WEEK_MASK)>>1) //!< Get week from bitmask valid
#define GPS_UBX_NAV_TIMEGPS_VALID_UTC_MASK 0x04 //!< Mask for field utc in bitmask valid
#define GPS_UBX_NAV_TIMEGPS_VALID_UTC_GET(val) (U)(((val)&GPS_UBX_NAV_TIMEGPS_VALID_UTC_MASK)>>2) //!< Get utc from bitmask valid
//@}
#define UBXID_NAV_TIMEGPS 0x0120 //!< message id for NAV-TIMEGPS
//================================================================
//! NAV_TIMEUTC: Periodic/Polled
/*!
UTC Time Solution
-
This Message's id is #UBXID_NAV_TIMEUTC
*/
//================================================================
typedef struct GPS_UBX_NAV_TIMEUTC_s
{
U4 iTOW; //!< GPS Millisecond Time of Week
U4 tAcc; //!< Time Accuracy Estimate
I4 nano; //!< Nanoseconds of second, range -500000000 .. 500000000 (UTC)
U2 year; //!< Year, range 1999..2099 (UTC)
U1 month; //!< Month, range 1..12 (UTC)
U1 day; //!< Day of Month, range 1..31 (UTC)
U1 hour; //!< Hour of Day, range 0..23 (UTC)
U1 min; //!< Minute of Hour, range 0..59 (UTC)
U1 sec; //!< Seconds of Minute, range 0..59 (UTC)
X1 valid; //!< Validity Flags
} GPS_UBX_NAV_TIMEUTC_t,*GPS_UBX_NAV_TIMEUTC_pt;
//! \name Bit Definitions for #GPS_UBX_NAV_TIMEUTC_s::valid
//@{
#define GPS_UBX_NAV_TIMEUTC_VALID_VALIDTOW_MASK 0x01 //!< Mask for field validTOW in bitmask valid
#define GPS_UBX_NAV_TIMEUTC_VALID_VALIDTOW_GET(val) (U)(((val)&GPS_UBX_NAV_TIMEUTC_VALID_VALIDTOW_MASK)>>0) //!< Get validTOW from bitmask valid
#define GPS_UBX_NAV_TIMEUTC_VALID_VALIDWKN_MASK 0x02 //!< Mask for field validWKN in bitmask valid
#define GPS_UBX_NAV_TIMEUTC_VALID_VALIDWKN_GET(val) (U)(((val)&GPS_UBX_NAV_TIMEUTC_VALID_VALIDWKN_MASK)>>1) //!< Get validWKN from bitmask valid
#define GPS_UBX_NAV_TIMEUTC_VALID_VALIDUTC_MASK 0x04 //!< Mask for field validUTC in bitmask valid
#define GPS_UBX_NAV_TIMEUTC_VALID_VALIDUTC_GET(val) (U)(((val)&GPS_UBX_NAV_TIMEUTC_VALID_VALIDUTC_MASK)>>2) //!< Get validUTC from bitmask valid
//@}
#define UBXID_NAV_TIMEUTC 0x0121 //!< message id for NAV-TIMEUTC
//================================================================
//! NAV_CLOCK: Periodic/Polled
/*!
Clock Solution
-
This Message's id is #UBXID_NAV_CLOCK
*/
//================================================================
typedef struct GPS_UBX_NAV_CLOCK_s
{
U4 iTOW; //!< GPS Millisecond Time of week
I4 clkB; //!< clock bias in nanoseconds
I4 clkD; //!< clock drift in nanoseconds per second
U4 tAcc; //!< Time Accuracy Estimate
U4 fAcc; //!< Frequency Accuracy Estimate
} GPS_UBX_NAV_CLOCK_t,*GPS_UBX_NAV_CLOCK_pt;
#define UBXID_NAV_CLOCK 0x0122 //!< message id for NAV-CLOCK
//================================================================
//! NAV_SVINFO: Periodic/Polled
/*!
Space Vehicle Information
-
This Message's id is #UBXID_NAV_SVINFO
*/
//================================================================
typedef struct GPS_UBX_NAV_SVINFO_s
{
U4 iTOW; //!< GPS Millisecond time of week
U1 numCh; //!< Number of channels
X1 globalFlags; //!< Bitmask
U2 res2; //!< Reserved
//REPEAT: GPS_UBX_NAV_SVINFO_CHN_t repeat0[numCh];
} GPS_UBX_NAV_SVINFO_t,*GPS_UBX_NAV_SVINFO_pt;
//! \name Bit Definitions for #GPS_UBX_NAV_SVINFO_s::globalFlags
//@{
#define GPS_UBX_NAV_SVINFO_GLOBALFLAGS_ISU5_MASK 0x01 //!< Mask for field isU5 in bitmask globalFlags
#define GPS_UBX_NAV_SVINFO_GLOBALFLAGS_ISU5_GET(val) (U)(((val)&GPS_UBX_NAV_SVINFO_GLOBALFLAGS_ISU5_MASK)>>0) //!< Get isU5 from bitmask globalFlags
//@}
//! Optional Sub-Structure of #GPS_UBX_NAV_SVINFO_t
typedef struct GPS_UBX_NAV_SVINFO_CHN_s
{
U1 chn; //!< channel number
U1 svid; //!< Satellite ID
X1 flags; //!< Bitmask
X1 quality; //!< Bitfield
U1 cno; //!< Carrier to Noise Ratio (Signal Strength)
I1 elev; //!< Elevation in integer degrees
I2 azim; //!< Azimuth in integer degrees
I4 prRes; //!< Pseudo range residual in centimetres
} GPS_UBX_NAV_SVINFO_CHN_t,*GPS_UBX_NAV_SVINFO_CHN_pt;
//! \name Bit Definitions for #GPS_UBX_NAV_SVINFO_CHN_s::flags
//@{
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_SVUSED_MASK 0x01 //!< Mask for field svUsed in bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_SVUSED_GET(val) (U)(((val)&GPS_UBX_NAV_SVINFO_CHN_FLAGS_SVUSED_MASK)>>0) //!< Get svUsed from bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_DIFFCORR_MASK 0x02 //!< Mask for field diffCorr in bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_DIFFCORR_GET(val) (U)(((val)&GPS_UBX_NAV_SVINFO_CHN_FLAGS_DIFFCORR_MASK)>>1) //!< Get diffCorr from bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITAVAIL_MASK 0x04 //!< Mask for field orbitAvail in bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITAVAIL_GET(val) (U)(((val)&GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITAVAIL_MASK)>>2) //!< Get orbitAvail from bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITEPH_MASK 0x08 //!< Mask for field orbitEph in bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITEPH_GET(val) (U)(((val)&GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITEPH_MASK)>>3) //!< Get orbitEph from bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_UNHEALTHY_MASK 0x10 //!< Mask for field unhealthy in bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_UNHEALTHY_GET(val) (U)(((val)&GPS_UBX_NAV_SVINFO_CHN_FLAGS_UNHEALTHY_MASK)>>4) //!< Get unhealthy from bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITALM_MASK 0x20 //!< Mask for field orbitAlm in bitmask flags
#define GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITALM_GET(val) (U)(((val)&GPS_UBX_NAV_SVINFO_CHN_FLAGS_ORBITALM_MASK)>>5) //!< Get orbitAlm from bitmask flags
//@}
//! \name Bit Definitions for #GPS_UBX_NAV_SVINFO_CHN_s::quality
//@{
#define GPS_UBX_NAV_SVINFO_CHN_QUALITY_QUALITYIND_MASK 0x0F //!< Mask for field qualityInd in bitmask quality
#define GPS_UBX_NAV_SVINFO_CHN_QUALITY_QUALITYIND_GET(val) (U)(((val)&GPS_UBX_NAV_SVINFO_CHN_QUALITY_QUALITYIND_MASK)>>0) //!< Get qualityInd from bitmask quality
//@}
#define UBXID_NAV_SVINFO 0x0130 //!< message id for NAV-SVINFO
//================================================================
//! NAV_SBAS: Periodic/Polled
/*!
SBAS Status Data
This message outputs the status of the SBAS sub system
This Message's id is #UBXID_NAV_SBAS
*/
//================================================================
typedef struct GPS_UBX_NAV_SBAS_s
{
U4 iTOW; //!< GPS Millisecond time of week
U1 geo; //!< PRN Number of the GEO where correction and integrity data is used from
U1 mode; //!< SBAS Mode
I1 sys; //!< SBAS System (WAAS/EGNOS/...)
X1 service; //!< SBAS Services available
U1 cnt; //!< Number of SV data following
U1 res[3]; //!< Reserved
//REPEAT: GPS_UBX_NAV_SBAS_SVID_t repeat0[cnt];
} GPS_UBX_NAV_SBAS_t,*GPS_UBX_NAV_SBAS_pt;
//! \name Bit Definitions for #GPS_UBX_NAV_SBAS_s::service
//@{
#define GPS_UBX_NAV_SBAS_SERVICE_RANGING_MASK 0x01 //!< Mask for field Ranging in bitmask service
#define GPS_UBX_NAV_SBAS_SERVICE_RANGING_GET(val) (U)(((val)&GPS_UBX_NAV_SBAS_SERVICE_RANGING_MASK)>>0) //!< Get Ranging from bitmask service
#define GPS_UBX_NAV_SBAS_SERVICE_CORRECTIONS_MASK 0x02 //!< Mask for field Corrections in bitmask service
#define GPS_UBX_NAV_SBAS_SERVICE_CORRECTIONS_GET(val) (U)(((val)&GPS_UBX_NAV_SBAS_SERVICE_CORRECTIONS_MASK)>>1) //!< Get Corrections from bitmask service
#define GPS_UBX_NAV_SBAS_SERVICE_INTEGRITY_MASK 0x04 //!< Mask for field Integrity in bitmask service
#define GPS_UBX_NAV_SBAS_SERVICE_INTEGRITY_GET(val) (U)(((val)&GPS_UBX_NAV_SBAS_SERVICE_INTEGRITY_MASK)>>2) //!< Get Integrity from bitmask service
#define GPS_UBX_NAV_SBAS_SERVICE_TESTMODE_MASK 0x08 //!< Mask for field Testmode in bitmask service
#define GPS_UBX_NAV_SBAS_SERVICE_TESTMODE_GET(val) (U)(((val)&GPS_UBX_NAV_SBAS_SERVICE_TESTMODE_MASK)>>3) //!< Get Testmode from bitmask service
//@}
//! Optional Sub-Structure of #GPS_UBX_NAV_SBAS_t
typedef struct GPS_UBX_NAV_SBAS_SVID_s
{
U1 svid; //!< SV Id
U1 flags; //!< Flags for this SV
U1 udre; //!< Monitoring status
U1 svSys; //!< System (WAAS/EGNOS/...)
U1 svService; //!< Services available
U1 res0; //!< Reserved
I2 prc; //!< Pseudo Range correction in [cm]
I2 res1; //!< Reserved
I2 ic; //!< Ionosphere correction in [cm]
} GPS_UBX_NAV_SBAS_SVID_t,*GPS_UBX_NAV_SBAS_SVID_pt;
#define UBXID_NAV_SBAS 0x0132 //!< message id for NAV-SBAS
//================================================================
//! RXM_RAW: Periodic/Polled
/*!
Raw Measurement Data
This message contains all information needed to be able to generate a <a href=\"http://www.aiub-download.unibe.ch/rinex/'>RINEX</a> file.
This Message's id is #UBXID_RXM_RAW
*/
//================================================================
typedef struct GPS_UBX_RXM_RAW_s
{
I4 iTOW; //!< Measurement integer millisecond GPS time of week (Receiver Time)
I2 week; //!< Measurement GPS week number (Receiver Time).
U1 numSV; //!< # of satellites following.
U1 res1; //!< Reserved
//REPEAT: GPS_UBX_RXM_RAW_CPMES_t repeat0[numSV];
} GPS_UBX_RXM_RAW_t,*GPS_UBX_RXM_RAW_pt;
//! Optional Sub-Structure of #GPS_UBX_RXM_RAW_t
typedef struct GPS_UBX_RXM_RAW_CPMES_s
{
R8 cpMes; //!< Carrier phase measurement [L1 cycles]
R8 prMes; //!< Pseudorange measurement [m]
R4 doMes; //!< Doppler measurement [Hz]
U1 sv; //!< Space Vehicle Number
I1 mesQI; //!< Nav Measurements Quality Indicator:
I1 cno; //!< Signal strength C/No. (dbHz)
U1 lli; //!< Loss of lock indicator (RINEX definition)
} GPS_UBX_RXM_RAW_CPMES_t,*GPS_UBX_RXM_RAW_CPMES_pt;
#define UBXID_RXM_RAW 0x0210 //!< message id for RXM-RAW
//================================================================
//! RXM_SFRB: Periodic
/*!
Subframe Buffer
The content of one single subframe buffer
+For GPS satellites, the 10 dwrd values contain the parity checked subframe data for 10 Words. Each dwrd has 24 Bits with valid data (Bits 23 to 0). The remaining 8 bits (31 to 24) have an undefined value. The direction within the Word is that the higher order bits are received from the SV first. Example: The Preamble can be found in dwrd[0], at bit position 23 down to 16. For more details on the data format please refer to the ICD-GPS-200C Interface document.
+For SBAS satellites, the 250 Bit message block can be found in dwrd[0] to dwrd[6] for the first 224 bits. The remaining 26 bits are in dwrd[7], whereas Bits 25 and 24 are the last two data bits, and Bits 23 down to 0 are the parity bits. For more information on SBAS data format, please refer to RTCA/DO-229C (MOPS), Appendix A.
This Message's id is #UBXID_RXM_SFRB
*/
//================================================================
typedef struct GPS_UBX_RXM_SFRB_s
{
U1 chn; //!< Channel Number
U1 svid; //!< ID of Satellite transmitting Subframe
X4 dwrd[10]; //!< Words of Data
} GPS_UBX_RXM_SFRB_t,*GPS_UBX_RXM_SFRB_pt;
#define UBXID_RXM_SFRB 0x0211 //!< message id for RXM-SFRB
//================================================================
//! RXM_SVSI: Periodic/Polled
/*!
SV Status Info
Status of the receiver manager knowledge about GPS Orbit Validity
This Message's id is #UBXID_RXM_SVSI
*/
//================================================================
typedef struct GPS_UBX_RXM_SVSI_s
{
I4 iTOW; //!< Measurement integer millisecond GPS time of week
I2 week; //!< Measurement GPS week number.
U1 numVis; //!< number of visible satellites
U1 numSV; //!< number of per-SV data blocks following
//REPEAT: GPS_UBX_RXM_SVSI_SVID_t repeat0[numSV];
} GPS_UBX_RXM_SVSI_t,*GPS_UBX_RXM_SVSI_pt;
//! Optional Sub-Structure of #GPS_UBX_RXM_SVSI_t
typedef struct GPS_UBX_RXM_SVSI_SVID_s
{
U1 svid; //!< Satellite ID
X1 svFlag; //!< Information Flags
I2 azim; //!< Azimuth
I1 elev; //!< Elevation
X1 age; //!< Age of Almanach and Ephemeris:
} GPS_UBX_RXM_SVSI_SVID_t,*GPS_UBX_RXM_SVSI_SVID_pt;
//! \name Bit Definitions for #GPS_UBX_RXM_SVSI_SVID_s::svFlag
//@{
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_URA_MASK 0x0F //!< Mask for field ura in bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_URA_GET(val) (U)(((val)&GPS_UBX_RXM_SVSI_SVID_SVFLAG_URA_MASK)>>0) //!< Get ura from bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_HEALTHY_MASK 0x10 //!< Mask for field healthy in bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_HEALTHY_GET(val) (U)(((val)&GPS_UBX_RXM_SVSI_SVID_SVFLAG_HEALTHY_MASK)>>4) //!< Get healthy from bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_EPHVAL_MASK 0x20 //!< Mask for field ephVal in bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_EPHVAL_GET(val) (U)(((val)&GPS_UBX_RXM_SVSI_SVID_SVFLAG_EPHVAL_MASK)>>5) //!< Get ephVal from bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_ALMVAL_MASK 0x40 //!< Mask for field almVal in bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_ALMVAL_GET(val) (U)(((val)&GPS_UBX_RXM_SVSI_SVID_SVFLAG_ALMVAL_MASK)>>6) //!< Get almVal from bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_NOTAVAIL_MASK 0x80 //!< Mask for field notAvail in bitmask svFlag
#define GPS_UBX_RXM_SVSI_SVID_SVFLAG_NOTAVAIL_GET(val) (U)(((val)&GPS_UBX_RXM_SVSI_SVID_SVFLAG_NOTAVAIL_MASK)>>7) //!< Get notAvail from bitmask svFlag
//@}
//! \name Bit Definitions for #GPS_UBX_RXM_SVSI_SVID_s::age
//@{
#define GPS_UBX_RXM_SVSI_SVID_AGE_ALMAGE_MASK 0x0F //!< Mask for field almAge in bitmask age
#define GPS_UBX_RXM_SVSI_SVID_AGE_ALMAGE_GET(val) (U)(((val)&GPS_UBX_RXM_SVSI_SVID_AGE_ALMAGE_MASK)>>0) //!< Get almAge from bitmask age
#define GPS_UBX_RXM_SVSI_SVID_AGE_EPHAGE_MASK 0xF0 //!< Mask for field ephAge in bitmask age
#define GPS_UBX_RXM_SVSI_SVID_AGE_EPHAGE_GET(val) (U)(((val)&GPS_UBX_RXM_SVSI_SVID_AGE_EPHAGE_MASK)>>4) //!< Get ephAge from bitmask age
//@}
#define UBXID_RXM_MEAS 0x0212 //!< message id for RXM-MEAS
typedef struct GPS_UBX_RXM_MEAS_s
{
I4 gnssTow; //!< GNSS system time of week corresponding tonavigation epoch
X4 info; //!< Satellite count and doppler center
//REPEAT: GPS_UBX_RXM_MEAS_SVID_t repeat0[numSV];
} GPS_UBX_RXM_MEAS_t,*GPS_UBX_RXM_MEAS_pt;
//! Optional Sub-Structure of #GPS_UBX_RXM_MEAS_t
typedef struct GPS_UBX_RXM_MEAS_SVID_s
{
U1 svid; //!< Satellite ID
U1 cno; //!< Signal C/N0
U1 prRms; //!< prRms
U1 mpInd; //!< Multipath indicator
I4 redSigtow; //!< Code phase measurement relative to gnssTow
I4 doppler; //!< Doppler measurement
} GPS_UBX_RXM_MEAS_SVID_t,*GPS_UBX_RXM_MEAS_SVID_pt;
#define UBXID_RXM_SVSI 0x0220 //!< message id for RXM-SVSI
//================================================================
//! INF_ERROR:
/*!
ASCII String output, indicating an error
This message has a variable length payload, representing an ASCII string.
This Message's id is #UBXID_INF_ERROR
*/
//================================================================
#define UBXID_INF_ERROR 0x0400 //!< message id for INF-ERROR
//================================================================
//! INF_WARNING:
/*!
ASCII String output, indicating a warning
This message has a variable length payload, representing an ASCII string.
This Message's id is #UBXID_INF_WARNING
*/
//================================================================
#define UBXID_INF_WARNING 0x0401 //!< message id for INF-WARNING
//================================================================
//! INF_NOTICE:
/*!
ASCII String output, with informational contents
This message has a variable length payload, representing an ASCII string.
This Message's id is #UBXID_INF_NOTICE
*/
//================================================================
#define UBXID_INF_NOTICE 0x0402 //!< message id for INF-NOTICE
//================================================================
//! INF_TEST:
/*!
ASCII String output, indicating test output
This message has a variable length payload, representing an ASCII string.
This Message's id is #UBXID_INF_TEST
*/
//================================================================
#define UBXID_INF_TEST 0x0403 //!< message id for INF-TEST
//================================================================
//! INF_DEBUG:
/*!
ASCII String output, indicating debug output
This message has a variable length payload, representing an ASCII string.
This Message's id is #UBXID_INF_DEBUG
*/
//================================================================
#define UBXID_INF_DEBUG 0x0404 //!< message id for INF-DEBUG
//================================================================
//! ACK_NAK: Answer
/*!
Message Not-Acknowledged
Output upon processing of an input message
This Message's id is #UBXID_ACK_NAK
*/
//================================================================
typedef struct GPS_UBX_ACK_NAK_s
{
U1 clsID; //!< Class Id of the Not-Acknowledged Message
U1 msgID; //!< Message Id of the Not-Acknowledged Message
} GPS_UBX_ACK_NAK_t,*GPS_UBX_ACK_NAK_pt;
#define UBXID_ACK_NAK 0x0500 //!< message id for ACK-NAK
//================================================================
//! ACK_ACK: Answer
/*!
Message Acknowledged
Output upon processing of an input message
This Message's id is #UBXID_ACK_ACK
*/
//================================================================
typedef struct GPS_UBX_ACK_ACK_s
{
U1 clsID; //!< Class Id of the Acknowledged Message
U1 msgID; //!< Message Id of the Acknowledged Message
} GPS_UBX_ACK_ACK_t,*GPS_UBX_ACK_ACK_pt;
#define UBXID_ACK_ACK 0x0501 //!< message id for ACK-ACK
//================================================================
//! CFG_PRT_POLL: Poll Request
/*!
Polls the configuration for one I/O Port
Sending this message with a port ID as payload results in having the receiver return the configuration for the given port. If the payload is omitted, the configuration for the incoming port is returned
This Message's id is #UBXID_CFG_PRT
*/
//================================================================
typedef struct GPS_UBX_CFG_PRT_POLL_s
{
U1 PortID; //!< Port Identifier Number
} GPS_UBX_CFG_PRT_POLL_t,*GPS_UBX_CFG_PRT_POLL_pt;
#define UBXID_CFG_PRT 0x0600 //!< message id for CFG-PRT
//================================================================
//! CFG_PRT_UART_U5: Get/Set
/*!
Get/Set Port Configuration for UART, USB Port(s)
Several configurations can be concatenated to one input message. In this case the payload length can be a multiple of the normal length. Output messages from the module contain only one configuration unit. Note that some fields are interpreted differentlydepending on communication port type (see alternate descriptions of this message)
\note: For the USB Port, the mode and baudrate fields are ignored.
This Message's id is #UBXID_CFG_PRT
*/
//================================================================
typedef struct GPS_UBX_CFG_PRT_UART_U5_s
{
U1 portID; //!< Port Identifier Number
U1 res0; //!< Reserved
U2 res1; //!< Reserved
X4 mode; //!< A bit mask describing the UART mode
U4 baudRate; //!< Baudrate in bits/second
X2 inProtoMask; //!< A mask describing which input protocols are active
X2 outProtoMask; //!< A mask describing which output protocols are active.
X2 flags; //!< Reserved, set to 0
U2 pad; //!< Reserved, set to 0
} GPS_UBX_CFG_PRT_UART_U5_t,*GPS_UBX_CFG_PRT_UART_U5_pt;
//! \name Bit Definitions for #GPS_UBX_CFG_PRT_UART_U5_s::mode
//@{
#define GPS_UBX_CFG_PRT_UART_U5_MODE_CHARLEN_MASK 0x000000C0 //!< Mask for field charLen in bitmask mode
#define GPS_UBX_CFG_PRT_UART_U5_MODE_CHARLEN_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_MODE_CHARLEN_MASK)>>6) //!< Get charLen from bitmask mode
#define GPS_UBX_CFG_PRT_UART_U5_MODE_PARITY_MASK 0x00000E00 //!< Mask for field parity in bitmask mode
#define GPS_UBX_CFG_PRT_UART_U5_MODE_PARITY_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_MODE_PARITY_MASK)>>9) //!< Get parity from bitmask mode
#define GPS_UBX_CFG_PRT_UART_U5_MODE_NSTOPBITS_MASK 0x00003000 //!< Mask for field nStopBits in bitmask mode
#define GPS_UBX_CFG_PRT_UART_U5_MODE_NSTOPBITS_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_MODE_NSTOPBITS_MASK)>>12) //!< Get nStopBits from bitmask mode
//@}
//! \name Bit Definitions for #GPS_UBX_CFG_PRT_UART_U5_s::inProtoMask
//@{
#define GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_UBX_MASK 0x0001 //!< Mask for field ubx in bitmask inProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_UBX_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_UBX_MASK)>>0) //!< Get ubx from bitmask inProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_NMEA_MASK 0x0002 //!< Mask for field nmea in bitmask inProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_NMEA_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_NMEA_MASK)>>1) //!< Get nmea from bitmask inProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_RTCM_MASK 0x0004 //!< Mask for field rtcm in bitmask inProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_RTCM_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_INPROTOMASK_RTCM_MASK)>>2) //!< Get rtcm from bitmask inProtoMask
//@}
//! \name Bit Definitions for #GPS_UBX_CFG_PRT_UART_U5_s::outProtoMask
//@{
#define GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_UBX_MASK 0x0001 //!< Mask for field ubx in bitmask outProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_UBX_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_UBX_MASK)>>0) //!< Get ubx from bitmask outProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_NMEA_MASK 0x0002 //!< Mask for field nmea in bitmask outProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_NMEA_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_NMEA_MASK)>>1) //!< Get nmea from bitmask outProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_RAW_MASK 0x0008 //!< Mask for field raw in bitmask outProtoMask
#define GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_RAW_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_UART_U5_OUTPROTOMASK_RAW_MASK)>>3) //!< Get raw from bitmask outProtoMask
//@}
//#define UBXID_CFG_PRT 0x0600 // already defined, see above
//================================================================
//! CFG_PRT_SPI_U5: Get/Set
/*!
Get/Set Port Configuration for SPI Port(s)
Several configurations can be concatenated to one input message. In this case the payload length can be a multiple of the normal length. Output messages from the module contain only one configuration unit. Note that some fields are interpreted differentlydepending on communication port type (see alternate descriptions of this message)
\note: Description of this message indicating the fields used in u-blox 5
This Message's id is #UBXID_CFG_PRT
*/
//================================================================
typedef struct GPS_UBX_CFG_PRT_SPI_U5_s
{
U1 portID; //!< Port Identifier Number
U1 res0; //!< Reserved
U2 res1; //!< Reserved
X4 mode; //!< SPI Mode Flags
U4 baudRate; //!< Unused, set to 0
X2 inProtoMask; //!< A mask describing which input protocols are active
X2 outProtoMask; //!< A mask describing which output protocols are active.
X2 flags; //!< Reserved, set to 0
U2 pad; //!< Reserved, set to 0
} GPS_UBX_CFG_PRT_SPI_U5_t,*GPS_UBX_CFG_PRT_SPI_U5_pt;
//! \name Bit Definitions for #GPS_UBX_CFG_PRT_SPI_U5_s::mode
//@{
#define GPS_UBX_CFG_PRT_SPI_U5_MODE_SPIMODE_MASK 0x00000006 //!< Mask for field spiMode in bitmask mode
#define GPS_UBX_CFG_PRT_SPI_U5_MODE_SPIMODE_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_SPI_U5_MODE_SPIMODE_MASK)>>1) //!< Get spiMode from bitmask mode
#define GPS_UBX_CFG_PRT_SPI_U5_MODE_FFCNT_MASK 0x0000FF00 //!< Mask for field ffCnt in bitmask mode
#define GPS_UBX_CFG_PRT_SPI_U5_MODE_FFCNT_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_SPI_U5_MODE_FFCNT_MASK)>>8) //!< Get ffCnt from bitmask mode
//@}
//! \name Bit Definitions for #GPS_UBX_CFG_PRT_SPI_U5_s::inProtoMask
//@{
#define GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_UBX_MASK 0x0001 //!< Mask for field ubx in bitmask inProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_UBX_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_UBX_MASK)>>0) //!< Get ubx from bitmask inProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_NMEA_MASK 0x0002 //!< Mask for field nmea in bitmask inProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_NMEA_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_NMEA_MASK)>>1) //!< Get nmea from bitmask inProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_RTCM_MASK 0x0004 //!< Mask for field rtcm in bitmask inProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_RTCM_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_SPI_U5_INPROTOMASK_RTCM_MASK)>>2) //!< Get rtcm from bitmask inProtoMask
//@}
//! \name Bit Definitions for #GPS_UBX_CFG_PRT_SPI_U5_s::outProtoMask
//@{
#define GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_UBX_MASK 0x0001 //!< Mask for field ubx in bitmask outProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_UBX_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_UBX_MASK)>>0) //!< Get ubx from bitmask outProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_NMEA_MASK 0x0002 //!< Mask for field nmea in bitmask outProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_NMEA_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_NMEA_MASK)>>1) //!< Get nmea from bitmask outProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_RAW_MASK 0x0008 //!< Mask for field raw in bitmask outProtoMask
#define GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_RAW_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_SPI_U5_OUTPROTOMASK_RAW_MASK)>>3) //!< Get raw from bitmask outProtoMask
//@}
//#define UBXID_CFG_PRT 0x0600 // already defined, see above
//================================================================
//! CFG_PRT_I2C_U5: Get/Set
/*!
Get/Set Port Configuration for I2C Port(s)
Several configurations can be concatenated to one input message. In this case the payload length can be a multiple of the normal length. Output messages from the module contain only one configuration unit. Note that some fields are interpreted differentlydepending on communication port type (see alternate descriptions of this message)
\note: Description of this message indicating the fields used in u-blox 5
This Message's id is #UBXID_CFG_PRT
*/
//================================================================
typedef struct GPS_UBX_CFG_PRT_I2C_U5_s
{
U1 portID; //!< Port Identifier Number
U1 res0; //!< Reserved
U2 res1; //!< Reserved
X4 mode; //!< I2C Mode Flags
U4 baudRate; //!< Unused, set to 0
X2 inProtoMask; //!< A mask describing which input protocols are active
X2 outProtoMask; //!< A mask describing which output protocols are active.
X2 flags; //!< Reserved, set to 0
U2 pad; //!< Reserved, set to 0
} GPS_UBX_CFG_PRT_I2C_U5_t,*GPS_UBX_CFG_PRT_I2C_U5_pt;
//! \name Bit Definitions for #GPS_UBX_CFG_PRT_I2C_U5_s::mode
//@{
#define GPS_UBX_CFG_PRT_I2C_U5_MODE_SLAVEADDR_MASK 0x000000FE //!< Mask for field slaveAddr in bitmask mode
#define GPS_UBX_CFG_PRT_I2C_U5_MODE_SLAVEADDR_GET(val) (U)(((val)&GPS_UBX_CFG_PRT_I2C_U5_MODE_SLAVEADDR_MASK)>>1) //!< Get slaveAddr from bitmask mode
//@}