Fixposition SDK 0.0.0-heads/main-0-gd0a6ce2
Collection of c++ libraries and apps for use with Fixposition products
Loading...
Searching...
No Matches
fpa.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 *
9 * Based on work by flipflip (https://github.com/phkehl)
10 * \endverbatim
11 *
12 * @file
13 * @brief Fixposition SDK: Parser FP_A routines and types
14 */
15// clang-format off
16/**
17 * @page FPSDK_COMMON_PARSER_FPA Parser FP_A routines and types
18 *
19 * **API**: fpsdk_common/parser/fpa.hpp and fpsdk::common::parser::fpa
20 *
21 * @fp_msgspec_begin{FP_A-Protocol}
22 *
23 * Messages are in this form:
24 *
25 * <code><b style="color: red;">$</b><b style="color: green;">FP</b>,<b style="color: blue;">msg_type</b>,<b style="color: blue;">msg_version</b>,<em>field<sub>3</sub></em>,<em>field<sub>4</sub></em>,…,<em>field<sub>N</sub></em><b style="color: red;">*CC</b><b style="color: red;">\\r\\n</b></code>
26 *
27 * Where:
28 *
29 * - The FP_A style framing:
30 * - <code><b style="color: red;">\$</b></code>
31 * -- Start character ("$", ASCII 36)
32 * - <code><b style="color: red;">\*CC</b></code>
33 * -- Checksum: "*" (ASCII 42) and two digit XOR value of all payload
34 * characters in captial hexadecimal notation, for example:
35 * "FPX" = <code>'F' ^ 'P' ^ 'X' = 70 ^ 80 ^ 88 = 78 = 0x4e</code> = checksum <code>4E</code>
36 * - <code><b style="color: red;">\\r\\n</b></code> -- Message termination characters (CR + LF, ASCII 13 + 10)
37 * - A Fixposition identifier:
38 * - <code><b style="color: green;">FP</b></code>
39 * -- Fixposition ASCII message identifier, "FP" (ASCII 70 + 80)
40 * - Fixposition message type and version:
41 * - <code><b style="color: blue;">msg_type</b></code> (= <code><em>field<sub>1</sub></em></code>)
42 * -- Message type, all capital letters (ASCII 65--90)
43 * - <code><b style="color: blue;">msg_version</b></code> (= <code><em>field<sub>2</sub></em></code>)
44 * -- Message version, decimal number (letters 0--9, ASCII 48--57), range 1--…
45 * - Data fields (payload)
46 * - <code><em>field<sub>3</sub></em>,<em>field<sub>4</sub></em>,…,<em>field<sub>N</sub></em></code>
47 * -- The structure of the message data is defined by the <code><b style="color: blue;">msg_type</b></code>
48 * and <code><b style="color: blue;">version</b></code>.
49 * Each field can contain all printable 7-bit ASCII characters (ASCII 32–126), excluding the
50 * reserved characters `!` (ASCII 33), `$` (ASCII 36), `*` (ASCII 42), `,` (ASCII 44),
51 * `\` (ASCII 92), `~` (ASCII 126).
52 * - Field separators
53 * - All fields (identifier, message type, message version, data fields) are separated by a `,` (comma, ASCII 44)
54 * - Null fields
55 * - Data fields can be _null_, meaning their value is absent to indicate that no data is
56 * available. The data for null fields is the empty string. For example:
57 * - Definition: <code>…,<em>field<sub>i</sub></em>,<em>field<sub>i+1</sub></em>,<em>field<sub>i+2</sub></em>,…</code>
58 * - Values: <code><em>field<sub>i</sub></em></code> = 123, <code><em>field<sub>i+1</sub></em></code> = _null_,
59 * <code><em>field<sub>i+2</sub></em></code> = 456
60 * - Payload string: <code>…,123,,456,…</code>
61 * - Data field types:
62 * - _Numeric_: Decimal integer number, one or more digits (0-9) and optional leading "-" sign
63 * - _Float (.x)_: Decimal floating point number, one or more digits (0-9) and optional leading "-" sign, with
64 * _x_ digits fractional part separated by a dot (".")
65 * - _Float (x)_: Decimal floating point number with _x_ significant digits, optional leading "-", optional fractional
66 * part separated by a dot (".")
67 * - _String_: String of allowed payload characters (but not the `,` field separator)
68 * - ...
69 * - ...
70 *
71 * @fp_msgspec_end
72 *
73 */
74// clang-format on
75#ifndef __FPSDK_COMMON_PARSER_FPA_HPP__
76#define __FPSDK_COMMON_PARSER_FPA_HPP__
77
78/* LIBC/STL */
79#include <array>
80#include <cstdint>
81#include <string>
82
83/* EXTERNAL */
84
85/* PACKAGE */
86#include "../logging.hpp"
87#include "../types.hpp"
88#include "types.hpp"
89
90namespace fpsdk {
91namespace common {
92namespace parser {
93/**
94 * @brief Parser FP_A routines and types
95 */
96namespace fpa {
97/* ****************************************************************************************************************** */
98
99static constexpr uint8_t FP_A_PREAMBLE = '$'; //!< FP_A framing preamble
100static constexpr int FP_A_FRAME_SIZE = 6; //!< FP_A frame size ("$*cc\r\n")
101
102//! FP_A message meta data
104{
105 char msg_type_[40] = { 0 }; //!< Message type (for example, "ODOMETRY"), nul-terminated string
106 int msg_version_ = 0; //!< Message version (for example, 1), < 0 if unknown
107 int payload_ix0_ = 0; //!< Index (offset) for start of payload, 0 if no payload available
108 int payload_ix1_ = 0; //!< Index (offset) for end of payload, 0 if no payload available
109};
110
111/**
112 * @brief Get FP_A message meta data
113 *
114 * @param[out] meta The meta data
115 * @param[in] msg Pointer to the FP_A message
116 * @param[in] msg_size Size of the FP_A message (>= 11)
117 *
118 * @note No check on the data provided is done. The caller must ensure that the data is a correct FP_A message.
119 *
120 * @returns true if the meta data was successfully extracted, false otherwise
121 */
122bool FpaGetMessageMeta(FpaMessageMeta& meta, const uint8_t* msg, const std::size_t msg_size);
123
124/**
125 * @brief Get FP_A message name
126 *
127 * Generates a name (string) in the form "FP_A-MESSAGEID" (for example, "FP_A-ODOMETRY").
128 *
129 * @param[out] name String to write the name to
130 * @param[in] size Size of \c name (incl. nul termination)
131 * @param[in] msg Pointer to the FP_A message
132 * @param[in] msg_size Size of the \c msg
133 *
134 * @note No check on the data provided is done. The caller must ensure that the data is a valid FP_A or FP_A message.
135 *
136 * @returns true if message name was generated, false if \c name buffer was too small
137 */
138bool FpaGetMessageName(char* name, const std::size_t size, const uint8_t* msg, const std::size_t msg_size);
139
140/**
141 * @brief Get FP_A message info
142 *
143 * This stringifies the content of some FP_A messages, for debugging.
144 *
145 * @param[out] info String to write the info to
146 * @param[in] size Size of \c name (incl. nul termination)
147 * @param[in] msg Pointer to the FP_A message
148 * @param[in] msg_size Size of the \c msg
149 *
150 * @note No check on the data provided is done. The caller must ensure that the data is a valid FP_A message.
151 *
152 * @returns true if message info was generated (even if info is empty), false if \c name buffer was too small
153 */
154bool FpaGetMessageInfo(char* info, const std::size_t size, const uint8_t* msg, const std::size_t msg_size);
155
156/**
157 * @brief FP_A fusion initialisation status
158 */
159enum class FpaInitStatus : int
160{ // clang-format off
161 UNSPECIFIED = '!', //!< Unspecified
162 NOT_INIT = '0', //!< Not initialised
163 LOCAL_INIT = '1', //!< Locally initialised
164 GLOBAL_INIT = '2', //!< Globally initialised
165}; // clang-format on
166
167/**
168 * @brief FP_A legacy fusion status
169 */
170enum class FpaFusionStatusLegacy : int
171{ // clang-format off
172 UNSPECIFIED = '!', //!< Unspecified
173 NONE = '0', //!< Not started
174 VISION = '1', //!< Vision only
175 VIO = '2', //!< Visual-inertial fusion
176 IMU_GNSS = '3', //!< Inertial-GNSS fusion
177 VIO_GNSS = '4' //!< Visual-inertial-GNSS fusion
178}; //clang-format on
179
180/**
181 * @brief FP_A fusion measurement status
182 */
183enum class FpaMeasStatus : int
184{ // clang-format off
185 UNSPECIFIED = '!', //!< Unspecified
186 NOT_USED = '0', //!< Not used
187 USED = '1', //!< Used
188 DEGRADED = '2', //!< Degraded
189}; // clang-format on
190
191/**
192 * @brief FP_A IMU bias status
193 */
194enum class FpaImuStatus : int
195{ // clang-format off
196 UNSPECIFIED = '!', //!< Unspecified
197 NOT_CONVERGED = '0', //!< Not converged
198 WARMSTARTED = '1', //!< Warmstarted
199 ROUGH_CONVERGED = '2', //!< Rough convergence
200 FINE_CONVERGED = '3', //!< Fine convergence
201}; // clang-format on
202
203/**
204 * @brief FP_A Legacy IMU bias status
205 */
206enum class FpaImuStatusLegacy : int
207{ // clang-format off
208 UNSPECIFIED = '!', //!< Unspecified
209 NOT_CONVERGED = '0', //!< Not converged
210 CONVERGED = '1', //!< Converged
211}; // clang-format on
212
213/**
214 * @brief FP_A IMU variance
215 */
216enum class FpaImuNoise : int
217{ // clang-format off
218 UNSPECIFIED = '!', //!< Unspecified
219 LOW_NOISE = '1', //!< Low noise
220 MEDIUM_NOISE = '2', //!< Medium noise
221 HIGH_NOISE = '3', //!< High noise
222 RESERVED4 = '4', //!< Reserved
223 RESERVED5 = '5', //!< Reserved
224 RESERVED6 = '6', //!< Reserved
225 RESERVED7 = '7', //!< Reserved
226}; // clang-format on
227
228/**
229 * @brief FP_A IMU accelerometer and gyroscope convergence
230 */
231enum class FpaImuConv : int
232{ // clang-format off
233 UNSPECIFIED = '!', //!< Unspecified
234 RESERVED0 = '0', //!< Reserved
235 WAIT_IMU_MEAS = '1', //!< Awaiting IMU measurements
236 WAIT_GLOBAL_MEAS = '2', //!< Insufficient global measurements
237 WAIT_MOTION = '3', //!< Insufficient motion
238 CONVERGING = '4', //!< Converging
239 RESERVED5 = '5', //!< Reserved
240 RESERVED6 = '6', //!< Reserved
241 IDLE = '7', //!< Idle
242}; // clang-format on
243
244/**
245 * @brief FP_A GNSS fix status
246 */
247enum class FpaGnssStatus : int
248{ // clang-format off
249 UNSPECIFIED = '!', //!< Unspecified
250 NO_FIX = '0', //!< No fix
251 SPP = '1', //!< Single-point positioning (SPP)
252 RTK_MB = '2', //!< RTK moving baseline
253 RESERVED3 = '3', //!< Reserved
254 RESERVED4 = '4', //!< Reserved
255 RTK_FLOAT = '5', //!< RTK float
256 RESERVED6 = '6', //!< Reserved
257 RESERVED7 = '7', //!< Reserved
258 RTK_FIXED = '8', //!< RTK fixed
259 RESERVED9 = '9', //!< Reserved
260}; // clang-format on
261
262/**
263 * @brief FP_A GNSS correction status
264 */
265enum class FpaCorrStatus : int
266{ // clang-format off
267 UNSPECIFIED = '!', //!< Unspecified
268 WAITING_FUSION = '0', //!< Waiting fusion
269 NO_GNSS = '1', //!< No GNSS available
270 NO_CORR = '2', //!< No corrections used
271 LIMITED_CORR = '3', //!< Limited corrections used: station data & at least one of the constellations (both bands) among the valid rover measurements
272 OLD_CORR = '4', //!< Corrections are too old (TBD)
273 GOOD_CORR = '5', //!< Sufficient corrections used: station data and corrections for ALL bands among the valid rover measurements
274 RESERVED6 = '6', //!< Reserved
275 RESERVED7 = '7', //!< Reserved
276 RESERVED8 = '8', //!< Reserved
277 RESERVED9 = '9', //!< Reserved
278}; // clang-format on
279
280/**
281 * @brief FP_A baseline status
282 */
283enum class FpaBaselineStatus : int
284{ // clang-format off
285 UNSPECIFIED = '!', //!< Unspecified
286 WAITING_FUSION = '0', //!< Waiting fusion
287 NO_FIX = '1', //!< Not available or no fix
288 FAILING = '2', //!< Failing
289 PASSING = '3', //!< Passing
290}; // clang-format on
291
292/**
293 * @brief FP_A camera status
294 */
295enum class FpaCamStatus : int
296{ // clang-format off
297 UNSPECIFIED = '!', //!< Unspecified
298 CAM_UNAVL = '0', //!< Camera not available
299 BAD_FEAT = '1', //!< Camera available, but not usable (e.g. too dark)
300 RESERVED2 = '2', //!< Reserved
301 RESERVED3 = '3', //!< Reserved
302 RESERVED4 = '4', //!< Reserved
303 GOOD = '5', //!< Camera working and available
304}; // clang-format on
305
306/**
307 * @brief FP_A wheelspeed status
308 */
309enum class FpaWsStatus : int
310{ // clang-format off
311 UNSPECIFIED = '!', //!< Unspecified
312 NOT_ENABLED = '0', //!< No wheelspeed enabled
313 MISS_MEAS = '1', //!< Missing wheelspeed measurements
314 NONE_CONVERGED = '2', //!< At least one wheelspeed enabled, no wheelspeed converged
315 ONE_CONVERGED = '3', //!< At least one wheelspeed enabled and at least one converged
316 ALL_CONVERGED = '4', //!< At least one wheelspeed enabled and all converged
317}; // clang-format on
318
319/**
320 * @brief FP_A Legacy wheelspeed status
321 */
322enum class FpaWsStatusLegacy : int
323{ // clang-format off
324 UNSPECIFIED = '!', //!< Unspecified
325 NOT_ENABLED = '-', //!< No wheelspeed enabled
326 NONE_CONVERGED = '0', //!< None converged
327 ONE_OR_MORE_CONVERGED = '1', //!< At least one converged
328}; // clang-format on
329
330/**
331 * @brief FP_A wheelspeed convergence status
332 */
333enum class FpaWsConv : int
334{ // clang-format off
335 UNSPECIFIED = '!', //!< Unspecified
336 WAIT_FUSION = '0', //!< Awaiting Fusion
337 WAIT_WS_MEAS = '1', //!< Missing wheelspeed measurements
338 WAIT_GLOBAL_MEAS = '2', //!< Insufficient global measurements
339 WAIT_MOTION = '3', //!< Insufficient motion
340 WAIT_IMU_BIAS = '4', //!< Insufficient imu bias convergence
341 CONVERGING = '5', //!< Converging
342 IDLE = '6', //!< Idle
343}; // clang-format on
344
345/**
346 * @brief FP_A markers status
347 */
348enum class FpaMarkersStatus : int
349{ // clang-format off
350 UNSPECIFIED = '!', //!< Unspecified
351 NOT_ENABLED = '0', //!< No markers available
352 NONE_CONVERGED = '1', //!< Markers available
353 ONE_CONVERGED = '2', //!< Markers available and used
354 ALL_CONVERGED = '3', //!< All markers available and used
355}; // clang-format on
356
357/**
358 * @brief FP_A markers convergence status
359 */
360enum class FpaMarkersConv : int
361{ // clang-format off
362 UNSPECIFIED = '!', //!< Unspecified
363 WAIT_FUSION = '0', //!< Awaiting Fusion
364 WAIT_MARKER_MEAS = '1', //!< Waiting marker measurements
365 WAIT_GLOBAL_MEAS = '2', //!< Insufficient global measurements
366 CONVERGING = '3', //!< Converging
367 IDLE = '4', //!< Idle
368}; // clang-format on
369
370/**
371 * @brief FP_A GNSS fix type
372 */
373enum class FpaGnssFix : int
374{ // clang-format off
375 UNSPECIFIED = '!', //!< Unspecified
376 UNKNOWN = '0', //!< Unknown
377 NOFIX = '1', //!< No fix
378 DRONLY = '2', //!< Dead-reckoning only
379 TIME = '3', //!< Time-only fix
380 S2D = '4', //!< Single 2D fix
381 S3D = '5', //!< Single 3D fix
382 S3D_DR = '6', //!< Single 3D fix with dead-reckoning
383 RTK_FLOAT = '7', //!< RTK float fix
384 RTK_FIXED = '8', //!< RTK fixed fix
385}; // clang-format on
386
387/**
388 * @brief FP_A epoch type
389 */
390enum class FpaEpoch : int
391{
392 UNSPECIFIED = 0, //!< Unspecified
393 GNSS1, //!< GNSS 1
394 GNSS2, //!< GNSS 2
395 GNSS, //!< Combined GNSS
396 FUSION, //!< Fusion
397};
398
399/**
400 * @brief Stringify epoch type
401 *
402 * @param[in] epoch The epoch type
403 *
404 * @returns the stringification of the epoch type ("FUSION", "GNSS1", etc.)
405 */
406const char* FpaEpochStr(const FpaEpoch epoch);
407
408/**
409 * @brief FP_A GNSS antenna state
410 */
411enum class FpaAntState : int
412{
413 UNSPECIFIED = 0, //!< Unspecified
414 OPEN, //!< No antenna detected (or connected via DC block)
415 OK, //!< Antenna detected and good
416 SHORT, //!< Antenna short circuit detected
417};
418
419/**
420 * @brief FP_A GNSS antenna power
421 */
422enum class FpaAntPower : int
423{
424 UNSPECIFIED = 0, //!< Unspecified
425 ON, //!< Antenna power supply is on
426 OFF, //!< Antenna power supply is off
427};
428
429/**
430 * @brief FP_A text levels
431 */
432enum class FpaTextLevel : int
433{ // clang-format off
434 UNSPECIFIED = 0, //!< Unspecified
439}; // clang-format on
440/**
441 * @brief FP_A time base
442 */
443enum class FpaTimebase : int
444{ // clang-format off
445 UNSPECIFIED = 0, //!< Unspecified
446 NONE, //!< None
447 GNSS, //!< GNSS
448 UTC, //!< UTC
449}; // clang-format on
450
451/**
452 * @brief FP_A time reference
453 */
454enum class FpaTimeref : int
455{ // clang-format off
456 UNSPECIFIED = 0, //!< Unspecified
457 UTC_NONE, //!< UTC: None (UTC params not yet known)
458 UTC_CRL, //!< UTC: Communications Research Laboratory (CRL), Japan
459 UTC_NIST, //!< UTC: National Institute of Standards and Technology (NIST)
460 UTC_USNO, //!< UTC: U.S. Naval Observatory (USNO)
461 UTC_BIPM, //!< UTC: International Bureau of Weights and Measures (BIPM)
462 UTC_EU, //!< UTC: European laboratories
463 UTC_SU, //!< UTC: Former Soviet Union (SU)
464 UTC_NTSC, //!< UTC: National Time Service Center (NTSC), China
465 GNSS_GPS, //!< GNSS: GPS
466 GNSS_GAL, //!< GNSS: Galileo
467 GNSS_BDS, //!< GNSS: BeiDou
468 GNSS_GLO, //!< GNSS: GLONASS
469 GNSS_NVC, //!< GNSS: NavIC
470 OTHER, //!< other/unknown GNSS/UTC
471}; // clang-format on
472
473/**
474 * @brief FP_A integer value
475 */
476struct FpaInt
477{
478 bool valid = false; //!< Data is valid
479 int value = 0; //!< Value
480};
481
482/**
483 * @brief FP_A float value
484 */
486{
487 bool valid = false; //!< Data is valid
488 double value = 0.0; //!< Value
489};
490
491/**
492 * @brief FP_A three float values
493 */
495{
496 bool valid = false; //!< Data is valid
497 std::array<double, 3> values = { { 0.0, 0.0, 0.0 } }; //!< Values
498};
499
500/**
501 * @brief FP_A four float values
502 */
504{
505 bool valid = false; //!< Data is valid
506 std::array<double, 4> values = { { 0.0, 0.0, 0.0, 0.0 } }; //!< Values
507};
508
509/**
510 * @brief FP_A six float values
511 */
513{
514 bool valid = false; //!< Data is valid
515 std::array<double, 6> values = { { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }; //!< Values
516};
517
518/**
519 * @brief FP_A GPS time
520 */
522{
523 FpaInt week; //!< GPS week number, range 0-9999, or null if time not (yet) available
524 FpaFloat tow; //!< GPS time of week, range 0.000-604799.999999, or null if time not (yet) available
525
526 bool operator==(const FpaGpsTime& rhs) const; //!< Equal (epsilon = 1e-6)
527 bool operator!=(const FpaGpsTime& rhs) const; //!< Not equal (epsilon = 1e-6)
528 bool operator<(const FpaGpsTime& rhs) const; //!< Less than
529 bool operator>(const FpaGpsTime& rhs) const; //!< Greater than
530 bool operator<=(const FpaGpsTime& rhs) const; //!< Less or equal than
531 bool operator>=(const FpaGpsTime& rhs) const; //!< Greater or equal than
532};
533
534/**
535 * @brief FP_A payload base class
536 */
538{
539 bool valid_ = false; //!< Payload successfully decoded (true), or not (yet) decoded (false)
540 virtual ~FpaPayload() = default; //!< Virtual dtor for polymorphism
541};
542
543/**
544 * @brief FP_A-EOE (version 1) message payload
545 */
547{
549 FpaEpoch epoch = FpaEpoch::UNSPECIFIED; //!< Indicates which epoch ended ("FUSION", "GNSS", "GNSS1", "GNSS2")
550
551 /**
552 * @brief Set data from message
553 *
554 * @param[in] msg Pointer to the FP_A message
555 * @param[in] msg_size Size of the FP_A message (>= 11)
556 *
557 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
558 * otherwise (fields are now invalid)
559 */
560 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
561
562 static constexpr const char* MSG_NAME = "FP_A-EOE"; //!< Message name
563};
564
565/**
566 * @brief FP_A-GNSSANT (version 1) message payload
567 */
569{ // clang-format off
573 FpaInt gnss1_age; //!< Time since gnss1_state or gnss1_power information last changed, 0-604800
576 FpaInt gnss2_age; //!< Time since gnss2_state or gnss2_power information last changed, 0-604800
577 // clang-format on
578
579 /**
580 * @brief Set data from message
581 *
582 * @param[in] msg Pointer to the FP_A message
583 * @param[in] msg_size Size of the FP_A message (>= 11)
584 *
585 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
586 * otherwise (fields are now invalid)
587 */
588 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
589
590 static constexpr const char* MSG_NAME = "FP_A-GNSSANT"; //!< Message name
591};
592
593/**
594 * @brief FP_A-GNSSCORR (version 1) message payload
595 */
597{ // clang-format off
599 FpaGnssFix gnss1_fix = FpaGnssFix::UNSPECIFIED; //!< Fix status of GNSS1
600 FpaInt gnss1_nsig_l1; //!< Number of L1 signals with correction data tracked by GNSS1 receiver, range 0-100
601 FpaInt gnss1_nsig_l2; //!< Number of L2 signals with correction data tracked by GNSS1 receiver, range 0-100
602 FpaGnssFix gnss2_fix = FpaGnssFix::UNSPECIFIED; //!< Fix status of GNSS2 receiver
603 FpaInt gnss2_nsig_l1; //!< Number of L1 signals with correction data tracked by GNSS2 receiver, range 0-100
604 FpaInt gnss2_nsig_l2; //!< Number of L2 signals with correction data tracked by GNSS2 receiver, range 0-100
605 FpaFloat corr_latency; //!< Average correction data latency (10s window), range 0.0-99.9
606 FpaFloat corr_update_rate; //!< Average correction update rate (10s window), range 0.0-0.0
607 FpaFloat corr_data_rate; //!< Average correction data rate (10s window), range 0.0-50.0
608 FpaFloat corr_msg_rate; //!< Average correction message rate (10s window), range 0-50
609 FpaInt sta_id; //!< Correction station ID, range 0--4095
610 FpaFloat3 sta_llh; //!< Correction station latitude/longitude/height [deg, deg, m]
611 FpaInt sta_dist; //!< Correction station baseline length (approximate 3d distance), range 0-100000
612 // clang-format on
613
614 /**
615 * @brief Set data from message
616 *
617 * @param[in] msg Pointer to the FP_A message
618 * @param[in] msg_size Size of the FP_A message (>= 11)
619 *
620 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
621 * otherwise (fields are now invalid)
622 */
623 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
624
625 static constexpr const char* MSG_NAME = "FP_A-GNSSCORR"; //!< Message name
626};
627
628/**
629 * @brief FP_A-...IMU (version 1) messages payload
630 */
632{
633 //! Data from which FP_A-...IMU is stored
634 enum class Which
635 {
636 UNSPECIFIED, //!< Unspecified
637 RAWIMU, //!< Data is from FP_A-RAWIMU
638 CORRIMU, //!< Data is from FP_A-CORRIMU
639 };
640 Which which = Which::UNSPECIFIED; //!< Indicates from which message the data is
641 // clang-format off
643 FpaFloat3 acc; //!< Raw acceleration in output frame, X/Y/Z components
644 FpaFloat3 rot; //!< Raw angular velocity in output frame, X/Y/Z components
645 // clang-format on
646
647 /**
648 * @brief Set data from message
649 *
650 * @param[in] msg Pointer to the FP_A message
651 * @param[in] msg_size Size of the FP_A message (>= 11)
652 *
653 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
654 * otherwise (fields are now invalid)
655 */
656 virtual bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) = 0;
657};
658
659/**
660 * @brief FP_A-RAWIMU (version 1) message payload
661 */
663{
664 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
665
666 static constexpr const char* MSG_NAME = "FP_A-RAWIMU"; //!< Message name
667};
668
669/**
670 * @brief FP_A-CORRIMU (version 1) message payload
671 */
673{
674 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
675
676 static constexpr const char* MSG_NAME = "FP_A-CORRIMU"; //!< Message name
677};
678
679/**
680 * @brief FP_A-IMUBIAS (version 1) message payload
681 */
683{ // clang-format off
685 FpaMeasStatus fusion_imu; //!< Fusion measurement status: IMU
686 FpaImuStatus imu_status; //!< IMU bias status
687 FpaImuNoise imu_noise; //!< IMU variance status
688 FpaImuConv imu_conv; //!< IMU convergence status
689 FpaFloat3 bias_acc; //!< Accelerometer bias, X/Y/Z components
690 FpaFloat3 bias_gyr; //!< Gyroscope bias, X/Y/Z components
691 FpaFloat3 bias_cov_acc; //!< Accelerometer bias covariance, X/Y/Z components
692 FpaFloat3 bias_cov_gyr; //!< Gyroscope bias covariance, X/Y/Z components
693 // clang-format on
694
695 /**
696 * @brief Set data from message
697 *
698 * @param[in] msg Pointer to the FP_A message
699 * @param[in] msg_size Size of the FP_A message (>= 11)
700 *
701 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
702 * otherwise (fields are now invalid)
703 */
704 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
705
706 static constexpr const char* MSG_NAME = "FP_A-IMUBIAS"; //!< Message name
707};
708
709/**
710 * @brief FP_A-LLH (version 1) message payload
711 */
713{ // clang-format off
715 FpaFloat3 llh; //!< Latitude/longitude/height [deg, deg, m]
716 FpaFloat6 cov_enu; //!< Position covariance in ENU, EE/NN/UU/EN/NU/EU components [m^2]
717 // clang-format on
718
719 /**
720 * @brief Set data from message
721 *
722 * @param[in] msg Pointer to the FP_A message
723 * @param[in] msg_size Size of the FP_A message (>= 11)
724 *
725 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
726 * otherwise (fields are now invalid)
727 */
728 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
729
730 static constexpr const char* MSG_NAME = "FP_A-LLH"; //!< Message name
731};
732
733/**
734 * @brief FP_A-ODOM... (version 1) messages payload
735 */
737{
738 //! Data from which FP_A-...IMU is stored
739 enum class Which
740 {
741 UNSPECIFIED, //!< Unspecified
742 ODOMETRY, //!< Data is from FP_A-ODOMETRY
743 ODOMENU, //!< Data is from FP_A-ODOMENU
744 ODOMSH, //!< Data is from FP_A-ODOMSH
745 };
746 // clang-format off
747 Which which = Which::UNSPECIFIED; //!< Indicates from which message the data is
749 FpaFloat3 pos; //!< Position, X/Y/Z components
750 FpaFloat4 orientation; //!< Quaternion, W/X/Y/Z components
751 FpaFloat3 vel; //!< Velocity, X/Y/Z components
752 FpaFloat3 rot; //!< Bias corrected angular velocity, X/Y/Z components
753 FpaFloat3 acc; //!< Bias corrected acceleration, X/Y/Z components
756 FpaGnssFix gnss1_fix; //!< Fix status of GNSS1 receiver
757 FpaGnssFix gnss2_fix; //!< Fix status of GNSS2 receiver
758 FpaWsStatusLegacy wheelspeed_status; //!< Wheelspeed status
759 FpaFloat6 pos_cov; //!< Position covariance, XX/YY/ZZ/XY/YZ/XZ components
760 FpaFloat6 orientation_cov; //!< Orientation covariance, XX/YY/ZZ/XY/YZ/XZ components
761 FpaFloat6 vel_cov; //!< Velocity covariance, XX/YY/ZZ/XY/YZ/XZ components
762 char version[100] = { 0 }; //!< Version
763 // clang-format on
764
765 /**
766 * @brief Set data from message
767 *
768 * @param[in] msg Pointer to the FP_A message
769 * @param[in] msg_size Size of the FP_A message (>= 11)
770 *
771 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
772 * otherwise (fields are now invalid)
773 */
774 virtual bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) = 0;
775};
776
777/**
778 * @brief FP_A-ODOMETRY (version 2) messages payload (ECEF)
779 */
781{
782 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
783
784 static constexpr const char* MSG_NAME = "FP_A-ODOMETRY"; //!< Message name
785};
786
787/**
788 * @brief FP_A-ODOMENU (version 1) messages payload (ENU0)
789 */
791{
792 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
793
794 static constexpr const char* MSG_NAME = "FP_A-ODOMENU"; //!< Message name
795};
796
797/**
798 * @brief FP_A-ODOMSH (version 1) messages payload (ECEF)
799 */
801{
802 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
803
804 static constexpr const char* MSG_NAME = "FP_A-ODOMSH"; //!< Message name
805};
806
807/**
808 * @brief FP_A-ODOMSTATUS (version 1) messages payload
809 */
811{ // clang-format off
813 FpaInitStatus init_status; //!< Fusion init status
814 FpaMeasStatus fusion_imu; //!< Fusion measurement status: IMU
815 FpaMeasStatus fusion_gnss1; //!< Fusion measurement status: GNSS 1
816 FpaMeasStatus fusion_gnss2; //!< Fusion measurement status: GNSS 2
817 FpaMeasStatus fusion_corr; //!< Fusion measurement status: GNSS corrections
818 FpaMeasStatus fusion_cam1; //!< Fusion measurement status: camera
819 FpaMeasStatus fusion_ws; //!< Fusion measurement status: wheelspeed
820 FpaMeasStatus fusion_markers; //!< Fusion measurement status: markers
821 FpaImuStatus imu_status; //!< IMU bias status
822 FpaImuNoise imu_noise; //!< IMU variance status
823 FpaImuConv imu_conv; //!< IMU convergence status
824 FpaGnssStatus gnss1_status; //!< GNSS 1 status
825 FpaGnssStatus gnss2_status; //!< GNSS 2 status
826 FpaBaselineStatus baseline_status; //!< Baseline status
827 FpaCorrStatus corr_status; //!< GNSS correction status
828 FpaCamStatus cam1_status; //!< Camera 1 status
829 FpaWsStatus ws_status; //!< Wheelspeed status
830 FpaWsConv ws_conv; //!< Wheelspeed convergence status
832 FpaMarkersConv markers_conv; //!< Marker convergence status
833 // clang-format on
834
835 /**
836 * @brief Set data from message
837 *
838 * @param[in] msg Pointer to the FP_A message
839 * @param[in] msg_size Size of the FP_A message (>= 11)
840 *
841 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
842 * otherwise (fields are now invalid)
843 */
844 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
845
846 static constexpr const char* MSG_NAME = "FP_A-ODOMSTATUS"; //!< Message name
847};
848
849/**
850 * @brief FP_A-TEXT (version 1) message payload
851 */
853{ // clang-format off
854 FpaTextLevel level; //!< Level
855 char text[MAX_FP_A_SIZE] = { 0 }; //!< Text (nul-terminated string)
856 // clang-format on
857
858 /**
859 * @brief Set data from message
860 *
861 * @param[in] msg Pointer to the FP_A message
862 * @param[in] msg_size Size of the FP_A message (>= 11)
863 *
864 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
865 * otherwise (fields are now invalid)
866 */
867 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
868
869 static constexpr const char* MSG_NAME = "FP_A-TEXT"; //!< Message name
870};
871
872/**
873 * @brief FP_A-TF (version 2) message payload
874 */
876{ // clang-format off
878 char frame_a[10] = { 0 }; //!< Target frame (nul-terminated string)
879 char frame_b[10] = { 0 }; //!< Initial frame (nul-terminated string)
880 FpaFloat3 translation; //!< Translation, X/Y/Z components
881 FpaFloat4 orientation; //!< Rotation in quaternion, W/X/Y/Z components
882 // clang-format on
883
884 /**
885 * @brief Set data from message
886 *
887 * @param[in] msg Pointer to the FP_A message
888 * @param[in] msg_size Size of the FP_A message (>= 11)
889 *
890 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
891 * otherwise (fields are now invalid)
892 */
893 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
894
895 static constexpr const char* MSG_NAME = "FP_A-TF"; //!< Message name
896};
897
898/**
899 * @brief FP_A-TP (versions 1 and 2) message payload
900 */
902{ // clang-format off
903 char tp_name[10] = { 0 }; //!< Timepulse name (nul-terminated string)
906 FpaInt tp_week; //!< Timepulse week number (only since version 2 of the message)
907 FpaInt tp_tow_sec; //!< Timepulse time seconds of week, integer second part (0--604799)
908 FpaFloat tp_tow_psec; //!< Timepulse time seconds of week, sub-second part (0.000000000000--0.999999999999)
909 FpaInt gps_leaps; //!< GPS leapseconds
910 // clang-format on
911
912 /**
913 * @brief Set data from message
914 *
915 * @param[in] msg Pointer to the FP_A message
916 * @param[in] msg_size Size of the FP_A message (>= 11)
917 *
918 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
919 * otherwise (fields are now invalid)
920 */
921 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
922
923 static constexpr const char* MSG_NAME = "FP_A-TP"; //!< Message name
924};
925
926/* ****************************************************************************************************************** */
927} // namespace fpa
928} // namespace parser
929} // namespace common
930} // namespace fpsdk
931#endif // __FPSDK_COMMON_PARSER_FPA_HPP__
Fixposition SDK: Logging.
@ WARNING
[4/warning] Warnings (for libs and apps)
@ INFO
[6/info] Interesting stuff, the default level (for apps)
@ ERROR
[3/err] Errors (for apps)
@ DEBUG
[7/debug] Debugging (for libs and apps)
FpaEpoch
FP_A epoch type.
Definition fpa.hpp:391
FpaGnssStatus
FP_A GNSS fix status.
Definition fpa.hpp:248
@ SPP
Single-point positioning (SPP)
FpaCorrStatus
FP_A GNSS correction status.
Definition fpa.hpp:266
@ OLD_CORR
Corrections are too old (TBD)
@ GOOD_CORR
Sufficient corrections used: station data and corrections for ALL bands among the valid rover measure...
@ LIMITED_CORR
Limited corrections used: station data & at least one of the constellations (both bands) among the va...
FpaTimeref
FP_A time reference.
Definition fpa.hpp:455
@ UTC_NTSC
UTC: National Time Service Center (NTSC), China.
@ UTC_EU
UTC: European laboratories.
@ UTC_NONE
UTC: None (UTC params not yet known)
@ UTC_USNO
UTC: U.S. Naval Observatory (USNO)
@ UTC_CRL
UTC: Communications Research Laboratory (CRL), Japan.
@ UTC_BIPM
UTC: International Bureau of Weights and Measures (BIPM)
@ UTC_SU
UTC: Former Soviet Union (SU)
@ UTC_NIST
UTC: National Institute of Standards and Technology (NIST)
const char * FpaEpochStr(const FpaEpoch epoch)
Stringify epoch type.
FpaTextLevel
FP_A text levels.
Definition fpa.hpp:433
FpaAntPower
FP_A GNSS antenna power.
Definition fpa.hpp:423
@ OFF
Antenna power supply is off.
@ ON
Antenna power supply is on.
static constexpr int FP_A_FRAME_SIZE
FP_A frame size ("$*cc\r\n")
Definition fpa.hpp:100
FpaMeasStatus
FP_A fusion measurement status.
Definition fpa.hpp:184
FpaBaselineStatus
FP_A baseline status.
Definition fpa.hpp:284
bool FpaGetMessageMeta(FpaMessageMeta &meta, const uint8_t *msg, const std::size_t msg_size)
Get FP_A message meta data.
FpaWsStatus
FP_A wheelspeed status.
Definition fpa.hpp:310
@ MISS_MEAS
Missing wheelspeed measurements.
@ ALL_CONVERGED
At least one wheelspeed enabled and all converged.
@ NONE_CONVERGED
At least one wheelspeed enabled, no wheelspeed converged.
@ ONE_CONVERGED
At least one wheelspeed enabled and at least one converged.
@ NOT_ENABLED
No wheelspeed enabled.
FpaGnssFix
FP_A GNSS fix type.
Definition fpa.hpp:374
@ S3D_DR
Single 3D fix with dead-reckoning.
static constexpr uint8_t FP_A_PREAMBLE
FP_A framing preamble.
Definition fpa.hpp:99
FpaFusionStatusLegacy
FP_A legacy fusion status.
Definition fpa.hpp:171
FpaMarkersConv
FP_A markers convergence status.
Definition fpa.hpp:361
@ WAIT_MARKER_MEAS
Waiting marker measurements.
FpaImuNoise
FP_A IMU variance.
Definition fpa.hpp:217
FpaCamStatus
FP_A camera status.
Definition fpa.hpp:296
@ GOOD
Camera working and available.
@ BAD_FEAT
Camera available, but not usable (e.g. too dark)
FpaWsConv
FP_A wheelspeed convergence status.
Definition fpa.hpp:334
@ WAIT_IMU_BIAS
Insufficient imu bias convergence.
@ WAIT_WS_MEAS
Missing wheelspeed measurements.
FpaMarkersStatus
FP_A markers status.
Definition fpa.hpp:349
FpaImuStatus
FP_A IMU bias status.
Definition fpa.hpp:195
FpaInitStatus
FP_A fusion initialisation status.
Definition fpa.hpp:160
FpaImuStatusLegacy
FP_A Legacy IMU bias status.
Definition fpa.hpp:207
bool FpaGetMessageInfo(char *info, const std::size_t size, const uint8_t *msg, const std::size_t msg_size)
Get FP_A message info.
FpaAntState
FP_A GNSS antenna state.
Definition fpa.hpp:412
@ SHORT
Antenna short circuit detected.
@ OPEN
No antenna detected (or connected via DC block)
@ OK
Antenna detected and good.
FpaTimebase
FP_A time base.
Definition fpa.hpp:444
bool FpaGetMessageName(char *name, const std::size_t size, const uint8_t *msg, const std::size_t msg_size)
Get FP_A message name.
FpaImuConv
FP_A IMU accelerometer and gyroscope convergence.
Definition fpa.hpp:232
@ WAIT_IMU_MEAS
Awaiting IMU measurements.
@ WAIT_GLOBAL_MEAS
Insufficient global measurements.
FpaWsStatusLegacy
FP_A Legacy wheelspeed status.
Definition fpa.hpp:323
@ ONE_OR_MORE_CONVERGED
At least one converged.
static constexpr std::size_t MAX_FP_A_SIZE
Maximum FP_A message size (must be the same as MAX_NMEA_SIZE)
Definition types.hpp:148
constexpr std::underlying_type< T >::type EnumToVal(T enum_val)
Convert enum class constant to the underlying integral type value.
Definition types.hpp:46
Fixposition SDK.
Fixposition SDK: Parser.
FP_A-CORRIMU (version 1) message payload.
Definition fpa.hpp:673
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size) final
Set data from message.
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:676
FP_A-EOE (version 1) message payload.
Definition fpa.hpp:547
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:562
FpaEpoch epoch
Indicates which epoch ended ("FUSION", "GNSS", "GNSS1", "GNSS2")
Definition fpa.hpp:549
FP_A three float values.
Definition fpa.hpp:495
std::array< double, 3 > values
Values.
Definition fpa.hpp:497
FP_A four float values.
Definition fpa.hpp:504
std::array< double, 4 > values
Values.
Definition fpa.hpp:506
FP_A six float values.
Definition fpa.hpp:513
std::array< double, 6 > values
Values.
Definition fpa.hpp:515
FP_A-GNSSANT (version 1) message payload.
Definition fpa.hpp:569
FpaAntPower gnss1_power
GNSS1 antenna power.
Definition fpa.hpp:572
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:590
FpaAntPower gnss2_power
GNSS2 antenna power.
Definition fpa.hpp:575
FpaAntState gnss2_state
GNSS2 antenna state.
Definition fpa.hpp:574
FpaInt gnss1_age
Time since gnss1_state or gnss1_power information last changed, 0-604800.
Definition fpa.hpp:573
FpaAntState gnss1_state
GNSS1 antenna state.
Definition fpa.hpp:571
FpaInt gnss2_age
Time since gnss2_state or gnss2_power information last changed, 0-604800.
Definition fpa.hpp:576
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
FP_A-GNSSCORR (version 1) message payload.
Definition fpa.hpp:597
FpaGnssFix gnss1_fix
Fix status of GNSS1.
Definition fpa.hpp:599
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:625
FpaInt gnss2_nsig_l1
Number of L1 signals with correction data tracked by GNSS2 receiver, range 0-100.
Definition fpa.hpp:603
FpaFloat corr_latency
Average correction data latency (10s window), range 0.0-99.9.
Definition fpa.hpp:605
FpaInt gnss1_nsig_l1
Number of L1 signals with correction data tracked by GNSS1 receiver, range 0-100.
Definition fpa.hpp:600
FpaInt sta_dist
Correction station baseline length (approximate 3d distance), range 0-100000.
Definition fpa.hpp:611
FpaInt gnss2_nsig_l2
Number of L2 signals with correction data tracked by GNSS2 receiver, range 0-100.
Definition fpa.hpp:604
FpaInt gnss1_nsig_l2
Number of L2 signals with correction data tracked by GNSS1 receiver, range 0-100.
Definition fpa.hpp:601
FpaInt sta_id
Correction station ID, range 0–4095.
Definition fpa.hpp:609
FpaFloat corr_msg_rate
Average correction message rate (10s window), range 0-50.
Definition fpa.hpp:608
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
FpaFloat3 sta_llh
Correction station latitude/longitude/height [deg, deg, m].
Definition fpa.hpp:610
FpaFloat corr_update_rate
Average correction update rate (10s window), range 0.0-0.0.
Definition fpa.hpp:606
FpaGnssFix gnss2_fix
Fix status of GNSS2 receiver.
Definition fpa.hpp:602
FpaFloat corr_data_rate
Average correction data rate (10s window), range 0.0-50.0.
Definition fpa.hpp:607
FpaInt week
GPS week number, range 0-9999, or null if time not (yet) available.
Definition fpa.hpp:523
bool operator!=(const FpaGpsTime &rhs) const
Not equal (epsilon = 1e-6)
bool operator>=(const FpaGpsTime &rhs) const
Greater or equal than.
bool operator==(const FpaGpsTime &rhs) const
Equal (epsilon = 1e-6)
bool operator<=(const FpaGpsTime &rhs) const
Less or equal than.
bool operator<(const FpaGpsTime &rhs) const
Less than.
bool operator>(const FpaGpsTime &rhs) const
Greater than.
FpaFloat tow
GPS time of week, range 0.000-604799.999999, or null if time not (yet) available.
Definition fpa.hpp:524
FP_A-...IMU (version 1) messages payload.
Definition fpa.hpp:632
Which which
Indicates from which message the data is.
Definition fpa.hpp:640
FpaFloat3 acc
Raw acceleration in output frame, X/Y/Z components.
Definition fpa.hpp:643
FpaFloat3 rot
Raw angular velocity in output frame, X/Y/Z components.
Definition fpa.hpp:644
virtual bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)=0
Set data from message.
Which
Data from which FP_A-...IMU is stored.
Definition fpa.hpp:635
FP_A-IMUBIAS (version 1) message payload.
Definition fpa.hpp:683
FpaImuStatus imu_status
IMU bias status.
Definition fpa.hpp:686
FpaMeasStatus fusion_imu
Fusion measurement status: IMU.
Definition fpa.hpp:685
FpaFloat3 bias_cov_acc
Accelerometer bias covariance, X/Y/Z components.
Definition fpa.hpp:691
FpaFloat3 bias_cov_gyr
Gyroscope bias covariance, X/Y/Z components.
Definition fpa.hpp:692
FpaFloat3 bias_gyr
Gyroscope bias, X/Y/Z components.
Definition fpa.hpp:690
FpaImuConv imu_conv
IMU convergence status.
Definition fpa.hpp:688
FpaImuNoise imu_noise
IMU variance status.
Definition fpa.hpp:687
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
FpaFloat3 bias_acc
Accelerometer bias, X/Y/Z components.
Definition fpa.hpp:689
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:706
FP_A integer value.
Definition fpa.hpp:477
bool valid
Data is valid.
Definition fpa.hpp:478
FP_A-LLH (version 1) message payload.
Definition fpa.hpp:713
FpaFloat3 llh
Latitude/longitude/height [deg, deg, m].
Definition fpa.hpp:715
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:730
FpaFloat6 cov_enu
Position covariance in ENU, EE/NN/UU/EN/NU/EU components [m^2].
Definition fpa.hpp:716
char msg_type_[40]
Message type (for example, "ODOMETRY"), nul-terminated string.
Definition fpa.hpp:105
int msg_version_
Message version (for example, 1), < 0 if unknown.
Definition fpa.hpp:106
int payload_ix1_
Index (offset) for end of payload, 0 if no payload available.
Definition fpa.hpp:108
int payload_ix0_
Index (offset) for start of payload, 0 if no payload available.
Definition fpa.hpp:107
FP_A-ODOM... (version 1) messages payload.
Definition fpa.hpp:737
Which
Data from which FP_A-...IMU is stored.
Definition fpa.hpp:740
FpaFusionStatusLegacy fusion_status
Fustion status.
Definition fpa.hpp:754
FpaWsStatusLegacy wheelspeed_status
Wheelspeed status.
Definition fpa.hpp:758
Which which
Indicates from which message the data is.
Definition fpa.hpp:747
virtual bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)=0
Set data from message.
FpaGnssFix gnss2_fix
Fix status of GNSS2 receiver.
Definition fpa.hpp:757
FpaFloat6 vel_cov
Velocity covariance, XX/YY/ZZ/XY/YZ/XZ components.
Definition fpa.hpp:761
FpaGnssFix gnss1_fix
Fix status of GNSS1 receiver.
Definition fpa.hpp:756
FpaFloat3 vel
Velocity, X/Y/Z components.
Definition fpa.hpp:751
FpaImuStatusLegacy imu_bias_status
IMU bias status.
Definition fpa.hpp:755
FpaFloat6 orientation_cov
Orientation covariance, XX/YY/ZZ/XY/YZ/XZ components.
Definition fpa.hpp:760
FpaFloat3 acc
Bias corrected acceleration, X/Y/Z components.
Definition fpa.hpp:753
FpaFloat3 pos
Position, X/Y/Z components.
Definition fpa.hpp:749
FpaFloat6 pos_cov
Position covariance, XX/YY/ZZ/XY/YZ/XZ components.
Definition fpa.hpp:759
FpaFloat3 rot
Bias corrected angular velocity, X/Y/Z components.
Definition fpa.hpp:752
FpaFloat4 orientation
Quaternion, W/X/Y/Z components.
Definition fpa.hpp:750
FP_A-ODOMENU (version 1) messages payload (ENU0)
Definition fpa.hpp:791
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size) final
Set data from message.
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:794
FP_A-ODOMETRY (version 2) messages payload (ECEF)
Definition fpa.hpp:781
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size) final
Set data from message.
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:784
FP_A-ODOMSH (version 1) messages payload (ECEF)
Definition fpa.hpp:801
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:804
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size) final
Set data from message.
FP_A-ODOMSTATUS (version 1) messages payload.
Definition fpa.hpp:811
FpaWsStatus ws_status
Wheelspeed status.
Definition fpa.hpp:829
FpaMarkersConv markers_conv
Marker convergence status.
Definition fpa.hpp:832
FpaImuConv imu_conv
IMU convergence status.
Definition fpa.hpp:823
FpaMarkersStatus markers_status
Marker status.
Definition fpa.hpp:831
FpaGnssStatus gnss1_status
GNSS 1 status.
Definition fpa.hpp:824
FpaMeasStatus fusion_gnss1
Fusion measurement status: GNSS 1.
Definition fpa.hpp:815
FpaMeasStatus fusion_gnss2
Fusion measurement status: GNSS 2.
Definition fpa.hpp:816
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:846
FpaImuNoise imu_noise
IMU variance status.
Definition fpa.hpp:822
FpaBaselineStatus baseline_status
Baseline status.
Definition fpa.hpp:826
FpaInitStatus init_status
Fusion init status.
Definition fpa.hpp:813
FpaMeasStatus fusion_imu
Fusion measurement status: IMU.
Definition fpa.hpp:814
FpaWsConv ws_conv
Wheelspeed convergence status.
Definition fpa.hpp:830
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
FpaMeasStatus fusion_cam1
Fusion measurement status: camera.
Definition fpa.hpp:818
FpaCamStatus cam1_status
Camera 1 status.
Definition fpa.hpp:828
FpaMeasStatus fusion_ws
Fusion measurement status: wheelspeed.
Definition fpa.hpp:819
FpaCorrStatus corr_status
GNSS correction status.
Definition fpa.hpp:827
FpaMeasStatus fusion_markers
Fusion measurement status: markers.
Definition fpa.hpp:820
FpaImuStatus imu_status
IMU bias status.
Definition fpa.hpp:821
FpaGnssStatus gnss2_status
GNSS 2 status.
Definition fpa.hpp:825
FpaMeasStatus fusion_corr
Fusion measurement status: GNSS corrections.
Definition fpa.hpp:817
FP_A payload base class.
Definition fpa.hpp:538
bool valid_
Payload successfully decoded (true), or not (yet) decoded (false)
Definition fpa.hpp:539
virtual ~FpaPayload()=default
Virtual dtor for polymorphism.
FP_A-RAWIMU (version 1) message payload.
Definition fpa.hpp:663
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:666
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size) final
Set data from message.
FP_A-TEXT (version 1) message payload.
Definition fpa.hpp:853
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
char text[MAX_FP_A_SIZE]
Text (nul-terminated string)
Definition fpa.hpp:855
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:869
FP_A-TF (version 2) message payload.
Definition fpa.hpp:876
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:895
char frame_b[10]
Initial frame (nul-terminated string)
Definition fpa.hpp:879
FpaFloat4 orientation
Rotation in quaternion, W/X/Y/Z components.
Definition fpa.hpp:881
char frame_a[10]
Target frame (nul-terminated string)
Definition fpa.hpp:878
FpaFloat3 translation
Translation, X/Y/Z components.
Definition fpa.hpp:880
FP_A-TP (versions 1 and 2) message payload.
Definition fpa.hpp:902
FpaInt tp_tow_sec
Timepulse time seconds of week, integer second part (0–604799)
Definition fpa.hpp:907
FpaTimebase timebase
Time base.
Definition fpa.hpp:904
FpaInt tp_week
Timepulse week number (only since version 2 of the message)
Definition fpa.hpp:906
bool SetFromMsg(const uint8_t *msg, const std::size_t msg_size)
Set data from message.
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:923
FpaTimeref timeref
Time reference.
Definition fpa.hpp:905
FpaFloat tp_tow_psec
Timepulse time seconds of week, sub-second part (0.000000000000–0.999999999999)
Definition fpa.hpp:908
FpaInt gps_leaps
GPS leapseconds.
Definition fpa.hpp:909
char tp_name[10]
Timepulse name (nul-terminated string)
Definition fpa.hpp:903
Fixposition SDK: Common types.