Fixposition SDK 0.0.0-heads/main-0-g4d935a0
Collection of c++ libraries and apps for use with Fixposition products on Linux
Loading...
Searching...
No Matches
parser_ubx.hpp
Go to the documentation of this file.
1/**
2 * \verbatim
3 * ___ ___
4 * \ \ / /
5 * \ \/ / Copyright (c) Fixposition AG (www.fixposition.com) and contributors
6 * / /\ \ License: see the LICENSE file
7 * /__/ \__\
8 * \endverbatim
9 *
10 * @file
11 * @brief Fixposition SDK: to_json() helpers for some fpsdk::common::parser::ubx messages
12 */
13#ifndef __FPSDK_COMMON_TO_JSON_PARSER_UBX_HPP__
14#define __FPSDK_COMMON_TO_JSON_PARSER_UBX_HPP__
15
16/* LIBC/STL */
17#include <cstring>
18#include <string>
19#include <vector>
20
21/* EXTERNAL */
22#include <nlohmann/json.hpp>
23
24/* PACKAGE */
25#include "../parser/ubx.hpp"
26#include "../string.hpp"
27#include "../types.hpp"
28
29#ifndef _DOXYGEN_ // not documenting these
30/* ****************************************************************************************************************** */
32
33// UBX-ACK-ACK (ack_or_nak = true) and UBX-ACK-NAK (ack_or_nak = false), which have the same payload
34inline void to_json_UBX_ACK(nlohmann::json& j, const std::vector<uint8_t>& data, const bool ack_or_nak)
35{
36 if (data.size() != (ack_or_nak ? UBX_ACK_ACK_V0_SIZE : UBX_ACK_NAK_V0_SIZE)) {
37 return;
38 }
40 std::memcpy(&ack, &data[UBX_HEAD_SIZE], sizeof(ack));
41 j = nlohmann::json::object({
42 { "clsId", ack.clsId },
43 { "msgId", ack.msgId },
44 });
45
46 // Name of the ack'ed message
47 const uint8_t msg[UBX_FRAME_SIZE] = { UBX_SYNC_1, UBX_SYNC_2, ack.clsId, ack.msgId, 0, 0, 0, 0 };
48 char name[MAX_NAME_SIZE];
49 if (UbxGetMessageName(name, sizeof(name), msg, sizeof(msg))) {
50 j["msgName"] = name;
51 }
52}
53
54// ---------------------------------------------------------------------------------------------------------------------
55
56inline void to_json_UBX_CFG_CFG(nlohmann::json& j, const std::vector<uint8_t>& data)
57{
58 if ((data.size() != UBX_CFG_CFG_V0_MIN_SIZE) && (data.size() != UBX_CFG_CFG_V0_MAX_SIZE)) {
59 return;
60 }
62 std::memcpy(&cfg, &data[UBX_HEAD_SIZE], sizeof(cfg));
63 j = nlohmann::json::object({
64 { "clearMask", cfg.clearMask },
65 { "saveMask", cfg.saveMask },
66 { "loadMask", cfg.loadMask },
67 });
68
69 if (data.size() == UBX_CFG_CFG_V0_MAX_SIZE) {
71 std::memcpy(&dev, &data[UBX_HEAD_SIZE + sizeof(cfg)], sizeof(dev));
72 j["deviceBbr"] = (dev.deviceMask & UBX_CFG_CFG_V0_DEVICE_BBR) != 0;
73 j["deviceFlash"] = (dev.deviceMask & UBX_CFG_CFG_V0_DEVICE_FLASH) != 0;
74 }
75}
76
77// ---------------------------------------------------------------------------------------------------------------------
78
79inline void to_json_UBX_CFG_RST(nlohmann::json& j, const std::vector<uint8_t>& data)
80{
81 if (data.size() == UBX_CFG_RST_V0_SIZE) {
83 std::memcpy(&rst, &data[UBX_HEAD_SIZE], sizeof(rst));
84 j = nlohmann::json::object({
85 { "navBbrMask", rst.navBbrMask },
86 { "resetMode", UBX_CFG_RST_V0_RESETMODE_STR(rst.resetMode) },
87 });
88 }
89}
90
91// ---------------------------------------------------------------------------------------------------------------------
92
93inline void to_json_UBX_CFG_VALDEL(nlohmann::json& j, const std::vector<uint8_t>& data)
94{
95 if ((data.size() < UBX_CFG_VALDEL_V1_MIN_SIZE) ||
97 return;
98 }
100 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
101 const std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
102 const std::size_t size = data.size() - UBX_CFG_VALDEL_V1_MIN_SIZE;
103 j = nlohmann::json::object({
104 { "version", head.version },
105 { "layerBbr", (head.layers & UBX_CFG_VALDEL_V1_LAYER_BBR) != 0 },
106 { "layerFlash", (head.layers & UBX_CFG_VALDEL_V1_LAYER_FLASH) != 0 },
107 { "transaction", UBX_CFG_VALDEL_V1_TRANSACTION_STR(head.transaction) },
108 { "keys", string::Base64Enc(std::vector<uint8_t>(data.cbegin() + offs, data.cbegin() + offs + size)) },
109 });
110}
111
112// ---------------------------------------------------------------------------------------------------------------------
113
114// UBX-CFG-VALGET version 0 is the poll request (a list of keys), version 1 is the response (a list of key-value pairs)
115inline void to_json_UBX_CFG_VALGET(nlohmann::json& j, const std::vector<uint8_t>& data)
116{
117 if (data.size() < UBX_CFG_VALGET_V0_MIN_SIZE) {
118 return;
119 }
122 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
123 const std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
124 const std::size_t size = data.size() - UBX_CFG_VALGET_V0_MIN_SIZE;
125 j = nlohmann::json::object({
126 { "version", head.version },
127 { "layer", UBX_CFG_VALGET_V0_LAYER_STR(head.layer) },
128 { "position", head.position },
129 { "keys", string::Base64Enc(std::vector<uint8_t>(data.cbegin() + offs, data.cbegin() + offs + size)) },
130 });
131 } else if (UBX_CFG_VALGET_VERSION(data.data()) == UBX_CFG_VALGET_V1_VERSION) {
133 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
134 const std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
135 const std::size_t size = data.size() - UBX_CFG_VALGET_V1_MIN_SIZE;
136 j = nlohmann::json::object({
137 { "version", head.version },
138 { "layer", UBX_CFG_VALGET_V1_LAYER_STR(head.layer) },
139 { "position", head.position },
140 { "cfgData", string::Base64Enc(std::vector<uint8_t>(data.cbegin() + offs, data.cbegin() + offs + size)) },
141 });
142 }
143}
144
145// ---------------------------------------------------------------------------------------------------------------------
146
147inline void to_json_UBX_CFG_VALSET(nlohmann::json& j, const std::vector<uint8_t>& data)
148{
149 if (data.size() < UBX_CFG_VALSET_V0_MIN_SIZE) {
150 return;
151 }
154 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
155 const std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
156 const std::size_t size = data.size() - UBX_CFG_VALSET_V0_MIN_SIZE;
157 j = nlohmann::json::object({
158 { "version", head.version },
159 { "layerRam", (head.layers & UBX_CFG_VALSET_V0_LAYERS_RAM) != 0 },
160 { "layerBbr", (head.layers & UBX_CFG_VALSET_V0_LAYERS_BBR) != 0 },
161 { "layerFlash", (head.layers & UBX_CFG_VALSET_V0_LAYERS_FLASH) != 0 },
162 { "cfgData", string::Base64Enc(std::vector<uint8_t>(data.cbegin() + offs, data.cbegin() + offs + size)) },
163 });
164 } else if (UBX_CFG_VALSET_VERSION(data.data()) == UBX_CFG_VALSET_V1_VERSION) {
166 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
167 const std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
168 const std::size_t size = data.size() - UBX_CFG_VALSET_V1_MIN_SIZE;
169 j = nlohmann::json::object({
170 { "version", head.version },
171 { "layerRam", (head.layers & UBX_CFG_VALSET_V1_LAYER_RAM) != 0 },
172 { "layerBbr", (head.layers & UBX_CFG_VALSET_V1_LAYER_BBR) != 0 },
173 { "layerFlash", (head.layers & UBX_CFG_VALSET_V1_LAYER_FLASH) != 0 },
174 { "transaction", UBX_CFG_VALSET_V1_TRANSACTION_STR(head.transaction) },
175 { "cfgData", string::Base64Enc(std::vector<uint8_t>(data.cbegin() + offs, data.cbegin() + offs + size)) },
176 });
177 }
178}
179
180// ---------------------------------------------------------------------------------------------------------------------
181
182inline void to_json_UBX_ESF_MEAS(nlohmann::json& j, const std::vector<uint8_t>& data)
183{
184 if ((data.size() < UBX_ESF_MEAS_V0_MIN_SIZE) || (data.size() != UBX_ESF_MEAS_V0_SIZE(data.data()))) {
185 return;
186 }
188 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
189
190 const std::size_t num_meas = UBX_ESF_MEAS_V0_FLAGS_NUMMEAS(head.flags);
191 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
192 auto meas = nlohmann::json::array();
193 for (std::size_t ix = 0; ix < num_meas; ix++, offs += sizeof(UBX_ESF_MEAS_V0_GROUP1)) {
195 std::memcpy(&m, &data[offs], sizeof(m));
196 meas.push_back(nlohmann::json::object({
197 { "dataType", UBX_ESF_MEAS_V0_DATA_DATATYPE(m.data) },
198 { "dataField", UBX_ESF_MEAS_V0_DATA_DATAFIELD(m.data) },
199 }));
200 }
201
202 j = nlohmann::json::object({
203 { "timeTag", head.timeTag },
204 { "id", head.id },
205 { "timeMarkSent", UBX_ESF_MEAS_V0_FLAGS_TIMEMARKSENT_STR(head.flags) },
206 { "calibTtagValid", UBX_ESF_MEAS_V0_FLAGS_CALIBTTAGVALID(head.flags) },
207 { "numMeas", UBX_ESF_MEAS_V0_FLAGS_NUMMEAS(head.flags) },
208 { "meas", meas },
209 });
210
211 if (UBX_ESF_MEAS_V0_FLAGS_CALIBTTAGVALID(head.flags)) {
213 std::memcpy(&g2, &data[offs], sizeof(g2));
214 j["calibTtag"] = g2.calibTtag;
215 }
216}
217
218// ---------------------------------------------------------------------------------------------------------------------
219
220inline void to_json_UBX_ESF_STATUS(nlohmann::json& j, const std::vector<uint8_t>& data)
221{
222 if ((data.size() < UBX_ESF_STATUS_V2_MIN_SIZE) ||
224 return;
225 }
227 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
228 if (data.size() != (UBX_ESF_STATUS_V2_MIN_SIZE + (head.numSens * sizeof(UBX_ESF_STATUS_V2_GROUP1)))) {
229 return;
230 }
231 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
232 auto sens = nlohmann::json::array();
233 for (std::size_t ix = 0; ix < head.numSens; ix++, offs += sizeof(UBX_ESF_STATUS_V2_GROUP1)) {
235 std::memcpy(&s, &data[offs], sizeof(s));
236 sens.push_back(nlohmann::json::object({
237 { "type", UBX_ESF_STATUS_V2_SENSSTATUS1_TYPE(s.sensStatus1) },
238 { "used", (s.sensStatus1 & UBX_ESF_STATUS_V2_SENSSTATUS1_USED) != 0 },
239 { "ready", (s.sensStatus1 & UBX_ESF_STATUS_V2_SENSSTATUS1_READY) != 0 },
240 { "calibStatus", UBX_ESF_STATUS_V2_SENSSTATUS2_CALIBSTATUS_STR(s.sensStatus2) },
241 { "timeStatus", UBX_ESF_STATUS_V2_SENSSTATUS2_TIMESTATUS_STR(s.sensStatus2) },
242 { "freq", s.freq },
243 { "badMeas", (s.faults & UBX_ESF_STATUS_V2_FAULTS_BADMEAS) != 0 },
244 { "badTtag", (s.faults & UBX_ESF_STATUS_V2_FAULTS_BADTTAG) != 0 },
245 { "missingMeas", (s.faults & UBX_ESF_STATUS_V2_FAULTS_MISSINGMEAS) != 0 },
246 { "noisyMeas", (s.faults & UBX_ESF_STATUS_V2_FAULTS_NOISYMEAS) != 0 },
247 }));
248 }
249
250 j = nlohmann::json::object({
251 { "iTOW", head.iTOW },
252 { "version", head.version },
253 { "numSens", head.numSens },
254 { "wtInitStatus", UBX_ESF_STATUS_V2_INITSTATUS1_WTINITSTATUS_STR(head.initStatus1) },
255 { "mntAlgStatus", UBX_ESF_STATUS_V2_INITSTATUS1_MNTALGSTATUS_STR(head.initStatus1) },
256 { "insInitStatus", UBX_ESF_STATUS_V2_INITSTATUS1_INSINITSTATUS_STR(head.initStatus1) },
257 { "imuInitStatus", UBX_ESF_STATUS_V2_INITSTATUS2_IMUINITSTATUS_STR(head.initStatus2) },
258 { "fusionMode", UBX_ESF_STATUS_V2_FUSIONMODE_STR(head.fusionMode) },
259 { "sens", sens },
260 });
261}
262
263// ---------------------------------------------------------------------------------------------------------------------
264
265inline void to_json_UBX_MGA_GAL_OSNMA_PUBKEY(nlohmann::json& j, const std::vector<uint8_t>& data)
266{
267 if (data.size() == UBX_MGA_GAL_OSNMA_PUBKEY_V0_SIZE) {
269 std::memcpy(&pk, &data[UBX_HEAD_SIZE], sizeof(pk));
270 j = nlohmann::json::object({
271 { "type", pk.type },
272 { "version", pk.version },
273 { "pubKeyId", UBX_MGA_GAL_OSNMA_PUBKEY_V0_BITFIELD0_PUBKEYID(pk.bitfield0) },
274 { "pubKeyType", UBX_MGA_GAL_OSNMA_PUBKEY_V0_BITFIELD0_PUBKEYTYPE_STR(pk.bitfield0) },
275 { "pubKeyPoint",
276 string::Base64Enc(std::vector<uint8_t>(pk.pubKeyPoint, pk.pubKeyPoint + sizeof(pk.pubKeyPoint))) },
277 });
278 }
279}
280
281// ---------------------------------------------------------------------------------------------------------------------
282
283inline void to_json_UBX_MGA_GAL_OSNMA_MERKLE(nlohmann::json& j, const std::vector<uint8_t>& data)
284{
285 if (data.size() == UBX_MGA_GAL_OSNMA_MERKLE_V0_SIZE) {
287 std::memcpy(&mt, &data[UBX_HEAD_SIZE], sizeof(mt));
288 j = nlohmann::json::object({
289 { "type", mt.type },
290 { "version", mt.version },
291 { "applicabilityTime", UBX_MGA_GAL_OSNMA_MERKLE_V0_BITFIELD0_APPLICABILITYTIME_STR(mt.bitfield0) },
292 { "treeNode", string::Base64Enc(std::vector<uint8_t>(mt.treeNode, mt.treeNode + sizeof(mt.treeNode))) },
293 });
294 }
295}
296
297// ---------------------------------------------------------------------------------------------------------------------
298
299inline void to_json_UBX_MGA_INI_TIME_UTC(nlohmann::json& j, const std::vector<uint8_t>& data)
300{
301 if (data.size() == UBX_MGA_INI_TIME_UTC_V0_SIZE) {
303 std::memcpy(&ini, &data[UBX_HEAD_SIZE], sizeof(ini));
304 j = nlohmann::json::object({
305 { "type", ini.type },
306 { "version", ini.version },
307 { "leapSecs", ini.leapSecs },
308 { "year", ini.year },
309 { "month", ini.month },
310 { "day", ini.day },
311 { "hour", ini.hour },
312 { "minute", ini.minute },
313 { "second", ini.second },
314 { "ns", ini.ns },
315 { "tAccS", ini.tAccS },
316 { "tAccNs", ini.tAccNs },
317 { "source", UBX_MGA_INI_TIME_UTC_V0_REF_SOURCE_STR(ini.ref) },
318 { "fall", UBX_MGA_INI_TIME_UTC_V0_REF_FALL(ini.ref) },
319 { "last", UBX_MGA_INI_TIME_UTC_V0_REF_LAST(ini.ref) },
320 { "trustedSource", UBX_MGA_INI_TIME_UTC_V0_BITFIELD0_TRUSTEDSOURCE(ini.bitfield0) },
321 });
322 }
323}
324
325// ---------------------------------------------------------------------------------------------------------------------
326
327inline void to_json_UBX_MGA_INI_TIME_GNSS(nlohmann::json& j, const std::vector<uint8_t>& data)
328{
329 if (data.size() == UBX_MGA_INI_TIME_GNSS_V0_SIZE) {
331 std::memcpy(&ini, &data[UBX_HEAD_SIZE], sizeof(ini));
332 j = nlohmann::json::object({
333 { "type", ini.type },
334 { "version", ini.version },
335 { "week", ini.week },
336 { "tow", ini.tow },
337 { "ns", ini.ns },
338 { "tAccS", ini.tAccS },
339 { "tAccNs", ini.tAccNs },
340 { "gnssId", UBX_GNSSID_STR(ini.gnssId) },
341 { "source", UBX_MGA_INI_TIME_GNSS_V0_REF_SOURCE_STR(ini.ref) },
342 { "fall", UBX_MGA_INI_TIME_GNSS_V0_REF_FALL(ini.ref) },
343 { "last", UBX_MGA_INI_TIME_GNSS_V0_REF_LAST(ini.ref) },
344 { "trustedSource", UBX_MGA_INI_TIME_GNSS_V0_BITFIELD0_TRUSTEDSOURCE(ini.bitfield0) },
345 });
346 }
347}
348
349// ---------------------------------------------------------------------------------------------------------------------
350
351inline void to_json_UBX_MON_COMMS(nlohmann::json& j, const std::vector<uint8_t>& data)
352{
353 if ((data.size() < UBX_MON_COMMS_V0_MIN_SIZE) || (UBX_MON_COMMS_VERSION(data.data()) != UBX_MON_COMMS_V0_VERSION)) {
354 return;
355 }
357 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
358 if (data.size() != (UBX_MON_COMMS_V0_MIN_SIZE + (head.nPorts * sizeof(UBX_MON_COMMS_V0_GROUP1)))) {
359 return;
360 }
361 auto prot_ids = nlohmann::json::array();
362 for (std::size_t ix = 0; ix < types::NumOf(head.protIds); ix++) {
363 prot_ids.push_back(UBX_MON_COMMS_V0_PROTIDS_STR(head.protIds[ix]));
364 }
365
366 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
367 auto ports = nlohmann::json::array();
368 for (std::size_t ix = 0; ix < head.nPorts; ix++, offs += sizeof(UBX_MON_COMMS_V0_GROUP1)) {
370 std::memcpy(&p, &data[offs], sizeof(p));
371 ports.push_back(nlohmann::json::object({
372 { "portId", p.portId },
373 { "txPending", p.txPending },
374 { "txBytes", p.txBytes },
375 { "txUsage", p.txUsage },
376 { "txPeakUsage", p.txPeakUsage },
377 { "rxPending", p.rxPending },
378 { "rxBytes", p.rxBytes },
379 { "rxUsage", p.rxUsage },
380 { "rxPeakUsage", p.rxPeakUsage },
381 { "overrunErrors", p.overrunErrors },
382 { "msgs", nlohmann::json::array({ p.msgs[0], p.msgs[1], p.msgs[2], p.msgs[3] }) },
383 { "skipped", p.skipped },
384 }));
385 }
386
387 j = nlohmann::json::object({
388 { "version", head.version },
389 { "nPorts", head.nPorts },
390 { "txErrorsMem", UBX_MON_COMMS_V0_TXERRORS_MEM(head.txErrors) },
391 { "txErrorsAlloc", UBX_MON_COMMS_V0_TXERRORS_ALLOC(head.txErrors) },
392 { "txErrorsOutputPort", UBX_MON_COMMS_V0_TXERRORS_OUTPUTPORT_STR(head.txErrors) },
393 { "protIds", prot_ids },
394 { "ports", ports },
395 });
396}
397
398// ---------------------------------------------------------------------------------------------------------------------
399
400inline void to_json_UBX_MON_HW(nlohmann::json& j, const std::vector<uint8_t>& data)
401{
402 if (data.size() == UBX_MON_HW_V0_SIZE) {
404 std::memcpy(&hw, &data[UBX_HEAD_SIZE], sizeof(hw));
405 j = nlohmann::json::object({
406 { "pinSel", hw.pinSel },
407 { "pinBank", hw.pinBank },
408 { "pinDir", hw.pinDir },
409 { "pinVal", hw.pinVal },
410 { "noisePerMS", hw.noisePerMS },
411 { "agcCnt", hw.agcCnt },
412 { "usedMask", hw.usedMask },
413 { "jamInd", hw.jamInd },
414 { "pinIrq", hw.pinIrq },
415 { "pullH", hw.pullH },
416 { "pullL", hw.pullL },
417 { "aStatus", UBX_MON_HW_V0_ASTATUS_STR(hw.aStatus) },
418 { "aPower", UBX_MON_HW_V0_APOWER_STR(hw.aPower) },
419 { "rtcCalib", (hw.flags & UBX_MON_HW_V0_FLAGS_RTCCALIB) != 0 },
420 { "safeBoot", (hw.flags & UBX_MON_HW_V0_FLAGS_SAFEBOOT) != 0 },
421 { "jammingState", UBX_MON_HW_V0_FLAGS_JAMMINGSTATE_STR(hw.flags) },
422 { "xtalAbsent", (hw.flags & UBX_MON_HW_V0_FLAGS_XTALABSENT) != 0 },
423 { "VP", hw.VP },
424 });
425 }
426}
427
428// ---------------------------------------------------------------------------------------------------------------------
429
430inline void to_json_UBX_MON_HW2(nlohmann::json& j, const std::vector<uint8_t>& data)
431{
432 if (data.size() == UBX_MON_HW2_V0_SIZE) {
434 std::memcpy(&hw2, &data[UBX_HEAD_SIZE], sizeof(hw2));
435 j = nlohmann::json::object({
436 { "ofsI", hw2.ofsI },
437 { "magI", hw2.magI },
438 { "ofsQ", hw2.ofsQ },
439 { "magQ", hw2.magQ },
440 { "lowLevCfg", hw2.lowLevCfg },
441 { "postStatus", hw2.postStatus },
442 { "cfgSource", UBX_MON_HW2_V0_CFGSOURCE_STR(hw2.cfgSource) },
443 });
444 }
445}
446
447// ---------------------------------------------------------------------------------------------------------------------
448
449inline void to_json_UBX_MON_HW3(nlohmann::json& j, const std::vector<uint8_t>& data)
450{
451 if ((data.size() < UBX_MON_HW3_V0_MIN_SIZE) || (UBX_MON_HW3_VERSION(data.data()) != UBX_MON_HW3_V0_VERSION)) {
452 return;
453 }
455 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
456 if (data.size() != (UBX_MON_HW3_V0_MIN_SIZE + (head.nPins * sizeof(UBX_MON_HW3_V0_GROUP1)))) {
457 return;
458 }
459 char hw_version[sizeof(head.hwVersion) + 1] = { 0 };
460 std::memcpy(hw_version, head.hwVersion, sizeof(head.hwVersion));
461
462 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
463 auto pins = nlohmann::json::array();
464 for (std::size_t ix = 0; ix < head.nPins; ix++, offs += sizeof(UBX_MON_HW3_V0_GROUP1)) {
466 std::memcpy(&p, &data[offs], sizeof(p));
467 // The struct is packed, so we cannot use the fields directly
468 const uint16_t pin_id = p.pinId;
469 const uint16_t pin_mask = p.pinMask;
470 const uint8_t vp = p.VP;
471 pins.push_back(nlohmann::json::object({
472 { "pinId", pin_id },
473 { "periphPio", UBX_MON_HW3_V0_PINMASK_PERIPHPIO_STR(pin_mask) },
474 { "pinBank", UBX_MON_HW3_V0_PINMASK_PINBANK_STR(pin_mask) },
475 { "direction", UBX_MON_HW3_V0_PINMASK_DIRECTION_STR(pin_mask) },
476 { "value", UBX_MON_HW3_V0_PINMASK_VALUE(pin_mask) },
477 { "vpManager", UBX_MON_HW3_V0_PINMASK_VPMANAGER(pin_mask) },
478 { "pioIrq", UBX_MON_HW3_V0_PINMASK_PIOIRQ(pin_mask) },
479 { "pioPullHigh", UBX_MON_HW3_V0_PINMASK_PIOPULLHIGH(pin_mask) },
480 { "pioPullLow", UBX_MON_HW3_V0_PINMASK_PIOPULLLOW(pin_mask) },
481 { "VP", vp },
482 }));
483 }
484
485 j = nlohmann::json::object({
486 { "version", head.version },
487 { "nPins", head.nPins },
488 { "rtcCalib", UBX_MON_HW3_V0_FLAGS_RTCCALIB(head.flags) },
489 { "safeBoot", UBX_MON_HW3_V0_FLAGS_SAFEBOOT(head.flags) },
490 { "xtalAbsent", UBX_MON_HW3_V0_FLAGS_XTALABSENT(head.flags) },
491 { "hwVersion", hw_version },
492 { "pins", pins },
493 });
494}
495
496// ---------------------------------------------------------------------------------------------------------------------
497
498inline void to_json_UBX_MON_RF(nlohmann::json& j, const std::vector<uint8_t>& data)
499{
500 if ((data.size() < UBX_MON_RF_V0_MIN_SIZE) || (UBX_MON_RF_VERSION(data.data()) != UBX_MON_RF_V0_VERSION)) {
501 return;
502 }
504 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
505 if (data.size() != (UBX_MON_RF_V0_MIN_SIZE + (head.nBlocks * sizeof(UBX_MON_RF_V0_GROUP1)))) {
506 return;
507 }
508
509 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
510 auto blocks = nlohmann::json::array();
511 for (std::size_t ix = 0; ix < head.nBlocks; ix++, offs += sizeof(UBX_MON_RF_V0_GROUP1)) {
513 std::memcpy(&b, &data[offs], sizeof(b));
514 blocks.push_back(nlohmann::json::object({
515 { "blockId", b.blockId },
516 { "jammingState", UBX_MON_RF_V0_FLAGS_JAMMINGSTATE_STR(b.flags) },
517 { "antStatus", UBX_MON_RF_V0_ANTSTATUS_STR(b.antStatus) },
518 { "antPower", UBX_MON_RF_V0_ANTPOWER_STR(b.antPower) },
519 { "postStatus", b.postStatus },
520 { "noisePerMS", b.noisePerMS },
521 { "agcCnt", b.agcCnt },
522 { "jamInd", b.jamInd },
523 { "ofsI", b.ofsI },
524 { "magI", b.magI },
525 { "ofsQ", b.ofsQ },
526 { "magQ", b.magQ },
527 }));
528 }
529
530 j = nlohmann::json::object({
531 { "version", head.version },
532 { "nBlocks", head.nBlocks },
533 { "blocks", blocks },
534 });
535}
536
537// ---------------------------------------------------------------------------------------------------------------------
538
539inline void to_json_UBX_MON_SPAN(nlohmann::json& j, const std::vector<uint8_t>& data)
540{
541 if ((data.size() < UBX_MON_SPAN_V0_MIN_SIZE) || (UBX_MON_SPAN_VERSION(data.data()) != UBX_MON_SPAN_V0_VERSION) ||
542 (data.size() != UBX_MON_SPAN_V0_SIZE(data.data()))) {
543 return;
544 }
546 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
547
548 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
549 auto blocks = nlohmann::json::array();
550 for (std::size_t ix = 0; ix < head.numRfBlocks; ix++, offs += sizeof(UBX_MON_SPAN_V0_GROUP1)) {
552 std::memcpy(&b, &data[offs], sizeof(b));
553 auto spectrum = nlohmann::json::array();
554 for (std::size_t bin = 0; bin < types::NumOf(b.spectrum); bin++) {
555 spectrum.push_back(b.spectrum[bin]);
556 }
557 blocks.push_back(nlohmann::json::object({
558 { "span", b.span },
559 { "res", b.res },
560 { "center", b.center },
561 { "pga", b.pga },
562 { "spectrum", spectrum },
563 }));
564 }
565
566 j = nlohmann::json::object({
567 { "version", head.version },
568 { "numRfBlocks", head.numRfBlocks },
569 { "blocks", blocks },
570 });
571}
572
573// ---------------------------------------------------------------------------------------------------------------------
574
575inline void to_json_UBX_MON_SYS(nlohmann::json& j, const std::vector<uint8_t>& data)
576{
577 if ((data.size() == UBX_MON_SYS_V1_SIZE) && (UBX_MON_SYS_VERSION(data.data()) == UBX_MON_SYS_V1_VERSION)) {
579 std::memcpy(&sys, &data[UBX_HEAD_SIZE], sizeof(sys));
580 j = nlohmann::json::object({
581 { "msgVer", sys.msgVer },
582 { "cpuLoad", sys.cpuLoad },
583 { "cpuLoadMax", sys.cpuLoadMax },
584 { "memUsage", sys.memUsage },
585 { "memUsageMax", sys.memUsageMax },
586 { "ioUsage", sys.ioUsage },
587 { "ioUsageMax", sys.ioUsageMax },
588 { "runTime", sys.runTime },
589 { "noticeCount", sys.noticeCount },
590 { "warnCount", sys.warnCount },
591 { "errorCount", sys.errorCount },
592 { "tempValue", sys.tempValue },
593 { "bootType", UBX_MON_SYS_V1_BOOTTYPE_STR(sys.bootType) },
594 });
595 }
596}
597
598// ---------------------------------------------------------------------------------------------------------------------
599
600inline void to_json_UBX_MON_TEMP(nlohmann::json& j, const std::vector<uint8_t>& data)
601{
602 if ((data.size() == UBX_MON_TEMP_V0_SIZE) && (UBX_MON_TEMP_VERSION(data.data()) == UBX_MON_TEMP_V0_VERSION)) {
604 std::memcpy(&temp, &data[UBX_HEAD_SIZE], sizeof(temp));
605 j = nlohmann::json::object({
606 { "version", temp.version },
607 { "temperature", temp.temperature },
608 { "unknown", temp.unknown },
609 });
610 }
611}
612
613// ---------------------------------------------------------------------------------------------------------------------
614
615inline void to_json_UBX_MON_VER(nlohmann::json& j, const std::vector<uint8_t>& data)
616{
617 if ((data.size() < UBX_MON_VER_V0_MIN_SIZE) ||
618 (((data.size() - UBX_MON_VER_V0_MIN_SIZE) % sizeof(UBX_MON_VER_V0_GROUP1)) != 0)) {
619 return;
620 }
622 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
623 char sw_version[sizeof(head.swVersion) + 1] = { 0 };
624 char hw_version[sizeof(head.hwVersion) + 1] = { 0 };
625 std::memcpy(sw_version, head.swVersion, sizeof(head.swVersion));
626 std::memcpy(hw_version, head.hwVersion, sizeof(head.hwVersion));
627
628 const std::size_t num_ext = (data.size() - UBX_MON_VER_V0_MIN_SIZE) / sizeof(UBX_MON_VER_V0_GROUP1);
629 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
630 auto extensions = nlohmann::json::array();
631 for (std::size_t ix = 0; ix < num_ext; ix++, offs += sizeof(UBX_MON_VER_V0_GROUP1)) {
633 std::memcpy(&e, &data[offs], sizeof(e));
634 char extension[sizeof(e.extension) + 1] = { 0 };
635 std::memcpy(extension, e.extension, sizeof(e.extension));
636 extensions.push_back(extension);
637 }
638
639 j = nlohmann::json::object({
640 { "swVersion", sw_version },
641 { "hwVersion", hw_version },
642 { "extensions", extensions },
643 });
644}
645
646// ---------------------------------------------------------------------------------------------------------------------
647
648inline void to_json_UBX_NAV_ATT(nlohmann::json& j, const std::vector<uint8_t>& data)
649{
650 if ((data.size() == UBX_NAV_ATT_V0_SIZE) && (UBX_NAV_ATT_VERSION(data.data()) == UBX_NAV_ATT_V0_VERSION)) {
652 std::memcpy(&att, &data[UBX_HEAD_SIZE], sizeof(att));
653 j = nlohmann::json::object({
654 { "iTOW", att.iTOW },
655 { "version", att.version },
656 { "roll", att.roll },
657 { "pitch", att.pitch },
658 { "heading", att.heading },
659 { "accRoll", att.accRoll },
660 { "accPitch", att.accPitch },
661 { "accHeading", att.accHeading },
662 });
663 }
664}
665
666// ---------------------------------------------------------------------------------------------------------------------
667
668inline void to_json_UBX_NAV_CLOCK(nlohmann::json& j, const std::vector<uint8_t>& data)
669{
670 if (data.size() == UBX_NAV_CLOCK_V0_SIZE) {
672 std::memcpy(&clock, &data[UBX_HEAD_SIZE], sizeof(clock));
673 j = nlohmann::json::object({
674 { "iTow", clock.iTow },
675 { "clkB", clock.clkB },
676 { "clkD", clock.clkD },
677 { "tAcc", clock.tAcc },
678 { "fAcc", clock.fAcc },
679 });
680 }
681}
682
683// ---------------------------------------------------------------------------------------------------------------------
684
685inline void to_json_UBX_NAV_COV(nlohmann::json& j, const std::vector<uint8_t>& data)
686{
687 if ((data.size() == UBX_NAV_COV_V0_SIZE) && (UBX_NAV_COV_VERSION(data.data()) == UBX_NAV_COV_V0_VERSION)) {
689 std::memcpy(&cov, &data[UBX_HEAD_SIZE], sizeof(cov));
690 j = nlohmann::json::object({
691 { "iTOW", cov.iTOW },
692 { "version", cov.version },
693 { "posCovNN", cov.posCovNN },
694 { "posCovNE", cov.posCovNE },
695 { "posCovND", cov.posCovND },
696 { "posCovEE", cov.posCovEE },
697 { "posCovED", cov.posCovED },
698 { "posCovDD", cov.posCovDD },
699 { "velCovNN", cov.velCovNN },
700 { "velCovNE", cov.velCovNE },
701 { "velCovND", cov.velCovND },
702 { "velCovEE", cov.velCovEE },
703 { "velCovED", cov.velCovED },
704 { "velCovDD", cov.velCovDD },
705 { "posCovValid", cov.posCovValid != 0 },
706 { "velCovValid", cov.velCovValid != 0 },
707 });
708 }
709}
710
711// ---------------------------------------------------------------------------------------------------------------------
712
713inline void to_json_UBX_NAV_DOP(nlohmann::json& j, const std::vector<uint8_t>& data)
714{
715 if (data.size() == UBX_NAV_DOP_V0_SIZE) {
717 std::memcpy(&dop, &data[UBX_HEAD_SIZE], sizeof(dop));
718 // The struct is packed, so we cannot use the fields directly
719 j = nlohmann::json::object({
720 { "iTOW", (uint32_t)dop.iTOW },
721 { "gDOP", (uint16_t)dop.gDOP },
722 { "pDOP", (uint16_t)dop.pDOP },
723 { "tDOP", (uint16_t)dop.tDOP },
724 { "vDOP", (uint16_t)dop.vDOP },
725 { "hDOP", (uint16_t)dop.hDOP },
726 { "nDOP", (uint16_t)dop.nDOP },
727 { "eDOP", (uint16_t)dop.eDOP },
728 });
729 }
730}
731
732// ---------------------------------------------------------------------------------------------------------------------
733
734inline void to_json_UBX_NAV_EELL(nlohmann::json& j, const std::vector<uint8_t>& data)
735{
736 if ((data.size() == UBX_NAV_EELL_V0_SIZE) && (UBX_NAV_EELL_VERSION(data.data()) == UBX_NAV_EELL_V0_VERSION)) {
738 std::memcpy(&eell, &data[UBX_HEAD_SIZE], sizeof(eell));
739 j = nlohmann::json::object({
740 { "iTOW", eell.iTOW },
741 { "version", eell.version },
742 { "errEllipseOrient", eell.errEllipseOrient },
743 { "errEllipseMajor", eell.errEllipseMajor },
744 { "errEllipseMinor", eell.errEllipseMinor },
745 });
746 }
747}
748
749// ---------------------------------------------------------------------------------------------------------------------
750
751inline void to_json_UBX_NAV_EOE(nlohmann::json& j, const std::vector<uint8_t>& data)
752{
753 if (data.size() == UBX_NAV_EOE_V0_SIZE) {
755 std::memcpy(&eoe, &data[UBX_HEAD_SIZE], sizeof(eoe));
756 j = nlohmann::json::object({
757 { "iTOW", eoe.iTOW },
758 });
759 }
760}
761
762// ---------------------------------------------------------------------------------------------------------------------
763
764inline void to_json_UBX_NAV_HPPOSECEF(nlohmann::json& j, const std::vector<uint8_t>& data)
765{
766 if ((data.size() == UBX_NAV_HPPOSECEF_V0_SIZE) &&
769 std::memcpy(&pos, &data[UBX_HEAD_SIZE], sizeof(pos));
770 j = nlohmann::json::object({
771 { "version", pos.version },
772 { "iTOW", pos.iTOW },
773 { "ecefX", pos.ecefX },
774 { "ecefY", pos.ecefY },
775 { "ecefZ", pos.ecefZ },
776 { "ecefXHp", pos.ecefXHp },
777 { "ecefYHp", pos.ecefYHp },
778 { "ecefZHp", pos.ecefZHp },
779 { "pAcc", pos.pAcc },
780 { "invalidEcef", UBX_NAV_HPPOSECEF_V0_FLAGS_INVALIDECEF(pos.flags) },
781 });
782 }
783}
784
785// ---------------------------------------------------------------------------------------------------------------------
786
787inline void to_json_UBX_NAV_HPPOSLLH(nlohmann::json& j, const std::vector<uint8_t>& data)
788{
789 if ((data.size() == UBX_NAV_HPPOSLLH_V0_SIZE) &&
792 std::memcpy(&pos, &data[UBX_HEAD_SIZE], sizeof(pos));
793 j = nlohmann::json::object({
794 { "version", pos.version },
795 { "iTOW", pos.iTOW },
796 { "lon", pos.lon },
797 { "lat", pos.lat },
798 { "height", pos.height },
799 { "hMSL", pos.hMSL },
800 { "lonHp", pos.lonHp },
801 { "latHp", pos.latHp },
802 { "heightHp", pos.heightHp },
803 { "hMSLHp", pos.hMSLHp },
804 { "hAcc", pos.hAcc },
805 { "vAcc", pos.vAcc },
806 { "invalidLlh", (pos.flags & UBX_NAV_HPPOSLLH_V0_FLAGS_INVALIDLLH) != 0 },
807 });
808 }
809}
810
811// ---------------------------------------------------------------------------------------------------------------------
812
813inline void to_json_UBX_NAV_POSECEF(nlohmann::json& j, const std::vector<uint8_t>& data)
814{
815 if (data.size() == UBX_NAV_POSECEF_V0_SIZE) {
817 std::memcpy(&pos, &data[UBX_HEAD_SIZE], sizeof(pos));
818 j = nlohmann::json::object({
819 { "iTOW", pos.iTOW },
820 { "ecefX", pos.ecefX },
821 { "ecefY", pos.ecefY },
822 { "ecefZ", pos.ecefZ },
823 { "pAcc", pos.pAcc },
824 });
825 }
826}
827
828// ---------------------------------------------------------------------------------------------------------------------
829
830inline void to_json_UBX_NAV_PVT(nlohmann::json& j, const std::vector<uint8_t>& data)
831{
832 if (data.size() == UBX_NAV_PVT_V1_SIZE) {
834 std::memcpy(&pvt, &data[UBX_HEAD_SIZE], sizeof(pvt));
835 j = nlohmann::json::object({
836 { "iTOW", pvt.iTOW },
837 { "year", pvt.year },
838 { "month", pvt.month },
839 { "day", pvt.day },
840 { "hour", pvt.hour },
841 { "min", pvt.min },
842 { "sec", pvt.sec },
843 { "tAcc", pvt.tAcc },
844 { "nano", pvt.nano },
845 { "numSV", pvt.numSV },
846 { "lon", pvt.lon },
847 { "lat", pvt.lat },
848 { "height", pvt.height },
849 { "hMSL", pvt.hMSL },
850 { "hAcc", pvt.hAcc },
851 { "vAcc", pvt.vAcc },
852 { "velN", pvt.velN },
853 { "velE", pvt.velE },
854 { "velD", pvt.velD },
855 { "gSpeed", pvt.gSpeed },
856 { "headMot", pvt.headMot },
857 { "sAcc", pvt.sAcc },
858 { "headAcc", pvt.headAcc },
859 { "pDOP", pvt.pDOP },
860 { "headVeh", pvt.headVeh },
861 { "magDec", pvt.magDec },
862 { "magAcc", pvt.magAcc },
863 { "validDate", UBX_NAV_PVT_V1_VALID_VALIDDATE(pvt.valid) },
864 { "validTime", UBX_NAV_PVT_V1_VALID_VALIDTIME(pvt.valid) },
865 { "fullyResolved", UBX_NAV_PVT_V1_VALID_FULLYRESOLVED(pvt.valid) },
866 { "validMag", UBX_NAV_PVT_V1_VALID_VALIDMAG(pvt.valid) },
867 { "fixType", UBX_NAV_PVT_V1_FIXTYPE_STR(pvt.fixType) },
868 { "gnssFixOk", UBX_NAV_PVT_V1_FLAGS_GNSSFIXOK(pvt.flags) },
869 { "diffSoln", UBX_NAV_PVT_V1_FLAGS_DIFFSOLN(pvt.flags) },
870 { "psmState", UBX_NAV_PVT_V1_FLAGS_PSMSTATE_STR(pvt.flags) },
871 { "headVehValid", UBX_NAV_PVT_V1_FLAGS_HEADVEHVALID(pvt.flags) },
872 { "carrSoln", UBX_NAV_PVT_V1_FLAGS_CARRSOLN_STR(pvt.flags) },
873 { "confAvail", UBX_NAV_PVT_V1_FLAGS2_CONFAVAIL(pvt.flags2) },
874 { "confDate", UBX_NAV_PVT_V1_FLAGS2_CONFDATE(pvt.flags2) },
875 { "confTime", UBX_NAV_PVT_V1_FLAGS2_CONFTIME(pvt.flags2) },
876 { "invalidLlh", UBX_NAV_PVT_V1_FLAGS3_INVALIDLLH(pvt.flags3) },
877 { "lastCorrectionAge", UBX_NAV_PVT_V1_FLAGS3_LASTCORRECTIONAGE_STR(pvt.flags3) },
878 { "authTime", UBX_NAV_PVT_V1_FLAGS3_AUTHTIME_STR(pvt.flags3) },
879 { "nmaFixStatus", UBX_NAV_PVT_V1_FLAGS3_NMAFIXSTATUS_STR(pvt.flags3) },
880 });
881 }
882}
883
884// ---------------------------------------------------------------------------------------------------------------------
885
886inline void to_json_UBX_NAV_RELPOSNED(nlohmann::json& j, const std::vector<uint8_t>& data)
887{
888 if ((data.size() == UBX_NAV_RELPOSNED_V1_SIZE) &&
891 std::memcpy(&rel, &data[UBX_HEAD_SIZE], sizeof(rel));
892 j = nlohmann::json::object({
893 { "version", rel.version },
894 { "refStationId", rel.refStationId },
895 { "iTOW", rel.iTOW },
896 { "relPosN", rel.relPosN },
897 { "relPosE", rel.relPosE },
898 { "relPosD", rel.relPosD },
899 { "relPosLength", rel.relPosLength },
900 { "relPosHeading", rel.relPosHeading },
901 { "relPosHPN", rel.relPosHPN },
902 { "relPosHPE", rel.relPosHPE },
903 { "relPosHPD", rel.relPosHPD },
904 { "relPosHPLength", rel.relPosHPLength },
905 { "accN", rel.accN },
906 { "accE", rel.accE },
907 { "accD", rel.accD },
908 { "accLength", rel.accLength },
909 { "accHeading", rel.accHeading },
910 { "gnssFixOk", UBX_NAV_RELPOSNED_V1_FLAGS_GNSSFIXOK(rel.flags) },
911 { "diffSoln", UBX_NAV_RELPOSNED_V1_FLAGS_DIFFSOLN(rel.flags) },
912 { "relPosValid", UBX_NAV_RELPOSNED_V1_FLAGS_RELPOSVALID(rel.flags) },
913 { "carrSoln", UBX_NAV_RELPOSNED_V1_FLAGS_CARRSOLN_STR(rel.flags) },
914 { "isMoving", UBX_NAV_RELPOSNED_V1_FLAGS_ISMOVING(rel.flags) },
915 { "refPosMiss", UBX_NAV_RELPOSNED_V1_FLAGS_REFPOSMISS(rel.flags) },
916 { "refObsMiss", UBX_NAV_RELPOSNED_V1_FLAGS_REFOBSMISS(rel.flags) },
917 { "relPosHeadingValid", UBX_NAV_RELPOSNED_V1_FLAGS_RELPOSHEADINGVALID(rel.flags) },
918 { "relPosNormalized", UBX_NAV_RELPOSNED_V1_FLAGS_RELPOSNORMALIZED(rel.flags) },
919 });
920 }
921}
922
923// ---------------------------------------------------------------------------------------------------------------------
924
925inline void to_json_UBX_NAV_SAT(nlohmann::json& j, const std::vector<uint8_t>& data)
926{
927 if ((data.size() < UBX_NAV_SAT_V1_MIN_SIZE) || (UBX_NAV_SAT_VERSION(data.data()) != UBX_NAV_SAT_V1_VERSION)) {
928 return;
929 }
931 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
932 if (data.size() != (UBX_NAV_SAT_V1_MIN_SIZE + (head.numSvs * sizeof(UBX_NAV_SAT_V1_GROUP1)))) {
933 return;
934 }
935
936 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
937 auto svs = nlohmann::json::array();
938 for (std::size_t ix = 0; ix < head.numSvs; ix++, offs += sizeof(UBX_NAV_SAT_V1_GROUP1)) {
940 std::memcpy(&s, &data[offs], sizeof(s));
941 svs.push_back(nlohmann::json::object({
942 { "gnssId", UBX_GNSSID_STR(s.gnssId) },
943 { "svId", s.svId },
944 { "cno", s.cno },
945 { "elev", s.elev },
946 { "azim", s.azim },
947 { "prRes", s.prRes },
948 { "orbitSource", UBX_NAV_SAT_V1_FLAGS_ORBITSOURCE_STR(s.flags) },
949 { "ephAvail", UBX_NAV_SAT_V1_FLAGS_EPHAVAIL(s.flags) },
950 { "almAvail", UBX_NAV_SAT_V1_FLAGS_ALMAVAIL(s.flags) },
951 { "anoAvail", UBX_NAV_SAT_V1_FLAGS_ANOAVAIL(s.flags) },
952 { "aopAvail", UBX_NAV_SAT_V1_FLAGS_AOPAVAIL(s.flags) },
953 }));
954 }
955
956 j = nlohmann::json::object({
957 { "iTOW", head.iTOW },
958 { "version", head.version },
959 { "numSvs", head.numSvs },
960 { "svs", svs },
961 });
962}
963
964// ---------------------------------------------------------------------------------------------------------------------
965
966inline void to_json_UBX_NAV_SIG(nlohmann::json& j, const std::vector<uint8_t>& data)
967{
968 if ((data.size() < UBX_NAV_SIG_V0_MIN_SIZE) || (UBX_NAV_SIG_VERSION(data.data()) != UBX_NAV_SIG_V0_VERSION)) {
969 return;
970 }
972 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
973 if (data.size() != (UBX_NAV_SIG_V0_MIN_SIZE + (head.numSigs * sizeof(UBX_NAV_SIG_V0_GROUP1)))) {
974 return;
975 }
976
977 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
978 auto sigs = nlohmann::json::array();
979 for (std::size_t ix = 0; ix < head.numSigs; ix++, offs += sizeof(UBX_NAV_SIG_V0_GROUP1)) {
981 std::memcpy(&s, &data[offs], sizeof(s));
982 sigs.push_back(nlohmann::json::object({
983 { "gnssId", UBX_GNSSID_STR(s.gnssId) },
984 { "svId", s.svId },
985 { "sigId", UBX_SIGID_STR(s.gnssId, s.sigId) },
986 { "freqId", (int)s.freqId - (int)UBX_NAV_SIG_V0_FREQID_OFFS },
987 { "prRes", s.prRes },
988 { "cno", s.cno },
989 { "qualityInd", UBX_NAV_SIG_V0_QUALITYIND_STR(s.qualityInd) },
990 { "corrSource", UBX_NAV_SIG_V0_CORRSOURCE_STR(s.corrSource) },
991 { "ionoModel", UBX_NAV_SIG_V0_IONOMODEL_STR(s.ionoModel) },
992 { "health", UBX_NAV_SIG_V0_SIGFLAGS_HEALTH_STR(s.sigFlags) },
993 { "prSmoothed", UBX_NAV_SIG_V0_SIGFLAGS_PR_SMOOTHED(s.sigFlags) },
994 { "prUsed", UBX_NAV_SIG_V0_SIGFLAGS_PR_USED(s.sigFlags) },
995 { "crUsed", UBX_NAV_SIG_V0_SIGFLAGS_CR_USED(s.sigFlags) },
996 { "doUsed", UBX_NAV_SIG_V0_SIGFLAGS_DO_USED(s.sigFlags) },
997 { "prCorrUsed", UBX_NAV_SIG_V0_SIGFLAGS_PR_CORR_USED(s.sigFlags) },
998 { "crCorrUsed", UBX_NAV_SIG_V0_SIGFLAGS_CR_CORR_USED(s.sigFlags) },
999 { "doCorrUsed", UBX_NAV_SIG_V0_SIGFLAGS_DO_CORR_USED(s.sigFlags) },
1000 { "authStatus", UBX_NAV_SIG_V0_SIGFLAGS_AUTH_STATUS(s.sigFlags) },
1001 }));
1002 }
1003
1004 j = nlohmann::json::object({
1005 { "iTOW", head.iTOW },
1006 { "version", head.version },
1007 { "numSigs", head.numSigs },
1008 { "sigs", sigs },
1009 });
1010}
1011
1012// ---------------------------------------------------------------------------------------------------------------------
1013
1014inline void to_json_UBX_NAV_STATUS(nlohmann::json& j, const std::vector<uint8_t>& data)
1015{
1016 if (data.size() == UBX_NAV_STATUS_V0_SIZE) {
1018 std::memcpy(&sta, &data[UBX_HEAD_SIZE], sizeof(sta));
1019 j = nlohmann::json::object({
1020 { "iTow", sta.iTow },
1021 { "ttff", sta.ttff },
1022 { "msss", sta.msss },
1023 { "gpsFix", UBX_NAV_STATUS_V0_GPSFIX_STR(sta.gpsFix) },
1024 { "gpsFixOk", UBX_NAV_STATUS_V0_FLAGS_GPSFIXOK(sta.flags) },
1025 { "diffSoln", UBX_NAV_STATUS_V0_FLAGS_DIFFSOLN(sta.flags) },
1026 { "wknSet", UBX_NAV_STATUS_V0_FLAGS_WKNSET(sta.flags) },
1027 { "towSet", UBX_NAV_STATUS_V0_FLAGS_TOWSET(sta.flags) },
1028 { "diffCorr", UBX_NAV_STATUS_V0_FIXSTAT_DIFFCORR(sta.fixStat) },
1029 { "carrSolnValid", UBX_NAV_STATUS_V0_FIXSTAT_CARRSOLNVALID(sta.fixStat) },
1030 { "psmState", UBX_NAV_STATUS_V0_FLAGS2_PSMSTATE_STR(sta.flags2) },
1031 { "spoofDetState", UBX_NAV_STATUS_V0_FLAGS2_SPOOFDETSTATE_STR(sta.flags2) },
1032 { "carrSoln", UBX_NAV_STATUS_V0_FLAGS2_CARRSOLN_STR(sta.flags2) },
1033 });
1034 }
1035}
1036
1037// ---------------------------------------------------------------------------------------------------------------------
1038
1039inline void to_json_UBX_NAV_TIMEBDS(nlohmann::json& j, const std::vector<uint8_t>& data)
1040{
1041 if (data.size() == UBX_NAV_TIMEBDS_V0_SIZE) {
1043 std::memcpy(&time, &data[UBX_HEAD_SIZE], sizeof(time));
1044 j = nlohmann::json::object({
1045 { "iTow", time.iTow },
1046 { "SOW", time.SOW },
1047 { "fSOW", time.fSOW },
1048 { "week", time.week },
1049 { "leapS", time.leapS },
1050 { "tAcc", time.tAcc },
1051 { "sowValid", UBX_NAV_TIMEBDS_V0_VALID_SOWVALID(time.valid) },
1052 { "weekValid", UBX_NAV_TIMEBDS_V0_VALID_WEEKVALID(time.valid) },
1053 { "leapSValid", UBX_NAV_TIMEBDS_V0_VALID_LEAPSVALID(time.valid) },
1054 });
1055 }
1056}
1057
1058// ---------------------------------------------------------------------------------------------------------------------
1059
1060inline void to_json_UBX_NAV_TIMEGAL(nlohmann::json& j, const std::vector<uint8_t>& data)
1061{
1062 if (data.size() == UBX_NAV_TIMEGAL_V0_SIZE) {
1064 std::memcpy(&time, &data[UBX_HEAD_SIZE], sizeof(time));
1065 j = nlohmann::json::object({
1066 { "iTow", time.iTow },
1067 { "galTow", time.galTow },
1068 { "fGalTow", time.fGalTow },
1069 { "galWno", time.galWno },
1070 { "leapS", time.leapS },
1071 { "tAcc", time.tAcc },
1072 { "galTowValid", UBX_NAV_TIMEGAL_V0_VALID_GALTOWVALID(time.valid) },
1073 { "galWnoValid", UBX_NAV_TIMEGAL_V0_VALID_GALWNOVALID(time.valid) },
1074 { "leapSValid", UBX_NAV_TIMEGAL_V0_VALID_LEAPSVALID(time.valid) },
1075 });
1076 }
1077}
1078
1079// ---------------------------------------------------------------------------------------------------------------------
1080
1081inline void to_json_UBX_NAV_TIMEGLO(nlohmann::json& j, const std::vector<uint8_t>& data)
1082{
1083 if (data.size() == UBX_NAV_TIMEGLO_V0_SIZE) {
1085 std::memcpy(&time, &data[UBX_HEAD_SIZE], sizeof(time));
1086 j = nlohmann::json::object({
1087 { "iTow", time.iTow },
1088 { "TOD", time.TOD },
1089 { "fTOD", time.fTOD },
1090 { "Nt", time.Nt },
1091 { "N4", time.N4 },
1092 { "tAcc", time.tAcc },
1093 { "todValid", UBX_NAV_TIMEGLO_V0_VALID_TODVALID(time.valid) },
1094 { "dateValid", UBX_NAV_TIMEGLO_V0_VALID_DATEVALID(time.valid) },
1095 });
1096 }
1097}
1098
1099// ---------------------------------------------------------------------------------------------------------------------
1100
1101inline void to_json_UBX_NAV_TIMEGPS(nlohmann::json& j, const std::vector<uint8_t>& data)
1102{
1103 if (data.size() == UBX_NAV_TIMEGPS_V0_SIZE) {
1105 std::memcpy(&time, &data[UBX_HEAD_SIZE], sizeof(time));
1106 j = nlohmann::json::object({
1107 { "iTow", time.iTow },
1108 { "fTOW", time.fTOW },
1109 { "week", time.week },
1110 { "leapS", time.leapS },
1111 { "tAcc", time.tAcc },
1112 { "towValid", UBX_NAV_TIMEGPS_V0_VALID_TOWVALID(time.valid) },
1113 { "weekValid", UBX_NAV_TIMEGPS_V0_VALID_WEEKVALID(time.valid) },
1114 { "leapSValid", UBX_NAV_TIMEGPS_V0_VALID_LEAPSVALID(time.valid) },
1115 });
1116 }
1117}
1118
1119// ---------------------------------------------------------------------------------------------------------------------
1120
1121inline void to_json_UBX_NAV_TIMETRUSTED(nlohmann::json& j, const std::vector<uint8_t>& data)
1122{
1123 if ((data.size() == UBX_NAV_TIMETRUSTED_V1_SIZE) &&
1126 std::memcpy(&tt, &data[UBX_HEAD_SIZE], sizeof(tt));
1127 j = nlohmann::json::object({
1128 { "version", tt.version },
1129 { "iTOW", tt.iTOW },
1130 { "iniWno", tt.iniWno },
1131 { "propWno", tt.propWno },
1132 { "iniTow", tt.iniTow },
1133 { "propTow", tt.propTow },
1134 { "iniTAcc", tt.iniTAcc },
1135 { "propTAcc", tt.propTAcc },
1136 { "deltaS", tt.deltaS },
1137 { "deltaMs", tt.deltaMs },
1138 { "refSys", UBX_NAV_TIMETRUSTED_V1_REFSYS_STR(tt.refSys) },
1139 { "trustedTimeValid", UBX_NAV_TIMETRUSTED_V1_VALID_TRUSTEDTIMEVALID(tt.valid) },
1140 { "deltaTimeValid", UBX_NAV_TIMETRUSTED_V1_VALID_DELTATIMEVALID(tt.valid) },
1141 });
1142 }
1143}
1144
1145// ---------------------------------------------------------------------------------------------------------------------
1146
1147inline void to_json_UBX_NAV_TIMEUTC(nlohmann::json& j, const std::vector<uint8_t>& data)
1148{
1149 if (data.size() == UBX_NAV_TIMEUTC_V0_SIZE) {
1151 std::memcpy(&utc, &data[UBX_HEAD_SIZE], sizeof(utc));
1152 j = nlohmann::json::object({
1153 { "iTow", utc.iTow },
1154 { "tAcc", utc.tAcc },
1155 { "nano", utc.nano },
1156 { "year", utc.year },
1157 { "month", utc.month },
1158 { "day", utc.day },
1159 { "hour", utc.hour },
1160 { "min", utc.min },
1161 { "sec", utc.sec },
1162 { "validTow", UBX_NAV_TIMEUTC_V0_VALID_VALIDTOW(utc.valid) != 0 },
1163 { "validWkn", UBX_NAV_TIMEUTC_V0_VALID_VALIDWKN(utc.valid) != 0 },
1164 { "validUtc", UBX_NAV_TIMEUTC_V0_VALID_VALIDUTC(utc.valid) != 0 },
1165 { "authStatus", UBX_NAV_TIMEUTC_V0_VALID_AUTHSTATUS(utc.valid) },
1166 { "utcStandard", UBX_NAV_TIMEUTC_V0_VALID_UTCSTANDARD_STR(utc.valid) },
1167 });
1168 }
1169}
1170
1171// ---------------------------------------------------------------------------------------------------------------------
1172
1173inline void to_json_UBX_NAV_TIMELS(nlohmann::json& j, const std::vector<uint8_t>& data)
1174{
1175 if (data.size() == UBX_NAV_TIMELS_V0_SIZE) {
1177 std::memcpy(&ls, &data[UBX_HEAD_SIZE], sizeof(ls));
1178 j = nlohmann::json::object({
1179 { "iTOW", ls.iTOW },
1180 { "version", ls.version },
1181 { "currLs", ls.currLs },
1182 { "lsChange", ls.lsChange },
1183 { "timeToLsEvent", ls.timeToLsEvent },
1184 { "dateOfLsGpsWn", ls.dateOfLsGpsWn },
1185 { "dateOfLsGpsDn", ls.dateOfLsGpsDn },
1186 { "srcOfCurrLs", UBX_NAV_TIMELS_V0_SRCOFCURRLS_STR(ls.srcOfCurrLs) },
1187 { "srcOfLsChange", UBX_NAV_TIMELS_V0_SRCOFCURRLSCHANGE_STR(ls.srcOfLsChange) },
1188 { "currLsValid", UBX_NAV_TIMELS_V0_VALID_CURRLSVALID(ls.valid) },
1189 { "timeToLsEventValid", UBX_NAV_TIMELS_V0_VALID_TIMETOLSEVENTVALID(ls.valid) },
1190 });
1191 }
1192}
1193
1194// ---------------------------------------------------------------------------------------------------------------------
1195
1196inline void to_json_UBX_NAV_VELECEF(nlohmann::json& j, const std::vector<uint8_t>& data)
1197{
1198 if (data.size() == UBX_NAV_VELECEF_V0_SIZE) {
1200 std::memcpy(&vel, &data[UBX_HEAD_SIZE], sizeof(vel));
1201 j = nlohmann::json::object({
1202 { "iTOW", vel.iTOW },
1203 { "ecefVX", vel.ecefVX },
1204 { "ecefVY", vel.ecefVY },
1205 { "ecefVZ", vel.ecefVZ },
1206 { "sAcc", vel.sAcc },
1207 });
1208 }
1209}
1210
1211// ---------------------------------------------------------------------------------------------------------------------
1212
1213inline void to_json_UBX_RXM_RAWX(nlohmann::json& j, const std::vector<uint8_t>& data)
1214{
1215 if ((data.size() < UBX_RXM_RAWX_V1_MIN_SIZE) || (UBX_RXM_RAWX_VERSION(data.data()) != UBX_RXM_RAWX_V1_VERSION) ||
1216 (data.size() != UBX_RXM_RAWX_V1_SIZE(data.data()))) {
1217 return;
1218 }
1220 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
1221
1222 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
1223 auto meas = nlohmann::json::array();
1224 for (std::size_t ix = 0; ix < head.numMeas; ix++, offs += sizeof(UBX_RXM_RAWX_V1_GROUP1)) {
1226 std::memcpy(&m, &data[offs], sizeof(m));
1227 meas.push_back(nlohmann::json::object({
1228 { "prMeas", m.prMeas },
1229 { "cpMeas", m.cpMeas },
1230 { "doMeas", m.doMeas },
1231 { "gnssId", UBX_GNSSID_STR(m.gnssId) },
1232 { "svId", m.svId },
1233 { "sigId", UBX_SIGID_STR(m.gnssId, m.sigId) },
1234 { "freqId", UBX_RXM_RAWX_V1_GROUP1_FREQID_TO_SLOT(m.freqId) },
1235 { "locktime", m.locktime },
1236 { "cno", m.cno },
1237 { "prStdev", UBX_RXM_RAWX_V1_PRSTDEV_PRSTD(m.prStdev) },
1238 { "cpStdev", UBX_RXM_RAWX_V1_CPSTDEV_CPSTD(m.cpStdev) },
1239 { "doStdev", UBX_RXM_RAWX_V1_DOSTDEV_DOSTD(m.doStdev) },
1240 { "prValid", UBX_RXM_RAWX_V1_TRKSTAT_PRVALID(m.trkStat) },
1241 { "cpValid", UBX_RXM_RAWX_V1_TRKSTAT_CPVALID(m.trkStat) },
1242 { "halfCyc", UBX_RXM_RAWX_V1_TRKSTAT_HALFCYC(m.trkStat) },
1243 { "subHalfCyc", UBX_RXM_RAWX_V1_TRKSTAT_SUBHALFCYC(m.trkStat) },
1244 }));
1245 }
1246
1247 j = nlohmann::json::object({
1248 { "rcvTow", head.rcvTow },
1249 { "week", head.week },
1250 { "leapS", head.leapS },
1251 { "numMeas", head.numMeas },
1252 { "version", head.version },
1253 { "leapSec", UBX_RXM_RAWX_V1_RECSTAT_LEAPSEC(head.recStat) },
1254 { "clkReset", UBX_RXM_RAWX_V1_RECSTAT_CLKRESET(head.recStat) },
1255 { "meas", meas },
1256 });
1257}
1258
1259// ---------------------------------------------------------------------------------------------------------------------
1260
1261inline void to_json_UBX_RXM_RTCM(nlohmann::json& j, const std::vector<uint8_t>& data)
1262{
1263 if ((data.size() == UBX_RXM_RTCM_V2_SIZE) && (UBX_RXM_RTCM_VERSION(data.data()) == UBX_RXM_RTCM_V2_VERSION)) {
1265 std::memcpy(&rtcm, &data[UBX_HEAD_SIZE], sizeof(rtcm));
1266 j = nlohmann::json::object({
1267 { "version", rtcm.version },
1268 { "subType", rtcm.subType },
1269 { "refStation", rtcm.refStation },
1270 { "msgType", rtcm.msgType },
1271 { "crcFailed", UBX_RXM_RTCM_V2_FLAGS_CRCFAILED(rtcm.flags) },
1272 { "msgUsed", UBX_RXM_RTCM_V2_FLAGS_MSGUSED_STR(rtcm.flags) },
1273 });
1274 }
1275}
1276
1277// ---------------------------------------------------------------------------------------------------------------------
1278
1279inline void to_json_UBX_RXM_SFRBX(nlohmann::json& j, const std::vector<uint8_t>& data)
1280{
1281 if ((data.size() < UBX_RXM_SFRBX_V2_MIN_SIZE) || (UBX_RXM_SFRBX_VERSION(data.data()) != UBX_RXM_SFRBX_V2_VERSION)) {
1282 return;
1283 }
1285 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
1286 if (data.size() != (UBX_RXM_SFRBX_V2_MIN_SIZE + (head.numWords * sizeof(UBX_RXM_SFRBX_V2_GROUP1)))) {
1287 return;
1288 }
1289 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
1290 auto dwrds = nlohmann::json::array();
1291 for (std::size_t ix = 0; ix < head.numWords; ix++, offs += sizeof(UBX_RXM_SFRBX_V2_GROUP1)) {
1293 std::memcpy(&w, &data[offs], sizeof(w));
1294 dwrds.push_back(string::Sprintf("%08x", w.dwrd));
1295 }
1296
1297 j = nlohmann::json::object({
1298 { "gnssId", UBX_GNSSID_STR(head.gnssId) },
1299 { "svId", head.svId },
1300 { "sigId", UBX_SIGID_STR(head.gnssId, head.sigId) },
1301 { "freqId", UBX_RXM_SFRBX_V2_GROUP0_FREQID_TO_SLOT(head.freqId) },
1302 { "numWords", head.numWords },
1303 { "chn", head.chn },
1304 { "version", head.version },
1305 { "dwrds", dwrds },
1306 });
1307}
1308
1309// ---------------------------------------------------------------------------------------------------------------------
1310
1311inline void to_json_UBX_RXM_SPARTN(nlohmann::json& j, const std::vector<uint8_t>& data)
1312{
1313 if ((data.size() == UBX_RXM_SPARTN_V1_SIZE) && (UBX_RXM_SPARTN_VERSION(data.data()) == UBX_RXM_SPARTN_V1_VERSION)) {
1315 std::memcpy(&spartn, &data[UBX_HEAD_SIZE], sizeof(spartn));
1316 j = nlohmann::json::object({
1317 { "version", spartn.version },
1318 { "subType", spartn.subType },
1319 { "msgType", spartn.msgType },
1320 { "msgUsed", UBX_RXM_SPARTN_V1_FLAGS_MSGUSED_STR(spartn.flags) },
1321 });
1322 }
1323}
1324
1325// ---------------------------------------------------------------------------------------------------------------------
1326
1327inline void to_json_UBX_SEC_OSNMA(nlohmann::json& j, const std::vector<uint8_t>& data)
1328{
1329 if ((data.size() < UBX_SEC_OSNMA_V3_MIN_SIZE) || (UBX_SEC_OSNMA_VERSION(data.data()) != UBX_SEC_OSNMA_V3_VERSION)) {
1330 return;
1331 }
1333 std::memcpy(&head, &data[UBX_HEAD_SIZE], sizeof(head));
1334 const std::size_t num_svs = UBX_SEC_OSNMA_V3_GENERALANDTIMING_AUTHSVS(head.generalAndTiming);
1335 if (data.size() != (UBX_SEC_OSNMA_V3_MIN_SIZE + (num_svs * sizeof(UBX_SEC_OSNMA_V3_GROUP1)))) {
1336 return;
1337 }
1338 std::size_t offs = UBX_HEAD_SIZE + sizeof(head);
1339 auto svs = nlohmann::json::array();
1340 for (std::size_t ix = 0; ix < num_svs; ix++, offs += sizeof(UBX_SEC_OSNMA_V3_GROUP1)) {
1342 std::memcpy(&s, &data[offs], sizeof(s));
1343 svs.push_back(nlohmann::json::object({
1344 { "svId", s.svId },
1345 { "iode", UBX_SEC_OSNMA_V3_GROUP1_BITFIELD1_IODE(s.bitfield1) },
1346 { "authNum", UBX_SEC_OSNMA_V3_GROUP1_BITFIELD1_AUTHNUM(s.bitfield1) },
1347 { "authStatus", UBX_SEC_OSNMA_V3_GROUP1_BITFIELD1_AUTHSTATUS(s.bitfield1) },
1348 }));
1349 }
1350
1351 j = nlohmann::json::object({
1352 { "version", head.version },
1353 { "headerAuthStatus", UBX_SEC_OSNMA_V3_NMAHEADER_HEADERAUTHSTATUS(head.nmaHeader) },
1354 { "nmaStatus", UBX_SEC_OSNMA_V3_NMAHEADER_NMASTATUS_STR(head.nmaHeader) },
1355 { "chainInForce", UBX_SEC_OSNMA_V3_NMAHEADER_CHAININFORCE(head.nmaHeader) },
1356 { "cpks", UBX_SEC_OSNMA_V3_NMAHEADER_CPKS_STR(head.nmaHeader) },
1357 { "osnmaEnabled", UBX_SEC_OSNMA_V3_OSNMAMONITORING_OSNMAENABLED(head.osnmaMonitoring) },
1358 { "numberSvs", UBX_SEC_OSNMA_V3_OSNMAMONITORING_NUMBERSVS(head.osnmaMonitoring) },
1359 { "nmaHeaderUpdate", UBX_SEC_OSNMA_V3_OSNMAMONITORING_NMAHEADERUPDATE_STR(head.osnmaMonitoring) },
1360 { "noData", UBX_SEC_OSNMA_V3_OSNMAMONITORING_NODATA(head.osnmaMonitoring) },
1361 { "wrongData", UBX_SEC_OSNMA_V3_OSNMAMONITORING_WRONGDATA(head.osnmaMonitoring) },
1362 { "wrongFlxMac", UBX_SEC_OSNMA_V3_OSNMAMONITORING_WRONGFLXMAC(head.osnmaMonitoring) },
1363 { "wrongMacLt", UBX_SEC_OSNMA_V3_OSNMAMONITORING_WRONGMACLT(head.osnmaMonitoring) },
1364 { "timSyncEnabled", UBX_SEC_OSNMA_V3_TIMSYNCREQ_TIMSYNCENABLED(head.timSyncReq) },
1365 { "timSyncStatus", UBX_SEC_OSNMA_V3_TIMSYNCREQ_TIMSYNCSTATUS_STR(head.timSyncReq) },
1366 { "timSyncReqDiff", head.timSyncReqDiff },
1367 { "dsmAuthenticationStatus",
1369 { "hashFunction", UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_HASHFUNCTION(head.dsmAuthentication) },
1370 { "macFunction", UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_MACFUNCTION(head.dsmAuthentication) },
1371 { "pubKeyId", UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_PUBKEYID(head.dsmAuthentication) },
1372 { "macLookupTable", UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_MACLOOKUPTABLE(head.dsmAuthentication) },
1373 { "keySize", UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_KEYSIZE(head.dsmAuthentication) },
1374 { "macSize", UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_MACSIZE(head.dsmAuthentication) },
1375 { "fromNvs", UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_FROMNVS(head.dsmAuthentication) },
1376 { "teslaKeyAuthStatus", UBX_SEC_OSNMA_V3_TESLAKEY_TESLAKEYAUTHSTATUS_STR(head.teslaKey) },
1377 { "wnSf", UBX_SEC_OSNMA_V3_TESLAKEY_WNSF(head.teslaKey) },
1378 { "towSf", UBX_SEC_OSNMA_V3_TESLAKEY_TOWSF(head.teslaKey) },
1379 { "chainId", UBX_SEC_OSNMA_V3_TESLAKEY_CHAINID(head.teslaKey) },
1380 { "authSvs", UBX_SEC_OSNMA_V3_GENERALANDTIMING_AUTHSVS(head.generalAndTiming) },
1381 { "authNumTim", UBX_SEC_OSNMA_V3_GENERALANDTIMING_AUTHNUMTIM(head.generalAndTiming) },
1382 { "timingAuthResult", UBX_SEC_OSNMA_V3_GENERALANDTIMING_TIMINGAUTHRESULT_STR(head.generalAndTiming) },
1383 { "macAdkdType", UBX_SEC_OSNMA_V3_GENERALANDTIMING_MACADKDTYPE_STR(head.generalAndTiming) },
1384 { "pubKeySrc", UBX_SEC_OSNMA_V3_GENERALANDTIMING_PUBKEYSRC_STR(head.generalAndTiming) },
1385 { "merkleRootSrc", UBX_SEC_OSNMA_V3_GENERALANDTIMING_MERKLEROOTSRC_STR(head.generalAndTiming) },
1386 { "merkleRootVal", UBX_SEC_OSNMA_V3_GENERALANDTIMING_MERKLEROOTVAL(head.generalAndTiming) },
1387 { "futureMerkleRootSrc", UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREMERKLEROOTSRC_STR(head.generalAndTiming) },
1388 { "futureMerkleRootVal", UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREMERKLEROOTVAL(head.generalAndTiming) },
1389 { "pubKeyVal", UBX_SEC_OSNMA_V3_GENERALANDTIMING_PUBKEYVAL(head.generalAndTiming) },
1390 { "futurePubKeyVal", UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREPUBKEYVAL(head.generalAndTiming) },
1391 { "futurePubKeySrc", UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREPUBKEYSRC_STR(head.generalAndTiming) },
1392 { "futurePubKeyId", UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREPUBKEYID(head.generalAndTiming) },
1393 { "svs", svs },
1394 });
1395}
1396
1397// ---------------------------------------------------------------------------------------------------------------------
1398
1399inline void to_json_UBX_TIM_SVIN(nlohmann::json& j, const std::vector<uint8_t>& data)
1400{
1401 if (data.size() == UBX_TIM_SVIN_V0_SIZE) {
1403 std::memcpy(&svin, &data[UBX_HEAD_SIZE], sizeof(svin));
1404 j = nlohmann::json::object({
1405 { "dur", svin.dur },
1406 { "meanX", svin.meanX },
1407 { "meanY", svin.meanY },
1408 { "meanZ", svin.meanZ },
1409 { "meanV", svin.meanV },
1410 { "obs", svin.obs },
1411 { "valid", svin.valid != 0 },
1412 { "active", svin.active != 0 },
1413 });
1414 }
1415}
1416
1417// ---------------------------------------------------------------------------------------------------------------------
1418
1419inline void to_json_UBX_TIM_TM2(nlohmann::json& j, const std::vector<uint8_t>& data)
1420{
1421 if (data.size() == UBX_TIM_TM2_V0_SIZE) {
1423 std::memcpy(&tm2, &data[UBX_HEAD_SIZE], sizeof(tm2));
1424 j = nlohmann::json::object({
1425 { "ch", tm2.ch },
1426 { "count", tm2.count },
1427 { "wnR", tm2.wnR },
1428 { "wnF", tm2.wnF },
1429 { "towMsR", tm2.towMsR },
1430 { "towSubMsR", tm2.towSubMsR },
1431 { "towMsF", tm2.towMsF },
1432 { "towSubMsF", tm2.towSubMsF },
1433 { "accEst", tm2.accEst },
1434 { "mode", UBX_TIM_TM2_V0_FLAGS_MODE_STR(tm2.flags) },
1435 { "run", UBX_TIM_TM2_V0_FLAGS_RUN_STR(tm2.flags) },
1436 { "newFallingEdge", UBX_TIM_TM2_V0_FLAGS_NEWFALLINGEDGE(tm2.flags) },
1437 { "timeBase", UBX_TIM_TM2_V0_FLAGS_TIMEBASE_STR(tm2.flags) },
1438 { "utcAcAvail", UBX_TIM_TM2_V0_FLAGS_UTCACAVAIL(tm2.flags) },
1439 { "timeValid", UBX_TIM_TM2_V0_FLAGS_TIMEVALID(tm2.flags) },
1440 { "newRisingEdge", UBX_TIM_TM2_V0_FLAGS_NEWRISINGEDGE(tm2.flags) },
1441 });
1442 }
1443}
1444
1445// ---------------------------------------------------------------------------------------------------------------------
1446
1447inline void to_json_UBX_TIM_TP(nlohmann::json& j, const std::vector<uint8_t>& data)
1448{
1449 if (data.size() == UBX_TIM_TP_V0_SIZE) {
1451 std::memcpy(&tp, &data[UBX_HEAD_SIZE], sizeof(tp));
1452 j = nlohmann::json::object({
1453 { "towMs", tp.towMs },
1454 { "towSubMs", tp.towSubMs },
1455 { "qErr", tp.qErr },
1456 { "week", tp.week },
1457 { "timeBase", UBX_TIM_TP_V0_FLAGS_TIMEBASE_STR(tp.flags) },
1458 { "utc", UBX_TIM_TP_V0_FLAGS_UTC(tp.flags) },
1459 { "raim", UBX_TIM_TP_V0_FLAGS_RAIM_STR(tp.flags) },
1460 { "qErrInvalid", UBX_TIM_TP_V0_FLAGS_QERRINVALID(tp.flags) },
1461 { "tpNotLocked", UBX_TIM_TP_V0_FLAGS_TPNOTLOCKED(tp.flags) },
1462 { "timeRefGnss", UBX_TIM_TP_V0_REFINFO_TIMEREFGNSS_STR(tp.refInfo) },
1463 { "utcStandard", UBX_TIM_TP_V0_REFINFO_UTCSTANDARD_STR(tp.refInfo) },
1464 });
1465 }
1466}
1467
1468// ---------------------------------------------------------------------------------------------------------------------
1469
1470// UBX-MGA-GAL and UBX-MGA-INI are multiplexed on the payload type byte
1471inline void to_json_UBX_MGA_GAL(nlohmann::json& j, const std::vector<uint8_t>& data)
1472{
1473 if (data.size() < (UBX_HEAD_SIZE + 1)) {
1474 return;
1475 }
1476 switch (data[UBX_HEAD_SIZE]) { // clang-format off
1477 case UBX_MGA_GAL_OSNMA_PUBKEY_TYPE: to_json_UBX_MGA_GAL_OSNMA_PUBKEY(j, data); break;
1478 case UBX_MGA_GAL_OSNMA_MERKLE_TYPE: to_json_UBX_MGA_GAL_OSNMA_MERKLE(j, data); break;
1479 } // clang-format on
1480}
1481
1482inline void to_json_UBX_MGA_INI(nlohmann::json& j, const std::vector<uint8_t>& data)
1483{
1484 if (data.size() < (UBX_HEAD_SIZE + 1)) {
1485 return;
1486 }
1487 switch (data[UBX_HEAD_SIZE]) { // clang-format off
1488 case UBX_MGA_INI_TIME_UTC_TYPE: to_json_UBX_MGA_INI_TIME_UTC(j, data); break;
1489 case UBX_MGA_INI_TIME_GNSS_TYPE: to_json_UBX_MGA_INI_TIME_GNSS(j, data); break;
1490 } // clang-format on
1491}
1492
1493// ---------------------------------------------------------------------------------------------------------------------
1494
1495inline nlohmann::json to_json_UBX(const ParserMsg& msg)
1496{
1497 auto j = nlohmann::json::object();
1498 switch (UbxClsId(msg.Data())) { // clang-format off
1499 case UBX_ACK_CLSID: switch (UbxMsgId(msg.Data())) {
1500 case UBX_ACK_ACK_MSGID: to_json_UBX_ACK(j, msg.data_, true); break;
1501 case UBX_ACK_NAK_MSGID: to_json_UBX_ACK(j, msg.data_, false); break; } break;
1502 case UBX_CFG_CLSID: switch (UbxMsgId(msg.Data())) {
1503 case UBX_CFG_CFG_MSGID: to_json_UBX_CFG_CFG(j, msg.data_); break;
1504 case UBX_CFG_RST_MSGID: to_json_UBX_CFG_RST(j, msg.data_); break;
1505 case UBX_CFG_VALDEL_MSGID: to_json_UBX_CFG_VALDEL(j, msg.data_); break;
1506 case UBX_CFG_VALGET_MSGID: to_json_UBX_CFG_VALGET(j, msg.data_); break;
1507 case UBX_CFG_VALSET_MSGID: to_json_UBX_CFG_VALSET(j, msg.data_); break; } break;
1508 case UBX_ESF_CLSID: switch (UbxMsgId(msg.Data())) {
1509 case UBX_ESF_MEAS_MSGID: to_json_UBX_ESF_MEAS(j, msg.data_); break;
1510 case UBX_ESF_STATUS_MSGID: to_json_UBX_ESF_STATUS(j, msg.data_); break; } break;
1511 case UBX_MGA_CLSID: switch (UbxMsgId(msg.Data())) {
1512 case UBX_MGA_GAL_MSGID: to_json_UBX_MGA_GAL(j, msg.data_); break;
1513 case UBX_MGA_INI_MSGID: to_json_UBX_MGA_INI(j, msg.data_); break; } break;
1514 case UBX_MON_CLSID: switch (UbxMsgId(msg.Data())) {
1515 case UBX_MON_COMMS_MSGID: to_json_UBX_MON_COMMS(j, msg.data_); break;
1516 case UBX_MON_HW_MSGID: to_json_UBX_MON_HW(j, msg.data_); break;
1517 case UBX_MON_HW2_MSGID: to_json_UBX_MON_HW2(j, msg.data_); break;
1518 case UBX_MON_HW3_MSGID: to_json_UBX_MON_HW3(j, msg.data_); break;
1519 case UBX_MON_RF_MSGID: to_json_UBX_MON_RF(j, msg.data_); break;
1520 case UBX_MON_SPAN_MSGID: to_json_UBX_MON_SPAN(j, msg.data_); break;
1521 case UBX_MON_SYS_MSGID: to_json_UBX_MON_SYS(j, msg.data_); break;
1522 case UBX_MON_TEMP_MSGID: to_json_UBX_MON_TEMP(j, msg.data_); break;
1523 case UBX_MON_VER_MSGID: to_json_UBX_MON_VER(j, msg.data_); break; } break;
1524 case UBX_NAV_CLSID: switch (UbxMsgId(msg.Data())) {
1525 case UBX_NAV_ATT_MSGID: to_json_UBX_NAV_ATT(j, msg.data_); break;
1526 case UBX_NAV_CLOCK_MSGID: to_json_UBX_NAV_CLOCK(j, msg.data_); break;
1527 case UBX_NAV_COV_MSGID: to_json_UBX_NAV_COV(j, msg.data_); break;
1528 case UBX_NAV_DOP_MSGID: to_json_UBX_NAV_DOP(j, msg.data_); break;
1529 case UBX_NAV_EELL_MSGID: to_json_UBX_NAV_EELL(j, msg.data_); break;
1530 case UBX_NAV_EOE_MSGID: to_json_UBX_NAV_EOE(j, msg.data_); break;
1531 case UBX_NAV_HPPOSECEF_MSGID: to_json_UBX_NAV_HPPOSECEF(j, msg.data_); break;
1532 case UBX_NAV_HPPOSLLH_MSGID: to_json_UBX_NAV_HPPOSLLH(j, msg.data_); break;
1533 case UBX_NAV_POSECEF_MSGID: to_json_UBX_NAV_POSECEF(j, msg.data_); break;
1534 case UBX_NAV_PVT_MSGID: to_json_UBX_NAV_PVT(j, msg.data_); break;
1535 case UBX_NAV_RELPOSNED_MSGID: to_json_UBX_NAV_RELPOSNED(j, msg.data_); break;
1536 case UBX_NAV_SAT_MSGID: to_json_UBX_NAV_SAT(j, msg.data_); break;
1537 case UBX_NAV_SIG_MSGID: to_json_UBX_NAV_SIG(j, msg.data_); break;
1538 case UBX_NAV_STATUS_MSGID: to_json_UBX_NAV_STATUS(j, msg.data_); break;
1539 case UBX_NAV_TIMEBDS_MSGID: to_json_UBX_NAV_TIMEBDS(j, msg.data_); break;
1540 case UBX_NAV_TIMEGAL_MSGID: to_json_UBX_NAV_TIMEGAL(j, msg.data_); break;
1541 case UBX_NAV_TIMEGLO_MSGID: to_json_UBX_NAV_TIMEGLO(j, msg.data_); break;
1542 case UBX_NAV_TIMEGPS_MSGID: to_json_UBX_NAV_TIMEGPS(j, msg.data_); break;
1543 case UBX_NAV_TIMELS_MSGID: to_json_UBX_NAV_TIMELS(j, msg.data_); break;
1544 case UBX_NAV_TIMETRUSTED_MSGID: to_json_UBX_NAV_TIMETRUSTED(j, msg.data_); break;
1545 case UBX_NAV_TIMEUTC_MSGID: to_json_UBX_NAV_TIMEUTC(j, msg.data_); break;
1546 case UBX_NAV_VELECEF_MSGID: to_json_UBX_NAV_VELECEF(j, msg.data_); break; } break;
1547 case UBX_NAV2_CLSID: switch (UbxMsgId(msg.Data())) {
1548 case UBX_NAV2_CLOCK_MSGID: to_json_UBX_NAV_CLOCK(j, msg.data_); break;
1549 case UBX_NAV2_COV_MSGID: to_json_UBX_NAV_COV(j, msg.data_); break;
1550 case UBX_NAV2_DOP_MSGID: to_json_UBX_NAV_DOP(j, msg.data_); break;
1551 case UBX_NAV2_EOE_MSGID: to_json_UBX_NAV_EOE(j, msg.data_); break;
1552 case UBX_NAV2_POSECEF_MSGID: to_json_UBX_NAV_POSECEF(j, msg.data_); break;
1553 case UBX_NAV2_PVT_MSGID: to_json_UBX_NAV_PVT(j, msg.data_); break;
1554 case UBX_NAV2_SAT_MSGID: to_json_UBX_NAV_SAT(j, msg.data_); break;
1555 case UBX_NAV2_SIG_MSGID: to_json_UBX_NAV_SIG(j, msg.data_); break;
1556 case UBX_NAV2_STATUS_MSGID: to_json_UBX_NAV_STATUS(j, msg.data_); break;
1557 case UBX_NAV2_TIMEBDS_MSGID: to_json_UBX_NAV_TIMEBDS(j, msg.data_); break;
1558 case UBX_NAV2_TIMEGAL_MSGID: to_json_UBX_NAV_TIMEGAL(j, msg.data_); break;
1559 case UBX_NAV2_TIMEGLO_MSGID: to_json_UBX_NAV_TIMEGLO(j, msg.data_); break;
1560 case UBX_NAV2_TIMEGPS_MSGID: to_json_UBX_NAV_TIMEGPS(j, msg.data_); break;
1561 case UBX_NAV2_TIMELS_MSGID: to_json_UBX_NAV_TIMELS(j, msg.data_); break;
1562 case UBX_NAV2_TIMEUTC_MSGID: to_json_UBX_NAV_TIMEUTC(j, msg.data_); break;
1563 case UBX_NAV2_VELECEF_MSGID: to_json_UBX_NAV_VELECEF(j, msg.data_); break; } break;
1564 case UBX_RXM_CLSID: switch (UbxMsgId(msg.Data())) {
1565 case UBX_RXM_RAWX_MSGID: to_json_UBX_RXM_RAWX(j, msg.data_); break;
1566 case UBX_RXM_RTCM_MSGID: to_json_UBX_RXM_RTCM(j, msg.data_); break;
1567 case UBX_RXM_SFRBX_MSGID: to_json_UBX_RXM_SFRBX(j, msg.data_); break;
1568 case UBX_RXM_SPARTN_MSGID: to_json_UBX_RXM_SPARTN(j, msg.data_); break; } break;
1569 case UBX_SEC_CLSID: switch (UbxMsgId(msg.Data())) {
1570 case UBX_SEC_OSNMA_MSGID: to_json_UBX_SEC_OSNMA(j, msg.data_); break; } break;
1571 case UBX_TIM_CLSID: switch (UbxMsgId(msg.Data())) {
1572 case UBX_TIM_SVIN_MSGID: to_json_UBX_TIM_SVIN(j, msg.data_); break;
1573 case UBX_TIM_TM2_MSGID: to_json_UBX_TIM_TM2(j, msg.data_); break;
1574 case UBX_TIM_TP_MSGID: to_json_UBX_TIM_TP(j, msg.data_); break; } break;
1575 } // clang-format on
1576 return j;
1577}
1578
1579} // namespace fpsdk::common::parser::ubx
1580/* ****************************************************************************************************************** */
1581#endif // !_DOXYGEN_
1582#endif // __FPSDK_COMMON_TO_JSON_PARSER_UBX_HPP__
Parser UBX routines and types.
Definition ubx.hpp:51
static constexpr bool UBX_MGA_INI_TIME_UTC_V0_BITFIELD0_TRUSTEDSOURCE(const uint8_t bitfield0)
Definition ubx.hpp:1255
static constexpr uint8_t UBX_ACK_NAK_MSGID
UBX-ACK-NAK message ID.
Definition ubx.hpp:229
static constexpr uint8_t UBX_NAV_VELECEF_MSGID
UBX-NAV-VELECEF message ID.
Definition ubx.hpp:397
static constexpr bool UBX_ESF_MEAS_V0_FLAGS_CALIBTTAGVALID(const uint16_t flags)
Definition ubx.hpp:1052
static constexpr uint8_t UBX_RXM_SPARTN_V1_VERSION
Definition ubx.hpp:2832
static constexpr uint8_t UBX_SEC_OSNMA_VERSION(const uint8_t *msg)
Definition ubx.hpp:2876
static constexpr uint8_t UBX_RXM_RTCM_V2_VERSION
Definition ubx.hpp:2765
const char * UBX_NAV_STATUS_V0_FLAGS2_SPOOFDETSTATE_STR(const uint8_t flags2)
Definition ubx.hpp:2419
static constexpr uint8_t UBX_NAV_HPPOSLLH_V0_VERSION
Definition ubx.hpp:1973
const char * UBX_GNSSID_STR(const uint8_t gnssId)
Definition ubx.hpp:660
static constexpr bool UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREMERKLEROOTVAL(const uint32_t generalAndTiming)
Definition ubx.hpp:2972
const char * UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREMERKLEROOTSRC_STR(const uint32_t generalAndTiming)
Definition ubx.hpp:2971
static constexpr uint8_t UBX_ESF_STATUS_V2_VERSION
Definition ubx.hpp:1097
static constexpr bool UBX_NAV_RELPOSNED_V1_FLAGS_RELPOSHEADINGVALID(const uint32_t flags)
Definition ubx.hpp:2187
static constexpr uint8_t UBX_SEC_OSNMA_V3_TESLAKEY_CHAINID(const uint32_t teslaKey)
Definition ubx.hpp:2946
static constexpr bool UBX_SEC_OSNMA_V3_OSNMAMONITORING_NODATA(const uint16_t osnmaMonitoring)
Definition ubx.hpp:2904
static constexpr bool UBX_NAV_STATUS_V0_FIXSTAT_DIFFCORR(const uint8_t fixStat)
Definition ubx.hpp:2410
static constexpr std::size_t UBX_NAV_HPPOSLLH_V0_SIZE
Definition ubx.hpp:1974
static constexpr uint8_t UBX_MON_HW3_MSGID
UBX-MON-HW3 message ID.
Definition ubx.hpp:305
static constexpr uint8_t UBX_NAV_RELPOSNED_MSGID
UBX-NAV-RELPOSNED message ID.
Definition ubx.hpp:361
static constexpr uint8_t UBX_MON_SYS_MSGID
UBX-MON-SYS message ID.
Definition ubx.hpp:321
static constexpr uint8_t UBX_CFG_VALSET_V0_LAYERS_RAM
UBX-CFG-VALSET.layers flag: layer RAM.
Definition ubx.hpp:815
static constexpr uint8_t UBX_NAV2_TIMEGLO_MSGID
UBX-NAV2-TIMEGLO message ID.
Definition ubx.hpp:433
static constexpr bool UBX_RXM_RAWX_V1_TRKSTAT_PRVALID(const uint8_t trkStat)
Definition ubx.hpp:2734
static constexpr std::size_t UBX_CFG_VALSET_V1_MIN_SIZE
Definition ubx.hpp:824
static constexpr bool UBX_RXM_RAWX_V1_TRKSTAT_HALFCYC(const uint8_t trkStat)
Definition ubx.hpp:2736
static constexpr bool UBX_NAV_PVT_V1_FLAGS2_CONFTIME(const uint8_t flags2)
Definition ubx.hpp:2088
const char * UBX_CFG_VALGET_V0_LAYER_STR(const uint8_t layer)
Definition ubx.hpp:875
static constexpr bool UBX_NAV_TIMEBDS_V0_VALID_WEEKVALID(const uint8_t valid)
Definition ubx.hpp:2521
static constexpr std::size_t UBX_MGA_GAL_OSNMA_MERKLE_V0_SIZE
Definition ubx.hpp:1206
static constexpr uint8_t UBX_CFG_RST_MSGID
UBX-CFG-RST message ID.
Definition ubx.hpp:235
static constexpr std::size_t UBX_TIM_SVIN_V0_SIZE
Definition ubx.hpp:3009
static constexpr bool UBX_MON_HW3_V0_PINMASK_VPMANAGER(const uint16_t pinMask)
Definition ubx.hpp:1520
static constexpr uint8_t UBX_NAV_TIMEUTC_V0_VALID_VALIDUTC(const uint8_t valid)
Definition ubx.hpp:2586
static constexpr bool UBX_SEC_OSNMA_V3_OSNMAMONITORING_WRONGMACLT(const uint16_t osnmaMonitoring)
Definition ubx.hpp:2907
static constexpr std::size_t UBX_MGA_INI_TIME_UTC_V0_SIZE
Definition ubx.hpp:1246
static constexpr uint8_t UBX_MON_CLSID
UBX-MON class ID.
Definition ubx.hpp:204
static constexpr bool UBX_MON_COMMS_V0_TXERRORS_MEM(const uint8_t txErrors)
Definition ubx.hpp:1348
static constexpr uint8_t UBX_CFG_VALDEL_MSGID
UBX-CFG-VALDEL message ID.
Definition ubx.hpp:237
const char * UBX_MON_RF_V0_ANTSTATUS_STR(const uint8_t antStatus)
Definition ubx.hpp:1582
static constexpr uint8_t UBX_TIM_SVIN_MSGID
UBX-TIM-SVIN message ID.
Definition ubx.hpp:479
const char * UBX_NAV_STATUS_V0_GPSFIX_STR(const uint8_t gpsFix)
Definition ubx.hpp:2399
const char * UBX_ESF_STATUS_V2_FUSIONMODE_STR(const uint8_t fusionMode)
Definition ubx.hpp:1129
static constexpr uint8_t UBX_MON_HW_V0_FLAGS_RTCCALIB
Definition ubx.hpp:1401
const char * UBX_NAV_SIG_V0_IONOMODEL_STR(const uint8_t ionoModel)
Definition ubx.hpp:2301
static constexpr uint8_t UBX_NAV_SAT_V1_VERSION
Definition ubx.hpp:2225
static constexpr uint8_t UBX_RXM_RAWX_V1_DOSTDEV_DOSTD(const uint8_t doStdev)
Definition ubx.hpp:2731
static constexpr uint8_t UBX_NAV_TIMEGLO_MSGID
UBX-NAV-TIMEGLO message ID.
Definition ubx.hpp:383
static constexpr std::size_t UBX_SEC_OSNMA_V3_MIN_SIZE
Definition ubx.hpp:2878
static constexpr uint8_t UBX_NAV2_TIMELS_MSGID
UBX-NAV2-TIMELS message ID.
Definition ubx.hpp:437
static constexpr std::size_t UBX_NAV_TIMETRUSTED_V1_SIZE
Definition ubx.hpp:2358
static constexpr uint8_t UBX_MON_TEMP_V0_VERSION
Definition ubx.hpp:1702
static constexpr bool UBX_NAV_RELPOSNED_V1_FLAGS_DIFFSOLN(const uint32_t flags)
Definition ubx.hpp:2177
static constexpr uint8_t UBX_ESF_CLSID
UBX-ESF class ID.
Definition ubx.hpp:196
static constexpr uint32_t UBX_ESF_MEAS_V0_DATA_DATAFIELD(const uint32_t data)
Definition ubx.hpp:1054
static constexpr bool UBX_TIM_TM2_V0_FLAGS_TIMEVALID(const uint8_t flags)
Definition ubx.hpp:3053
static constexpr bool UBX_NAV_TIMEUTC_V0_VALID_AUTHSTATUS(const uint8_t valid)
Definition ubx.hpp:2587
static constexpr std::size_t UBX_ESF_MEAS_V0_FLAGS_NUMMEAS(const uint16_t flags)
Definition ubx.hpp:1053
static constexpr uint8_t UBX_MON_SPAN_V0_VERSION
Definition ubx.hpp:1627
static constexpr uint8_t UBX_NAV_TIMETRUSTED_MSGID
UBX-NAV-TIMETRUSTED message ID.
Definition ubx.hpp:393
static constexpr uint8_t UBX_SEC_OSNMA_MSGID
UBX-SEC-OSNMA message ID.
Definition ubx.hpp:471
static constexpr uint8_t UBX_NAV_HPPOSECEF_VERSION(const uint8_t *msg)
Definition ubx.hpp:1933
const char * UBX_MON_RF_V0_FLAGS_JAMMINGSTATE_STR(const uint8_t flags)
Definition ubx.hpp:1572
static constexpr bool UBX_NAV_SIG_V0_SIGFLAGS_AUTH_STATUS(const uint16_t sigFlags)
Definition ubx.hpp:2314
static constexpr std::size_t UBX_MON_HW3_V0_MIN_SIZE
Definition ubx.hpp:1495
static constexpr uint8_t UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_MACSIZE(const uint32_t dsmAuthentication)
Definition ubx.hpp:2933
static constexpr uint8_t UBX_MON_SYS_VERSION(const uint8_t *msg)
Definition ubx.hpp:1663
static constexpr uint8_t UBX_MON_RF_VERSION(const uint8_t *msg)
Definition ubx.hpp:1566
const char * UBX_MGA_GAL_OSNMA_MERKLE_V0_BITFIELD0_APPLICABILITYTIME_STR(const uint8_t bitfield0)
Definition ubx.hpp:1208
static constexpr bool UBX_NAV_TIMETRUSTED_V1_VALID_TRUSTEDTIMEVALID(const uint8_t valid)
Definition ubx.hpp:2365
static constexpr std::size_t UBX_CFG_VALDEL_V1_MIN_SIZE
Definition ubx.hpp:917
static constexpr std::size_t UBX_CFG_VALSET_V0_MIN_SIZE
Definition ubx.hpp:814
const char * UBX_SEC_OSNMA_V3_GENERALANDTIMING_MACADKDTYPE_STR(const uint32_t generalAndTiming)
Definition ubx.hpp:2955
static constexpr bool UBX_SEC_OSNMA_V3_GENERALANDTIMING_PUBKEYVAL(const uint32_t generalAndTiming)
Definition ubx.hpp:2973
static constexpr uint8_t UBX_MGA_GAL_MSGID
UBX-MGA-GAL message ID.
Definition ubx.hpp:287
static constexpr uint8_t UBX_MON_HW3_V0_VERSION
Definition ubx.hpp:1494
const char * UBX_NAV_STATUS_V0_FLAGS2_CARRSOLN_STR(const uint8_t flags2)
Definition ubx.hpp:2425
const char * UBX_ESF_STATUS_V2_INITSTATUS2_IMUINITSTATUS_STR(const uint8_t initStatus2)
Definition ubx.hpp:1120
static constexpr uint8_t UBX_NAV_COV_VERSION(const uint8_t *msg)
Definition ubx.hpp:1824
static constexpr bool UBX_MGA_INI_TIME_GNSS_V0_REF_FALL(const uint8_t ref)
Definition ubx.hpp:1294
static constexpr uint8_t UBX_ESF_STATUS_V2_FAULTS_MISSINGMEAS
Definition ubx.hpp:1147
const char * UBX_TIM_TP_V0_REFINFO_UTCSTANDARD_STR(const uint8_t refInfo)
Definition ubx.hpp:3117
static constexpr bool UBX_NAV_SIG_V0_SIGFLAGS_DO_CORR_USED(const uint16_t sigFlags)
Definition ubx.hpp:2313
const char * UBX_SEC_OSNMA_V3_GENERALANDTIMING_TIMINGAUTHRESULT_STR(const uint32_t generalAndTiming)
Definition ubx.hpp:2950
static constexpr bool UBX_NAV_STATUS_V0_FLAGS_WKNSET(const uint8_t flags)
Definition ubx.hpp:2408
const char * UBX_MON_HW3_V0_PINMASK_PERIPHPIO_STR(const uint16_t pinMask)
Definition ubx.hpp:1502
static constexpr std::size_t UBX_ESF_STATUS_V2_MIN_SIZE
Definition ubx.hpp:1098
static constexpr uint8_t UBX_RXM_RAWX_V1_PRSTDEV_PRSTD(const uint8_t prStdev)
Definition ubx.hpp:2727
static constexpr uint8_t UBX_NAV_EELL_VERSION(const uint8_t *msg)
Definition ubx.hpp:1878
static constexpr bool UBX_NAV_RELPOSNED_V1_FLAGS_RELPOSNORMALIZED(const uint32_t flags)
Definition ubx.hpp:2188
static constexpr uint8_t UBX_NAV_SAT_MSGID
UBX-NAV-SAT message ID.
Definition ubx.hpp:365
static constexpr uint8_t UBX_NAV_TIMEBDS_MSGID
UBX-NAV-TIMEBDS message ID.
Definition ubx.hpp:379
const char * UBX_TIM_TM2_V0_FLAGS_TIMEBASE_STR(const uint8_t flags)
Definition ubx.hpp:3048
static constexpr std::size_t UBX_NAV_TIMEGLO_V0_SIZE
Definition ubx.hpp:2547
static constexpr uint8_t UBX_MGA_CLSID
UBX-MGA class ID.
Definition ubx.hpp:202
static constexpr bool UBX_MON_HW3_V0_FLAGS_RTCCALIB(const uint8_t flags)
Definition ubx.hpp:1498
static constexpr bool UBX_NAV_SIG_V0_SIGFLAGS_PR_CORR_USED(const uint16_t sigFlags)
Definition ubx.hpp:2311
static constexpr uint8_t UBX_NAV2_COV_MSGID
UBX-NAV2-COV message ID.
Definition ubx.hpp:403
static constexpr std::size_t UBX_CFG_CFG_V0_MAX_SIZE
Definition ubx.hpp:1001
static constexpr uint8_t UBX_NAV2_CLOCK_MSGID
UBX-NAV2-CLOCK message ID.
Definition ubx.hpp:401
static constexpr uint8_t UBX_CFG_VALSET_V1_LAYER_BBR
UBX-CFG-VALSET.layers flag: layer BBR.
Definition ubx.hpp:826
static constexpr std::size_t UBX_MON_HW_V0_SIZE
Definition ubx.hpp:1400
static constexpr uint8_t UBX_NAV_ATT_VERSION(const uint8_t *msg)
Definition ubx.hpp:1757
static constexpr uint16_t UBX_SEC_OSNMA_V3_GROUP1_BITFIELD1_IODE(const uint16_t bitfield1)
Definition ubx.hpp:2978
static constexpr uint8_t UBX_CFG_CFG_V0_DEVICE_FLASH
Layer Flash.
Definition ubx.hpp:1009
static constexpr uint8_t UBX_RXM_RAWX_V1_VERSION
Definition ubx.hpp:2723
static constexpr bool UBX_NAV_STATUS_V0_FLAGS_GPSFIXOK(const uint8_t flags)
Definition ubx.hpp:2406
static constexpr uint8_t UBX_NAV_ATT_V0_VERSION
Definition ubx.hpp:1758
const char * UBX_MON_HW_V0_ASTATUS_STR(const uint8_t aStatus)
Definition ubx.hpp:1415
static constexpr std::size_t UBX_RXM_SFRBX_V2_MIN_SIZE
Definition ubx.hpp:2808
static constexpr uint8_t UBX_CFG_VALSET_V0_LAYERS_FLASH
UBX-CFG-VALSET.layers flag: layer Flash.
Definition ubx.hpp:817
static constexpr uint8_t UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_KEYSIZE(const uint32_t dsmAuthentication)
Definition ubx.hpp:2932
static constexpr uint8_t UBX_CFG_CLSID
UBX-CFG class ID.
Definition ubx.hpp:194
static constexpr bool UBX_NAV_RELPOSNED_V1_FLAGS_REFPOSMISS(const uint32_t flags)
Definition ubx.hpp:2185
static constexpr bool UBX_NAV_TIMETRUSTED_V1_VALID_DELTATIMEVALID(const uint8_t valid)
Definition ubx.hpp:2366
static constexpr std::size_t UBX_NAV_ATT_V0_SIZE
Definition ubx.hpp:1759
static constexpr bool UBX_NAV_PVT_V1_FLAGS3_INVALIDLLH(const uint16_t flags3)
Definition ubx.hpp:2089
static constexpr std::size_t UBX_TIM_TM2_V0_SIZE
Definition ubx.hpp:3037
static constexpr bool UBX_NAV_SIG_V0_SIGFLAGS_DO_USED(const uint16_t sigFlags)
Definition ubx.hpp:2310
static constexpr uint8_t UBX_NAV2_DOP_MSGID
UBX-NAV2-DOP message ID.
Definition ubx.hpp:405
const char * UBX_NAV_SIG_V0_QUALITYIND_STR(const uint8_t qualityInd)
Definition ubx.hpp:2295
static constexpr std::size_t UBX_NAV_HPPOSECEF_V0_SIZE
Definition ubx.hpp:1935
const char * UBX_SEC_OSNMA_V3_NMAHEADER_NMASTATUS_STR(const uint8_t nmaHeader)
Definition ubx.hpp:2881
static constexpr uint8_t UBX_SEC_OSNMA_V3_GENERALANDTIMING_AUTHNUMTIM(const uint32_t generalAndTiming)
Definition ubx.hpp:2948
const char * UBX_ESF_STATUS_V2_SENSSTATUS2_TIMESTATUS_STR(const uint8_t sensStatus2)
Definition ubx.hpp:1140
static constexpr uint8_t UBX_RXM_SFRBX_MSGID
UBX-RXM-SFRBX message ID.
Definition ubx.hpp:465
static constexpr std::size_t UBX_MON_SPAN_V0_SIZE(const uint8_t *msg)
Definition ubx.hpp:1629
static constexpr bool UBX_SEC_OSNMA_V3_TIMSYNCREQ_TIMSYNCENABLED(const uint8_t timSyncReq)
Definition ubx.hpp:2908
static constexpr bool UBX_NAV_PVT_V1_VALID_VALIDTIME(const uint8_t valid)
Definition ubx.hpp:2060
static constexpr uint8_t UBX_SEC_OSNMA_V3_VERSION
Definition ubx.hpp:2877
static constexpr uint8_t UBX_RXM_CLSID
UBX-RXM class ID.
Definition ubx.hpp:210
static constexpr uint8_t UBX_RXM_RAWX_V1_CPSTDEV_CPSTD(const uint8_t cpStdev)
Definition ubx.hpp:2729
const char * UBX_ESF_MEAS_V0_FLAGS_TIMEMARKSENT_STR(const uint16_t flags)
Definition ubx.hpp:1048
static constexpr std::size_t UBX_MGA_INI_TIME_GNSS_V0_SIZE
Definition ubx.hpp:1288
static constexpr bool UBX_NAV_SAT_V1_FLAGS_ALMAVAIL(const uint32_t flags)
Definition ubx.hpp:2240
static constexpr uint8_t UBX_NAV_CLSID
UBX-NAV class ID.
Definition ubx.hpp:206
static constexpr uint8_t UBX_RXM_RAWX_VERSION(const uint8_t *msg)
Definition ubx.hpp:2722
static constexpr bool UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREPUBKEYVAL(const uint32_t generalAndTiming)
Definition ubx.hpp:2974
const char * UBX_MON_HW3_V0_PINMASK_DIRECTION_STR(const uint16_t pinMask)
Definition ubx.hpp:1516
const char * UBX_SIGID_STR(const uint8_t gnssId, const uint8_t sigId)
Definition ubx.hpp:733
static constexpr uint8_t UBX_MON_SYS_V1_VERSION
Definition ubx.hpp:1664
static constexpr bool UBX_TIM_TM2_V0_FLAGS_NEWRISINGEDGE(const uint8_t flags)
Definition ubx.hpp:3054
static constexpr uint8_t UBX_NAV_EOE_MSGID
UBX-NAV-EOE message ID.
Definition ubx.hpp:339
static constexpr uint8_t UBX_MON_HW_MSGID
UBX-MON-HW message ID.
Definition ubx.hpp:301
static constexpr bool UBX_NAV_TIMEBDS_V0_VALID_LEAPSVALID(const uint8_t valid)
Definition ubx.hpp:2522
static constexpr uint8_t UBX_NAV2_STATUS_MSGID
UBX-NAV2-STATUS message ID.
Definition ubx.hpp:425
static constexpr bool UBX_NAV_HPPOSECEF_V0_FLAGS_INVALIDECEF(const uint8_t flags)
Definition ubx.hpp:1940
static constexpr std::size_t UBX_NAV_STATUS_V0_SIZE
Definition ubx.hpp:2397
const char * UBX_NAV_SAT_V1_FLAGS_ORBITSOURCE_STR(const uint32_t flags)
Definition ubx.hpp:2230
static constexpr int UBX_RXM_RAWX_V1_GROUP1_FREQID_TO_SLOT(const uint8_t freqId)
Definition ubx.hpp:2738
static constexpr uint8_t UBX_SEC_OSNMA_V3_GENERALANDTIMING_AUTHSVS(const uint32_t generalAndTiming)
Definition ubx.hpp:2947
static constexpr bool UBX_NAV_TIMEGPS_V0_VALID_WEEKVALID(const uint8_t valid)
Definition ubx.hpp:2459
static constexpr std::size_t UBX_MON_RF_V0_MIN_SIZE
Definition ubx.hpp:1568
static constexpr std::size_t UBX_RXM_SPARTN_V1_SIZE
Definition ubx.hpp:2833
const char * UBX_MON_RF_V0_ANTPOWER_STR(const uint8_t antPower)
Definition ubx.hpp:1586
static constexpr bool UBX_RXM_RTCM_V2_FLAGS_CRCFAILED(const uint8_t flags)
Definition ubx.hpp:2767
static constexpr uint8_t UBX_CFG_VALGET_VERSION(const uint8_t *msg)
Definition ubx.hpp:867
static constexpr uint8_t UBX_NAV_SAT_VERSION(const uint8_t *msg)
Definition ubx.hpp:2224
static constexpr uint8_t UBX_MON_HW2_MSGID
UBX-MON-HW2 message ID.
Definition ubx.hpp:303
static constexpr uint8_t UBX_ACK_CLSID
UBX-ACK class ID.
Definition ubx.hpp:192
static constexpr bool UBX_NAV_TIMEGAL_V0_VALID_GALTOWVALID(const uint8_t valid)
Definition ubx.hpp:2489
static constexpr uint8_t UBX_RXM_SPARTN_VERSION(const uint8_t *msg)
Definition ubx.hpp:2831
static constexpr std::size_t UBX_ESF_MEAS_V0_MIN_SIZE
Definition ubx.hpp:1046
static constexpr std::size_t UBX_NAV_PVT_V1_SIZE
Definition ubx.hpp:2057
static constexpr bool UBX_SEC_OSNMA_V3_NMAHEADER_HEADERAUTHSTATUS(const uint8_t nmaHeader)
Definition ubx.hpp:2879
static constexpr uint8_t UBX_MON_COMMS_MSGID
UBX-MON-COMMS message ID.
Definition ubx.hpp:297
static constexpr bool UBX_NAV_PVT_V1_VALID_FULLYRESOLVED(const uint8_t valid)
Definition ubx.hpp:2061
static constexpr uint8_t UBX_TIM_TP_MSGID
UBX-TIM-TP message ID.
Definition ubx.hpp:483
static constexpr std::size_t UBX_NAV_SAT_V1_MIN_SIZE
Definition ubx.hpp:2226
static constexpr uint8_t UBX_RXM_SFRBX_VERSION(const uint8_t *msg)
Definition ubx.hpp:2806
static constexpr uint8_t UBX_MON_COMMS_VERSION(const uint8_t *msg)
Definition ubx.hpp:1343
static constexpr uint8_t UBX_RXM_SPARTN_MSGID
UBX-RXM-SPARTN message ID.
Definition ubx.hpp:467
static constexpr std::size_t UBX_MON_SPAN_V0_MIN_SIZE
Definition ubx.hpp:1628
static constexpr uint8_t UBX_TIM_CLSID
UBX-TIM class ID.
Definition ubx.hpp:214
const char * UBX_MON_COMMS_V0_PROTIDS_STR(const uint8_t protId)
Definition ubx.hpp:1365
static constexpr bool UBX_MON_HW3_V0_FLAGS_SAFEBOOT(const uint8_t flags)
Definition ubx.hpp:1499
static constexpr bool UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_FROMNVS(const uint32_t dsmAuthentication)
Definition ubx.hpp:2934
static constexpr uint8_t UBX_NAV_COV_MSGID
UBX-NAV-COV message ID.
Definition ubx.hpp:333
static constexpr uint8_t UBX_NAV_POSECEF_MSGID
UBX-NAV-POSECEF message ID.
Definition ubx.hpp:353
static constexpr bool UBX_MGA_INI_TIME_GNSS_V0_BITFIELD0_TRUSTEDSOURCE(const uint8_t bitfield0)
Definition ubx.hpp:1296
static constexpr uint8_t UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_HASHFUNCTION(const uint32_t dsmAuthentication)
Definition ubx.hpp:2928
static constexpr bool UBX_MGA_INI_TIME_UTC_V0_REF_LAST(const uint8_t ref)
Definition ubx.hpp:1253
static constexpr bool UBX_NAV_SIG_V0_SIGFLAGS_PR_SMOOTHED(const uint16_t sigFlags)
Definition ubx.hpp:2307
static constexpr uint8_t UBX_MON_COMMS_V0_VERSION
Definition ubx.hpp:1344
static constexpr std::size_t UBX_MON_COMMS_V0_MIN_SIZE
Definition ubx.hpp:1345
static constexpr uint8_t UBX_NAV_STATUS_MSGID
UBX-NAV-STATUS message ID.
Definition ubx.hpp:375
static constexpr bool UBX_NAV_PVT_V1_VALID_VALIDDATE(const uint8_t valid)
Definition ubx.hpp:2059
static constexpr uint8_t UBX_SEC_OSNMA_V3_OSNMAMONITORING_NUMBERSVS(const uint16_t osnmaMonitoring)
Definition ubx.hpp:2898
static constexpr bool UBX_MON_HW3_V0_PINMASK_PIOPULLHIGH(const uint16_t pinMask)
Definition ubx.hpp:1522
static constexpr uint8_t UBX_NAV2_TIMEGPS_MSGID
UBX-NAV2-TIMEGPS message ID.
Definition ubx.hpp:435
static constexpr uint8_t UBX_CFG_VALGET_V1_VERSION
UBX-CFG-VALGET.version value.
Definition ubx.hpp:882
static constexpr std::size_t UBX_FRAME_SIZE
Size (in bytes) of UBX frame.
Definition ubx.hpp:62
const char * UBX_RXM_RTCM_V2_FLAGS_MSGUSED_STR(const uint8_t flags)
Definition ubx.hpp:2769
static constexpr std::size_t UBX_NAV_VELECEF_V0_SIZE
Definition ubx.hpp:2672
static constexpr std::size_t UBX_MGA_GAL_OSNMA_PUBKEY_V0_SIZE
Definition ubx.hpp:1175
static constexpr std::size_t UBX_RXM_RAWX_V1_MIN_SIZE
Definition ubx.hpp:2724
static constexpr uint8_t UBX_NAV2_VELECEF_MSGID
UBX-NAV2-VELECEF message ID.
Definition ubx.hpp:445
static constexpr std::size_t UBX_NAV_POSECEF_V0_SIZE
Definition ubx.hpp:2004
static constexpr uint8_t UBX_ACK_ACK_MSGID
UBX-ACK-ACK message ID.
Definition ubx.hpp:227
static constexpr std::size_t UBX_NAV_EOE_V0_SIZE
Definition ubx.hpp:1903
const char * UBX_CFG_VALSET_V1_TRANSACTION_STR(const uint8_t transaction)
Definition ubx.hpp:832
static constexpr uint8_t UBX_SEC_OSNMA_V3_NMAHEADER_CHAININFORCE(const uint8_t nmaHeader)
Definition ubx.hpp:2886
static constexpr uint8_t UBX_NAV_TIMEGAL_MSGID
UBX-NAV-TIMEGAL message ID.
Definition ubx.hpp:381
static constexpr std::size_t UBX_MON_VER_V0_MIN_SIZE
Definition ubx.hpp:1730
const char * UBX_NAV_PVT_V1_FLAGS_PSMSTATE_STR(const uint8_t flags)
Definition ubx.hpp:2073
static constexpr bool UBX_NAV_TIMEGAL_V0_VALID_GALWNOVALID(const uint8_t valid)
Definition ubx.hpp:2490
static constexpr bool UBX_TIM_TM2_V0_FLAGS_UTCACAVAIL(const uint8_t flags)
Definition ubx.hpp:3052
static constexpr bool UBX_NAV_TIMEGLO_V0_VALID_DATEVALID(const uint8_t valid)
Definition ubx.hpp:2552
static constexpr uint8_t UBX_MON_TEMP_VERSION(const uint8_t *msg)
Definition ubx.hpp:1701
static constexpr std::size_t UBX_NAV_RELPOSNED_V1_SIZE
Definition ubx.hpp:2166
static constexpr std::size_t UBX_NAV_TIMEGPS_V0_SIZE
Definition ubx.hpp:2454
static constexpr uint8_t UBX_NAV_TIMEUTC_V0_VALID_VALIDTOW(const uint8_t valid)
Definition ubx.hpp:2584
static constexpr uint8_t UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREPUBKEYID(const uint32_t generalAndTiming)
Definition ubx.hpp:2977
static constexpr uint8_t UBX_NAV_ATT_MSGID
UBX-NAV-ATT message ID.
Definition ubx.hpp:329
static constexpr bool UBX_NAV_RELPOSNED_V1_FLAGS_GNSSFIXOK(const uint32_t flags)
Definition ubx.hpp:2176
static std::size_t UBX_ESF_MEAS_V0_SIZE(const uint8_t *msg)
Definition ubx.hpp:1057
static constexpr bool UBX_RXM_RAWX_V1_TRKSTAT_SUBHALFCYC(const uint8_t trkStat)
Definition ubx.hpp:2737
static constexpr bool UBX_TIM_TP_V0_FLAGS_TPNOTLOCKED(const uint8_t flags)
Definition ubx.hpp:3096
static constexpr uint8_t UBX_NAV_CLOCK_MSGID
UBX-NAV-CLOCK message ID.
Definition ubx.hpp:331
static constexpr uint8_t UBX_MON_HW_V0_FLAGS_SAFEBOOT
Definition ubx.hpp:1402
static constexpr bool UBX_NAV_STATUS_V0_FLAGS_DIFFSOLN(const uint8_t flags)
Definition ubx.hpp:2407
static constexpr uint8_t UBX_CFG_VALGET_V0_VERSION
UBX-CFG-VALGET.version value.
Definition ubx.hpp:869
static constexpr uint8_t UBX_NAV_SIG_VERSION(const uint8_t *msg)
Definition ubx.hpp:2282
static constexpr bool UBX_NAV_TIMEGAL_V0_VALID_LEAPSVALID(const uint8_t valid)
Definition ubx.hpp:2491
static constexpr bool UBX_NAV_PVT_V1_FLAGS2_CONFDATE(const uint8_t flags2)
Definition ubx.hpp:2087
const char * UBX_NAV_SIG_V0_CORRSOURCE_STR(const uint8_t corrSource)
Definition ubx.hpp:2323
static constexpr bool UBX_NAV_SIG_V0_SIGFLAGS_CR_USED(const uint16_t sigFlags)
Definition ubx.hpp:2309
const char * UBX_TIM_TM2_V0_FLAGS_MODE_STR(const uint8_t flags)
Definition ubx.hpp:3039
static constexpr uint8_t UBX_ESF_STATUS_V2_SENSSTATUS1_TYPE(const uint8_t sensStatus1)
same enum as UBX-ESF-MEAS.dataType it seems //!<
Definition ubx.hpp:1130
static constexpr uint8_t UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_MACLOOKUPTABLE(const uint32_t dsmAuthentication)
Definition ubx.hpp:2931
static constexpr std::size_t UBX_NAV_TIMEGAL_V0_SIZE
Definition ubx.hpp:2485
static constexpr bool UBX_RXM_RAWX_V1_RECSTAT_LEAPSEC(const uint8_t recStat)
Definition ubx.hpp:2725
static constexpr uint8_t UBX_MGA_GAL_OSNMA_PUBKEY_TYPE
Definition ubx.hpp:1172
const char * UBX_NAV_PVT_V1_FLAGS3_AUTHTIME_STR(const uint16_t flags3)
Definition ubx.hpp:2106
static constexpr uint8_t UBX_NAV_TIMEGPS_MSGID
UBX-NAV-TIMEGPS message ID.
Definition ubx.hpp:385
static constexpr bool UBX_NAV_SAT_V1_FLAGS_ANOAVAIL(const uint32_t flags)
Definition ubx.hpp:2241
static constexpr bool UBX_NAV_SIG_V0_SIGFLAGS_CR_CORR_USED(const uint16_t sigFlags)
Definition ubx.hpp:2312
static constexpr bool UBX_NAV_TIMELS_V0_VALID_CURRLSVALID(const uint8_t valid)
Definition ubx.hpp:2648
static constexpr uint8_t UBX_CFG_VALSET_MSGID
UBX-CFG-VALSET message ID.
Definition ubx.hpp:241
const char * UBX_SEC_OSNMA_V3_GENERALANDTIMING_PUBKEYSRC_STR(const uint32_t generalAndTiming)
Definition ubx.hpp:2959
const char * UBX_NAV_PVT_V1_FIXTYPE_STR(const uint8_t fixType)
Definition ubx.hpp:2069
const char * UBX_MON_COMMS_V0_TXERRORS_OUTPUTPORT_STR(const uint8_t txErrors)
Definition ubx.hpp:1351
static constexpr uint8_t UBX_NAV2_CLSID
UBX-NAV2 class ID.
Definition ubx.hpp:208
static constexpr uint8_t UBX_ESF_STATUS_V2_FAULTS_BADTTAG
Definition ubx.hpp:1146
constexpr uint8_t UbxClsId(const uint8_t *msg)
Get class ID from message.
Definition ubx.hpp:77
static constexpr uint8_t UBX_CFG_VALSET_VERSION(const uint8_t *msg)
Definition ubx.hpp:811
static constexpr uint8_t UBX_CFG_CFG_V0_DEVICE_BBR
Layer BBR.
Definition ubx.hpp:1008
static constexpr uint8_t UBX_MGA_GAL_OSNMA_PUBKEY_V0_BITFIELD0_PUBKEYID(const uint8_t bitfield0)
Definition ubx.hpp:1176
bool UbxGetMessageName(char *name, const std::size_t size, const uint8_t *msg, const std::size_t msg_size)
Get UBX message name.
static constexpr uint8_t UBX_MGA_INI_TIME_GNSS_TYPE
Definition ubx.hpp:1285
static constexpr bool UBX_NAV_TIMEGLO_V0_VALID_TODVALID(const uint8_t valid)
Definition ubx.hpp:2551
static constexpr std::size_t UBX_NAV_DOP_V0_SIZE
Definition ubx.hpp:1853
const char * UBX_MGA_INI_TIME_UTC_V0_REF_SOURCE_STR(const uint8_t ref)
Definition ubx.hpp:1248
static constexpr uint8_t UBX_CFG_CFG_MSGID
UBX-CFG-CFG message ID.
Definition ubx.hpp:231
static constexpr bool UBX_TIM_TP_V0_FLAGS_UTC(const uint8_t flags)
Definition ubx.hpp:3089
static constexpr bool UBX_TIM_TM2_V0_FLAGS_NEWFALLINGEDGE(const uint8_t flags)
Definition ubx.hpp:3046
static constexpr bool UBX_NAV_TIMEBDS_V0_VALID_SOWVALID(const uint8_t valid)
Definition ubx.hpp:2520
const char * UBX_MON_HW_V0_APOWER_STR(const uint8_t aPower)
Definition ubx.hpp:1419
const char * UBX_NAV_TIMELS_V0_SRCOFCURRLS_STR(const uint8_t srcOfCurrLs)
Definition ubx.hpp:2640
static constexpr uint8_t UBX_ESF_STATUS_V2_FAULTS_NOISYMEAS
Definition ubx.hpp:1148
static constexpr std::size_t UBX_CFG_VALGET_V0_MIN_SIZE
Definition ubx.hpp:870
static constexpr uint8_t UBX_RXM_SFRBX_V2_VERSION
Definition ubx.hpp:2807
static constexpr uint8_t UBX_CFG_VALDEL_V1_LAYER_FLASH
UBX-CFG-VALDEL.layers flag: layer Flash.
Definition ubx.hpp:919
static constexpr bool UBX_NAV_STATUS_V0_FLAGS_TOWSET(const uint8_t flags)
Definition ubx.hpp:2409
const char * UBX_MON_HW2_V0_CFGSOURCE_STR(const uint8_t cfgSource)
Definition ubx.hpp:1455
static constexpr std::size_t UBX_MON_SYS_V1_SIZE
Definition ubx.hpp:1665
const char * UBX_NAV_SIG_V0_SIGFLAGS_HEALTH_STR(const uint16_t sigFlags)
Definition ubx.hpp:2303
static constexpr uint16_t UBX_SEC_OSNMA_V3_TESLAKEY_TOWSF(const uint32_t teslaKey)
Definition ubx.hpp:2944
const char * UBX_MGA_INI_TIME_GNSS_V0_REF_SOURCE_STR(const uint8_t ref)
Definition ubx.hpp:1290
static constexpr uint8_t UBX_MGA_GAL_OSNMA_MERKLE_TYPE
Definition ubx.hpp:1203
static constexpr uint8_t UBX_NAV_HPPOSECEF_MSGID
UBX-NAV-HPPOSECEF message ID.
Definition ubx.hpp:343
static constexpr bool UBX_NAV_SAT_V1_FLAGS_AOPAVAIL(const uint32_t flags)
Definition ubx.hpp:2242
static constexpr uint8_t UBX_NAV_HPPOSECEF_V0_VERSION
Definition ubx.hpp:1934
static constexpr uint8_t UBX_MON_RF_MSGID
UBX-MON-RF message ID.
Definition ubx.hpp:313
const char * UBX_ESF_STATUS_V2_SENSSTATUS2_CALIBSTATUS_STR(const uint8_t sensStatus2)
Definition ubx.hpp:1134
static constexpr uint8_t UBX_ESF_MEAS_MSGID
UBX-ESF-MEAS message ID.
Definition ubx.hpp:247
static constexpr uint8_t UBX_RXM_RAWX_MSGID
UBX-RXM-RAWX message ID.
Definition ubx.hpp:459
const char * UBX_NAV_PVT_V1_FLAGS3_NMAFIXSTATUS_STR(const uint16_t flags3)
Definition ubx.hpp:2110
const char * UBX_SEC_OSNMA_V3_GENERALANDTIMING_FUTUREPUBKEYSRC_STR(const uint32_t generalAndTiming)
Definition ubx.hpp:2976
static constexpr uint8_t UBX_SEC_CLSID
UBX-SEC class ID.
Definition ubx.hpp:212
static constexpr bool UBX_NAV_PVT_V1_FLAGS2_CONFAVAIL(const uint8_t flags2)
Definition ubx.hpp:2086
const char * UBX_NAV_TIMEUTC_V0_VALID_UTCSTANDARD_STR(const uint8_t valid)
Definition ubx.hpp:2599
static constexpr uint8_t UBX_CFG_VALSET_V1_LAYER_FLASH
UBX-CFG-VALSET.layers flag: layer Flash.
Definition ubx.hpp:827
const char * UBX_SEC_OSNMA_V3_TIMSYNCREQ_TIMSYNCSTATUS_STR(const uint8_t timSyncReq)
Definition ubx.hpp:2910
const char * UBX_TIM_TM2_V0_FLAGS_RUN_STR(const uint8_t flags)
Definition ubx.hpp:3043
static constexpr bool UBX_NAV_RELPOSNED_V1_FLAGS_ISMOVING(const uint32_t flags)
Definition ubx.hpp:2184
const char * UBX_NAV_PVT_V1_FLAGS3_LASTCORRECTIONAGE_STR(const uint16_t flags3)
Definition ubx.hpp:2091
static constexpr bool UBX_NAV_PVT_V1_FLAGS_HEADVEHVALID(const uint8_t flags)
Definition ubx.hpp:2080
static constexpr bool UBX_NAV_PVT_V1_FLAGS_GNSSFIXOK(const uint8_t flags)
Definition ubx.hpp:2070
static constexpr uint8_t UBX_SYNC_2
UBX frame sync char 2.
Definition ubx.hpp:65
const char * UBX_CFG_RST_V0_RESETMODE_STR(const uint8_t resetMode)
Definition ubx.hpp:970
const char * UBX_NAV_STATUS_V0_FLAGS2_PSMSTATE_STR(const uint8_t flags2)
Definition ubx.hpp:2413
static constexpr uint8_t UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_MACFUNCTION(const uint32_t dsmAuthentication)
Definition ubx.hpp:2929
static constexpr std::size_t UBX_NAV_CLOCK_V0_SIZE
Definition ubx.hpp:1784
static constexpr uint8_t UBX_NAV_PVT_MSGID
UBX-NAV-PVT message ID.
Definition ubx.hpp:359
static constexpr std::size_t UBX_TIM_TP_V0_SIZE
Definition ubx.hpp:3081
const char * UBX_NAV_TIMELS_V0_SRCOFCURRLSCHANGE_STR(const uint8_t srcOfLsChange)
Definition ubx.hpp:2647
static constexpr uint8_t UBX_NAV_HPPOSLLH_V0_FLAGS_INVALIDLLH
Definition ubx.hpp:1975
static constexpr bool UBX_MON_COMMS_V0_TXERRORS_ALLOC(const uint8_t txErrors)
Definition ubx.hpp:1349
const char * UBX_ESF_STATUS_V2_INITSTATUS1_MNTALGSTATUS_STR(const uint8_t initStatus1)
Definition ubx.hpp:1108
static constexpr bool UBX_TIM_TP_V0_FLAGS_QERRINVALID(const uint8_t flags)
Definition ubx.hpp:3095
static constexpr uint8_t UBX_NAV2_SAT_MSGID
UBX-NAV2-SAT message ID.
Definition ubx.hpp:417
static constexpr uint8_t UBX_CFG_VALSET_V1_LAYER_RAM
UBX-CFG-VALSET.layers flag: layer RAM.
Definition ubx.hpp:825
static constexpr bool UBX_NAV_PVT_V1_FLAGS_DIFFSOLN(const uint8_t flags)
Definition ubx.hpp:2071
const char * UBX_NAV_RELPOSNED_V1_FLAGS_CARRSOLN_STR(const uint32_t flags)
Definition ubx.hpp:2180
static constexpr uint8_t UBX_NAV_TIMETRUSTED_VERSION(const uint8_t *msg)
Definition ubx.hpp:2356
static constexpr bool UBX_SEC_OSNMA_V3_GENERALANDTIMING_MERKLEROOTVAL(const uint32_t generalAndTiming)
Definition ubx.hpp:2969
static constexpr bool UBX_MGA_INI_TIME_UTC_V0_REF_FALL(const uint8_t ref)
Definition ubx.hpp:1252
static constexpr uint8_t UBX_CFG_VALSET_V0_VERSION
UBX-CFG-VALSET.version value.
Definition ubx.hpp:813
static constexpr bool UBX_NAV_PVT_V1_VALID_VALIDMAG(const uint8_t valid)
Definition ubx.hpp:2062
static constexpr bool UBX_NAV_STATUS_V0_FIXSTAT_CARRSOLNVALID(const uint8_t fixStat)
Definition ubx.hpp:2411
static constexpr bool UBX_NAV_SAT_V1_FLAGS_EPHAVAIL(const uint32_t flags)
Definition ubx.hpp:2239
static constexpr std::size_t UBX_NAV_SIG_V0_FREQID_OFFS
Definition ubx.hpp:2286
static constexpr uint8_t UBX_NAV2_TIMEBDS_MSGID
UBX-NAV2-TIMEBDS message ID.
Definition ubx.hpp:429
static constexpr uint8_t UBX_ESF_STATUS_VERSION(const uint8_t *msg)
Definition ubx.hpp:1096
static constexpr uint8_t UBX_NAV_DOP_MSGID
UBX-NAV-DOP message ID.
Definition ubx.hpp:335
const char * UBX_TIM_TP_V0_REFINFO_TIMEREFGNSS_STR(const uint8_t refInfo)
Definition ubx.hpp:3104
const char * UBX_TIM_TP_V0_FLAGS_RAIM_STR(const uint8_t flags)
Definition ubx.hpp:3091
static constexpr uint8_t UBX_NAV2_TIMEUTC_MSGID
UBX-NAV2-TIMEUTC message ID.
Definition ubx.hpp:443
static constexpr std::size_t UBX_CFG_CFG_V0_MIN_SIZE
Definition ubx.hpp:1000
static constexpr bool UBX_SEC_OSNMA_V3_OSNMAMONITORING_WRONGFLXMAC(const uint16_t osnmaMonitoring)
Definition ubx.hpp:2906
static constexpr bool UBX_SEC_OSNMA_V3_OSNMAMONITORING_OSNMAENABLED(const uint16_t osnmaMonitoring)
Definition ubx.hpp:2897
static constexpr std::size_t UBX_MON_TEMP_V0_SIZE
Definition ubx.hpp:1703
static constexpr std::size_t UBX_NAV_SIG_V0_MIN_SIZE
Definition ubx.hpp:2284
static constexpr uint8_t UBX_MON_SPAN_MSGID
UBX-MON-SPAN message ID.
Definition ubx.hpp:319
static constexpr uint8_t UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_PUBKEYID(const uint32_t dsmAuthentication)
Definition ubx.hpp:2930
const char * UBX_MON_HW_V0_FLAGS_JAMMINGSTATE_STR(const uint8_t flags)
Definition ubx.hpp:1404
static constexpr bool UBX_SEC_OSNMA_V3_OSNMAMONITORING_WRONGDATA(const uint16_t osnmaMonitoring)
Definition ubx.hpp:2905
static constexpr uint16_t UBX_SEC_OSNMA_V3_TESLAKEY_WNSF(const uint32_t teslaKey)
Definition ubx.hpp:2943
static constexpr uint8_t UBX_MON_HW_V0_FLAGS_XTALABSENT
Definition ubx.hpp:1409
static constexpr uint8_t UBX_MGA_INI_TIME_UTC_TYPE
Definition ubx.hpp:1243
static constexpr uint8_t UBX_RXM_RTCM_VERSION(const uint8_t *msg)
Definition ubx.hpp:2764
static constexpr uint8_t UBX_CFG_VALSET_V0_LAYERS_BBR
UBX-CFG-VALSET.layers flag: layer BBR.
Definition ubx.hpp:816
constexpr uint8_t UbxMsgId(const uint8_t *msg)
Get message ID from message.
Definition ubx.hpp:92
static constexpr std::size_t UBX_NAV_TIMELS_V0_SIZE
Definition ubx.hpp:2630
static constexpr uint8_t UBX_MON_VER_MSGID
UBX-MON-VER message ID.
Definition ubx.hpp:327
static constexpr uint8_t UBX_MGA_INI_MSGID
UBX-MGA-INI message ID.
Definition ubx.hpp:293
static constexpr uint8_t UBX_NAV_TIMEUTC_MSGID
UBX-NAV-TIMEUTC message ID.
Definition ubx.hpp:395
static constexpr uint8_t UBX_NAV_HPPOSLLH_VERSION(const uint8_t *msg)
Definition ubx.hpp:1972
static constexpr uint8_t UBX_NAV_EELL_MSGID
UBX-NAV-EELL message ID.
Definition ubx.hpp:337
static constexpr std::size_t UBX_CFG_VALGET_V1_MIN_SIZE
Definition ubx.hpp:883
static constexpr uint8_t UBX_CFG_VALDEL_V1_VERSION
UBX-CFG-VALDEL.version value.
Definition ubx.hpp:916
static constexpr std::size_t UBX_CFG_RST_V0_SIZE
Definition ubx.hpp:949
const char * UBX_CFG_VALGET_V1_LAYER_STR(const uint8_t layer)
Definition ubx.hpp:888
static constexpr uint8_t UBX_NAV2_POSECEF_MSGID
UBX-NAV2-POSECEF message ID.
Definition ubx.hpp:411
static constexpr uint8_t UBX_MON_RF_V0_VERSION
Definition ubx.hpp:1567
const char * UBX_SEC_OSNMA_V3_NMAHEADER_CPKS_STR(const uint8_t nmaHeader)
Definition ubx.hpp:2888
static constexpr std::size_t UBX_ACK_NAK_V0_SIZE
Definition ubx.hpp:779
static constexpr int UBX_RXM_SFRBX_V2_GROUP0_FREQID_TO_SLOT(const uint8_t freqId)
Definition ubx.hpp:2809
static constexpr uint8_t UBX_CFG_VALSET_V1_VERSION
UBX-CFG-VALSET.version value.
Definition ubx.hpp:823
static constexpr uint8_t UBX_MON_HW3_VERSION(const uint8_t *msg)
Definition ubx.hpp:1493
static constexpr uint8_t UBX_NAV2_EOE_MSGID
UBX-NAV2-EOE message ID.
Definition ubx.hpp:407
static constexpr bool UBX_NAV_SIG_V0_SIGFLAGS_PR_USED(const uint16_t sigFlags)
Definition ubx.hpp:2308
static constexpr bool UBX_NAV_TIMEGPS_V0_VALID_TOWVALID(const uint8_t valid)
Definition ubx.hpp:2458
const char * UBX_MON_SYS_V1_BOOTTYPE_STR(const uint8_t bootType)
Definition ubx.hpp:1678
static constexpr std::size_t UBX_ACK_ACK_V0_SIZE
Definition ubx.hpp:760
static constexpr bool UBX_MON_HW3_V0_FLAGS_XTALABSENT(const uint8_t flags)
Definition ubx.hpp:1500
static constexpr std::size_t UBX_MON_HW2_V0_SIZE
Definition ubx.hpp:1450
const char * UBX_TIM_TP_V0_FLAGS_TIMEBASE_STR(const uint8_t flags)
Definition ubx.hpp:3086
const char * UBX_SEC_OSNMA_V3_TESLAKEY_TESLAKEYAUTHSTATUS_STR(const uint32_t teslaKey)
Definition ubx.hpp:2936
static constexpr bool UBX_RXM_RAWX_V1_TRKSTAT_CPVALID(const uint8_t trkStat)
Definition ubx.hpp:2735
static constexpr uint8_t UBX_ESF_STATUS_MSGID
UBX-ESF-STATUS message ID.
Definition ubx.hpp:251
static constexpr uint8_t UBX_ESF_STATUS_V2_SENSSTATUS1_READY
Definition ubx.hpp:1132
const char * UBX_ESF_STATUS_V2_INITSTATUS1_INSINITSTATUS_STR(const uint8_t initStatus1)
Definition ubx.hpp:1114
const char * UBX_SEC_OSNMA_V3_GENERALANDTIMING_MERKLEROOTSRC_STR(const uint32_t generalAndTiming)
Definition ubx.hpp:2965
static constexpr std::size_t UBX_RXM_RTCM_V2_SIZE
Definition ubx.hpp:2766
static constexpr uint8_t UBX_CFG_VALDEL_VERSION(const uint8_t *msg)
Definition ubx.hpp:915
const char * UBX_RXM_SPARTN_V1_FLAGS_MSGUSED_STR(const uint8_t flags)
Definition ubx.hpp:2835
static constexpr std::size_t UBX_NAV_COV_V0_SIZE
Definition ubx.hpp:1826
static constexpr bool UBX_NAV_RELPOSNED_V1_FLAGS_REFOBSMISS(const uint32_t flags)
Definition ubx.hpp:2186
static constexpr bool UBX_NAV_TIMEGPS_V0_VALID_LEAPSVALID(const uint8_t valid)
Definition ubx.hpp:2460
const char * UBX_MON_HW3_V0_PINMASK_PINBANK_STR(const uint16_t pinMask)
Definition ubx.hpp:1506
const char * UBX_SEC_OSNMA_V3_DSMAUTHENTICATION_DSMAUTHENTICATIONSTATUS_STR(const uint32_t dsmAuthentication)
Definition ubx.hpp:2917
static constexpr uint8_t UBX_CFG_VALDEL_V1_LAYER_BBR
UBX-CFG-VALDEL.layers flag: layer BBR.
Definition ubx.hpp:918
static constexpr bool UBX_MON_HW3_V0_PINMASK_PIOPULLLOW(const uint16_t pinMask)
Definition ubx.hpp:1523
static constexpr std::size_t UBX_NAV_TIMEBDS_V0_SIZE
Definition ubx.hpp:2516
static constexpr bool UBX_RXM_RAWX_V1_RECSTAT_CLKRESET(const uint8_t recStat)
Definition ubx.hpp:2726
const char * UBX_MGA_GAL_OSNMA_PUBKEY_V0_BITFIELD0_PUBKEYTYPE_STR(const uint8_t bitfield0)
Definition ubx.hpp:1178
static constexpr std::size_t UBX_RXM_RAWX_V1_SIZE(const uint8_t *msg)
Definition ubx.hpp:2739
static constexpr uint8_t UBX_NAV_TIMELS_MSGID
UBX-NAV-TIMELS message ID.
Definition ubx.hpp:387
static constexpr uint8_t UBX_ESF_MEAS_V0_DATA_DATATYPE(const uint32_t data)
same enum as UBX-ESF-STATUS.type it seems
Definition ubx.hpp:1055
const char * UBX_NAV_PVT_V1_FLAGS_CARRSOLN_STR(const uint8_t flags)
Definition ubx.hpp:2082
const char * UBX_NAV_TIMETRUSTED_V1_REFSYS_STR(const uint8_t refSys)
Definition ubx.hpp:2364
static constexpr std::size_t UBX_NAV_TIMEUTC_V0_SIZE
Definition ubx.hpp:2580
static constexpr uint8_t UBX_NAV_TIMEUTC_V0_VALID_VALIDWKN(const uint8_t valid)
Definition ubx.hpp:2585
static constexpr uint8_t UBX_CFG_VALGET_MSGID
UBX-CFG-VALGET message ID.
Definition ubx.hpp:239
static constexpr uint8_t UBX_TIM_TM2_MSGID
UBX-TIM-TM2 message ID.
Definition ubx.hpp:481
static constexpr uint8_t UBX_NAV_SIG_MSGID
UBX-NAV-SIG message ID.
Definition ubx.hpp:369
static constexpr bool UBX_NAV_TIMELS_V0_VALID_TIMETOLSEVENTVALID(const uint8_t valid)
Definition ubx.hpp:2649
static constexpr uint8_t UBX_NAV_EELL_V0_VERSION
Definition ubx.hpp:1879
static constexpr uint8_t UBX_MON_SPAN_VERSION(const uint8_t *msg)
Definition ubx.hpp:1626
static constexpr uint8_t UBX_NAV_RELPOSNED_VERSION(const uint8_t *msg)
Definition ubx.hpp:2164
const char * UBX_SEC_OSNMA_V3_OSNMAMONITORING_NMAHEADERUPDATE_STR(const uint16_t osnmaMonitoring)
Definition ubx.hpp:2900
static constexpr uint8_t UBX_NAV_HPPOSLLH_MSGID
UBX-NAV-HPPOSLLH message ID.
Definition ubx.hpp:345
static constexpr uint8_t UBX_RXM_RTCM_MSGID
UBX-RXM-RTCM message ID.
Definition ubx.hpp:463
const char * UBX_CFG_VALDEL_V1_TRANSACTION_STR(const uint8_t transaction)
Definition ubx.hpp:924
static constexpr uint8_t UBX_NAV_SIG_V0_VERSION
Definition ubx.hpp:2283
static constexpr bool UBX_NAV_RELPOSNED_V1_FLAGS_RELPOSVALID(const uint32_t flags)
Definition ubx.hpp:2178
static constexpr uint8_t UBX_NAV2_PVT_MSGID
UBX-NAV2-PVT message ID.
Definition ubx.hpp:415
static constexpr uint8_t UBX_SEC_OSNMA_V3_GROUP1_BITFIELD1_AUTHNUM(const uint16_t bitfield1)
Definition ubx.hpp:2979
static constexpr bool UBX_SEC_OSNMA_V3_GROUP1_BITFIELD1_AUTHSTATUS(const uint16_t bitfield1)
Definition ubx.hpp:2980
static constexpr uint8_t UBX_ESF_STATUS_V2_SENSSTATUS1_USED
Definition ubx.hpp:1131
const char * UBX_ESF_STATUS_V2_INITSTATUS1_WTINITSTATUS_STR(const uint8_t initStatus1)
Definition ubx.hpp:1103
static constexpr uint8_t UBX_MON_TEMP_MSGID
UBX-MON-TEMP message ID.
Definition ubx.hpp:323
static constexpr uint8_t UBX_NAV_COV_V0_VERSION
Definition ubx.hpp:1825
static constexpr bool UBX_MON_HW3_V0_PINMASK_PIOIRQ(const uint16_t pinMask)
Definition ubx.hpp:1521
static constexpr uint8_t UBX_SYNC_1
UBX frame sync char 1.
Definition ubx.hpp:64
static constexpr std::size_t UBX_HEAD_SIZE
Size of UBX frame header.
Definition ubx.hpp:63
static constexpr uint8_t UBX_NAV_TIMETRUSTED_V1_VERSION
Definition ubx.hpp:2357
static constexpr std::size_t UBX_NAV_EELL_V0_SIZE
Definition ubx.hpp:1880
static constexpr uint8_t UBX_ESF_STATUS_V2_FAULTS_BADMEAS
Definition ubx.hpp:1145
static constexpr bool UBX_MON_HW3_V0_PINMASK_VALUE(const uint16_t pinMask)
Definition ubx.hpp:1519
static constexpr bool UBX_MGA_INI_TIME_GNSS_V0_REF_LAST(const uint8_t ref)
Definition ubx.hpp:1295
static constexpr uint8_t UBX_NAV_RELPOSNED_V1_VERSION
Definition ubx.hpp:2165
static constexpr uint8_t UBX_NAV2_TIMEGAL_MSGID
UBX-NAV2-TIMEGAL message ID.
Definition ubx.hpp:431
static constexpr uint8_t UBX_NAV2_SIG_MSGID
UBX-NAV2-SIG message ID.
Definition ubx.hpp:421
static constexpr std::size_t MAX_NAME_SIZE
Maximum size of message name string (incl. nul termination).
Definition types.hpp:184
std::string Sprintf(const char *const fmt,...) PRINTF_ATTR(1)
Format string.
std::string Base64Enc(const std::vector< uint8_t > &buf)
Encode to base64.
constexpr std::size_t NumOf()
Get number of elements in array type.
Definition types.hpp:86
Fixposition SDK: String utilities.
UBX-ACK-ACK (version 0, output) payload.
Definition ubx.hpp:754
UBX-CFG-CFG (version 0, command) message head.
Definition ubx.hpp:983
UBX-CFG-CFG (version 0, command) message optional group.
Definition ubx.hpp:993
UBX-CFG-RST (version 0, command) message payload.
Definition ubx.hpp:940
UBX-CFG-VALDEL (version 1, input) message payload header.
Definition ubx.hpp:905
UBX-CFG-VALGET (version 0, poll) message payload header.
Definition ubx.hpp:848
UBX-CFG-VALGET (version 1, output) message payload header.
Definition ubx.hpp:858
UBX-CFG-VALSET (version 0, input) message payload header.
Definition ubx.hpp:791
UBX-CFG-VALSET (version 1, input) message payload header.
Definition ubx.hpp:801
UBX-ESF-MEAS (version 0, input and output) message head.
Definition ubx.hpp:1021
UBX-ESF-MEAS (version 0, input and output) data.
Definition ubx.hpp:1031
UBX-ESF-MEAS (version 0, input and output) timetag.
Definition ubx.hpp:1039
UBX-ESF-STATUS (version 0, output) message head.
Definition ubx.hpp:1071
UBX-ESF-STATUS (version 0, output) per-sensor status.
Definition ubx.hpp:1086
UBX-MGA-GAL-OSNMA_MERKLE (version 0, input) payload.
Definition ubx.hpp:1192
UBX-MGA-GAL-OSNMA_PUBKEY (version 0, input) payload.
Definition ubx.hpp:1160
UBX-MGA-INI-TIME_GNSS (version 0, input) payload.
Definition ubx.hpp:1267
UBX-MGA-INI-TIME_UTC (version 0, input) payload.
Definition ubx.hpp:1222
UBX-MON-COMMS (version 0, output) payload head.
Definition ubx.hpp:1308
UBX-MON-COMMS (version 0, output) payload repeated group.
Definition ubx.hpp:1320
UBX-MON-HW (version 0, output) payload.
Definition ubx.hpp:1434
UBX-MON-HW3 (version 0, output) payload.
Definition ubx.hpp:1471
UBX-MON-HW3 (version 0, output) payload.
Definition ubx.hpp:1483
UBX-MON-HW (version 0, output).
Definition ubx.hpp:1377
UBX-MON-RF (version 0, output) payload head.
Definition ubx.hpp:1535
UBX-MON-RF (version 0, output) payload repeated group.
Definition ubx.hpp:1546
UBX-MON-RF (version 0, output) payload head.
Definition ubx.hpp:1602
UBX-MON-RF (version 0, output) payload repeated group.
Definition ubx.hpp:1614
UBX-MON-SYS (version 1, output) payload.
Definition ubx.hpp:1643
UBX-MON-TEMP (version 0, output) message payload (no docu available, but u-center shows it....
Definition ubx.hpp:1690
UBX-MON-VER (version 0, output) message payload header.
Definition ubx.hpp:1714
UBX-MON-VER (version 0, output) optional repeated field.
Definition ubx.hpp:1723
UBX-NAV-ATT (version 0, output) payload.
Definition ubx.hpp:1742
UBX-NAV-COV (version 0, output) payload head.
Definition ubx.hpp:1800
UBX-NAV-EELL (version 0, output) payload head.
Definition ubx.hpp:1866
UBX-NAV-EOE (version 0, output) payload.
Definition ubx.hpp:1896
UBX-NAV-HPPOSECEF (version 0, output) payload.
Definition ubx.hpp:1916
UBX-NAV-HPPOSLLH (version 0) payload.
Definition ubx.hpp:1952
UBX-NAV-POSECEF (version 0, output) payload.
Definition ubx.hpp:1993
UBX-NAV-PVT (version 1, output) payload.
Definition ubx.hpp:2018
UBX-NAV-RELPOSNED (version 1, output) payload.
Definition ubx.hpp:2137
UBX-NAV-SAT (version 1, output) payload head.
Definition ubx.hpp:2200
UBX-NAV-SAT (version 1, output) payload repeated group.
Definition ubx.hpp:2211
UBX-NAV-SIG (version 0, output) payload head.
Definition ubx.hpp:2254
UBX-NAV-SIG (version 0, output) payload repeated group.
Definition ubx.hpp:2265
UBX-NAV-TIMETRUSTED (version 1, output) payload.
Definition ubx.hpp:2336
UBX-RXM-RAWX (version 1, output) payload head.
Definition ubx.hpp:2688
UBX-RXM-RAWX (version 1, output) payload repeated group.
Definition ubx.hpp:2702
UBX-RXM-RTCM (version 2, output).
Definition ubx.hpp:2753
UBX-RXM-SFRBX (version 2, output) payload head.
Definition ubx.hpp:2784
UBX-RXM-SFRBX (version 2, output) payload repeated group.
Definition ubx.hpp:2799
UBX-RXM-SPARTN (version 1, output).
Definition ubx.hpp:2822
UBX-SEC-OSNMA (version 3, output) payload head.
Definition ubx.hpp:2850
UBX-SEC-OSNMA (version 3, output) payload repeated group (per authenticated SV).
Definition ubx.hpp:2867
Fixposition SDK: Common types and type helpers.
Fixposition SDK: Parser UBX routines and types.