2 * u-blox UBX protocol dissection.
4 * By Timo Warns <timo.warns@gmail.com>
5 * Copyright 2023 Timo Warns
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@unicom.net>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
16 #include <epan/expert.h>
17 #include <epan/packet.h>
18 #include <epan/unit_strings.h>
19 #include <wsutil/array.h>
20 #include <wsutil/utf8_entities.h>
21 #include <wsutil/pint.h>
23 #include "packet-ubx.h"
24 #include "packet-sbas_l1.h"
27 * Dissects the UBX protocol of u-blox GNSS receivers as defined by the
28 * u-blox 8 / u-blox M8 receiver description.
31 /* mapping from UBX message class / id to mnemonics */
32 static const value_string UBX_MSG_CLASS_ID
[] = {
33 {UBX_ACK_ACK
, "UBX-ACK-ACK"},
34 {UBX_ACK_NAK
, "UBX-ACK-NAK"},
35 {UBX_AID_ALM
, "UBX-AID-ALM"},
36 {UBX_AID_AOP
, "UBX-AID-AOP"},
37 {UBX_AID_EPH
, "UBX-AID-EPH"},
38 {UBX_AID_HUI
, "UBX-AID-HUI"},
39 {UBX_AID_INI
, "UBX-AID-INI"},
40 {UBX_CFG_ANT
, "UBX-CFG-ANT"},
41 {UBX_CFG_BATCH
, "UBX-CFG-BATCH"},
42 {UBX_CFG_CFG
, "UBX-CFG-CFG"},
43 {UBX_CFG_DAT
, "UBX-CFG-DAT"},
44 {UBX_CFG_DGNSS
, "UBX-CFG-DGNSS"},
45 {UBX_CFG_DOSC
, "UBX-CFG-DOSC"},
46 {UBX_CFG_ESFALG
, "UBX-CFG-ESFALG"},
47 {UBX_CFG_ESFA
, "UBX-CFG-ESFA"},
48 {UBX_CFG_ESFG
, "UBX-CFG-ESFG"},
49 {UBX_CFG_ESFWT
, "UBX-CFG-ESFWT"},
50 {UBX_CFG_ESRC
, "UBX-CFG-ESRC"},
51 {UBX_CFG_GEOFENCE
, "UBX-CFG-GEOFENCE"},
52 {UBX_CFG_GNSS
, "UBX-CFG-GNSS"},
53 {UBX_CFG_HNR
, "UBX-CFG-HNR"},
54 {UBX_CFG_INF
, "UBX-CFG-INF"},
55 {UBX_CFG_ITFM
, "UBX-CFG-ITFM"},
56 {UBX_CFG_LOGFILTER
, "UBX-CFG-LOGFILTER"},
57 {UBX_CFG_MSG
, "UBX-CFG-MSG"},
58 {UBX_CFG_NAV5
, "UBX-CFG-NAV5"},
59 {UBX_CFG_NAVX5
, "UBX-CFG-NAVX5"},
60 {UBX_CFG_NMEA
, "UBX-CFG-NMEA"},
61 {UBX_CFG_ODO
, "UBX-CFG-ODO"},
62 {UBX_CFG_PM2
, "UBX-CFG-PM2"},
63 {UBX_CFG_PMS
, "UBX-CFG-PMS"},
64 {UBX_CFG_PRT
, "UBX-CFG-PRT"},
65 {UBX_CFG_PWR
, "UBX-CFG-PWR"},
66 {UBX_CFG_RATE
, "UBX-CFG-RATE"},
67 {UBX_CFG_RINV
, "UBX-CFG-RINV"},
68 {UBX_CFG_RST
, "UBX-CFG-RST"},
69 {UBX_CFG_RXM
, "UBX-CFG-RXM"},
70 {UBX_CFG_SBAS
, "UBX-CFG-SBAS"},
71 {UBX_CFG_SENIF
, "UBX-CFG-SENIF"},
72 {UBX_CFG_SLAS
, "UBX-CFG-SLAS"},
73 {UBX_CFG_SMGR
, "UBX-CFG-SMGR"},
74 {UBX_CFG_SPT
, "UBX-CFG-SPT"},
75 {UBX_CFG_TMODE2
, "UBX-CFG-TMODE2"},
76 {UBX_CFG_TMODE3
, "UBX-CFG-TMODE3"},
77 {UBX_CFG_TP5
, "UBX-CFG-TP5"},
78 {UBX_CFG_TXSLOT
, "UBX-CFG-TXSLOT"},
79 {UBX_CFG_USB
, "UBX-CFG-USB"},
80 {UBX_ESF_ALG
, "UBX-ESF-ALG"},
81 {UBX_ESF_INS
, "UBX-ESF-INS"},
82 {UBX_ESF_MEAS
, "UBX-ESF-MEAS"},
83 {UBX_ESF_RAW
, "UBX-ESF-RAW"},
84 {UBX_ESF_STATUS
, "UBX-ESF-STATUS"},
85 {UBX_HNR_ATT
, "UBX-HNR-ATT"},
86 {UBX_HNR_INS
, "UBX-HNR-INS"},
87 {UBX_HNR_PVT
, "UBX-HNR-PVT"},
88 {UBX_INF_DEBUG
, "UBX-INF-DEBUG"},
89 {UBX_INF_ERROR
, "UBX-INF-ERROR"},
90 {UBX_INF_NOTICE
, "UBX-INF-NOTICE"},
91 {UBX_INF_TEST
, "UBX-INF-TEST"},
92 {UBX_INF_WARNING
, "UBX-INF-WARNING"},
93 {UBX_LOG_BATCH
, "UBX-LOG-BATCH"},
94 {UBX_LOG_CREATE
, "UBX-LOG-CREATE"},
95 {UBX_LOG_ERASE
, "UBX-LOG-ERASE"},
96 {UBX_LOG_FINDTIME
, "UBX-LOG-FINDTIME"},
97 {UBX_LOG_INFO
, "UBX-LOG-INFO"},
98 {UBX_LOG_RETRIEVEBATCH
, "UBX-LOG-RETRIEVEBATCH"},
99 {UBX_LOG_RETRIEVEPOSEXTRA
, "UBX-LOG-RETRIEVEPOSEXTRA"},
100 {UBX_LOG_RETRIEVEPOS
, "UBX-LOG-RETRIEVEPOS"},
101 {UBX_LOG_RETRIEVESTRING
, "UBX-LOG-RETRIEVESTRING"},
102 {UBX_LOG_RETRIEVE
, "UBX-LOG-RETRIEVE"},
103 {UBX_LOG_STRING
, "UBX-LOG-STRING"},
104 {UBX_MGA_ACK_DATA0
, "UBX-MGA-ACK-DATA0"},
105 {UBX_MGA_ANO
, "UBX-MGA-ANO"},
106 {UBX_MGA_BDS
, "UBX-MGA-BDS"},
107 {UBX_MGA_DBD
, "UBX-MGA-DBD"},
108 {UBX_MGA_FLASH
, "UBX-MGA-FLASH"},
109 {UBX_MGA_GAL
, "UBX-MGA-GAL"},
110 {UBX_MGA_GLO
, "UBX-MGA-GLO"},
111 {UBX_MGA_GPS
, "UBX-MGA-GPS"},
112 {UBX_MGA_INI
, "UBX-MGA-INI"},
113 {UBX_MGA_QZSS
, "UBX-MGA-QZSS"},
114 {UBX_MON_BATCH
, "UBX-MON-BATCH"},
115 {UBX_MON_GNSS
, "UBX-MON-GNSS"},
116 {UBX_MON_HW2
, "UBX-MON-HW2"},
117 {UBX_MON_HW
, "UBX-MON-HW"},
118 {UBX_MON_IO
, "UBX-MON-IO"},
119 {UBX_MON_MSGPP
, "UBX-MON-MSGPP"},
120 {UBX_MON_PATCH
, "UBX-MON-PATCH"},
121 {UBX_MON_RXBUF
, "UBX-MON-RXBUF"},
122 {UBX_MON_RXR
, "UBX-MON-RXR"},
123 {UBX_MON_SMGR
, "UBX-MON-SMGR"},
124 {UBX_MON_SPT
, "UBX-MON-SPT"},
125 {UBX_MON_TXBUF
, "UBX-MON-TXBUF"},
126 {UBX_MON_VER
, "UBX-MON-VER"},
127 {UBX_NAV_AOPSTATUS
, "UBX-NAV-AOPSTATUS"},
128 {UBX_NAV_ATT
, "UBX-NAV-ATT"},
129 {UBX_NAV_CLOCK
, "UBX-NAV-CLOCK"},
130 {UBX_NAV_COV
, "UBX-NAV-COV"},
131 {UBX_NAV_DGPS
, "UBX-NAV-DGPS"},
132 {UBX_NAV_DOP
, "UBX-NAV-DOP"},
133 {UBX_NAV_EELL
, "UBX-NAV-EELL"},
134 {UBX_NAV_EOE
, "UBX-NAV-EOE"},
135 {UBX_NAV_GEOFENCE
, "UBX-NAV-GEOFENCE"},
136 {UBX_NAV_HPPOSECEF
, "UBX-NAV-HPPOSECEF"},
137 {UBX_NAV_HPPOSLLH
, "UBX-NAV-HPPOSLLH"},
138 {UBX_NAV_NMI
, "UBX-NAV-NMI"},
139 {UBX_NAV_ODO
, "UBX-NAV-ODO"},
140 {UBX_NAV_ORB
, "UBX-NAV-ORB"},
141 {UBX_NAV_POSECEF
, "UBX-NAV-POSECEF"},
142 {UBX_NAV_POSLLH
, "UBX-NAV-POSLLH"},
143 {UBX_NAV_PVT
, "UBX-NAV-PVT"},
144 {UBX_NAV_RELPOSNED
, "UBX-NAV-RELPOSNED"},
145 {UBX_NAV_RESETODO
, "UBX-NAV-RESETODO"},
146 {UBX_NAV_SAT
, "UBX-NAV-SAT"},
147 {UBX_NAV_SBAS
, "UBX-NAV-SBAS"},
148 {UBX_NAV_SLAS
, "UBX-NAV-SLAS"},
149 {UBX_NAV_SOL
, "UBX-NAV-SOL"},
150 {UBX_NAV_STATUS
, "UBX-NAV-STATUS"},
151 {UBX_NAV_SVINFO
, "UBX-NAV-SVINFO"},
152 {UBX_NAV_SVIN
, "UBX-NAV-SVIN"},
153 {UBX_NAV_TIMEBDS
, "UBX-NAV-TIMEBDS"},
154 {UBX_NAV_TIMEGAL
, "UBX-NAV-TIMEGAL"},
155 {UBX_NAV_TIMEGLO
, "UBX-NAV-TIMEGLO"},
156 {UBX_NAV_TIMEGPS
, "UBX-NAV-TIMEGPS"},
157 {UBX_NAV_TIMELS
, "UBX-NAV-TIMELS"},
158 {UBX_NAV_TIMEUTC
, "UBX-NAV-TIMEUTC"},
159 {UBX_NAV_VELECEF
, "UBX-NAV-VELECEF"},
160 {UBX_NAV_VELNED
, "UBX-NAV-VELNED"},
161 {UBX_RXM_IMES
, "UBX-RXM-IMES"},
162 {UBX_RXM_MEASX
, "UBX-RXM-MEASX"},
163 {UBX_RXM_PMREQ
, "UBX-RXM-PMREQ"},
164 {UBX_RXM_RAWX
, "UBX-RXM-RAWX"},
165 {UBX_RXM_RLM
, "UBX-RXM-RLM"},
166 {UBX_RXM_RTCM
, "UBX-RXM-RTCM"},
167 {UBX_RXM_SFRBX
, "UBX-RXM-SFRBX"},
168 {UBX_RXM_SVSI
, "UBX-RXM-SVSI"},
169 {UBX_SEC_UNIQID
, "UBX-SEC-UNIQID"},
170 {UBX_TIM_DOSC
, "UBX-TIM-DOSC"},
171 {UBX_TIM_FCHG
, "UBX-TIM-FCHG"},
172 {UBX_TIM_HOC
, "UBX-TIM-HOC"},
173 {UBX_TIM_SMEAS
, "UBX-TIM-SMEAS"},
174 {UBX_TIM_SVIN
, "UBX-TIM-SVIN"},
175 {UBX_TIM_TM2
, "UBX-TIM-TM2"},
176 {UBX_TIM_TOS
, "UBX-TIM-TOS"},
177 {UBX_TIM_TP
, "UBX-TIM-TP"},
178 {UBX_TIM_VCOCAL
, "UBX-TIM-VCOCAL"},
179 {UBX_TIM_VRFY
, "UBX-TIM-VRFY"},
180 {UBX_UPD_SOS
, "UBX-UPD-SOS"},
184 static const value_string UBX_GNSS_ID
[] = {
185 {GNSS_ID_GPS
, "GPS"},
186 {GNSS_ID_SBAS
, "SBAS"},
187 {GNSS_ID_GALILEO
, "Galileo"},
188 {GNSS_ID_BEIDOU
, "Beidou"},
189 {GNSS_ID_IMES
, "IMES"},
190 {GNSS_ID_QZSS
, "QZSS"},
191 {GNSS_ID_GLONASS
, "Glonass"},
195 /* mapping from correction age id to description */
196 static const value_string UBX_LAST_CORRECTION_AGE
[] = {
197 {0, "not available"},
198 {1, "age between 0 and 1 second"},
199 {2, "age between 1 (inclusive) and 2 seconds"},
200 {3, "age between 2 (inclusive) and 5 seconds"},
201 {4, "age between 5 (inclusive) and 10 seconds"},
202 {5, "age between 10 (inclusive) and 15 seconds"},
203 {6, "age between 15 (inclusive) and 20 seconds"},
204 {7, "age between 20 (inclusive) and 30 seconds"},
205 {8, "age between 30 (inclusive) and 45 seconds"},
206 {9, "age between 45 (inclusive) and 60 seconds"},
207 {10, "age between 60 (inclusive) and 90 seconds"},
208 {11, "age between 90 (inclusive) and 120 seconds"},
209 {12, "age greater or equal than 120 seconds"},
210 {13, "age greater or equal than 120 seconds"},
211 {14, "age greater or equal than 120 seconds"},
212 {15, "age greater or equal than 120 seconds"},
216 /* mapping from GNSS fix type id to description */
217 static const value_string UBX_GNSS_FIX_TYPE
[] = {
219 {1, "dead reckoning only"},
222 {4, "GNSS + dead reckoning combined"},
223 {5, "time only fix"},
227 /* signal quality indicator description */
228 static const value_string UBX_SIGNAL_QUALITY_INDICATOR
[] = {
230 {1, "searching signal"},
231 {2, "signal acquired"},
232 {3, "signal detected but unusable"},
233 {4, "code locked and time synchronized"},
234 {5, "code and carrier locked and time synchronized"},
235 {6, "code and carrier locked and time synchronized"},
236 {7, "code and carrier locked and time synchronized"},
240 /* signal health description */
241 static const value_string UBX_SIGNAL_HEALTH
[] = {
248 /* orbit source description */
249 static const value_string UBX_ORBIT_SOURCE
[] = {
250 {0, "no orbit information available"},
251 {1, "ephemeris is used"},
252 {2, "almanac is used"},
253 {3, "AssistNow Offline orbit is used"},
254 {4, "AssistNow Autonomous orbit is used"},
255 {5, "other orbit information is used"},
256 {6, "other orbit information is used"},
257 {7, "other orbit information is used"},
261 /* CFG-GNSS GPS sigCfgMsk */
262 static const value_string UBX_CFG_GNSS_GPS_SIGCFGMASK
[] = {
268 /* CFG-GNSS SBAS sigCfgMsk */
269 static const value_string UBX_CFG_GNSS_SBAS_SIGCFGMASK
[] = {
270 {0x01, "SBAS L1C/A"},
274 /* CFG-GNSS Galileo sigCfgMsk */
275 static const value_string UBX_CFG_GNSS_GAL_SIGCFGMASK
[] = {
276 {0x01, "Galileo E1"},
277 {0x20, "Galileo E5b"},
281 /* CFG-GNSS BeiDou sigCfgMsk */
282 static const value_string UBX_CFG_GNSS_BDS_SIGCFGMASK
[] = {
283 {0x01, "BeiDou B1I"},
284 {0x10, "BeiDou B2I"},
288 /* CFG-GNSS IMES sigCfgMsk */
289 static const value_string UBX_CFG_GNSS_IMES_SIGCFGMASK
[] = {
294 /* CFG-GNSS QZSS sigCfgMsk */
295 static const value_string UBX_CFG_GNSS_QZSS_SIGCFGMASK
[] = {
296 {0x01, "QZSS L1C/A"},
302 /* CFG-GNSS Glonass sigCfgMsk */
303 static const value_string UBX_CFG_GNSS_GLO_SIGCFGMASK
[] = {
304 {0x01, "Glonass L1"},
305 {0x10, "Glonass L2"},
309 /* UBX-RXM-MEASX Multipath index */
310 static const value_string UBX_RXM_MEASX_MULTIPATH_INDEX
[] = {
311 {0x0, "not measured"},
319 static const value_string UBX_SBAS_MODE
[] = {
321 {1, "Enabled integrity"},
322 {3, "Enabled test mode"},
327 static const value_string UBX_SBAS_SYSTEM
[] = {
337 /* SBAS testbed description */
338 static const value_string UBX_SBAS_TESTBED
[] = {
339 {0, "Ignore data when in test mode (SBAS msg 0)"},
340 {1, "Use data anyhow"},
344 /* UTC standard identifier */
345 static const value_string UBX_UTC_STD_ID
[] = {
346 {0, "Information not available"},
347 {1, "Communications Research Laboratory (CRL), Tokyo, Japan"},
348 {2, "National Institute of Standards and Technology (NIST)"},
349 {3, "U.S. Naval Observatory (USNO)"},
350 {4, "International Bureau of Weights and Measures (BIPM)"},
351 {5, "European laboratories"},
352 {6, "Former Soviet Union (SU)"},
353 {7, "National Time Service Center (NTSC), China"},
358 /* Initialize the protocol and registered fields */
359 static int proto_ubx
;
361 static int hf_ubx_preamble
;
362 static int hf_ubx_msg_class_id
;
363 static int hf_ubx_payload_len
;
364 static int hf_ubx_chksum
;
366 static int hf_ubx_ack_ack
;
367 static int hf_ubx_ack_ack_msg_class_id
;
369 static int hf_ubx_ack_nak
;
370 static int hf_ubx_ack_nak_msg_class_id
;
372 static int hf_ubx_cfg_gnss
;
373 static int hf_ubx_cfg_gnss_version
;
374 static int hf_ubx_cfg_gnss_numtrkchhw
;
375 static int hf_ubx_cfg_gnss_numtrkchuse
;
376 static int hf_ubx_cfg_gnss_numconfigblocks
;
377 static int hf_ubx_cfg_gnss_blk_gnssid
;
378 static int hf_ubx_cfg_gnss_blk_restrkch
;
379 static int hf_ubx_cfg_gnss_blk_maxtrkch
;
380 static int hf_ubx_cfg_gnss_blk_reserved1
;
381 static int hf_ubx_cfg_gnss_blk_enable
;
382 static int hf_ubx_cfg_gnss_blk_sigcfgmask
;
383 static int hf_ubx_cfg_gnss_blk_gps_sigcfgmask
;
384 static int hf_ubx_cfg_gnss_blk_sbas_sigcfgmask
;
385 static int hf_ubx_cfg_gnss_blk_gal_sigcfgmask
;
386 static int hf_ubx_cfg_gnss_blk_bds_sigcfgmask
;
387 static int hf_ubx_cfg_gnss_blk_imes_sigcfgmask
;
388 static int hf_ubx_cfg_gnss_blk_qzss_sigcfgmask
;
389 static int hf_ubx_cfg_gnss_blk_glo_sigcfgmask
;
391 static int hf_ubx_cfg_sbas
;
392 static int hf_ubx_cfg_sbas_mode
;
393 static int hf_ubx_cfg_sbas_mode_enabled
;
394 static int hf_ubx_cfg_sbas_mode_test
;
395 static int hf_ubx_cfg_sbas_usage_range
;
396 static int hf_ubx_cfg_sbas_usage_diffcorr
;
397 static int hf_ubx_cfg_sbas_usage_integrity
;
398 static int hf_ubx_cfg_sbas_max_sbas
;
399 static int hf_ubx_cfg_sbas_scanmode_prn158
;
400 static int hf_ubx_cfg_sbas_scanmode_prn157
;
401 static int hf_ubx_cfg_sbas_scanmode_prn156
;
402 static int hf_ubx_cfg_sbas_scanmode_prn155
;
403 static int hf_ubx_cfg_sbas_scanmode_prn154
;
404 static int hf_ubx_cfg_sbas_scanmode_prn153
;
405 static int hf_ubx_cfg_sbas_scanmode_prn152
;
406 static int hf_ubx_cfg_sbas_scanmode_prn151
;
407 static int hf_ubx_cfg_sbas_scanmode_prn150
;
408 static int hf_ubx_cfg_sbas_scanmode_prn149
;
409 static int hf_ubx_cfg_sbas_scanmode_prn148
;
410 static int hf_ubx_cfg_sbas_scanmode_prn147
;
411 static int hf_ubx_cfg_sbas_scanmode_prn146
;
412 static int hf_ubx_cfg_sbas_scanmode_prn145
;
413 static int hf_ubx_cfg_sbas_scanmode_prn144
;
414 static int hf_ubx_cfg_sbas_scanmode_prn143
;
415 static int hf_ubx_cfg_sbas_scanmode_prn142
;
416 static int hf_ubx_cfg_sbas_scanmode_prn141
;
417 static int hf_ubx_cfg_sbas_scanmode_prn140
;
418 static int hf_ubx_cfg_sbas_scanmode_prn139
;
419 static int hf_ubx_cfg_sbas_scanmode_prn138
;
420 static int hf_ubx_cfg_sbas_scanmode_prn137
;
421 static int hf_ubx_cfg_sbas_scanmode_prn136
;
422 static int hf_ubx_cfg_sbas_scanmode_prn135
;
423 static int hf_ubx_cfg_sbas_scanmode_prn134
;
424 static int hf_ubx_cfg_sbas_scanmode_prn133
;
425 static int hf_ubx_cfg_sbas_scanmode_prn132
;
426 static int hf_ubx_cfg_sbas_scanmode_prn131
;
427 static int hf_ubx_cfg_sbas_scanmode_prn130
;
428 static int hf_ubx_cfg_sbas_scanmode_prn129
;
429 static int hf_ubx_cfg_sbas_scanmode_prn128
;
430 static int hf_ubx_cfg_sbas_scanmode_prn127
;
431 static int hf_ubx_cfg_sbas_scanmode_prn126
;
432 static int hf_ubx_cfg_sbas_scanmode_prn125
;
433 static int hf_ubx_cfg_sbas_scanmode_prn124
;
434 static int hf_ubx_cfg_sbas_scanmode_prn123
;
435 static int hf_ubx_cfg_sbas_scanmode_prn122
;
436 static int hf_ubx_cfg_sbas_scanmode_prn121
;
437 static int hf_ubx_cfg_sbas_scanmode_prn120
;
439 static int * const ubx_cfg_sbas_mode_fields
[] = {
440 &hf_ubx_cfg_sbas_mode_enabled
,
441 &hf_ubx_cfg_sbas_mode_test
,
445 static int hf_ubx_nav_dop
;
446 static int hf_ubx_nav_dop_itow
;
447 static int hf_ubx_nav_dop_gdop
;
448 static int hf_ubx_nav_dop_pdop
;
449 static int hf_ubx_nav_dop_tdop
;
450 static int hf_ubx_nav_dop_vdop
;
451 static int hf_ubx_nav_dop_hdop
;
452 static int hf_ubx_nav_dop_ndop
;
453 static int hf_ubx_nav_dop_edop
;
455 static int hf_ubx_nav_eoe
;
456 static int hf_ubx_nav_eoe_itow
;
458 static int hf_ubx_nav_odo
;
459 static int hf_ubx_nav_odo_version
;
460 static int hf_ubx_nav_odo_reserved1
;
461 static int hf_ubx_nav_odo_itow
;
462 static int hf_ubx_nav_odo_distance
;
463 static int hf_ubx_nav_odo_totaldistance
;
464 static int hf_ubx_nav_odo_distancestd
;
466 static int hf_ubx_nav_posecef
;
467 static int hf_ubx_nav_posecef_itow
;
468 static int hf_ubx_nav_posecef_ecefx
;
469 static int hf_ubx_nav_posecef_ecefy
;
470 static int hf_ubx_nav_posecef_ecefz
;
471 static int hf_ubx_nav_posecef_pacc
;
473 static int hf_ubx_nav_pvt
;
474 static int hf_ubx_nav_pvt_itow
;
475 static int hf_ubx_nav_pvt_year
;
476 static int hf_ubx_nav_pvt_month
;
477 static int hf_ubx_nav_pvt_day
;
478 static int hf_ubx_nav_pvt_hour
;
479 static int hf_ubx_nav_pvt_min
;
480 static int hf_ubx_nav_pvt_sec
;
481 static int hf_ubx_nav_pvt_valid
;
482 static int hf_ubx_nav_pvt_validmag
;
483 static int hf_ubx_nav_pvt_fullyresolved
;
484 static int hf_ubx_nav_pvt_validtime
;
485 static int hf_ubx_nav_pvt_validdate
;
486 static int hf_ubx_nav_pvt_tacc
;
487 static int hf_ubx_nav_pvt_nano
;
488 static int hf_ubx_nav_pvt_fixtype
;
489 static int hf_ubx_nav_pvt_flags
;
490 static int hf_ubx_nav_pvt_headvehvalid
;
491 static int hf_ubx_nav_pvt_psmstate
;
492 static int hf_ubx_nav_pvt_diffsoln
;
493 static int hf_ubx_nav_pvt_gnssfixok
;
494 static int hf_ubx_nav_pvt_flags2
;
495 static int hf_ubx_nav_pvt_confirmedtime
;
496 static int hf_ubx_nav_pvt_confirmeddate
;
497 static int hf_ubx_nav_pvt_confirmedavai
;
498 static int hf_ubx_nav_pvt_numsv
;
499 static int hf_ubx_nav_pvt_lon
;
500 static int hf_ubx_nav_pvt_lat
;
501 static int hf_ubx_nav_pvt_height
;
502 static int hf_ubx_nav_pvt_hmsl
;
503 static int hf_ubx_nav_pvt_hacc
;
504 static int hf_ubx_nav_pvt_vacc
;
505 static int hf_ubx_nav_pvt_veln
;
506 static int hf_ubx_nav_pvt_vele
;
507 static int hf_ubx_nav_pvt_veld
;
508 static int hf_ubx_nav_pvt_gspeed
;
509 static int hf_ubx_nav_pvt_headmot
;
510 static int hf_ubx_nav_pvt_sacc
;
511 static int hf_ubx_nav_pvt_headacc
;
512 static int hf_ubx_nav_pvt_pdop
;
513 static int hf_ubx_nav_pvt_lastcorrectionage
;
514 static int hf_ubx_nav_pvt_invalidllh
;
515 static int hf_ubx_nav_pvt_reserved1
;
516 static int hf_ubx_nav_pvt_headveh
;
517 static int hf_ubx_nav_pvt_magdec
;
518 static int hf_ubx_nav_pvt_magacc
;
520 static int * const ubx_nav_pvt_valid_fields
[] = {
521 &hf_ubx_nav_pvt_validdate
,
522 &hf_ubx_nav_pvt_validtime
,
523 &hf_ubx_nav_pvt_fullyresolved
,
524 &hf_ubx_nav_pvt_validmag
,
528 static int * const ubx_nav_pvt_flags_fields
[] = {
529 &hf_ubx_nav_pvt_gnssfixok
,
530 &hf_ubx_nav_pvt_diffsoln
,
531 &hf_ubx_nav_pvt_psmstate
,
532 &hf_ubx_nav_pvt_headvehvalid
,
536 static int * const ubx_nav_pvt_flags2_fields
[] = {
537 &hf_ubx_nav_pvt_confirmedavai
,
538 &hf_ubx_nav_pvt_confirmeddate
,
539 &hf_ubx_nav_pvt_confirmedtime
,
543 static int hf_ubx_nav_sat
;
544 static int hf_ubx_nav_sat_itow
;
545 static int hf_ubx_nav_sat_version
;
546 static int hf_ubx_nav_sat_num_svs
;
547 static int hf_ubx_nav_sat_reserved1
;
548 static int hf_ubx_nav_sat_gnss_id
;
549 static int hf_ubx_nav_sat_sv_id
;
550 static int hf_ubx_nav_sat_cn0
;
551 static int hf_ubx_nav_sat_elev
;
552 static int hf_ubx_nav_sat_azim
;
553 static int hf_ubx_nav_sat_pr_res
;
554 static int hf_ubx_nav_sat_flags
;
555 static int hf_ubx_nav_sat_quality_ind
;
556 static int hf_ubx_nav_sat_sv_used
;
557 static int hf_ubx_nav_sat_health
;
558 static int hf_ubx_nav_sat_diff_corr
;
559 static int hf_ubx_nav_sat_smoothed
;
560 static int hf_ubx_nav_sat_orbit_src
;
561 static int hf_ubx_nav_sat_eph_avail
;
562 static int hf_ubx_nav_sat_alm_avail
;
563 static int hf_ubx_nav_sat_ano_avail
;
564 static int hf_ubx_nav_sat_aop_avail
;
565 static int hf_ubx_nav_sat_sbas_corr_used
;
566 static int hf_ubx_nav_sat_rtcm_corr_used
;
567 static int hf_ubx_nav_sat_slas_corr_used
;
568 static int hf_ubx_nav_sat_spartn_corr_used
;
569 static int hf_ubx_nav_sat_pr_corr_used
;
570 static int hf_ubx_nav_sat_cr_corr_used
;
571 static int hf_ubx_nav_sat_do_corr_used
;
573 static int * const ubx_nav_sat_flags_fields
[] = {
574 &hf_ubx_nav_sat_quality_ind
,
575 &hf_ubx_nav_sat_sv_used
,
576 &hf_ubx_nav_sat_health
,
577 &hf_ubx_nav_sat_diff_corr
,
578 &hf_ubx_nav_sat_smoothed
,
579 &hf_ubx_nav_sat_orbit_src
,
580 &hf_ubx_nav_sat_eph_avail
,
581 &hf_ubx_nav_sat_alm_avail
,
582 &hf_ubx_nav_sat_ano_avail
,
583 &hf_ubx_nav_sat_aop_avail
,
584 &hf_ubx_nav_sat_sbas_corr_used
,
585 &hf_ubx_nav_sat_rtcm_corr_used
,
586 &hf_ubx_nav_sat_slas_corr_used
,
587 &hf_ubx_nav_sat_spartn_corr_used
,
588 &hf_ubx_nav_sat_pr_corr_used
,
589 &hf_ubx_nav_sat_cr_corr_used
,
590 &hf_ubx_nav_sat_do_corr_used
,
594 static int hf_ubx_nav_sbas
;
595 static int hf_ubx_nav_sbas_itow
;
596 static int hf_ubx_nav_sbas_geo
;
597 static int hf_ubx_nav_sbas_mode
;
598 static int hf_ubx_nav_sbas_sys
;
599 static int hf_ubx_nav_sbas_service
;
600 static int hf_ubx_nav_sbas_service_ranging
;
601 static int hf_ubx_nav_sbas_service_corrections
;
602 static int hf_ubx_nav_sbas_service_integrity
;
603 static int hf_ubx_nav_sbas_service_testmode
;
604 static int hf_ubx_nav_sbas_service_bad
;
605 static int hf_ubx_nav_sbas_cnt
;
606 static int hf_ubx_nav_sbas_reserved1
;
607 static int hf_ubx_nav_sbas_sv_id
;
608 static int hf_ubx_nav_sbas_flags
;
609 static int hf_ubx_nav_sbas_udre
;
610 static int hf_ubx_nav_sbas_sv_sys
;
611 static int hf_ubx_nav_sbas_sv_service
;
612 static int hf_ubx_nav_sbas_reserved2
;
613 static int hf_ubx_nav_sbas_prc
;
614 static int hf_ubx_nav_sbas_reserved3
;
615 static int hf_ubx_nav_sbas_ic
;
617 static int * const ubx_nav_sbas_service_fields
[] = {
618 &hf_ubx_nav_sbas_service_ranging
,
619 &hf_ubx_nav_sbas_service_corrections
,
620 &hf_ubx_nav_sbas_service_integrity
,
621 &hf_ubx_nav_sbas_service_testmode
,
622 &hf_ubx_nav_sbas_service_bad
,
626 static int hf_ubx_nav_timegps
;
627 static int hf_ubx_nav_timegps_itow
;
628 static int hf_ubx_nav_timegps_ftow
;
629 static int hf_ubx_nav_timegps_week
;
630 static int hf_ubx_nav_timegps_leaps
;
631 static int hf_ubx_nav_timegps_valid
;
632 static int hf_ubx_nav_timegps_leapsvalid
;
633 static int hf_ubx_nav_timegps_weekvalid
;
634 static int hf_ubx_nav_timegps_towvalid
;
635 static int hf_ubx_nav_timegps_tacc
;
637 static int * const ubx_nav_timegps_valid_fields
[] = {
638 &hf_ubx_nav_timegps_towvalid
,
639 &hf_ubx_nav_timegps_weekvalid
,
640 &hf_ubx_nav_timegps_leapsvalid
,
644 static int hf_ubx_nav_timeutc
;
645 static int hf_ubx_nav_timeutc_itow
;
646 static int hf_ubx_nav_timeutc_tacc
;
647 static int hf_ubx_nav_timeutc_nano
;
648 static int hf_ubx_nav_timeutc_year
;
649 static int hf_ubx_nav_timeutc_month
;
650 static int hf_ubx_nav_timeutc_day
;
651 static int hf_ubx_nav_timeutc_hour
;
652 static int hf_ubx_nav_timeutc_min
;
653 static int hf_ubx_nav_timeutc_sec
;
654 static int hf_ubx_nav_timeutc_valid
;
655 static int hf_ubx_nav_timeutc_validtow
;
656 static int hf_ubx_nav_timeutc_validwkn
;
657 static int hf_ubx_nav_timeutc_validutc
;
658 static int hf_ubx_nav_timeutc_utcstandard
;
660 static int * const ubx_nav_timeutc_valid_fields
[] = {
661 &hf_ubx_nav_timeutc_validtow
,
662 &hf_ubx_nav_timeutc_validwkn
,
663 &hf_ubx_nav_timeutc_validutc
,
664 &hf_ubx_nav_timeutc_utcstandard
,
668 static int hf_ubx_nav_velecef
;
669 static int hf_ubx_nav_velecef_itow
;
670 static int hf_ubx_nav_velecef_ecefvx
;
671 static int hf_ubx_nav_velecef_ecefvy
;
672 static int hf_ubx_nav_velecef_ecefvz
;
673 static int hf_ubx_nav_velecef_sacc
;
675 static int hf_ubx_rxm_measx
;
676 static int hf_ubx_rxm_measx_version
;
677 static int hf_ubx_rxm_measx_reserved1
;
678 static int hf_ubx_rxm_measx_gpstow
;
679 static int hf_ubx_rxm_measx_glotow
;
680 static int hf_ubx_rxm_measx_bdstow
;
681 static int hf_ubx_rxm_measx_reserved2
;
682 static int hf_ubx_rxm_measx_qzsstow
;
683 static int hf_ubx_rxm_measx_gpstowacc
;
684 static int hf_ubx_rxm_measx_glotowacc
;
685 static int hf_ubx_rxm_measx_bdstowacc
;
686 static int hf_ubx_rxm_measx_reserved3
;
687 static int hf_ubx_rxm_measx_qzsstowacc
;
688 static int hf_ubx_rxm_measx_numsv
;
689 static int hf_ubx_rxm_measx_flags_towset
;
690 static int hf_ubx_rxm_measx_reserved4
;
691 static int hf_ubx_rxm_measx_gnssid
;
692 static int hf_ubx_rxm_measx_svid
;
693 static int hf_ubx_rxm_measx_cn0
;
694 static int hf_ubx_rxm_measx_mpathindic
;
695 static int hf_ubx_rxm_measx_dopplerms
;
696 static int hf_ubx_rxm_measx_dopplerhz
;
697 static int hf_ubx_rxm_measx_wholechips
;
698 static int hf_ubx_rxm_measx_fracchips
;
699 static int hf_ubx_rxm_measx_codephase
;
700 static int hf_ubx_rxm_measx_intcodephase
;
701 static int hf_ubx_rxm_measx_pseurangermserr
;
702 static int hf_ubx_rxm_measx_reserved5
;
704 static int hf_ubx_rxm_rawx
;
705 static int hf_ubx_rxm_rawx_rcvtow
;
706 static int hf_ubx_rxm_rawx_week
;
707 static int hf_ubx_rxm_rawx_leaps
;
708 static int hf_ubx_rxm_rawx_nummeas
;
709 static int hf_ubx_rxm_rawx_recstat
;
710 static int hf_ubx_rxm_rawx_recstat_leapsec
;
711 static int hf_ubx_rxm_rawx_recstat_clkreset
;
712 static int hf_ubx_rxm_rawx_version
;
713 static int hf_ubx_rxm_rawx_reserved1
;
714 static int hf_ubx_rxm_rawx_prmes
;
715 static int hf_ubx_rxm_rawx_cpmes
;
716 static int hf_ubx_rxm_rawx_domes
;
717 static int hf_ubx_rxm_rawx_gnssid
;
718 static int hf_ubx_rxm_rawx_svid
;
719 static int hf_ubx_rxm_rawx_sigid
;
720 static int hf_ubx_rxm_rawx_freqid
;
721 static int hf_ubx_rxm_rawx_locktime
;
722 static int hf_ubx_rxm_rawx_cn0
;
723 static int hf_ubx_rxm_rawx_prstdev
;
724 static int hf_ubx_rxm_rawx_cpstdev
;
725 static int hf_ubx_rxm_rawx_dostdev
;
726 static int hf_ubx_rxm_rawx_trkstat
;
727 static int hf_ubx_rxm_rawx_trkstat_prvalid
;
728 static int hf_ubx_rxm_rawx_trkstat_cpvalid
;
729 static int hf_ubx_rxm_rawx_trkstat_halfcyc
;
730 static int hf_ubx_rxm_rawx_trkstat_subhalfcyc
;
731 static int hf_ubx_rxm_rawx_reserved2
;
733 static int * const ubx_rxm_rawx_recstat_fields
[] = {
734 &hf_ubx_rxm_rawx_recstat_leapsec
,
735 &hf_ubx_rxm_rawx_recstat_clkreset
,
739 static int * const ubx_rxm_rawx_trkstat_fields
[] = {
740 &hf_ubx_rxm_rawx_trkstat_prvalid
,
741 &hf_ubx_rxm_rawx_trkstat_cpvalid
,
742 &hf_ubx_rxm_rawx_trkstat_halfcyc
,
743 &hf_ubx_rxm_rawx_trkstat_subhalfcyc
,
747 static int hf_ubx_rxm_sfrbx
;
748 static int hf_ubx_rxm_sfrbx_gnssid
;
749 static int hf_ubx_rxm_sfrbx_svid
;
750 static int hf_ubx_rxm_sfrbx_sigid
;
751 static int hf_ubx_rxm_sfrbx_freqid
;
752 static int hf_ubx_rxm_sfrbx_numwords
;
753 static int hf_ubx_rxm_sfrbx_chn
;
754 static int hf_ubx_rxm_sfrbx_version
;
755 static int hf_ubx_rxm_sfrbx_dwrd
;
756 static int hf_ubx_rxm_sfrbx_reserved1
;
757 static int hf_ubx_rxm_sfrbx_reserved2
;
758 static int hf_ubx_rxm_sfrbx_reserved3
;
760 static dissector_table_t ubx_class_id_dissector_table
;
761 static dissector_table_t ubx_gnssid_dissector_table
;
763 static expert_field ei_ubx_chksum
;
766 static int ett_ubx_ack_ack
;
767 static int ett_ubx_ack_nak
;
768 static int ett_ubx_cfg_gnss
;
769 static int ett_ubx_cfg_gnss_block
[255];
770 static int ett_ubx_cfg_sbas
;
771 static int ett_ubx_cfg_sbas_mode
;
772 static int ett_ubx_cfg_sbas_scanmode
;
773 static int ett_ubx_nav_dop
;
774 static int ett_ubx_nav_eoe
;
775 static int ett_ubx_nav_odo
;
776 static int ett_ubx_nav_posecef
;
777 static int ett_ubx_nav_pvt
;
778 static int ett_ubx_nav_pvt_datetime
;
779 static int ett_ubx_nav_pvt_valid
;
780 static int ett_ubx_nav_pvt_flags
;
781 static int ett_ubx_nav_pvt_flags2
;
782 static int ett_ubx_nav_sat
;
783 static int ett_ubx_nav_sat_sv_info
[255];
784 static int ett_ubx_nav_sat_flags
;
785 static int ett_ubx_nav_sbas
;
786 static int ett_ubx_nav_sbas_service
;
787 static int ett_ubx_nav_sbas_sv_info
[255];
788 static int ett_ubx_nav_timegps
;
789 static int ett_ubx_nav_timegps_tow
;
790 static int ett_ubx_nav_timegps_valid
;
791 static int ett_ubx_nav_timeutc
;
792 static int ett_ubx_nav_timeutc_valid
;
793 static int ett_ubx_nav_velecef
;
794 static int ett_ubx_rxm_measx
;
795 static int ett_ubx_rxm_measx_meas
[255];
796 static int ett_ubx_rxm_rawx
;
797 static int ett_ubx_rxm_rawx_recstat
;
798 static int ett_ubx_rxm_rawx_trkstat
;
799 static int ett_ubx_rxm_rawx_meas
[255];
800 static int ett_ubx_rxm_sfrbx
;
802 static dissector_handle_t ubx_handle
;
804 /* compute the checksum for a UBX message (Fletcher 8-bit by RFC 1145 */
805 static uint16_t chksum_fletcher_8(const uint8_t *data
, const int len
) {
806 uint8_t ck_a
= 0, ck_b
= 0;
809 for (i
= 0; i
< len
; i
++) {
814 return (ck_b
<< 8) | ck_a
;
817 /* Format code phase */
818 static void fmt_codephase(char *label
, uint32_t p
) {
819 snprintf(label
, ITEM_LABEL_LENGTH
, "%d * 2^-21 ms", p
);
822 /* Format carrier phase standard deviation */
823 static void fmt_cpstdev(char *label
, uint32_t p
) {
824 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%03d cycles", (p
* 4) / 1000, (p
* 4) % 1000);
827 /* Format magnetic declination */
828 static void fmt_decl(char *label
, int32_t d
) {
830 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%02d%s", d
/ 100, d
% 100,
834 snprintf(label
, ITEM_LABEL_LENGTH
, "-%d.%02d%s", -d
/ 100, -d
% 100,
839 /* Format magnetic declination accuracy */
840 static void fmt_decl_acc(char *label
, uint32_t a
) {
841 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%02d%s", a
/ 100,
842 a
% 100, UTF8_DEGREE_SIGN
);
845 /* Format Dilution of Precision */
846 static void fmt_dop(char *label
, uint32_t dop
) {
847 snprintf(label
, ITEM_LABEL_LENGTH
, "%i.%02i", dop
/ 100, dop
% 100);
850 /* Format Doppler measurement in m/s */
851 static void fmt_dopplerms(char *label
, int32_t d
) {
853 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%02d m/s", d
* 4 / 100, (d
* 4) % 100);
856 snprintf(label
, ITEM_LABEL_LENGTH
, "-%d.%02d m/s", -d
* 4 / 100, (-d
* 4) % 100);
860 /* Format Doppler measurement in Hz */
861 static void fmt_dopplerhz(char *label
, int32_t d
) {
863 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%01d Hz", d
* 2 / 10, (d
* 2) % 10);
866 snprintf(label
, ITEM_LABEL_LENGTH
, "-%d.%01d Hz", -d
* 2 / 10, (-d
* 2) % 10);
870 /* Format Doppler standard deviation */
871 static void fmt_dostdev(char *label
, uint32_t p
) {
872 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%03d Hz", (1 << p
) * 2 / 1000, ((1 << p
) * 2) % 1000);
876 static void fmt_heading(char *label
, int32_t h
) {
878 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%05d%s", h
/ 100000, h
% 100000,
882 snprintf(label
, ITEM_LABEL_LENGTH
, "-%d.%05d%s", -h
/ 100000,
883 -h
% 100000, UTF8_DEGREE_SIGN
);
887 /* Format heading accuracy */
888 static void fmt_heading_acc(char *label
, uint32_t a
) {
889 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%05d%s", a
/ 100000,
890 a
% 100000, UTF8_DEGREE_SIGN
);
893 /* Format latitude or longitude */
894 static void fmt_lat_lon(char *label
, int32_t l
) {
896 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%07d%s", l
/ 10000000,
897 l
% 10000000, UTF8_DEGREE_SIGN
);
900 snprintf(label
, ITEM_LABEL_LENGTH
, "-%d.%07d%s", -l
/ 10000000,
901 -l
% 10000000, UTF8_DEGREE_SIGN
);
905 /* Format pseudo-range residuals */
906 static void fmt_pr_res(char *label
, int32_t p
) {
908 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%01dm", p
/ 10, p
% 10);
911 snprintf(label
, ITEM_LABEL_LENGTH
, "-%d.%01dm", -p
/ 10, -p
% 10);
915 /* Format pseudo-range standard deviation */
916 static void fmt_prstdev(char *label
, uint32_t p
) {
917 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%02dm", (1 << p
) / 100, (1 << p
) % 100);
920 /* Format measurement reference time accuracy */
921 static void fmt_towacc(char *label
, uint32_t p
) {
922 snprintf(label
, ITEM_LABEL_LENGTH
, "%d.%04dms", p
/ 16, (p
* 10000 / 16) % 10000);
925 /* Dissect UBX message */
926 static int dissect_ubx(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
928 uint32_t msg_class_id
, payload_len
, cmp_chksum
;
930 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX");
931 col_clear(pinfo
->cinfo
, COL_INFO
);
933 payload_len
= tvb_get_uint16(tvb
, 4, ENC_LITTLE_ENDIAN
);
935 proto_item
*ti
= proto_tree_add_item(tree
, proto_ubx
, tvb
, 0,
936 UBX_HEADER_SIZE
+ payload_len
+ UBX_CHKSUM_SIZE
, ENC_NA
);
937 proto_tree
*ubx_tree
= proto_item_add_subtree(ti
, ett_ubx
);
939 // dissect the registered fields
940 proto_tree_add_item(ubx_tree
, hf_ubx_preamble
,
941 tvb
, 0, 2, ENC_BIG_ENDIAN
);
942 proto_tree_add_item_ret_uint(ubx_tree
, hf_ubx_msg_class_id
,
943 tvb
, 2, 2, ENC_BIG_ENDIAN
, &msg_class_id
);
944 proto_tree_add_item(ubx_tree
, hf_ubx_payload_len
,
945 tvb
, 4, 2, ENC_LITTLE_ENDIAN
);
948 cmp_chksum
= chksum_fletcher_8(
949 (uint8_t *)tvb_memdup(pinfo
->pool
, tvb
, 2, UBX_HEADER_SIZE
+ payload_len
- 2),
950 UBX_HEADER_SIZE
+ payload_len
- 2);
951 proto_tree_add_checksum(ubx_tree
,
952 tvb
, UBX_HEADER_SIZE
+ payload_len
,
953 hf_ubx_chksum
, -1, &ei_ubx_chksum
, NULL
, cmp_chksum
,
954 ENC_LITTLE_ENDIAN
, PROTO_CHECKSUM_VERIFY
);
956 // send the payload to the next dissector
957 next_tvb
= tvb_new_subset_length(tvb
, UBX_HEADER_SIZE
, payload_len
);
958 if (!dissector_try_uint(ubx_class_id_dissector_table
, msg_class_id
,
959 next_tvb
, pinfo
, tree
)) {
960 call_data_dissector(next_tvb
, pinfo
, tree
);
963 return tvb_captured_length(tvb
);
966 /* Dissect UBX-ACK-ACK message */
967 static int dissect_ubx_ack_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
968 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-ACK-ACK");
969 col_clear(pinfo
->cinfo
, COL_INFO
);
971 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_ack_ack
, tvb
, 0, 2, ENC_NA
);
972 proto_tree
*ubx_ack_ack_tree
= proto_item_add_subtree(ti
, ett_ubx_ack_ack
);
974 // dissect the registered fields
975 proto_tree_add_item(ubx_ack_ack_tree
, hf_ubx_ack_ack_msg_class_id
,
976 tvb
, 0, 2, ENC_BIG_ENDIAN
);
978 return tvb_captured_length(tvb
);
981 /* Dissect UBX-ACK-NAK message */
982 static int dissect_ubx_ack_nak(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
983 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-ACK-NAK");
984 col_clear(pinfo
->cinfo
, COL_INFO
);
986 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_ack_nak
, tvb
, 0, 2, ENC_NA
);
987 proto_tree
*ubx_ack_nak_tree
= proto_item_add_subtree(ti
, ett_ubx_ack_nak
);
989 // dissect the registered fields
990 proto_tree_add_item(ubx_ack_nak_tree
, hf_ubx_ack_nak_msg_class_id
,
991 tvb
, 0, 2, ENC_BIG_ENDIAN
);
993 return tvb_captured_length(tvb
);
996 /* Dissect UBX-CFG-SBAS message */
997 static int dissect_ubx_cfg_gnss(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
998 uint8_t i
, num_config_blocks
;
1000 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-CFG-GNSS");
1001 col_clear(pinfo
->cinfo
, COL_INFO
);
1003 num_config_blocks
= tvb_get_uint8(tvb
, 3);
1005 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_cfg_gnss
,
1006 tvb
, 0, 4 + 8 * num_config_blocks
, ENC_NA
);
1007 proto_tree
*ubx_cfg_gnss_tree
= proto_item_add_subtree(ti
, ett_ubx_cfg_gnss
);
1009 // dissect the registered fields
1010 proto_tree_add_item(ubx_cfg_gnss_tree
, hf_ubx_cfg_gnss_version
,
1012 proto_tree_add_item(ubx_cfg_gnss_tree
, hf_ubx_cfg_gnss_numtrkchhw
,
1014 proto_tree_add_item(ubx_cfg_gnss_tree
, hf_ubx_cfg_gnss_numtrkchuse
,
1016 proto_tree_add_item(ubx_cfg_gnss_tree
, hf_ubx_cfg_gnss_numconfigblocks
,
1019 for (i
= 0; i
< num_config_blocks
; i
++) {
1020 const uint8_t gnss_id
= tvb_get_uint8(tvb
, 4 + 8 * i
);
1021 const uint8_t res_trk_ch
= tvb_get_uint8(tvb
, 5 + 8 * i
);
1022 const uint8_t max_trk_ch
= tvb_get_uint8(tvb
, 6 + 8 * i
);
1024 proto_tree
*gnss_blk_tree
= proto_tree_add_subtree_format(ubx_cfg_gnss_tree
,
1025 tvb
, 4 + 8 * i
, 8, ett_ubx_cfg_gnss_block
[i
], NULL
,
1026 "%-7s (Res Trk Ch %2d, Max Trk Ch %2d)",
1027 val_to_str_const(gnss_id
, UBX_GNSS_ID
, "Unknown GNSS ID"),
1028 res_trk_ch
, max_trk_ch
);
1030 proto_tree_add_item(gnss_blk_tree
, hf_ubx_cfg_gnss_blk_gnssid
,
1031 tvb
, 4 + 8 * i
, 1, ENC_NA
);
1032 proto_tree_add_item(gnss_blk_tree
, hf_ubx_cfg_gnss_blk_restrkch
,
1033 tvb
, 5 + 8 * i
, 1, ENC_NA
);
1034 proto_tree_add_item(gnss_blk_tree
, hf_ubx_cfg_gnss_blk_maxtrkch
,
1035 tvb
, 6 + 8 * i
, 1, ENC_NA
);
1036 proto_tree_add_item(gnss_blk_tree
, hf_ubx_cfg_gnss_blk_reserved1
,
1037 tvb
, 7 + 8 * i
, 1, ENC_NA
);
1038 proto_tree_add_item(gnss_blk_tree
, hf_ubx_cfg_gnss_blk_enable
,
1039 tvb
, 8 + 8 * i
, 4, ENC_LITTLE_ENDIAN
);
1044 hf
= hf_ubx_cfg_gnss_blk_gps_sigcfgmask
;
1047 hf
= hf_ubx_cfg_gnss_blk_sbas_sigcfgmask
;
1049 case GNSS_ID_GALILEO
:
1050 hf
= hf_ubx_cfg_gnss_blk_gal_sigcfgmask
;
1052 case GNSS_ID_BEIDOU
:
1053 hf
= hf_ubx_cfg_gnss_blk_bds_sigcfgmask
;
1056 hf
= hf_ubx_cfg_gnss_blk_imes_sigcfgmask
;
1059 hf
= hf_ubx_cfg_gnss_blk_qzss_sigcfgmask
;
1061 case GNSS_ID_GLONASS
:
1062 hf
= hf_ubx_cfg_gnss_blk_glo_sigcfgmask
;
1065 hf
= hf_ubx_cfg_gnss_blk_sigcfgmask
;
1067 proto_tree_add_item(gnss_blk_tree
, hf
,
1068 tvb
, 8 + 8 * i
, 4, ENC_LITTLE_ENDIAN
);
1071 return tvb_captured_length(tvb
);
1074 /* Dissect UBX-CFG-SBAS message */
1075 static int dissect_ubx_cfg_sbas(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1076 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-CFG-SBAS");
1077 col_clear(pinfo
->cinfo
, COL_INFO
);
1079 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_cfg_sbas
, tvb
, 0, 2, ENC_NA
);
1080 proto_tree
*ubx_cfg_sbas_tree
= proto_item_add_subtree(ti
, ett_ubx_cfg_sbas
);
1082 // dissect the registered fields
1083 proto_tree_add_bitmask(ubx_cfg_sbas_tree
, tvb
, 0, hf_ubx_cfg_sbas_mode
,
1084 ett_ubx_cfg_sbas_mode
, ubx_cfg_sbas_mode_fields
, ENC_NA
);
1085 proto_tree_add_item(ubx_cfg_sbas_tree
, hf_ubx_cfg_sbas_usage_range
,
1087 proto_tree_add_item(ubx_cfg_sbas_tree
, hf_ubx_cfg_sbas_usage_diffcorr
,
1089 proto_tree_add_item(ubx_cfg_sbas_tree
, hf_ubx_cfg_sbas_usage_integrity
,
1091 proto_tree_add_item(ubx_cfg_sbas_tree
, hf_ubx_cfg_sbas_max_sbas
,
1095 proto_tree
*scanmode_tree
= proto_tree_add_subtree(ubx_cfg_sbas_tree
,
1096 tvb
, 3, 5, ett_ubx_cfg_sbas_scanmode
, NULL
, "Scanmode bitmask");
1097 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn120
,
1098 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1099 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn121
,
1100 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1101 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn122
,
1102 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1103 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn123
,
1104 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1105 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn124
,
1106 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1107 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn125
,
1108 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1109 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn126
,
1110 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1111 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn127
,
1112 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1113 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn128
,
1114 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1115 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn129
,
1116 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1117 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn130
,
1118 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1119 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn131
,
1120 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1121 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn132
,
1122 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1123 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn133
,
1124 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1125 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn134
,
1126 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1127 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn135
,
1128 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1129 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn136
,
1130 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1131 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn137
,
1132 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1133 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn138
,
1134 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1135 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn139
,
1136 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1137 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn140
,
1138 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1139 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn141
,
1140 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1141 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn142
,
1142 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1143 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn143
,
1144 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1145 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn144
,
1146 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1147 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn145
,
1148 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1149 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn146
,
1150 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1151 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn147
,
1152 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1153 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn148
,
1154 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1155 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn149
,
1156 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1157 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn150
,
1158 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1159 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn151
,
1160 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1161 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn152
,
1163 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn153
,
1165 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn154
,
1167 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn155
,
1169 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn156
,
1171 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn157
,
1173 proto_tree_add_item(scanmode_tree
, hf_ubx_cfg_sbas_scanmode_prn158
,
1176 return tvb_captured_length(tvb
);
1179 /* Dissect UBX-NAV-DOP message */
1180 static int dissect_ubx_nav_dop(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1181 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-DOP");
1182 col_clear(pinfo
->cinfo
, COL_INFO
);
1184 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_dop
,
1185 tvb
, 0, 18, ENC_NA
);
1186 proto_tree
*ubx_nav_dop_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_dop
);
1188 // dissect the registered fields
1189 proto_tree_add_item(ubx_nav_dop_tree
, hf_ubx_nav_dop_itow
,
1190 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1191 proto_tree_add_item(ubx_nav_dop_tree
, hf_ubx_nav_dop_gdop
, tvb
, 4, 2, ENC_LITTLE_ENDIAN
);
1192 proto_tree_add_item(ubx_nav_dop_tree
, hf_ubx_nav_dop_pdop
, tvb
, 6, 2, ENC_LITTLE_ENDIAN
);
1193 proto_tree_add_item(ubx_nav_dop_tree
, hf_ubx_nav_dop_tdop
, tvb
, 8, 2, ENC_LITTLE_ENDIAN
);
1194 proto_tree_add_item(ubx_nav_dop_tree
, hf_ubx_nav_dop_vdop
, tvb
, 10, 2, ENC_LITTLE_ENDIAN
);
1195 proto_tree_add_item(ubx_nav_dop_tree
, hf_ubx_nav_dop_hdop
, tvb
, 12, 2, ENC_LITTLE_ENDIAN
);
1196 proto_tree_add_item(ubx_nav_dop_tree
, hf_ubx_nav_dop_ndop
, tvb
, 14, 2, ENC_LITTLE_ENDIAN
);
1197 proto_tree_add_item(ubx_nav_dop_tree
, hf_ubx_nav_dop_edop
, tvb
, 16, 2, ENC_LITTLE_ENDIAN
);
1199 return tvb_captured_length(tvb
);
1202 /* Dissect UBX-NAV-EOE message */
1203 static int dissect_ubx_nav_eoe(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1204 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-EOE");
1205 col_clear(pinfo
->cinfo
, COL_INFO
);
1207 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_eoe
,
1209 proto_tree
*ubx_nav_eoe_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_eoe
);
1211 // dissect the registered fields
1212 proto_tree_add_item(ubx_nav_eoe_tree
, hf_ubx_nav_eoe_itow
,
1213 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1215 return tvb_captured_length(tvb
);
1218 /* Dissect UBX-NAV-ODO message */
1219 static int dissect_ubx_nav_odo(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1220 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-ODO");
1221 col_clear(pinfo
->cinfo
, COL_INFO
);
1223 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_odo
,
1224 tvb
, 0, 20, ENC_NA
);
1225 proto_tree
*ubx_nav_odo_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_odo
);
1227 // dissect the registered fields
1228 proto_tree_add_item(ubx_nav_odo_tree
, hf_ubx_nav_odo_version
,
1230 proto_tree_add_item(ubx_nav_odo_tree
, hf_ubx_nav_odo_reserved1
,
1231 tvb
, 1, 3, ENC_LITTLE_ENDIAN
);
1232 proto_tree_add_item(ubx_nav_odo_tree
, hf_ubx_nav_odo_itow
,
1233 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1234 proto_tree_add_item(ubx_nav_odo_tree
, hf_ubx_nav_odo_distance
,
1235 tvb
, 8, 4, ENC_LITTLE_ENDIAN
);
1236 proto_tree_add_item(ubx_nav_odo_tree
, hf_ubx_nav_odo_totaldistance
,
1237 tvb
, 12, 4, ENC_LITTLE_ENDIAN
);
1238 proto_tree_add_item(ubx_nav_odo_tree
, hf_ubx_nav_odo_distancestd
,
1239 tvb
, 16, 4, ENC_LITTLE_ENDIAN
);
1241 return tvb_captured_length(tvb
);
1244 /* Dissect UBX-NAV-POSECEF message */
1245 static int dissect_ubx_nav_posecef(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1246 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-POSECEF");
1247 col_clear(pinfo
->cinfo
, COL_INFO
);
1249 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_posecef
,
1250 tvb
, 0, 20, ENC_NA
);
1251 proto_tree
*ubx_nav_posecef_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_posecef
);
1253 // dissect the registered fields
1254 proto_tree_add_item(ubx_nav_posecef_tree
, hf_ubx_nav_posecef_itow
,
1255 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1256 proto_tree_add_item(ubx_nav_posecef_tree
, hf_ubx_nav_posecef_ecefx
,
1257 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1258 proto_tree_add_item(ubx_nav_posecef_tree
, hf_ubx_nav_posecef_ecefy
,
1259 tvb
, 8, 4, ENC_LITTLE_ENDIAN
);
1260 proto_tree_add_item(ubx_nav_posecef_tree
, hf_ubx_nav_posecef_ecefz
,
1261 tvb
, 12, 4, ENC_LITTLE_ENDIAN
);
1262 proto_tree_add_item(ubx_nav_posecef_tree
, hf_ubx_nav_posecef_pacc
,
1263 tvb
, 16, 4, ENC_LITTLE_ENDIAN
);
1265 return tvb_captured_length(tvb
);
1268 /* Dissect UBX-NAV-PVT message */
1269 static int dissect_ubx_nav_pvt(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1270 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-PVT");
1271 col_clear(pinfo
->cinfo
, COL_INFO
);
1273 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_pvt
,
1274 tvb
, 0, 92, ENC_NA
);
1275 proto_tree
*ubx_nav_pvt_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_pvt
);
1277 // dissect the registered fields
1278 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_itow
,
1279 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1281 // dissect date & time
1282 uint16_t year
= tvb_get_int16(tvb
, 4, ENC_LITTLE_ENDIAN
);
1283 uint8_t month
= tvb_get_int8(tvb
, 6);
1284 uint8_t day
= tvb_get_int8(tvb
, 7);
1285 uint8_t hour
= tvb_get_int8(tvb
, 8);
1286 uint8_t min
= tvb_get_int8(tvb
, 9);
1287 uint8_t sec
= tvb_get_int8(tvb
, 10);
1288 proto_tree
*datetime_tree
= proto_tree_add_subtree_format(ubx_nav_pvt_tree
,
1289 tvb
, 4, 7, ett_ubx_nav_pvt_datetime
, NULL
,
1290 "Date/time: %04d-%02d-%02d %02d:%02d:%02d",
1291 year
, month
, day
, hour
, min
, sec
);
1292 proto_tree_add_item(datetime_tree
, hf_ubx_nav_pvt_year
,
1293 tvb
, 4, 2, ENC_LITTLE_ENDIAN
);
1294 proto_tree_add_item(datetime_tree
, hf_ubx_nav_pvt_month
,
1296 proto_tree_add_item(datetime_tree
, hf_ubx_nav_pvt_day
,
1298 proto_tree_add_item(datetime_tree
, hf_ubx_nav_pvt_hour
,
1300 proto_tree_add_item(datetime_tree
, hf_ubx_nav_pvt_min
,
1302 proto_tree_add_item(datetime_tree
, hf_ubx_nav_pvt_sec
,
1303 tvb
, 10, 1, ENC_NA
);
1305 proto_tree_add_bitmask(ubx_nav_pvt_tree
, tvb
, 11, hf_ubx_nav_pvt_valid
,
1306 ett_ubx_nav_pvt_valid
, ubx_nav_pvt_valid_fields
, ENC_NA
);
1307 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_tacc
,
1308 tvb
, 12, 4, ENC_LITTLE_ENDIAN
);
1309 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_nano
,
1310 tvb
, 16, 4, ENC_LITTLE_ENDIAN
);
1311 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_fixtype
,
1312 tvb
, 20, 1, ENC_NA
);
1313 proto_tree_add_bitmask(ubx_nav_pvt_tree
, tvb
, 21, hf_ubx_nav_pvt_flags
,
1314 ett_ubx_nav_pvt_flags
, ubx_nav_pvt_flags_fields
, ENC_NA
);
1315 proto_tree_add_bitmask(ubx_nav_pvt_tree
, tvb
, 22, hf_ubx_nav_pvt_flags2
,
1316 ett_ubx_nav_pvt_flags2
, ubx_nav_pvt_flags2_fields
, ENC_NA
);
1317 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_numsv
,
1318 tvb
, 23, 1, ENC_NA
);
1319 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_lon
,
1320 tvb
, 24, 4, ENC_LITTLE_ENDIAN
);
1321 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_lat
,
1322 tvb
, 28, 4, ENC_LITTLE_ENDIAN
);
1323 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_height
,
1324 tvb
, 32, 4, ENC_LITTLE_ENDIAN
);
1325 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_hmsl
,
1326 tvb
, 36, 4, ENC_LITTLE_ENDIAN
);
1327 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_hacc
,
1328 tvb
, 40, 4, ENC_LITTLE_ENDIAN
);
1329 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_vacc
,
1330 tvb
, 44, 4, ENC_LITTLE_ENDIAN
);
1331 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_veln
,
1332 tvb
, 48, 4, ENC_LITTLE_ENDIAN
);
1333 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_vele
,
1334 tvb
, 52, 4, ENC_LITTLE_ENDIAN
);
1335 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_veld
,
1336 tvb
, 56, 4, ENC_LITTLE_ENDIAN
);
1337 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_gspeed
,
1338 tvb
, 60, 4, ENC_LITTLE_ENDIAN
);
1339 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_headmot
,
1340 tvb
, 64, 4, ENC_LITTLE_ENDIAN
);
1341 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_sacc
,
1342 tvb
, 68, 4, ENC_LITTLE_ENDIAN
);
1343 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_headacc
,
1344 tvb
, 72, 4, ENC_LITTLE_ENDIAN
);
1345 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_pdop
,
1346 tvb
, 76, 2, ENC_LITTLE_ENDIAN
);
1347 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_invalidllh
,
1348 tvb
, 78, 2, ENC_LITTLE_ENDIAN
);
1349 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_lastcorrectionage
,
1350 tvb
, 78, 2, ENC_LITTLE_ENDIAN
);
1351 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_reserved1
,
1352 tvb
, 80, 4, ENC_LITTLE_ENDIAN
);
1353 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_headveh
,
1354 tvb
, 84, 4, ENC_LITTLE_ENDIAN
);
1355 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_magdec
,
1356 tvb
, 88, 2, ENC_LITTLE_ENDIAN
);
1357 proto_tree_add_item(ubx_nav_pvt_tree
, hf_ubx_nav_pvt_magacc
,
1358 tvb
, 90, 2, ENC_LITTLE_ENDIAN
);
1360 return tvb_captured_length(tvb
);
1363 /* Dissect UBX-NAV-SAT message */
1364 static int dissect_ubx_nav_sat(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1368 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-SAT");
1369 col_clear(pinfo
->cinfo
, COL_INFO
);
1371 num_svs
= tvb_get_uint8(tvb
, 5);
1373 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_sat
,
1374 tvb
, 0, 8 + 12 * num_svs
, ENC_NA
);
1375 proto_tree
*ubx_nav_sat_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_sat
);
1377 // dissect the registered fields
1378 proto_tree_add_item(ubx_nav_sat_tree
, hf_ubx_nav_sat_itow
,
1379 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1380 proto_tree_add_item(ubx_nav_sat_tree
, hf_ubx_nav_sat_version
,
1382 proto_tree_add_item(ubx_nav_sat_tree
, hf_ubx_nav_sat_num_svs
,
1384 proto_tree_add_item(ubx_nav_sat_tree
, hf_ubx_nav_sat_reserved1
,
1387 for (i
= 0; i
< num_svs
; i
++) {
1388 const uint8_t gnss_id
= tvb_get_uint8(tvb
, 8 + 12 * i
);
1389 const uint8_t sv_id
= tvb_get_uint8(tvb
, 9 + 12 * i
);
1390 const uint32_t used
= (tvb_get_uint32(tvb
, 16 + 12 * i
, ENC_LITTLE_ENDIAN
) & 0x0008) >> 3;
1392 proto_tree
*sv_info_tree
= proto_tree_add_subtree_format(ubx_nav_sat_tree
,
1393 tvb
, 8 + 12 * i
, 12, ett_ubx_nav_sat_sv_info
[i
], NULL
,
1394 "%-7s / SV ID %3d, used %d",
1395 val_to_str_const(gnss_id
, UBX_GNSS_ID
, "Unknown GNSS ID"),
1398 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sat_gnss_id
,
1399 tvb
, 8 + 12 * i
, 1, ENC_NA
);
1400 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sat_sv_id
,
1401 tvb
, 9 + 12 * i
, 1, ENC_NA
);
1402 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sat_cn0
,
1403 tvb
, 10 + 12 * i
, 1, ENC_NA
);
1404 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sat_elev
,
1405 tvb
, 11 + 12 * i
, 1, ENC_NA
);
1406 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sat_azim
,
1407 tvb
, 12 + 12 * i
, 2, ENC_LITTLE_ENDIAN
);
1408 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sat_pr_res
,
1409 tvb
, 14 + 12 * i
, 2, ENC_LITTLE_ENDIAN
);
1410 proto_tree_add_bitmask(sv_info_tree
, tvb
, 16 + 12 * i
,
1411 hf_ubx_nav_sat_flags
, ett_ubx_nav_sat_flags
,
1412 ubx_nav_sat_flags_fields
, ENC_LITTLE_ENDIAN
);
1415 return tvb_captured_length(tvb
);
1418 /* Dissect UBX-NAV-SBAS message */
1419 static int dissect_ubx_nav_sbas(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1423 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-SBAS");
1424 col_clear(pinfo
->cinfo
, COL_INFO
);
1426 num_svs
= tvb_get_uint8(tvb
, 8);
1428 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_sbas
,
1429 tvb
, 0, 12 + 12 * num_svs
, ENC_NA
);
1430 proto_tree
*ubx_nav_sbas_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_sbas
);
1432 proto_tree_add_item(ubx_nav_sbas_tree
, hf_ubx_nav_sbas_itow
,
1433 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1434 proto_tree_add_item(ubx_nav_sbas_tree
, hf_ubx_nav_sbas_geo
,
1436 proto_tree_add_item(ubx_nav_sbas_tree
, hf_ubx_nav_sbas_mode
,
1438 proto_tree_add_item(ubx_nav_sbas_tree
, hf_ubx_nav_sbas_sys
,
1440 proto_tree_add_bitmask(ubx_nav_sbas_tree
, tvb
, 7, hf_ubx_nav_sbas_service
,
1441 ett_ubx_nav_sbas_service
, ubx_nav_sbas_service_fields
, ENC_NA
);
1442 proto_tree_add_item(ubx_nav_sbas_tree
, hf_ubx_nav_sbas_cnt
,
1444 proto_tree_add_item(ubx_nav_sbas_tree
, hf_ubx_nav_sbas_reserved1
,
1445 tvb
, 9, 3, ENC_LITTLE_ENDIAN
);
1447 for (i
= 0; i
< num_svs
; i
++) {
1448 const uint8_t sv_id
= tvb_get_uint8(tvb
, 12 + 12 * i
);
1450 proto_tree
*sv_info_tree
= proto_tree_add_subtree_format(ubx_nav_sbas_tree
,
1451 tvb
, 12 + 12 * i
, 12, ett_ubx_nav_sbas_sv_info
[i
], NULL
,
1452 "SV ID %3d", sv_id
);
1454 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_sv_id
,
1455 tvb
, 12 + 12 * i
, 1, ENC_NA
);
1456 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_flags
,
1457 tvb
, 13 + 12 * i
, 1, ENC_NA
);
1458 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_udre
,
1459 tvb
, 14 + 12 * i
, 1, ENC_NA
);
1460 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_sv_sys
,
1461 tvb
, 15 + 12 * i
, 1, ENC_NA
);
1462 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_sv_service
,
1463 tvb
, 16 + 12 * i
, 1, ENC_NA
);
1464 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_reserved2
,
1465 tvb
, 17 + 12 * i
, 1, ENC_NA
);
1466 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_prc
,
1467 tvb
, 18 + 12 * i
, 2, ENC_LITTLE_ENDIAN
);
1468 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_reserved3
,
1469 tvb
, 20 + 12 * i
, 2, ENC_LITTLE_ENDIAN
);
1470 proto_tree_add_item(sv_info_tree
, hf_ubx_nav_sbas_ic
,
1471 tvb
, 22 + 12 * i
, 2, ENC_LITTLE_ENDIAN
);
1474 return tvb_captured_length(tvb
);
1477 /* Dissect UBX-NAV-TIMEGPS message */
1478 static int dissect_ubx_nav_timegps(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1482 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-TIMEGPS");
1483 col_clear(pinfo
->cinfo
, COL_INFO
);
1485 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_timegps
,
1486 tvb
, 0, 16, ENC_NA
);
1487 proto_tree
*ubx_nav_timegps_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_timegps
);
1489 // dissect the registered fields
1490 itow
= tvb_get_uint32(tvb
, 0, ENC_LITTLE_ENDIAN
);
1491 ftow
= tvb_get_int32(tvb
, 4, ENC_LITTLE_ENDIAN
);
1492 ftow
= (itow
% 1000) * 1000000 + ftow
;
1496 ftow
= 1000000000 + ftow
;
1498 proto_tree
*tow_tree
= proto_tree_add_subtree_format(ubx_nav_timegps_tree
,
1499 tvb
, 0, 8, ett_ubx_nav_timegps_tow
, NULL
, "TOW: %d.%09ds", itow
, ftow
);
1500 proto_tree_add_item(tow_tree
, hf_ubx_nav_timegps_itow
,
1501 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1502 proto_tree_add_item(tow_tree
, hf_ubx_nav_timegps_ftow
,
1503 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1505 proto_tree_add_item(ubx_nav_timegps_tree
, hf_ubx_nav_timegps_week
,
1506 tvb
, 8, 2, ENC_LITTLE_ENDIAN
);
1507 proto_tree_add_item(ubx_nav_timegps_tree
, hf_ubx_nav_timegps_leaps
,
1508 tvb
, 10, 1, ENC_NA
);
1509 proto_tree_add_bitmask(ubx_nav_timegps_tree
, tvb
, 11,
1510 hf_ubx_nav_timegps_valid
, ett_ubx_nav_timegps_valid
,
1511 ubx_nav_timegps_valid_fields
, ENC_NA
);
1512 proto_tree_add_item(ubx_nav_timegps_tree
, hf_ubx_nav_timegps_tacc
,
1513 tvb
, 12, 4, ENC_LITTLE_ENDIAN
);
1515 return tvb_captured_length(tvb
);
1518 /* Dissect UBX-NAV-TIMEUTC message */
1519 static int dissect_ubx_nav_timeutc(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1520 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-TIMEUTC");
1521 col_clear(pinfo
->cinfo
, COL_INFO
);
1523 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_timeutc
,
1524 tvb
, 0, 20, ENC_NA
);
1525 proto_tree
*ubx_nav_timeutc_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_timeutc
);
1527 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_itow
,
1528 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1529 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_tacc
,
1530 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1531 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_nano
,
1532 tvb
, 8, 4, ENC_LITTLE_ENDIAN
);
1533 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_year
,
1534 tvb
, 12, 2, ENC_LITTLE_ENDIAN
);
1535 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_month
,
1536 tvb
, 14, 1, ENC_NA
);
1537 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_day
,
1538 tvb
, 15, 1, ENC_NA
);
1539 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_hour
,
1540 tvb
, 16, 1, ENC_NA
);
1541 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_min
,
1542 tvb
, 17, 1, ENC_NA
);
1543 proto_tree_add_item(ubx_nav_timeutc_tree
, hf_ubx_nav_timeutc_sec
,
1544 tvb
, 18, 1, ENC_NA
);
1545 proto_tree_add_bitmask(ubx_nav_timeutc_tree
, tvb
, 19,
1546 hf_ubx_nav_timeutc_valid
, ett_ubx_nav_timeutc_valid
,
1547 ubx_nav_timeutc_valid_fields
, ENC_NA
);
1549 return tvb_captured_length(tvb
);
1552 /* Dissect UBX-NAV-VELECEF message */
1553 static int dissect_ubx_nav_velecef(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1554 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-NAV-VELECEF");
1555 col_clear(pinfo
->cinfo
, COL_INFO
);
1557 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_nav_velecef
,
1558 tvb
, 0, 20, ENC_NA
);
1559 proto_tree
*ubx_nav_velecef_tree
= proto_item_add_subtree(ti
, ett_ubx_nav_velecef
);
1561 // dissect the registered fields
1562 proto_tree_add_item(ubx_nav_velecef_tree
, hf_ubx_nav_velecef_itow
,
1563 tvb
, 0, 4, ENC_LITTLE_ENDIAN
);
1564 proto_tree_add_item(ubx_nav_velecef_tree
, hf_ubx_nav_velecef_ecefvx
,
1565 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1566 proto_tree_add_item(ubx_nav_velecef_tree
, hf_ubx_nav_velecef_ecefvy
,
1567 tvb
, 8, 4, ENC_LITTLE_ENDIAN
);
1568 proto_tree_add_item(ubx_nav_velecef_tree
, hf_ubx_nav_velecef_ecefvz
,
1569 tvb
, 12, 4, ENC_LITTLE_ENDIAN
);
1570 proto_tree_add_item(ubx_nav_velecef_tree
, hf_ubx_nav_velecef_sacc
,
1571 tvb
, 16, 4, ENC_LITTLE_ENDIAN
);
1573 return tvb_captured_length(tvb
);
1576 /* Dissect UBX-RXM-MEASX message */
1577 static int dissect_ubx_rxm_measx(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1580 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-RXM-MEASX");
1581 col_clear(pinfo
->cinfo
, COL_INFO
);
1583 numsv
= tvb_get_uint8(tvb
, 34);
1585 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_rxm_measx
,
1586 tvb
, 0, 44 + numsv
* 24, ENC_NA
);
1587 proto_tree
*ubx_rxm_measx_tree
= proto_item_add_subtree(ti
, ett_ubx_rxm_measx
);
1589 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_version
,
1591 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_reserved1
,
1592 tvb
, 1, 3, ENC_LITTLE_ENDIAN
);
1593 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_gpstow
,
1594 tvb
, 4, 4, ENC_LITTLE_ENDIAN
);
1595 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_glotow
,
1596 tvb
, 8, 4, ENC_LITTLE_ENDIAN
);
1597 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_bdstow
,
1598 tvb
, 12, 4, ENC_LITTLE_ENDIAN
);
1599 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_reserved2
,
1600 tvb
, 16, 4, ENC_LITTLE_ENDIAN
);
1601 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_qzsstow
,
1602 tvb
, 20, 4, ENC_LITTLE_ENDIAN
);
1603 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_gpstowacc
,
1604 tvb
, 24, 2, ENC_LITTLE_ENDIAN
);
1605 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_glotowacc
,
1606 tvb
, 26, 2, ENC_LITTLE_ENDIAN
);
1607 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_bdstowacc
,
1608 tvb
, 28, 2, ENC_LITTLE_ENDIAN
);
1609 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_reserved3
,
1610 tvb
, 30, 2, ENC_LITTLE_ENDIAN
);
1611 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_qzsstowacc
,
1612 tvb
, 32, 2, ENC_LITTLE_ENDIAN
);
1613 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_numsv
,
1614 tvb
, 34, 1, ENC_NA
);
1615 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_flags_towset
,
1616 tvb
, 35, 1, ENC_NA
);
1617 proto_tree_add_item(ubx_rxm_measx_tree
, hf_ubx_rxm_measx_reserved4
,
1618 tvb
, 36, 8, ENC_LITTLE_ENDIAN
);
1620 for (i
= 0; i
< numsv
; i
++) {
1621 const uint8_t gnss_id
= tvb_get_uint8(tvb
, 44 + 24 * i
);
1622 const uint8_t sv_id
= tvb_get_uint8(tvb
, 45 + 24 * i
);
1623 const uint8_t cn0
= tvb_get_uint8(tvb
, 46 + 24 * i
);
1625 proto_tree
*meas_tree
= proto_tree_add_subtree_format(ubx_rxm_measx_tree
,
1626 tvb
, 44 + 24 * i
, 24, ett_ubx_rxm_measx_meas
[i
], NULL
,
1627 "%-7s / SV ID %3d / C/N0 %d dB-Hz",
1628 val_to_str_const(gnss_id
, UBX_GNSS_ID
, "Unknown GNSS ID"),
1631 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_gnssid
,
1632 tvb
, 44 + 24 * i
, 1, ENC_NA
);
1633 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_svid
,
1634 tvb
, 45 + 24 * i
, 1, ENC_NA
);
1635 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_cn0
,
1636 tvb
, 46 + 24 * i
, 1, ENC_NA
);
1637 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_mpathindic
,
1638 tvb
, 47 + 24 * i
, 1, ENC_NA
);
1639 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_dopplerms
,
1640 tvb
, 48 + 24 * i
, 4, ENC_LITTLE_ENDIAN
);
1641 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_dopplerhz
,
1642 tvb
, 52 + 24 * i
, 4, ENC_LITTLE_ENDIAN
);
1643 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_wholechips
,
1644 tvb
, 56 + 24 * i
, 2, ENC_LITTLE_ENDIAN
);
1645 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_fracchips
,
1646 tvb
, 58 + 24 * i
, 2, ENC_LITTLE_ENDIAN
);
1647 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_codephase
,
1648 tvb
, 60 + 24 * i
, 4, ENC_LITTLE_ENDIAN
);
1649 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_intcodephase
,
1650 tvb
, 64 + 24 * i
, 1, ENC_NA
);
1651 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_pseurangermserr
,
1652 tvb
, 65 + 24 * i
, 1, ENC_NA
);
1653 proto_tree_add_item(meas_tree
, hf_ubx_rxm_measx_reserved5
,
1654 tvb
, 66 + 24 * i
, 2, ENC_LITTLE_ENDIAN
);
1657 return tvb_captured_length(tvb
);
1660 /* Dissect UBX-RXM-RAWX message */
1661 static int dissect_ubx_rxm_rawx(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1662 uint32_t i
, nummeas
;
1664 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-RXM-RAWX");
1665 col_clear(pinfo
->cinfo
, COL_INFO
);
1667 nummeas
= tvb_get_uint8(tvb
, 11);
1669 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_rxm_rawx
,
1670 tvb
, 0, 16 + nummeas
* 32, ENC_NA
);
1671 proto_tree
*ubx_rxm_rawx_tree
= proto_item_add_subtree(ti
, ett_ubx_rxm_rawx
);
1673 proto_tree_add_item(ubx_rxm_rawx_tree
, hf_ubx_rxm_rawx_rcvtow
,
1674 tvb
, 0, 8, ENC_LITTLE_ENDIAN
);
1675 proto_tree_add_item(ubx_rxm_rawx_tree
, hf_ubx_rxm_rawx_week
,
1676 tvb
, 8, 2, ENC_LITTLE_ENDIAN
);
1677 proto_tree_add_item(ubx_rxm_rawx_tree
, hf_ubx_rxm_rawx_leaps
,
1678 tvb
, 10, 1, ENC_NA
);
1679 proto_tree_add_item(ubx_rxm_rawx_tree
, hf_ubx_rxm_rawx_nummeas
,
1680 tvb
, 11, 1, ENC_NA
);
1681 proto_tree_add_bitmask(ubx_rxm_rawx_tree
, tvb
, 12,
1682 hf_ubx_rxm_rawx_recstat
, ett_ubx_rxm_rawx_recstat
,
1683 ubx_rxm_rawx_recstat_fields
, ENC_NA
);
1684 proto_tree_add_item(ubx_rxm_rawx_tree
, hf_ubx_rxm_rawx_version
,
1685 tvb
, 13, 1, ENC_NA
);
1686 proto_tree_add_item(ubx_rxm_rawx_tree
, hf_ubx_rxm_rawx_reserved1
,
1687 tvb
, 14, 2, ENC_LITTLE_ENDIAN
);
1689 for (i
= 0; i
< nummeas
; i
++) {
1690 const uint8_t gnss_id
= tvb_get_uint8(tvb
, 36 + 32 * i
);
1691 const uint8_t sv_id
= tvb_get_uint8(tvb
, 37 + 32 * i
);
1692 const uint8_t cn0
= tvb_get_uint8(tvb
, 42 + 32 * i
);
1694 proto_tree
*meas_tree
= proto_tree_add_subtree_format(ubx_rxm_rawx_tree
,
1695 tvb
, 16 + 32 * i
, 32, ett_ubx_rxm_rawx_meas
[i
], NULL
,
1696 "%-7s / SV ID %3d / C/N0 %d dB-Hz",
1697 val_to_str_const(gnss_id
, UBX_GNSS_ID
, "Unknown GNSS ID"),
1700 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_prmes
,
1701 tvb
, 16 + 32 * i
, 8, ENC_LITTLE_ENDIAN
);
1702 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_cpmes
,
1703 tvb
, 24 + 32 * i
, 8, ENC_LITTLE_ENDIAN
);
1704 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_domes
,
1705 tvb
, 32 + 32 * i
, 4, ENC_LITTLE_ENDIAN
);
1706 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_gnssid
,
1707 tvb
, 36 + 32 * i
, 1, ENC_NA
);
1708 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_svid
,
1709 tvb
, 37 + 32 * i
, 1, ENC_NA
);
1710 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_sigid
,
1711 tvb
, 38 + 32 * i
, 1, ENC_NA
);
1712 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_freqid
,
1713 tvb
, 39 + 32 * i
, 1, ENC_NA
);
1714 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_locktime
,
1715 tvb
, 40 + 32 * i
, 2, ENC_LITTLE_ENDIAN
);
1716 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_cn0
,
1717 tvb
, 42 + 32 * i
, 1, ENC_NA
);
1718 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_prstdev
,
1719 tvb
, 43 + 32 * i
, 1, ENC_NA
);
1720 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_cpstdev
,
1721 tvb
, 44 + 32 * i
, 1, ENC_NA
);
1722 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_dostdev
,
1723 tvb
, 45 + 32 * i
, 1, ENC_NA
);
1724 proto_tree_add_bitmask(meas_tree
, tvb
, 46,
1725 hf_ubx_rxm_rawx_trkstat
, ett_ubx_rxm_rawx_trkstat
,
1726 ubx_rxm_rawx_trkstat_fields
, ENC_NA
);
1727 proto_tree_add_item(meas_tree
, hf_ubx_rxm_rawx_reserved2
,
1728 tvb
, 47 + 32 * i
, 1, ENC_NA
);
1731 return tvb_captured_length(tvb
);
1734 /* Dissect UBX-RXM-SFRBX message */
1735 static int dissect_ubx_rxm_sfrbx(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
) {
1739 uint32_t gnssid
, numwords
, version
;
1741 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "UBX-RXM-SFRBX");
1742 col_clear(pinfo
->cinfo
, COL_INFO
);
1744 // get length of the payload and protocol version
1745 numwords
= tvb_get_uint8(tvb
, 4);
1746 version
= tvb_get_uint8(tvb
, 6);
1748 proto_item
*ti
= proto_tree_add_item(tree
, hf_ubx_rxm_sfrbx
,
1749 tvb
, 0, 8 + numwords
* 4, ENC_NA
);
1750 proto_tree
*ubx_rxm_sfrbx_tree
= proto_item_add_subtree(ti
, ett_ubx_rxm_sfrbx
);
1752 proto_tree_add_item_ret_uint(ubx_rxm_sfrbx_tree
, hf_ubx_rxm_sfrbx_gnssid
,
1753 tvb
, 0, 1, ENC_NA
, &gnssid
);
1754 proto_tree_add_item(ubx_rxm_sfrbx_tree
, hf_ubx_rxm_sfrbx_svid
,
1757 case 0x01: proto_tree_add_item(ubx_rxm_sfrbx_tree
,
1758 hf_ubx_rxm_sfrbx_reserved1
, tvb
, 2, 1, ENC_NA
);
1760 case 0x02: proto_tree_add_item(ubx_rxm_sfrbx_tree
,
1761 hf_ubx_rxm_sfrbx_sigid
, tvb
, 2, 1, ENC_NA
);
1764 proto_tree_add_item(ubx_rxm_sfrbx_tree
, hf_ubx_rxm_sfrbx_freqid
,
1766 proto_tree_add_item(ubx_rxm_sfrbx_tree
, hf_ubx_rxm_sfrbx_numwords
,
1769 case 0x01: proto_tree_add_item(ubx_rxm_sfrbx_tree
,
1770 hf_ubx_rxm_sfrbx_reserved2
, tvb
, 5, 1, ENC_NA
);
1772 case 0x02: proto_tree_add_item(ubx_rxm_sfrbx_tree
,
1773 hf_ubx_rxm_sfrbx_chn
, tvb
, 5, 1, ENC_NA
);
1776 proto_tree_add_item(ubx_rxm_sfrbx_tree
, hf_ubx_rxm_sfrbx_version
,
1779 case 0x01: proto_tree_add_item(ubx_rxm_sfrbx_tree
,
1780 hf_ubx_rxm_sfrbx_reserved3
, tvb
, 7, 1, ENC_NA
);
1782 case 0x02: proto_tree_add_item(ubx_rxm_sfrbx_tree
,
1783 hf_ubx_rxm_sfrbx_reserved1
, tvb
, 7, 1, ENC_NA
);
1786 proto_tree_add_item(ubx_rxm_sfrbx_tree
, hf_ubx_rxm_sfrbx_dwrd
,
1787 tvb
, 8, numwords
* 4, ENC_NA
);
1789 if (gnssid
== GNSS_ID_GPS
) {
1790 // send the GPS nav msg (preprocessed by UBX) to the next dissector
1791 next_tvb
= tvb_new_subset_length(tvb
, 8, 4 * numwords
);
1794 // UBX-RXM-SFRBX has the nav msg encoded in little endian. As this is not
1795 // convenient for dissection, map to big endian and add as new data source.
1796 buf
= wmem_alloc(pinfo
->pool
, numwords
* 4);
1797 for (i
= 0; i
< numwords
; i
++) {
1798 phton32(buf
+ 4 * i
, tvb_get_uint32(tvb
, 8 + i
* 4, ENC_LITTLE_ENDIAN
));
1800 next_tvb
= tvb_new_child_real_data(tvb
, (uint8_t *)buf
, numwords
* 4, numwords
* 4);
1801 add_new_data_source(pinfo
, next_tvb
, "GNSS navigation message");
1804 // send the nav msg to the next dissector
1805 if (!dissector_try_uint(ubx_gnssid_dissector_table
, gnssid
, next_tvb
, pinfo
, tree
)) {
1806 call_data_dissector(next_tvb
, pinfo
, tree
);
1809 return tvb_captured_length(tvb
);
1812 void proto_register_ubx(void) {
1813 static hf_register_info hf
[] = {
1815 {"Preamble", "ubx.preamble",
1816 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1817 {&hf_ubx_msg_class_id
,
1818 {"Msg Class & ID", "ubx.msg_class_id",
1819 FT_UINT16
, BASE_HEX
, VALS(UBX_MSG_CLASS_ID
), 0x0, NULL
, HFILL
}},
1820 {&hf_ubx_payload_len
,
1821 {"Payload Length", "ubx.payload_len",
1822 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1824 {"Checksum", "ubx.checksum",
1825 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1829 {"UBX-ACK-ACK", "ubx.ack.ack",
1830 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1831 {&hf_ubx_ack_ack_msg_class_id
,
1832 {"Msg Class & ID", "ubx.ack.ack.msg_class_id",
1833 FT_UINT16
, BASE_HEX
, VALS(UBX_MSG_CLASS_ID
), 0x0, NULL
, HFILL
}},
1837 {"UBX-ACK-NAK", "ubx.ack.nak",
1838 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1839 {&hf_ubx_ack_nak_msg_class_id
,
1840 {"Msg Class & ID", "ubx.ack.nak.msg_class_id",
1841 FT_UINT16
, BASE_HEX
, VALS(UBX_MSG_CLASS_ID
), 0x0, NULL
, HFILL
}},
1845 {"UBX-CFG-GNSS", "ubx.cfg.gnss",
1846 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1847 {&hf_ubx_cfg_gnss_version
,
1848 {"Version", "ubx.cfg.gnss.version",
1849 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1850 {&hf_ubx_cfg_gnss_numtrkchhw
,
1851 {"Number of tracking channels available in hardware", "ubx.cfg.gnss.numtrkchhw",
1852 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1853 {&hf_ubx_cfg_gnss_numtrkchuse
,
1854 {"Number of tracking channels to use", "ubx.cfg.gnss.numtrkchuse",
1855 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1856 {&hf_ubx_cfg_gnss_numconfigblocks
,
1857 {"Number of configuration blocks following", "ubx.cfg.gnss.numconfigblocks",
1858 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1859 {&hf_ubx_cfg_gnss_blk_gnssid
,
1860 {"GNSS ID", "ubx.cfg.gnss.gnssid",
1861 FT_UINT8
, BASE_DEC
, VALS(UBX_GNSS_ID
), 0x0, NULL
, HFILL
}},
1862 {&hf_ubx_cfg_gnss_blk_restrkch
,
1863 {"Number of reserved (minimum) tracking channels", "ubx.cfg.gnss.restrkch",
1864 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1865 {&hf_ubx_cfg_gnss_blk_maxtrkch
,
1866 {"Maximum number of tracking channels", "ubx.cfg.gnss.maxtrkch",
1867 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1868 {&hf_ubx_cfg_gnss_blk_reserved1
,
1869 {"Reserved", "ubx.cfg.gnss.reserved1",
1870 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1871 {&hf_ubx_cfg_gnss_blk_enable
,
1872 {"Enabled", "ubx.cfg.gnss.enabled",
1873 FT_UINT32
, BASE_HEX
, NULL
, 0x00000001, NULL
, HFILL
}},
1874 {&hf_ubx_cfg_gnss_blk_sigcfgmask
,
1875 {"Signal configuration mask", "ubx.cfg.gnss.sigcfgmask",
1876 FT_UINT32
, BASE_HEX
, NULL
, 0x00ff0000, NULL
, HFILL
}},
1877 {&hf_ubx_cfg_gnss_blk_gps_sigcfgmask
,
1878 {"Signal configuration mask", "ubx.cfg.gnss.sigcfgmask",
1879 FT_UINT32
, BASE_HEX
, VALS(UBX_CFG_GNSS_GPS_SIGCFGMASK
), 0x00ff0000, NULL
, HFILL
}},
1880 {&hf_ubx_cfg_gnss_blk_sbas_sigcfgmask
,
1881 {"Signal configuration mask", "ubx.cfg.gnss.sigcfgmask",
1882 FT_UINT32
, BASE_HEX
, VALS(UBX_CFG_GNSS_SBAS_SIGCFGMASK
), 0x00ff0000, NULL
, HFILL
}},
1883 {&hf_ubx_cfg_gnss_blk_gal_sigcfgmask
,
1884 {"Signal configuration mask", "ubx.cfg.gnss.sigcfgmask",
1885 FT_UINT32
, BASE_HEX
, VALS(UBX_CFG_GNSS_GAL_SIGCFGMASK
), 0x00ff0000, NULL
, HFILL
}},
1886 {&hf_ubx_cfg_gnss_blk_bds_sigcfgmask
,
1887 {"Signal configuration mask", "ubx.cfg.gnss.sigcfgmask",
1888 FT_UINT32
, BASE_HEX
, VALS(UBX_CFG_GNSS_BDS_SIGCFGMASK
), 0x00ff0000, NULL
, HFILL
}},
1889 {&hf_ubx_cfg_gnss_blk_imes_sigcfgmask
,
1890 {"Signal configuration mask", "ubx.cfg.gnss.sigcfgmask",
1891 FT_UINT32
, BASE_HEX
, VALS(UBX_CFG_GNSS_IMES_SIGCFGMASK
), 0x00ff0000, NULL
, HFILL
}},
1892 {&hf_ubx_cfg_gnss_blk_qzss_sigcfgmask
,
1893 {"Signal configuration mask", "ubx.cfg.gnss.sigcfgmask",
1894 FT_UINT32
, BASE_HEX
, VALS(UBX_CFG_GNSS_QZSS_SIGCFGMASK
), 0x00ff0000, NULL
, HFILL
}},
1895 {&hf_ubx_cfg_gnss_blk_glo_sigcfgmask
,
1896 {"Signal configuration mask", "ubx.cfg.gnss.sigcfgmask",
1897 FT_UINT32
, BASE_HEX
, VALS(UBX_CFG_GNSS_GLO_SIGCFGMASK
), 0x00ff0000, NULL
, HFILL
}},
1901 {"UBX-CFG-SBAS", "ubx.cfg.sbas",
1902 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
1903 {&hf_ubx_cfg_sbas_mode
,
1904 {"SBAS mode", "ubx.cfg.sbas.mode",
1905 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
1906 {&hf_ubx_cfg_sbas_mode_enabled
,
1907 {"SBAS enabled", "ubx.cfg.sbas.mode.enabled",
1908 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
1909 {&hf_ubx_cfg_sbas_mode_test
,
1910 {"SBAS testbed", "ubx.cfg.sbas.mode.test",
1911 FT_UINT8
, BASE_HEX
, VALS(UBX_SBAS_TESTBED
), 0x02, NULL
, HFILL
}},
1912 {&hf_ubx_cfg_sbas_usage_range
,
1913 {"Use SBAS GEOs as a ranging source (for navigation)", "ubx.cfg.sbas.usage.range",
1914 FT_UINT8
, BASE_HEX
, NULL
, 0x01, NULL
, HFILL
}},
1915 {&hf_ubx_cfg_sbas_usage_diffcorr
,
1916 {"Use SBAS differential corrections", "ubx.cfg.sbas.usage.diffcorr",
1917 FT_UINT8
, BASE_HEX
, NULL
, 0x02, NULL
, HFILL
}},
1918 {&hf_ubx_cfg_sbas_usage_integrity
,
1919 {"Use SBAS integrity information", "ubx.cfg.sbas.usage.integrity",
1920 FT_UINT8
, BASE_HEX
, NULL
, 0x04, NULL
, HFILL
}},
1921 {&hf_ubx_cfg_sbas_max_sbas
,
1922 {"Maximum number of SBAS prioritized tracking channels to use", "ubx.cfg.sbas.maxsbas",
1923 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
1924 {&hf_ubx_cfg_sbas_scanmode_prn158
,
1925 {"PRN 158", "ubx.cfg.sbas.scanmode.prn158",
1926 FT_UINT8
, BASE_HEX
, NULL
, 0x40, NULL
, HFILL
}},
1927 {&hf_ubx_cfg_sbas_scanmode_prn157
,
1928 {"PRN 157", "ubx.cfg.sbas.scanmode.prn157",
1929 FT_UINT8
, BASE_HEX
, NULL
, 0x20, NULL
, HFILL
}},
1930 {&hf_ubx_cfg_sbas_scanmode_prn156
,
1931 {"PRN 156", "ubx.cfg.sbas.scanmode.prn156",
1932 FT_UINT8
, BASE_HEX
, NULL
, 0x10, NULL
, HFILL
}},
1933 {&hf_ubx_cfg_sbas_scanmode_prn155
,
1934 {"PRN 155", "ubx.cfg.sbas.scanmode.prn155",
1935 FT_UINT8
, BASE_HEX
, NULL
, 0x08, NULL
, HFILL
}},
1936 {&hf_ubx_cfg_sbas_scanmode_prn154
,
1937 {"PRN 154", "ubx.cfg.sbas.scanmode.prn154",
1938 FT_UINT8
, BASE_HEX
, NULL
, 0x04, NULL
, HFILL
}},
1939 {&hf_ubx_cfg_sbas_scanmode_prn153
,
1940 {"PRN 153", "ubx.cfg.sbas.scanmode.prn153",
1941 FT_UINT8
, BASE_HEX
, NULL
, 0x02, NULL
, HFILL
}},
1942 {&hf_ubx_cfg_sbas_scanmode_prn152
,
1943 {"PRN 152", "ubx.cfg.sbas.scanmode.prn152",
1944 FT_UINT8
, BASE_HEX
, NULL
, 0x01, NULL
, HFILL
}},
1945 {&hf_ubx_cfg_sbas_scanmode_prn151
,
1946 {"PRN 151", "ubx.cfg.sbas.scanmode.prn151",
1947 FT_UINT32
, BASE_HEX
, NULL
, 0x80000000, NULL
, HFILL
}},
1948 {&hf_ubx_cfg_sbas_scanmode_prn150
,
1949 {"PRN 150", "ubx.cfg.sbas.scanmode.prn150",
1950 FT_UINT32
, BASE_HEX
, NULL
, 0x40000000, NULL
, HFILL
}},
1951 {&hf_ubx_cfg_sbas_scanmode_prn149
,
1952 {"PRN 149", "ubx.cfg.sbas.scanmode.prn149",
1953 FT_UINT32
, BASE_HEX
, NULL
, 0x20000000, NULL
, HFILL
}},
1954 {&hf_ubx_cfg_sbas_scanmode_prn148
,
1955 {"PRN 148", "ubx.cfg.sbas.scanmode.prn148",
1956 FT_UINT32
, BASE_HEX
, NULL
, 0x10000000, NULL
, HFILL
}},
1957 {&hf_ubx_cfg_sbas_scanmode_prn147
,
1958 {"PRN 147", "ubx.cfg.sbas.scanmode.prn147",
1959 FT_UINT32
, BASE_HEX
, NULL
, 0x08000000, NULL
, HFILL
}},
1960 {&hf_ubx_cfg_sbas_scanmode_prn146
,
1961 {"PRN 146", "ubx.cfg.sbas.scanmode.prn146",
1962 FT_UINT32
, BASE_HEX
, NULL
, 0x04000000, NULL
, HFILL
}},
1963 {&hf_ubx_cfg_sbas_scanmode_prn145
,
1964 {"PRN 145", "ubx.cfg.sbas.scanmode.prn145",
1965 FT_UINT32
, BASE_HEX
, NULL
, 0x02000000, NULL
, HFILL
}},
1966 {&hf_ubx_cfg_sbas_scanmode_prn144
,
1967 {"PRN 144", "ubx.cfg.sbas.scanmode.prn144",
1968 FT_UINT32
, BASE_HEX
, NULL
, 0x01000000, NULL
, HFILL
}},
1969 {&hf_ubx_cfg_sbas_scanmode_prn143
,
1970 {"PRN 143", "ubx.cfg.sbas.scanmode.prn143",
1971 FT_UINT32
, BASE_HEX
, NULL
, 0x00800000, NULL
, HFILL
}},
1972 {&hf_ubx_cfg_sbas_scanmode_prn142
,
1973 {"PRN 142", "ubx.cfg.sbas.scanmode.prn142",
1974 FT_UINT32
, BASE_HEX
, NULL
, 0x00400000, NULL
, HFILL
}},
1975 {&hf_ubx_cfg_sbas_scanmode_prn141
,
1976 {"PRN 141", "ubx.cfg.sbas.scanmode.prn141",
1977 FT_UINT32
, BASE_HEX
, NULL
, 0x00200000, NULL
, HFILL
}},
1978 {&hf_ubx_cfg_sbas_scanmode_prn140
,
1979 {"PRN 140", "ubx.cfg.sbas.scanmode.prn140",
1980 FT_UINT32
, BASE_HEX
, NULL
, 0x00100000, NULL
, HFILL
}},
1981 {&hf_ubx_cfg_sbas_scanmode_prn139
,
1982 {"PRN 139", "ubx.cfg.sbas.scanmode.prn139",
1983 FT_UINT32
, BASE_HEX
, NULL
, 0x00080000, NULL
, HFILL
}},
1984 {&hf_ubx_cfg_sbas_scanmode_prn138
,
1985 {"PRN 138", "ubx.cfg.sbas.scanmode.prn138",
1986 FT_UINT32
, BASE_HEX
, NULL
, 0x00040000, NULL
, HFILL
}},
1987 {&hf_ubx_cfg_sbas_scanmode_prn137
,
1988 {"PRN 137", "ubx.cfg.sbas.scanmode.prn137",
1989 FT_UINT32
, BASE_HEX
, NULL
, 0x00020000, NULL
, HFILL
}},
1990 {&hf_ubx_cfg_sbas_scanmode_prn136
,
1991 {"PRN 136", "ubx.cfg.sbas.scanmode.prn136",
1992 FT_UINT32
, BASE_HEX
, NULL
, 0x00010000, NULL
, HFILL
}},
1993 {&hf_ubx_cfg_sbas_scanmode_prn135
,
1994 {"PRN 135", "ubx.cfg.sbas.scanmode.prn135",
1995 FT_UINT32
, BASE_HEX
, NULL
, 0x00008000, NULL
, HFILL
}},
1996 {&hf_ubx_cfg_sbas_scanmode_prn134
,
1997 {"PRN 134", "ubx.cfg.sbas.scanmode.prn134",
1998 FT_UINT32
, BASE_HEX
, NULL
, 0x00004000, NULL
, HFILL
}},
1999 {&hf_ubx_cfg_sbas_scanmode_prn133
,
2000 {"PRN 133", "ubx.cfg.sbas.scanmode.prn133",
2001 FT_UINT32
, BASE_HEX
, NULL
, 0x00002000, NULL
, HFILL
}},
2002 {&hf_ubx_cfg_sbas_scanmode_prn132
,
2003 {"PRN 132", "ubx.cfg.sbas.scanmode.prn132",
2004 FT_UINT32
, BASE_HEX
, NULL
, 0x00001000, NULL
, HFILL
}},
2005 {&hf_ubx_cfg_sbas_scanmode_prn131
,
2006 {"PRN 131", "ubx.cfg.sbas.scanmode.prn131",
2007 FT_UINT32
, BASE_HEX
, NULL
, 0x00000800, NULL
, HFILL
}},
2008 {&hf_ubx_cfg_sbas_scanmode_prn130
,
2009 {"PRN 130", "ubx.cfg.sbas.scanmode.prn130",
2010 FT_UINT32
, BASE_HEX
, NULL
, 0x00000400, NULL
, HFILL
}},
2011 {&hf_ubx_cfg_sbas_scanmode_prn129
,
2012 {"PRN 129", "ubx.cfg.sbas.scanmode.prn129",
2013 FT_UINT32
, BASE_HEX
, NULL
, 0x00000200, NULL
, HFILL
}},
2014 {&hf_ubx_cfg_sbas_scanmode_prn128
,
2015 {"PRN 128", "ubx.cfg.sbas.scanmode.prn128",
2016 FT_UINT32
, BASE_HEX
, NULL
, 0x00000100, NULL
, HFILL
}},
2017 {&hf_ubx_cfg_sbas_scanmode_prn127
,
2018 {"PRN 127", "ubx.cfg.sbas.scanmode.prn127",
2019 FT_UINT32
, BASE_HEX
, NULL
, 0x00000080, NULL
, HFILL
}},
2020 {&hf_ubx_cfg_sbas_scanmode_prn126
,
2021 {"PRN 126", "ubx.cfg.sbas.scanmode.prn126",
2022 FT_UINT32
, BASE_HEX
, NULL
, 0x00000040, NULL
, HFILL
}},
2023 {&hf_ubx_cfg_sbas_scanmode_prn125
,
2024 {"PRN 125", "ubx.cfg.sbas.scanmode.prn125",
2025 FT_UINT32
, BASE_HEX
, NULL
, 0x00000020, NULL
, HFILL
}},
2026 {&hf_ubx_cfg_sbas_scanmode_prn124
,
2027 {"PRN 124", "ubx.cfg.sbas.scanmode.prn124",
2028 FT_UINT32
, BASE_HEX
, NULL
, 0x00000010, NULL
, HFILL
}},
2029 {&hf_ubx_cfg_sbas_scanmode_prn123
,
2030 {"PRN 123", "ubx.cfg.sbas.scanmode.prn123",
2031 FT_UINT32
, BASE_HEX
, NULL
, 0x00000008, NULL
, HFILL
}},
2032 {&hf_ubx_cfg_sbas_scanmode_prn122
,
2033 {"PRN 122", "ubx.cfg.sbas.scanmode.prn122",
2034 FT_UINT32
, BASE_HEX
, NULL
, 0x00000004, NULL
, HFILL
}},
2035 {&hf_ubx_cfg_sbas_scanmode_prn121
,
2036 {"PRN 121", "ubx.cfg.sbas.scanmode.prn121",
2037 FT_UINT32
, BASE_HEX
, NULL
, 0x00000002, NULL
, HFILL
}},
2038 {&hf_ubx_cfg_sbas_scanmode_prn120
,
2039 {"PRN 120", "ubx.cfg.sbas.scanmode.prn120",
2040 FT_UINT32
, BASE_HEX
, NULL
, 0x00000001, NULL
, HFILL
}},
2044 {"UBX-NAV-DOP", "ubx.nav.dop",
2045 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2046 {&hf_ubx_nav_dop_itow
,
2047 {"iTOW", "ubx.nav.dop.itow",
2048 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2049 {&hf_ubx_nav_dop_gdop
,
2050 {"Geometric DOP", "ubx.nav.dop.gdop",
2051 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_dop
), 0x0, NULL
, HFILL
}},
2052 {&hf_ubx_nav_dop_pdop
,
2053 {"Position DOP", "ubx.nav.dop.pdop",
2054 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_dop
), 0x0, NULL
, HFILL
}},
2055 {&hf_ubx_nav_dop_tdop
,
2056 {"Time DOP", "ubx.nav.dop.tdop",
2057 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_dop
), 0x0, NULL
, HFILL
}},
2058 {&hf_ubx_nav_dop_vdop
,
2059 {"Vertical DOP", "ubx.nav.dop.vdop",
2060 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_dop
), 0x0, NULL
, HFILL
}},
2061 {&hf_ubx_nav_dop_hdop
,
2062 {"Horizontal DOP", "ubx.nav.dop.hdop",
2063 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_dop
), 0x0, NULL
, HFILL
}},
2064 {&hf_ubx_nav_dop_ndop
,
2065 {"Northing DOP", "ubx.nav.dop.ndop",
2066 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_dop
), 0x0, NULL
, HFILL
}},
2067 {&hf_ubx_nav_dop_edop
,
2068 {"Easting DOP", "ubx.nav.dop.edop",
2069 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_dop
), 0x0, NULL
, HFILL
}},
2073 {"UBX-NAV-EOE", "ubx.nav.eoe",
2074 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2075 {&hf_ubx_nav_eoe_itow
,
2076 {"iTOW", "ubx.nav.eoe.itow",
2077 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2081 {"UBX-NAV-ODO", "ubx.nav.odo",
2082 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2083 {&hf_ubx_nav_odo_version
,
2084 {"Version", "ubx.nav.odo.version",
2085 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2086 {&hf_ubx_nav_odo_reserved1
,
2087 {"Reserved", "ubx.nav.odo.reserved1",
2088 FT_UINT24
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2089 {&hf_ubx_nav_odo_itow
,
2090 {"iTOW", "ubx.nav.odo.itow",
2091 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2092 {&hf_ubx_nav_odo_distance
,
2093 {"Ground distance since last reset", "ubx.nav.odo.distance",
2094 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_meter_meters
), 0x0, NULL
, HFILL
}},
2095 {&hf_ubx_nav_odo_totaldistance
,
2096 {"Total cumulative ground distance", "ubx.nav.odo.totaldistance",
2097 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_meter_meters
), 0x0, NULL
, HFILL
}},
2098 {&hf_ubx_nav_odo_distancestd
,
2099 {"Ground distance accuracy (1-sigma)", "ubx.nav.odo.distancestd",
2100 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_meter_meters
), 0x0, NULL
, HFILL
}},
2103 {&hf_ubx_nav_posecef
,
2104 {"UBX-NAV-POSECEF", "ubx.nav.posecef",
2105 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2106 {&hf_ubx_nav_posecef_itow
,
2107 {"iTOW", "ubx.nav.posecef.itow",
2108 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2109 {&hf_ubx_nav_posecef_ecefx
,
2110 {"ECEF X coordinate", "ubx.nav.posecef.ecefx",
2111 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_centimeters
), 0x0, NULL
, HFILL
}},
2112 {&hf_ubx_nav_posecef_ecefy
,
2113 {"ECEF Y coordinate", "ubx.nav.posecef.ecefy",
2114 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_centimeters
), 0x0, NULL
, HFILL
}},
2115 {&hf_ubx_nav_posecef_ecefz
,
2116 {"ECEF Z coordinate", "ubx.nav.posecef.ecefz",
2117 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_centimeters
), 0x0, NULL
, HFILL
}},
2118 {&hf_ubx_nav_posecef_pacc
,
2119 {"Position accuracy estimate", "ubx.nav.posecef.pacc",
2120 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_centimeters
), 0x0, NULL
, HFILL
}},
2124 {"UBX-NAV-PVT", "ubx.nav.pvt",
2125 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2126 {&hf_ubx_nav_pvt_itow
,
2127 {"iTOW", "ubx.nav.pvt.itow",
2128 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2129 {&hf_ubx_nav_pvt_year
,
2130 {"Year", "ubx.nav.pvt.year",
2131 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2132 {&hf_ubx_nav_pvt_month
,
2133 {"Month", "ubx.nav.pvt.month",
2134 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2135 {&hf_ubx_nav_pvt_day
,
2136 {"Day", "ubx.nav.pvt.day",
2137 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2138 {&hf_ubx_nav_pvt_hour
,
2139 {"Hour", "ubx.nav.pvt.hour",
2140 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2141 {&hf_ubx_nav_pvt_min
,
2142 {"Minute", "ubx.nav.pvt.min",
2143 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2144 {&hf_ubx_nav_pvt_sec
,
2145 {"Seconds", "ubx.nav.pvt.sec",
2146 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2147 {&hf_ubx_nav_pvt_valid
,
2148 {"Validity flags", "ubx.nav.pvt.valid",
2149 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2150 {&hf_ubx_nav_pvt_validmag
,
2151 {"Valid magnetic declination", "ubx.nav.pvt.valid.validmag",
2152 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
2153 {&hf_ubx_nav_pvt_fullyresolved
,
2154 {"UTC time of day fully resolved", "ubx.nav.pvt.valid.fullyresolved",
2155 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
2156 {&hf_ubx_nav_pvt_validtime
,
2157 {"valid UTC time of day", "ubx.nav.pvt.valid.validtime",
2158 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
2159 {&hf_ubx_nav_pvt_validdate
,
2160 {"valid UTC date", "ubx.nav.pvt.valid.validdate",
2161 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
2162 {&hf_ubx_nav_pvt_tacc
,
2163 {"Time accuracy estimate", "ubx.nav.pvt.tacc",
2164 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_nanoseconds
), 0x0, NULL
, HFILL
}},
2165 {&hf_ubx_nav_pvt_nano
,
2166 {"UTC fraction of second", "ubx.nav.pvt.nano",
2167 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_nanoseconds
), 0x0, NULL
, HFILL
}},
2168 {&hf_ubx_nav_pvt_fixtype
,
2169 {"GNSS fix type", "ubx.nav.pvt.fixtype",
2170 FT_UINT8
, BASE_DEC
, VALS(UBX_GNSS_FIX_TYPE
), 0x0, NULL
, HFILL
}},
2171 {&hf_ubx_nav_pvt_flags
,
2172 {"Fix status flags", "ubx.nav.pvt.flags",
2173 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2174 {&hf_ubx_nav_pvt_headvehvalid
,
2175 {"heading of vehicle is valid", "ubx.nav.pvt.flags.headvehvalid",
2176 FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
2177 {&hf_ubx_nav_pvt_psmstate
,
2178 {"PSM state", "ubx.nav.pvt.flags.psmstate",
2179 FT_UINT8
, BASE_DEC
, NULL
, 0x1c, NULL
, HFILL
}},
2180 {&hf_ubx_nav_pvt_diffsoln
,
2181 {"differential corrections were applied", "ubx.nav.pvt.flags.diffsoln",
2182 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
2183 {&hf_ubx_nav_pvt_gnssfixok
,
2184 {"valid fix", "ubx.nav.pvt.flags.gnssfixok",
2185 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
2186 {&hf_ubx_nav_pvt_flags2
,
2187 {"Additional flags", "ubx.nav.pvt.flags2",
2188 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2189 {&hf_ubx_nav_pvt_confirmedtime
,
2190 {"UTC time of day could be confirmed", "ubx.nav.pvt.flags2.confirmedtime",
2191 FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
2192 {&hf_ubx_nav_pvt_confirmeddate
,
2193 {"UTC date could be validated", "ubx.nav.pvt.flags2.confirmeddate",
2194 FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
2195 {&hf_ubx_nav_pvt_confirmedavai
,
2196 {"information about UTC date and time of day validity confirmation is available", "ubx.nav.pvt.flags2.confirmedavai",
2197 FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
2198 {&hf_ubx_nav_pvt_numsv
,
2199 {"Number of satellite vehicles used in Nav solution", "ubx.nav.pvt.numsv",
2200 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2201 {&hf_ubx_nav_pvt_lon
,
2202 {"Longitude", "ubx.nav.pvt.lon",
2203 FT_INT32
, BASE_CUSTOM
, CF_FUNC(&fmt_lat_lon
), 0x0, NULL
, HFILL
}},
2204 {&hf_ubx_nav_pvt_lat
,
2205 {"Latitude", "ubx.nav.pvt.lat",
2206 FT_INT32
, BASE_CUSTOM
, CF_FUNC(&fmt_lat_lon
), 0x0, NULL
, HFILL
}},
2207 {&hf_ubx_nav_pvt_height
,
2208 {"Height above ellipsoid", "ubx.nav.pvt.height",
2209 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_millimeters
), 0x0, NULL
, HFILL
}},
2210 {&hf_ubx_nav_pvt_hmsl
,
2211 {"Height above mean sea level", "ubx.nav.pvt.hmsl",
2212 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_millimeters
), 0x0, NULL
, HFILL
}},
2213 {&hf_ubx_nav_pvt_hacc
,
2214 {"Horizontal accuracy estimate", "ubx.nav.pvt.hacc",
2215 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_millimeters
), 0x0, NULL
, HFILL
}},
2216 {&hf_ubx_nav_pvt_vacc
,
2217 {"Vertical accuracy estimate", "ubx.nav.pvt.vacc",
2218 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_millimeters
), 0x0, NULL
, HFILL
}},
2219 {&hf_ubx_nav_pvt_veln
,
2220 {"NED north velocity", "ubx.nav.pvt.veln",
2221 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_mm_s
), 0x0, NULL
, HFILL
}},
2222 {&hf_ubx_nav_pvt_vele
,
2223 {"NED east velocity", "ubx.nav.pvt.vele",
2224 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_mm_s
), 0x0, NULL
, HFILL
}},
2225 {&hf_ubx_nav_pvt_veld
,
2226 {"NED down velocity", "ubx.nav.pvt.veld",
2227 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_mm_s
), 0x0, NULL
, HFILL
}},
2228 {&hf_ubx_nav_pvt_gspeed
,
2229 {"Ground speed (2-D)", "ubx.nav.pvt.gspeed",
2230 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_mm_s
), 0x0, NULL
, HFILL
}},
2231 {&hf_ubx_nav_pvt_headmot
,
2232 {"Heading of motion (2-D)", "ubx.nav.pvt.headmot",
2233 FT_INT32
, BASE_CUSTOM
, CF_FUNC(&fmt_heading
), 0x0, NULL
, HFILL
}},
2234 {&hf_ubx_nav_pvt_sacc
,
2235 {"Speed accuracy estimate", "ubx.nav.pvt.sacc",
2236 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_mm_s
), 0x0, NULL
, HFILL
}},
2237 {&hf_ubx_nav_pvt_headacc
,
2238 {"Heading accuracy estimate", "ubx.nav.pvt.headacc",
2239 FT_UINT32
, BASE_CUSTOM
, CF_FUNC(&fmt_heading_acc
), 0x0, NULL
, HFILL
}},
2240 {&hf_ubx_nav_pvt_pdop
,
2241 {"Position DOP", "ubx.nav.pvt.pdop",
2242 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_dop
), 0x0, NULL
, HFILL
}},
2243 {&hf_ubx_nav_pvt_lastcorrectionage
,
2244 {"Age of the most recently received differential correction", "ubx.nav.pvt.lastcorrectionage",
2245 FT_UINT16
, BASE_DEC
, VALS(UBX_LAST_CORRECTION_AGE
), 0x001e, NULL
, HFILL
}},
2246 {&hf_ubx_nav_pvt_invalidllh
,
2247 {"Invalid lon, lat, height, and hMSL", "ubx.nav.pvt.invalidllh",
2248 FT_BOOLEAN
, 16, NULL
, 0x0001, NULL
, HFILL
}},
2249 {&hf_ubx_nav_pvt_reserved1
,
2250 {"Reserved 1", "ubx.nav.pvt.reserved1",
2251 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2252 {&hf_ubx_nav_pvt_headveh
,
2253 {"Heading of vehicle (2-D)", "ubx.nav.pvt.headveh",
2254 FT_INT32
, BASE_CUSTOM
, CF_FUNC(&fmt_heading
), 0x0, NULL
, HFILL
}},
2255 {&hf_ubx_nav_pvt_magdec
,
2256 {"Magnetic declination", "ubx.nav.pvt.magdec",
2257 FT_INT16
, BASE_CUSTOM
, CF_FUNC(&fmt_decl
), 0x0, NULL
, HFILL
}},
2258 {&hf_ubx_nav_pvt_magacc
,
2259 {"Magnetic declination accuracy", "ubx.nav.pvt.magacc",
2260 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_decl_acc
), 0x0, NULL
, HFILL
}},
2264 {"UBX-NAV-SAT", "ubx.nav.sat",
2265 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2266 {&hf_ubx_nav_sat_itow
,
2267 {"iTOW", "ubx.nav.sat.itow",
2268 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2269 {&hf_ubx_nav_sat_version
,
2270 {"Version", "ubx.nav.sat.version",
2271 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2272 {&hf_ubx_nav_sat_num_svs
,
2273 {"Number of satellites", "ubx.nav.sat.num_svs",
2274 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2275 {&hf_ubx_nav_sat_reserved1
,
2276 {"Reserved", "ubx.nav.sat.reserved1",
2277 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2278 {&hf_ubx_nav_sat_gnss_id
,
2279 {"GNSS ID", "ubx.nav.sat.gnss_id",
2280 FT_UINT8
, BASE_DEC
, VALS(UBX_GNSS_ID
), 0x0, NULL
, HFILL
}},
2281 {&hf_ubx_nav_sat_sv_id
,
2282 {"SV ID", "ubx.nav.sat.sv_id",
2283 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2284 {&hf_ubx_nav_sat_cn0
,
2285 {"C/N0", "ubx.nav.sat.cn0",
2286 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_dbhz
), 0x0, NULL
, HFILL
}},
2287 {&hf_ubx_nav_sat_elev
,
2288 {"Elevation", "ubx.nav.sat.elev",
2289 FT_INT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2290 {&hf_ubx_nav_sat_azim
,
2291 {"Azimuth", "ubx.nav.sat.azim",
2292 FT_INT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2293 {&hf_ubx_nav_sat_pr_res
,
2294 {"Pseudorange residual", "ubx.nav.sat.pr_res",
2295 FT_INT16
, BASE_CUSTOM
, CF_FUNC(&fmt_pr_res
), 0x0, NULL
, HFILL
}},
2296 {&hf_ubx_nav_sat_flags
,
2297 {"Bitmask", "ubx.nav.sat.flags",
2298 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2299 {&hf_ubx_nav_sat_quality_ind
,
2300 {"Signal quality indicator", "ubx.nav.sat.flags.quality_ind",
2301 FT_UINT32
, BASE_HEX
, VALS(UBX_SIGNAL_QUALITY_INDICATOR
), 0x00000007, NULL
, HFILL
}},
2302 {&hf_ubx_nav_sat_sv_used
,
2303 {"Signal used for navigation", "ubx.nav.sat.flags.sv_used",
2304 FT_UINT32
, BASE_HEX
, NULL
, 0x00000008, NULL
, HFILL
}},
2305 {&hf_ubx_nav_sat_health
,
2306 {"Signal health", "ubx.nav.sat.flags.health",
2307 FT_UINT32
, BASE_HEX
, VALS(UBX_SIGNAL_HEALTH
), 0x00000030, NULL
, HFILL
}},
2308 {&hf_ubx_nav_sat_diff_corr
,
2309 {"Differential correction available", "ubx.nav.sat.flags.diff_corr",
2310 FT_UINT32
, BASE_HEX
, NULL
, 0x00000040, NULL
, HFILL
}},
2311 {&hf_ubx_nav_sat_smoothed
,
2312 {"Carrier smoothed pseudorange used", "ubx.nav.sat.flags.smoothed",
2313 FT_UINT32
, BASE_HEX
, NULL
, 0x00000080, NULL
, HFILL
}},
2314 {&hf_ubx_nav_sat_orbit_src
,
2315 {"Orbit source", "ubx.nav.sat.flags.orbit_src",
2316 FT_UINT32
, BASE_HEX
, VALS(UBX_ORBIT_SOURCE
), 0x00000700, NULL
, HFILL
}},
2317 {&hf_ubx_nav_sat_eph_avail
,
2318 {"Ephemeris available", "ubx.nav.sat.flags.eph_avail",
2319 FT_UINT32
, BASE_HEX
, NULL
, 0x00000800, NULL
, HFILL
}},
2320 {&hf_ubx_nav_sat_alm_avail
,
2321 {"Almanac available", "ubx.nav.sat.flags.alm_avail",
2322 FT_UINT32
, BASE_HEX
, NULL
, 0x00001000, NULL
, HFILL
}},
2323 {&hf_ubx_nav_sat_ano_avail
,
2324 {"AssistNow Offline data available", "ubx.nav.sat.flags.ano_avail",
2325 FT_UINT32
, BASE_HEX
, NULL
, 0x00002000, NULL
, HFILL
}},
2326 {&hf_ubx_nav_sat_aop_avail
,
2327 {"AssistNow Autonomous data available", "ubx.nav.sat.flags.aop_avail",
2328 FT_UINT32
, BASE_HEX
, NULL
, 0x00004000, NULL
, HFILL
}},
2329 {&hf_ubx_nav_sat_sbas_corr_used
,
2330 {"SBAS corrections used", "ubx.nav.sat.flags.sbas_corr_used",
2331 FT_UINT32
, BASE_HEX
, NULL
, 0x00010000, NULL
, HFILL
}},
2332 {&hf_ubx_nav_sat_rtcm_corr_used
,
2333 {"RTCM corrections used", "ubx.nav.sat.flags.rtcm_corr_used",
2334 FT_UINT32
, BASE_HEX
, NULL
, 0x00020000, NULL
, HFILL
}},
2335 {&hf_ubx_nav_sat_slas_corr_used
,
2336 {"QZSS SLAS corrections used", "ubx.nav.sat.flags.slas_corr_used",
2337 FT_UINT32
, BASE_HEX
, NULL
, 0x00040000, NULL
, HFILL
}},
2338 {&hf_ubx_nav_sat_spartn_corr_used
,
2339 {"SPARTN corrections used", "ubx.nav.sat.flags.spartn_corr_used",
2340 FT_UINT32
, BASE_HEX
, NULL
, 0x00080000, NULL
, HFILL
}},
2341 {&hf_ubx_nav_sat_pr_corr_used
,
2342 {"Pseudorange corrections used", "ubx.nav.sat.flags.pr_corr_used",
2343 FT_UINT32
, BASE_HEX
, NULL
, 0x00100000, NULL
, HFILL
}},
2344 {&hf_ubx_nav_sat_cr_corr_used
,
2345 {"Carrier range corrections used", "ubx.nav.sat.flags.cr_corr_used",
2346 FT_UINT32
, BASE_HEX
, NULL
, 0x00200000, NULL
, HFILL
}},
2347 {&hf_ubx_nav_sat_do_corr_used
,
2348 {"Range rate (Doppler) corrections used", "ubx.nav.sat.flags.do_corr_used",
2349 FT_UINT32
, BASE_HEX
, NULL
, 0x00400000, NULL
, HFILL
}},
2353 {"UBX-NAV-SBAS", "ubx.nav.sbas",
2354 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2355 {&hf_ubx_nav_sbas_itow
,
2356 {"iTOW", "ubx.nav.sbas.itow",
2357 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2358 {&hf_ubx_nav_sbas_geo
,
2359 {"GEO PRN", "ubx.nav.sbas.geo",
2360 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2361 {&hf_ubx_nav_sbas_mode
,
2362 {"SBAS Mode", "ubx.nav.sbas.mode",
2363 FT_UINT8
, BASE_DEC
, VALS(UBX_SBAS_MODE
), 0x0, NULL
, HFILL
}},
2364 {&hf_ubx_nav_sbas_sys
,
2365 {"SBAS System", "ubx.nav.sbas.sys",
2366 FT_INT8
, BASE_DEC
, VALS(UBX_SBAS_SYSTEM
), 0x0, NULL
, HFILL
}},
2367 {&hf_ubx_nav_sbas_service
,
2368 {"SBAS Services available", "ubx.nav.sbas.service",
2369 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2370 {&hf_ubx_nav_sbas_service_ranging
,
2371 {"GEO may be used as ranging source", "ubx.nav.sbas.service.ranging",
2372 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
2373 {&hf_ubx_nav_sbas_service_corrections
,
2374 {"GEO is providing correction data", "ubx.nav.sbas.service.corrections",
2375 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
2376 {&hf_ubx_nav_sbas_service_integrity
,
2377 {"GEO is providing integrity", "ubx.nav.sbas.service.integrity",
2378 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
2379 {&hf_ubx_nav_sbas_service_testmode
,
2380 {"GEO is in test mode", "ubx.nav.sbas.service.testmode",
2381 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
2382 {&hf_ubx_nav_sbas_service_bad
,
2383 {"Problem with signal or broadcast data indicated", "ubx.nav.sbas.service.bad",
2384 FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
2385 {&hf_ubx_nav_sbas_cnt
,
2386 {"Number of SV data following", "ubx.nav.sbas.cnt",
2387 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2388 {&hf_ubx_nav_sbas_reserved1
,
2389 {"Reserved", "ubx.nav.sbas.reserved1",
2390 FT_UINT24
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2391 {&hf_ubx_nav_sbas_sv_id
,
2392 {"SV ID", "ubx.nav.sbas.sv_id",
2393 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2394 {&hf_ubx_nav_sbas_flags
,
2395 {"Flags", "ubx.nav.sbas.flags",
2396 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2397 {&hf_ubx_nav_sbas_udre
,
2398 {"Monitoring status", "ubx.nav.sbas.udre",
2399 FT_UINT8
, BASE_DEC
, VALS(UDREI_EVALUATION
), 0x0, NULL
, HFILL
}},
2400 {&hf_ubx_nav_sbas_sv_sys
,
2401 {"System", "ubx.nav.sbas.sv_sys",
2402 FT_INT8
, BASE_DEC
, VALS(UBX_SBAS_SYSTEM
), 0x0, NULL
, HFILL
}},
2403 {&hf_ubx_nav_sbas_sv_service
,
2404 {"Service", "ubx.nav.sbas.sv_service",
2405 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2406 {&hf_ubx_nav_sbas_reserved2
,
2407 {"Reserved", "ubx.nav.sbas.reserved2",
2408 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2409 {&hf_ubx_nav_sbas_prc
,
2410 {"Pseudo Range correction", "ubx.nav.sbas.prc",
2411 FT_INT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_centimeter_centimeters
), 0x0, NULL
, HFILL
}},
2412 {&hf_ubx_nav_sbas_reserved3
,
2413 {"Reserved", "ubx.nav.sbas.reserved3",
2414 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2415 {&hf_ubx_nav_sbas_ic
,
2416 {"Ionosphere correction", "ubx.nav.sbas.ic",
2417 FT_INT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_centimeter_centimeters
), 0x0, NULL
, HFILL
}},
2420 {&hf_ubx_nav_timegps
,
2421 {"UBX-NAV-TIMEGPS", "ubx.nav.timegps",
2422 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2423 {&hf_ubx_nav_timegps_itow
,
2424 {"iTOW", "ubx.nav.timegps.itow",
2425 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2426 {&hf_ubx_nav_timegps_ftow
,
2427 {"fTOW", "ubx.nav.timegps.ftow",
2428 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_nanoseconds
), 0x0, NULL
, HFILL
}},
2429 {&hf_ubx_nav_timegps_week
,
2430 {"GPS week", "ubx.nav.timegps.week",
2431 FT_INT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2432 {&hf_ubx_nav_timegps_leaps
,
2433 {"GPS leap seconds", "ubx.nav.timegps.leaps",
2434 FT_INT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_seconds
), 0x0, NULL
, HFILL
}},
2435 {&hf_ubx_nav_timegps_valid
,
2436 {"Validity flags", "ubx.nav.timegps.valid",
2437 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2438 {&hf_ubx_nav_timegps_towvalid
,
2439 {"Valid GPS time of week", "ubx.nav.timegps.valid.towvalid",
2440 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
2441 {&hf_ubx_nav_timegps_weekvalid
,
2442 {"Valid GPS week number", "ubx.nav.timegps.valid.weekvalid",
2443 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
2444 {&hf_ubx_nav_timegps_leapsvalid
,
2445 {"Valid GPS leap seconds", "ubx.nav.timegps.valid.leapsvalid",
2446 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
2447 {&hf_ubx_nav_timegps_tacc
,
2448 {"Time accuracy estimate", "ubx.nav.timegps.tacc",
2449 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_seconds
), 0x0, NULL
, HFILL
}},
2452 {&hf_ubx_nav_timeutc
,
2453 {"UBX-NAV-TIMEUTC", "ubx.nav.timeutc",
2454 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2455 {&hf_ubx_nav_timeutc_itow
,
2456 {"iTOW", "ubx.nav.timeutc.itow",
2457 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2458 {&hf_ubx_nav_timeutc_tacc
,
2459 {"Time accuracy estimate (UTC)", "ubx.nav.timeutc.tacc",
2460 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_nanoseconds
), 0x0, NULL
, HFILL
}},
2461 {&hf_ubx_nav_timeutc_nano
,
2462 {"Fraction of second (UTC)", "ubx.nav.timeutc.nano",
2463 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_nanoseconds
), 0x0, NULL
, HFILL
}},
2464 {&hf_ubx_nav_timeutc_year
,
2465 {"Year", "ubx.nav.timeutc.year",
2466 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2467 {&hf_ubx_nav_timeutc_month
,
2468 {"Month", "ubx.nav.timeutc.month",
2469 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2470 {&hf_ubx_nav_timeutc_day
,
2471 {"Day", "ubx.nav.timeutc.day",
2472 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2473 {&hf_ubx_nav_timeutc_hour
,
2474 {"Hour of day", "ubx.nav.timeutc.hour",
2475 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2476 {&hf_ubx_nav_timeutc_min
,
2477 {"Minute of hour", "ubx.nav.timeutc.min",
2478 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2479 {&hf_ubx_nav_timeutc_sec
,
2480 {"Seconds of minute", "ubx.nav.timeutc.sec",
2481 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2482 {&hf_ubx_nav_timeutc_valid
,
2483 {"Validity flags", "ubx.nav.timeutc.valid",
2484 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2485 {&hf_ubx_nav_timeutc_validtow
,
2486 {"Valid Time of Week", "ubx.nav.timeutc.valid.validtow",
2487 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
2488 {&hf_ubx_nav_timeutc_validwkn
,
2489 {"Valid Week Number", "ubx.nav.timeutc.valid.validwkn",
2490 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
2491 {&hf_ubx_nav_timeutc_validutc
,
2492 {"Valid UTC Time", "ubx.nav.timeutc.valid.validutc",
2493 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
2494 {&hf_ubx_nav_timeutc_utcstandard
,
2495 {"utcStandard", "ubx.nav.timeutc.valid.utcstandard",
2496 FT_UINT8
, BASE_DEC
, VALS(UBX_UTC_STD_ID
), 0xf0, NULL
, HFILL
}},
2499 {&hf_ubx_nav_velecef
,
2500 {"UBX-NAV-VELECEF", "ubx.nav.velecef",
2501 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2502 {&hf_ubx_nav_velecef_itow
,
2503 {"iTOW", "ubx.nav.velecef.itow",
2504 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_seconds
), 0x0, NULL
, HFILL
}},
2505 {&hf_ubx_nav_velecef_ecefvx
,
2506 {"ECEF X velocity", "ubx.nav.velecef.ecefvx",
2507 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_cm_s
), 0x0, NULL
, HFILL
}},
2508 {&hf_ubx_nav_velecef_ecefvy
,
2509 {"ECEF Y velocity", "ubx.nav.velecef.ecefvy",
2510 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_cm_s
), 0x0, NULL
, HFILL
}},
2511 {&hf_ubx_nav_velecef_ecefvz
,
2512 {"ECEF Z velocity", "ubx.nav.velecef.ecefvz",
2513 FT_INT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_cm_s
), 0x0, NULL
, HFILL
}},
2514 {&hf_ubx_nav_velecef_sacc
,
2515 {"Speed accuracy estimate", "ubx.nav.velecef.sacc",
2516 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_cm_s
), 0x0, NULL
, HFILL
}},
2520 {"UBX-RXM-MEASX", "ubx.rxm.measx",
2521 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2522 {&hf_ubx_rxm_measx_version
,
2523 {"Message version", "ubx.rxm.measx.version",
2524 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2525 {&hf_ubx_rxm_measx_reserved1
,
2526 {"Reserved", "ubx.rxm.measx.reserved1",
2527 FT_UINT24
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2528 {&hf_ubx_rxm_measx_gpstow
,
2529 {"GPS measurement reference time", "ubx.rxm.measx.gpstow",
2530 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2531 {&hf_ubx_rxm_measx_glotow
,
2532 {"GLONASS measurement reference time", "ubx.rxm.measx.glotow",
2533 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2534 {&hf_ubx_rxm_measx_bdstow
,
2535 {"BeiDou measurement reference time", "ubx.rxm.measx.bdstow",
2536 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2537 {&hf_ubx_rxm_measx_reserved2
,
2538 {"Reserved", "ubx.rxm.measx.reserved2",
2539 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2540 {&hf_ubx_rxm_measx_qzsstow
,
2541 {"QZSS measurement reference time", "ubx.rxm.measx.qzsstow",
2542 FT_UINT32
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2543 {&hf_ubx_rxm_measx_gpstowacc
,
2544 {"GPS measurement reference time accuracy", "ubx.rxm.measx.gpstowacc",
2545 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_towacc
), 0x0, NULL
, HFILL
}},
2546 {&hf_ubx_rxm_measx_glotowacc
,
2547 {"GLONASS measurement reference time accuracy", "ubx.rxm.measx.glotowacc",
2548 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_towacc
), 0x0, NULL
, HFILL
}},
2549 {&hf_ubx_rxm_measx_bdstowacc
,
2550 {"BeiDou measurement reference time accuracy", "ubx.rxm.measx.bdstowacc",
2551 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_towacc
), 0x0, NULL
, HFILL
}},
2552 {&hf_ubx_rxm_measx_reserved3
,
2553 {"Reserved", "ubx.rxm.measx.reserved3",
2554 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2555 {&hf_ubx_rxm_measx_qzsstowacc
,
2556 {"QZSS measurement reference time accuracy", "ubx.rxm.measx.qzsstowacc",
2557 FT_UINT16
, BASE_CUSTOM
, CF_FUNC(&fmt_towacc
), 0x0, NULL
, HFILL
}},
2558 {&hf_ubx_rxm_measx_numsv
,
2559 {"Number of satellites in repeated block", "ubx.rxm.measx.numsv",
2560 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2561 {&hf_ubx_rxm_measx_flags_towset
,
2562 {"TOW set", "ubx.rxm.measx.flags.towset",
2563 FT_BOOLEAN
, 8, NULL
, 0x03, NULL
, HFILL
}},
2564 {&hf_ubx_rxm_measx_reserved4
,
2565 {"Reserved", "ubx.rxm.measx.reserved4",
2566 FT_UINT64
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2567 {&hf_ubx_rxm_measx_gnssid
,
2568 {"GNSS ID", "ubx.rxm.measx.gnssid",
2569 FT_UINT8
, BASE_DEC
, VALS(UBX_GNSS_ID
), 0x0, NULL
, HFILL
}},
2570 {&hf_ubx_rxm_measx_svid
,
2571 {"Satellite ID", "ubx.rxm.measx.svid",
2572 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2573 {&hf_ubx_rxm_measx_cn0
,
2574 {"C/N0", "ubx.rxm.measx.cn0",
2575 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_dbhz
), 0x0, NULL
, HFILL
}},
2576 {&hf_ubx_rxm_measx_mpathindic
,
2577 {"multipath index", "ubx.rxm.measx.mpathindic",
2578 FT_UINT8
, BASE_DEC
, VALS(UBX_RXM_MEASX_MULTIPATH_INDEX
), 0x0, NULL
, HFILL
}},
2579 {&hf_ubx_rxm_measx_dopplerms
,
2580 {"Doppler measurement", "ubx.rxm.measx.dopplerms",
2581 FT_INT32
, BASE_CUSTOM
, CF_FUNC(&fmt_dopplerms
), 0x0, NULL
, HFILL
}},
2582 {&hf_ubx_rxm_measx_dopplerhz
,
2583 {"Doppler measurement", "ubx.rxm.measx.dopplerhz",
2584 FT_INT32
, BASE_CUSTOM
, CF_FUNC(&fmt_dopplerhz
), 0x0, NULL
, HFILL
}},
2585 {&hf_ubx_rxm_measx_wholechips
,
2586 {"whole value of the code phase measurement", "ubx.rxm.measx.wholechips",
2587 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2588 {&hf_ubx_rxm_measx_fracchips
,
2589 {"fractional value of the code phase measurement", "ubx.rxm.measx.fracchips",
2590 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2591 {&hf_ubx_rxm_measx_codephase
,
2592 {"Code phase", "ubx.rxm.measx.codephase",
2593 FT_UINT32
, BASE_CUSTOM
, CF_FUNC(&fmt_codephase
), 0x0, NULL
, HFILL
}},
2594 {&hf_ubx_rxm_measx_intcodephase
,
2595 {"integer (part of) the code phase", "ubx.rxm.measx.intcodephase",
2596 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2597 {&hf_ubx_rxm_measx_pseurangermserr
,
2598 {"pseudorange RMS error index", "ubx.rxm.measx.pseurangermserr",
2599 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2600 {&hf_ubx_rxm_measx_reserved5
,
2601 {"Reserved", "ubx.rxm.measx.reserved5",
2602 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2606 {"UBX-RXM-RAWX", "ubx.rxm.rawx",
2607 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2608 {&hf_ubx_rxm_rawx_rcvtow
,
2609 {"Measurement time of week in receiver local time", "ubx.rxm.rawx.rcvtow",
2610 FT_DOUBLE
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_seconds
), 0x0, NULL
, HFILL
}},
2611 {&hf_ubx_rxm_rawx_week
,
2612 {"GPS week number in receiver local time", "ubx.rxm.rawx.week",
2613 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2614 {&hf_ubx_rxm_rawx_leaps
,
2615 {"GPS leap seconds", "ubx.rxm.rawx.leaps",
2616 FT_INT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_seconds
), 0x0, NULL
, HFILL
}},
2617 {&hf_ubx_rxm_rawx_nummeas
,
2618 {"Number of measurements to follow", "ubx.rxm.rawx.nummeas",
2619 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2620 {&hf_ubx_rxm_rawx_recstat
,
2621 {"Receiver tracking status bitfield", "ubx.rxm.rawx.recstat",
2622 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2623 {&hf_ubx_rxm_rawx_recstat_leapsec
,
2624 {"Leap seconds have been determined", "ubx.rxm.rawx.recstat.leapsec",
2625 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
2626 {&hf_ubx_rxm_rawx_recstat_clkreset
,
2627 {"Clock reset applied", "ubx.rxm.rawx.recstat.clkreset",
2628 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
2629 {&hf_ubx_rxm_rawx_version
,
2630 {"Message version", "ubx.rxm.rawx.version",
2631 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2632 {&hf_ubx_rxm_rawx_reserved1
,
2633 {"Reserved", "ubx.rxm.rawx.reserved1",
2634 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2635 {&hf_ubx_rxm_rawx_prmes
,
2636 {"Pseudorange measurement", "ubx.rxm.rawx.prmes",
2637 FT_DOUBLE
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_meter_meters
), 0x0, NULL
, HFILL
}},
2638 {&hf_ubx_rxm_rawx_cpmes
,
2639 {"Carrier phase measurement", "ubx.rxm.rawx.cpmes",
2640 FT_DOUBLE
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_cycle_cycles
), 0x0, NULL
, HFILL
}},
2641 {&hf_ubx_rxm_rawx_domes
,
2642 {"Doppler measurement", "ubx.rxm.rawx.domes",
2643 FT_FLOAT
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_hz
), 0x0, NULL
, HFILL
}},
2644 {&hf_ubx_rxm_rawx_gnssid
,
2645 {"GNSS ID", "ubx.rxm.rawx.gnssid",
2646 FT_UINT8
, BASE_DEC
, VALS(UBX_GNSS_ID
), 0x0, NULL
, HFILL
}},
2647 {&hf_ubx_rxm_rawx_svid
,
2648 {"Satellite ID", "ubx.rxm.rawx.svid",
2649 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2650 {&hf_ubx_rxm_rawx_sigid
,
2651 {"Signal ID", "ubx.rxm.rawx.sigid",
2652 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2653 {&hf_ubx_rxm_rawx_freqid
,
2654 {"Frequency ID", "ubx.rxm.rawx.freqid",
2655 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2656 {&hf_ubx_rxm_rawx_locktime
,
2657 {"Carrier phase locktime counter", "ubx.rxm.rawx.locktime",
2658 FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_milliseconds
), 0x0, NULL
, HFILL
}},
2659 {&hf_ubx_rxm_rawx_cn0
,
2660 {"C/N0", "ubx.rxm.rawx.cn0",
2661 FT_UINT8
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_dbhz
), 0x0, NULL
, HFILL
}},
2662 {&hf_ubx_rxm_rawx_prstdev
,
2663 {"Estimated pseudorange measurement standard deviation", "ubx.rxm.rawx.prstdev",
2664 FT_UINT8
, BASE_CUSTOM
, CF_FUNC(&fmt_prstdev
), 0x0f, NULL
, HFILL
}},
2665 {&hf_ubx_rxm_rawx_cpstdev
,
2666 {"Estimated carrier phase measurement standard deviation", "ubx.rxm.rawx.cpstdev",
2667 FT_UINT8
, BASE_CUSTOM
, CF_FUNC(&fmt_cpstdev
), 0x0f, NULL
, HFILL
}},
2668 {&hf_ubx_rxm_rawx_dostdev
,
2669 {"Estimated Doppler measurement standard deviation", "ubx.rxm.rawx.dostdev",
2670 FT_UINT8
, BASE_CUSTOM
, CF_FUNC(&fmt_dostdev
), 0x0f, NULL
, HFILL
}},
2671 {&hf_ubx_rxm_rawx_trkstat
,
2672 {"Tracking status bitfield", "ubx.rxm.rawx.trkstat",
2673 FT_UINT8
, BASE_HEX
, NULL
, 0x0f, NULL
, HFILL
}},
2674 {&hf_ubx_rxm_rawx_trkstat_prvalid
,
2675 {"Pseudorange valid", "ubx.rxm.rawx.trkstat.prvalid",
2676 FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
2677 {&hf_ubx_rxm_rawx_trkstat_cpvalid
,
2678 {"Carrier phase valid", "ubx.rxm.rawx.trkstat.cpvalid",
2679 FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
2680 {&hf_ubx_rxm_rawx_trkstat_halfcyc
,
2681 {"Half cycle valid", "ubx.rxm.rawx.trkstat.halfcyc",
2682 FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
2683 {&hf_ubx_rxm_rawx_trkstat_subhalfcyc
,
2684 {"Half cycle subtracted from phase", "ubx.rxm.rawx.trkstat.subhalfcyc",
2685 FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
2686 {&hf_ubx_rxm_rawx_reserved2
,
2687 {"Reserved", "ubx.rxm.rawx.reserved2",
2688 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2692 {"UBX-RXM-SFRBX", "ubx.rxm.sfrbx",
2693 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2694 {&hf_ubx_rxm_sfrbx_gnssid
,
2695 {"GNSS ID", "ubx.rxm.sfrbx.gnssid",
2696 FT_UINT8
, BASE_DEC
, VALS(UBX_GNSS_ID
), 0x0, NULL
, HFILL
}},
2697 {&hf_ubx_rxm_sfrbx_svid
,
2698 {"Satellite ID", "ubx.rxm.sfrbx.svid",
2699 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2700 {&hf_ubx_rxm_sfrbx_sigid
,
2701 {"Signal identifier", "ubx.rxm.sfrbx.sigid",
2702 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2703 {&hf_ubx_rxm_sfrbx_freqid
,
2704 {"Frequency identifier", "ubx.rxm.sfrbx.freqid",
2705 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2706 {&hf_ubx_rxm_sfrbx_numwords
,
2707 {"Number of data words", "ubx.rxm.sfrbx.numwords",
2708 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2709 {&hf_ubx_rxm_sfrbx_chn
,
2710 {"Tracking channel number", "ubx.rxm.sfrbx.chn",
2711 FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
2712 {&hf_ubx_rxm_sfrbx_version
,
2713 {"Message version", "ubx.rxm.sfrbx.version",
2714 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2715 {&hf_ubx_rxm_sfrbx_dwrd
,
2716 {"Data words (little endian)", "ubx.rxm.sfrbx.dwrd",
2717 FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
2718 {&hf_ubx_rxm_sfrbx_reserved1
,
2719 {"Reserved 1", "ubx.rxm.sfrbx.reserved1",
2720 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2721 {&hf_ubx_rxm_sfrbx_reserved2
,
2722 {"Reserved 2", "ubx.rxm.sfrbx.reserved2",
2723 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2724 {&hf_ubx_rxm_sfrbx_reserved3
,
2725 {"Reserved 3", "ubx.rxm.sfrbx.reserved3",
2726 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
2729 expert_module_t
*expert_ubx
;
2731 static ei_register_info ei
[] = {
2732 {&ei_ubx_chksum
, {"ubx.chksum", PI_CHECKSUM
, PI_WARN
, "Chksum", EXPFILL
}},
2735 static int *ett_part
[] = {
2741 &ett_ubx_cfg_sbas_mode
,
2742 &ett_ubx_cfg_sbas_scanmode
,
2746 &ett_ubx_nav_posecef
,
2748 &ett_ubx_nav_pvt_datetime
,
2749 &ett_ubx_nav_pvt_valid
,
2750 &ett_ubx_nav_pvt_flags
,
2751 &ett_ubx_nav_pvt_flags2
,
2753 &ett_ubx_nav_sat_flags
,
2755 &ett_ubx_nav_sbas_service
,
2756 &ett_ubx_nav_timegps
,
2757 &ett_ubx_nav_timegps_tow
,
2758 &ett_ubx_nav_timegps_valid
,
2759 &ett_ubx_nav_timeutc
,
2760 &ett_ubx_nav_timeutc_valid
,
2761 &ett_ubx_nav_velecef
,
2764 &ett_ubx_rxm_rawx_recstat
,
2765 &ett_ubx_rxm_rawx_trkstat
,
2769 static int *ett
[array_length(ett_part
)
2770 + array_length(ett_ubx_nav_sat_sv_info
)
2771 + array_length(ett_ubx_cfg_gnss_block
)
2772 + array_length(ett_ubx_nav_sbas_sv_info
)
2773 + array_length(ett_ubx_rxm_rawx_meas
)
2774 + array_length(ett_ubx_rxm_measx_meas
)];
2776 // fill ett with elements from ett_part,
2777 // pointers to ett_ubx_nav_sat_sv_info elements,
2778 // pointers to ett_ubx_cfg_gnss_block elements,
2779 // pointers to ett_ubx_nav_sbas_sv_info elements,
2780 // pointers to ett_ubx_rxm_rawx_meas elements, and
2781 // pointers to ett_ubx_rxm_measx_meas elements
2783 for (i
= 0; i
< array_length(ett_part
); i
++) {
2784 ett
[i
] = ett_part
[i
];
2786 for (i
= 0; i
< array_length(ett_ubx_nav_sat_sv_info
); i
++) {
2787 ett
[i
+ array_length(ett_part
)] = &ett_ubx_nav_sat_sv_info
[i
];
2789 for (i
= 0; i
< array_length(ett_ubx_cfg_gnss_block
); i
++) {
2790 ett
[i
+ array_length(ett_part
) + array_length(ett_ubx_nav_sat_sv_info
)]
2791 = &ett_ubx_cfg_gnss_block
[i
];
2793 for (i
= 0; i
< array_length(ett_ubx_nav_sbas_sv_info
); i
++) {
2794 ett
[i
+ array_length(ett_part
) + array_length(ett_ubx_nav_sat_sv_info
)
2795 + array_length(ett_ubx_cfg_gnss_block
)]
2796 = &ett_ubx_nav_sbas_sv_info
[i
];
2798 for (i
= 0; i
< array_length(ett_ubx_rxm_rawx_meas
); i
++) {
2799 ett
[i
+ array_length(ett_part
) + array_length(ett_ubx_nav_sat_sv_info
)
2800 + array_length(ett_ubx_cfg_gnss_block
)
2801 + array_length(ett_ubx_nav_sbas_sv_info
)]
2802 = &ett_ubx_rxm_rawx_meas
[i
];
2804 for (i
= 0; i
< array_length(ett_ubx_rxm_measx_meas
); i
++) {
2805 ett
[i
+ array_length(ett_part
) + array_length(ett_ubx_nav_sat_sv_info
)
2806 + array_length(ett_ubx_cfg_gnss_block
)
2807 + array_length(ett_ubx_nav_sbas_sv_info
)
2808 + array_length(ett_ubx_rxm_rawx_meas
)]
2809 = &ett_ubx_rxm_measx_meas
[i
];
2812 proto_ubx
= proto_register_protocol("UBX Protocol", "UBX", "ubx");
2814 ubx_handle
= register_dissector("ubx", dissect_ubx
, proto_ubx
);
2816 proto_register_field_array(proto_ubx
, hf
, array_length(hf
));
2817 proto_register_subtree_array(ett
, array_length(ett
));
2819 expert_ubx
= expert_register_protocol(proto_ubx
);
2820 expert_register_field_array(expert_ubx
, ei
, array_length(ei
));
2822 ubx_class_id_dissector_table
= register_dissector_table("ubx.msg_class_id",
2823 "UBX Message Class & ID", proto_ubx
, FT_UINT16
, BASE_HEX
);
2824 ubx_gnssid_dissector_table
= register_dissector_table("ubx.rxm.sfrbx.gnssid",
2825 "UBX-RXM-SFRBX GNSS Type ID", proto_ubx
,
2826 FT_UINT8
, BASE_DEC
);
2829 void proto_reg_handoff_ubx(void) {
2830 UBX_REGISTER_DISSECTOR(dissect_ubx_ack_ack
, UBX_ACK_ACK
);
2831 UBX_REGISTER_DISSECTOR(dissect_ubx_ack_nak
, UBX_ACK_NAK
);
2832 UBX_REGISTER_DISSECTOR(dissect_ubx_cfg_gnss
, UBX_CFG_GNSS
);
2833 UBX_REGISTER_DISSECTOR(dissect_ubx_cfg_sbas
, UBX_CFG_SBAS
);
2834 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_dop
, UBX_NAV_DOP
);
2835 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_eoe
, UBX_NAV_EOE
);
2836 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_odo
, UBX_NAV_ODO
);
2837 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_posecef
, UBX_NAV_POSECEF
);
2838 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_pvt
, UBX_NAV_PVT
);
2839 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_sat
, UBX_NAV_SAT
);
2840 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_sbas
, UBX_NAV_SBAS
);
2841 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_timegps
, UBX_NAV_TIMEGPS
);
2842 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_timeutc
, UBX_NAV_TIMEUTC
);
2843 UBX_REGISTER_DISSECTOR(dissect_ubx_nav_velecef
, UBX_NAV_VELECEF
);
2844 UBX_REGISTER_DISSECTOR(dissect_ubx_rxm_measx
, UBX_RXM_MEASX
);
2845 UBX_REGISTER_DISSECTOR(dissect_ubx_rxm_rawx
, UBX_RXM_RAWX
);
2846 UBX_REGISTER_DISSECTOR(dissect_ubx_rxm_sfrbx
, UBX_RXM_SFRBX
);