Fixposition SDK 0.0.0-heads/main-0-g90a51ff
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 FP_A GNSS antenna state
401 */
402enum class FpaAntState : int
403{
404 UNSPECIFIED = 0, //!< Unspecified
405 OPEN, //!< No antenna detected (or connected via DC block)
406 OK, //!< Antenna detected and good
407 SHORT, //!< Antenna short circuit detected
408};
409
410/**
411 * @brief FP_A GNSS antenna power
412 */
413enum class FpaAntPower : int
414{
415 UNSPECIFIED = 0, //!< Unspecified
416 ON, //!< Antenna power supply is on
417 OFF, //!< Antenna power supply is off
418};
419
420/**
421 * @brief FP_A text levels
422 */
423enum class FpaTextLevel : int
424{ // clang-format off
425 UNSPECIFIED = 0, //!< Unspecified
430}; // clang-format on
431/**
432 * @brief FP_A time base
433 */
434enum class FpaTimebase : int
435{ // clang-format off
436 UNSPECIFIED = 0, //!< Unspecified
437 NONE, //!< None
438 GNSS, //!< GNSS
439 UTC, //!< UTC
440}; // clang-format on
441
442/**
443 * @brief FP_A time reference
444 */
445enum class FpaTimeref : int
446{ // clang-format off
447 UNSPECIFIED = 0, //!< Unspecified
448 UTC_NONE, //!< UTC: None (UTC params not yet known)
449 UTC_CRL, //!< UTC: Communications Research Laboratory (CRL), Japan
450 UTC_NIST, //!< UTC: National Institute of Standards and Technology (NIST)
451 UTC_USNO, //!< UTC: U.S. Naval Observatory (USNO)
452 UTC_BIPM, //!< UTC: International Bureau of Weights and Measures (BIPM)
453 UTC_EU, //!< UTC: European laboratories
454 UTC_SU, //!< UTC: Former Soviet Union (SU)
455 UTC_NTSC, //!< UTC: National Time Service Center (NTSC), China
456 GNSS_GPS, //!< GNSS: GPS
457 GNSS_GAL, //!< GNSS: Galileo
458 GNSS_BDS, //!< GNSS: BeiDou
459 GNSS_GLO, //!< GNSS: GLONASS
460 GNSS_NVC, //!< GNSS: NavIC
461 OTHER, //!< other/unknown GNSS/UTC
462}; // clang-format on
463
464/**
465 * @brief FP_A integer value
466 */
467struct FpaInt
468{
469 bool valid = false; //!< Data is valid
470 int value = 0; //!< Value
471};
472
473/**
474 * @brief FP_A float value
475 */
477{
478 bool valid = false; //!< Data is valid
479 double value = 0.0; //!< Value
480};
481
482/**
483 * @brief FP_A three float values
484 */
486{
487 bool valid = false; //!< Data is valid
488 std::array<double, 3> values = { { 0.0, 0.0, 0.0 } }; //!< Values
489};
490
491/**
492 * @brief FP_A four float values
493 */
495{
496 bool valid = false; //!< Data is valid
497 std::array<double, 4> values = { { 0.0, 0.0, 0.0, 0.0 } }; //!< Values
498};
499
500/**
501 * @brief FP_A six float values
502 */
504{
505 bool valid = false; //!< Data is valid
506 std::array<double, 6> values = { { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }; //!< Values
507};
508
509/**
510 * @brief FP_A GPS time
511 */
513{
514 FpaInt week; //!< GPS week number, range 0-9999, or null if time not (yet) available
515 FpaFloat tow; //!< GPS time of week, range 0.000-604799.999999, or null if time not (yet) available
516
517 bool operator==(const FpaGpsTime& rhs) const; //!< Equal (epsilon = 1e-6)
518 bool operator!=(const FpaGpsTime& rhs) const; //!< Not equal (epsilon = 1e-6)
519 bool operator<(const FpaGpsTime& rhs) const; //!< Less than
520 bool operator>(const FpaGpsTime& rhs) const; //!< Greater than
521 bool operator<=(const FpaGpsTime& rhs) const; //!< Less or equal than
522 bool operator>=(const FpaGpsTime& rhs) const; //!< Greater or equal than
523};
524
525/**
526 * @brief FP_A payload base class
527 */
529{
530 bool valid_ = false; //!< Payload successfully decoded (true), or not (yet) decoded (false)
531 virtual ~FpaPayload() = default; //!< Virtual dtor for polymorphism
532};
533
534/**
535 * @brief FP_A-EOE (version 1) message payload
536 */
538{
540 FpaEpoch epoch = FpaEpoch::UNSPECIFIED; //!< Indicates which epoch ended ("FUSION", "GNSS", "GNSS1", "GNSS2")
541
542 /**
543 * @brief Set data from message
544 *
545 * @param[in] msg Pointer to the FP_A message
546 * @param[in] msg_size Size of the FP_A message (>= 11)
547 *
548 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
549 * otherwise (fields are now invalid)
550 */
551 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
552
553 static constexpr const char* MSG_NAME = "FP_A-EOE"; //!< Message name
554};
555
556/**
557 * @brief FP_A-GNSSANT (version 1) message payload
558 */
560{ // clang-format off
564 FpaInt gnss1_age; //!< Time since gnss1_state or gnss1_power information last changed, 0-604800
567 FpaInt gnss2_age; //!< Time since gnss2_state or gnss2_power information last changed, 0-604800
568 // clang-format on
569
570 /**
571 * @brief Set data from message
572 *
573 * @param[in] msg Pointer to the FP_A message
574 * @param[in] msg_size Size of the FP_A message (>= 11)
575 *
576 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
577 * otherwise (fields are now invalid)
578 */
579 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
580
581 static constexpr const char* MSG_NAME = "FP_A-GNSSANT"; //!< Message name
582};
583
584/**
585 * @brief FP_A-GNSSCORR (version 1) message payload
586 */
588{ // clang-format off
590 FpaGnssFix gnss1_fix = FpaGnssFix::UNSPECIFIED; //!< Fix status of GNSS1
591 FpaInt gnss1_nsig_l1; //!< Number of L1 signals with correction data tracked by GNSS1 receiver, range 0-100
592 FpaInt gnss1_nsig_l2; //!< Number of L2 signals with correction data tracked by GNSS1 receiver, range 0-100
593 FpaGnssFix gnss2_fix = FpaGnssFix::UNSPECIFIED; //!< Fix status of GNSS2 receiver
594 FpaInt gnss2_nsig_l1; //!< Number of L1 signals with correction data tracked by GNSS2 receiver, range 0-100
595 FpaInt gnss2_nsig_l2; //!< Number of L2 signals with correction data tracked by GNSS2 receiver, range 0-100
596 FpaFloat corr_latency; //!< Average correction data latency (10s window), range 0.0-99.9
597 FpaFloat corr_update_rate; //!< Average correction update rate (10s window), range 0.0-0.0
598 FpaFloat corr_data_rate; //!< Average correction data rate (10s window), range 0.0-50.0
599 FpaFloat corr_msg_rate; //!< Average correction message rate (10s window), range 0-50
600 FpaInt sta_id; //!< Correction station ID, range 0--4095
601 FpaFloat3 sta_llh; //!< Correction station latitude/longitude/height [deg, deg, m]
602 FpaInt sta_dist; //!< Correction station baseline length (approximate 3d distance), range 0-100000
603 // clang-format on
604
605 /**
606 * @brief Set data from message
607 *
608 * @param[in] msg Pointer to the FP_A message
609 * @param[in] msg_size Size of the FP_A message (>= 11)
610 *
611 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
612 * otherwise (fields are now invalid)
613 */
614 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
615
616 static constexpr const char* MSG_NAME = "FP_A-GNSSCORR"; //!< Message name
617};
618
619/**
620 * @brief FP_A-...IMU (version 1) messages payload
621 */
623{
624 //! Data from which FP_A-...IMU is stored
625 enum class Which
626 {
627 UNSPECIFIED, //!< Unspecified
628 RAWIMU, //!< Data is from FP_A-RAWIMU
629 CORRIMU, //!< Data is from FP_A-CORRIMU
630 };
631 Which which = Which::UNSPECIFIED; //!< Indicates from which message the data is
632 // clang-format off
634 FpaFloat3 acc; //!< Raw acceleration in output frame, X/Y/Z components
635 FpaFloat3 rot; //!< Raw angular velocity in output frame, X/Y/Z components
636 // clang-format on
637
638 /**
639 * @brief Set data from message
640 *
641 * @param[in] msg Pointer to the FP_A message
642 * @param[in] msg_size Size of the FP_A message (>= 11)
643 *
644 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
645 * otherwise (fields are now invalid)
646 */
647 virtual bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) = 0;
648};
649
650/**
651 * @brief FP_A-RAWIMU (version 1) message payload
652 */
654{
655 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
656
657 static constexpr const char* MSG_NAME = "FP_A-RAWIMU"; //!< Message name
658};
659
660/**
661 * @brief FP_A-CORRIMU (version 1) message payload
662 */
664{
665 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
666
667 static constexpr const char* MSG_NAME = "FP_A-CORRIMU"; //!< Message name
668};
669
670/**
671 * @brief FP_A-IMUBIAS (version 1) message payload
672 */
674{ // clang-format off
676 FpaMeasStatus fusion_imu; //!< Fusion measurement status: IMU
677 FpaImuStatus imu_status; //!< IMU bias status
678 FpaImuNoise imu_noise; //!< IMU variance status
679 FpaImuConv imu_conv; //!< IMU convergence status
680 FpaFloat3 bias_acc; //!< Accelerometer bias, X/Y/Z components
681 FpaFloat3 bias_gyr; //!< Gyroscope bias, X/Y/Z components
682 FpaFloat3 bias_cov_acc; //!< Accelerometer bias covariance, X/Y/Z components
683 FpaFloat3 bias_cov_gyr; //!< Gyroscope bias covariance, X/Y/Z components
684 // clang-format on
685
686 /**
687 * @brief Set data from message
688 *
689 * @param[in] msg Pointer to the FP_A message
690 * @param[in] msg_size Size of the FP_A message (>= 11)
691 *
692 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
693 * otherwise (fields are now invalid)
694 */
695 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
696
697 static constexpr const char* MSG_NAME = "FP_A-IMUBIAS"; //!< Message name
698};
699
700/**
701 * @brief FP_A-LLH (version 1) message payload
702 */
704{ // clang-format off
706 FpaFloat3 llh; //!< Latitude/longitude/height [deg, deg, m]
707 FpaFloat6 cov_enu; //!< Position covariance in ENU, EE/NN/UU/EN/NU/EU components [m^2]
708 // clang-format on
709
710 /**
711 * @brief Set data from message
712 *
713 * @param[in] msg Pointer to the FP_A message
714 * @param[in] msg_size Size of the FP_A message (>= 11)
715 *
716 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
717 * otherwise (fields are now invalid)
718 */
719 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
720
721 static constexpr const char* MSG_NAME = "FP_A-LLH"; //!< Message name
722};
723
724/**
725 * @brief FP_A-ODOM... (version 1) messages payload
726 */
728{
729 //! Data from which FP_A-...IMU is stored
730 enum class Which
731 {
732 UNSPECIFIED, //!< Unspecified
733 ODOMETRY, //!< Data is from FP_A-ODOMETRY
734 ODOMENU, //!< Data is from FP_A-ODOMENU
735 ODOMSH, //!< Data is from FP_A-ODOMSH
736 };
737 // clang-format off
738 Which which = Which::UNSPECIFIED; //!< Indicates from which message the data is
740 FpaFloat3 pos; //!< Position, X/Y/Z components
741 FpaFloat4 orientation; //!< Quaternion, W/X/Y/Z components
742 FpaFloat3 vel; //!< Velocity, X/Y/Z components
743 FpaFloat3 rot; //!< Bias corrected angular velocity, X/Y/Z components
744 FpaFloat3 acc; //!< Bias corrected acceleration, X/Y/Z components
747 FpaGnssFix gnss1_fix; //!< Fix status of GNSS1 receiver
748 FpaGnssFix gnss2_fix; //!< Fix status of GNSS2 receiver
749 FpaWsStatusLegacy wheelspeed_status; //!< Wheelspeed status
750 FpaFloat6 pos_cov; //!< Position covariance, XX/YY/ZZ/XY/YZ/XZ components
751 FpaFloat6 orientation_cov; //!< Orientation covariance, XX/YY/ZZ/XY/YZ/XZ components
752 FpaFloat6 vel_cov; //!< Velocity covariance, XX/YY/ZZ/XY/YZ/XZ components
753 char version[100] = { 0 }; //!< Version
754 // clang-format on
755
756 /**
757 * @brief Set data from message
758 *
759 * @param[in] msg Pointer to the FP_A message
760 * @param[in] msg_size Size of the FP_A message (>= 11)
761 *
762 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
763 * otherwise (fields are now invalid)
764 */
765 virtual bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) = 0;
766};
767
768/**
769 * @brief FP_A-ODOMETRY (version 2) messages payload (ECEF)
770 */
772{
773 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
774
775 static constexpr const char* MSG_NAME = "FP_A-ODOMETRY"; //!< Message name
776};
777
778/**
779 * @brief FP_A-ODOMENU (version 1) messages payload (ENU0)
780 */
782{
783 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
784
785 static constexpr const char* MSG_NAME = "FP_A-ODOMENU"; //!< Message name
786};
787
788/**
789 * @brief FP_A-ODOMSH (version 1) messages payload (ECEF)
790 */
792{
793 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size) final;
794
795 static constexpr const char* MSG_NAME = "FP_A-ODOMSH"; //!< Message name
796};
797
798/**
799 * @brief FP_A-ODOMSTATUS (version 1) messages payload
800 */
802{ // clang-format off
804 FpaInitStatus init_status; //!< Fusion init status
805 FpaMeasStatus fusion_imu; //!< Fusion measurement status: IMU
806 FpaMeasStatus fusion_gnss1; //!< Fusion measurement status: GNSS 1
807 FpaMeasStatus fusion_gnss2; //!< Fusion measurement status: GNSS 2
808 FpaMeasStatus fusion_corr; //!< Fusion measurement status: GNSS corrections
809 FpaMeasStatus fusion_cam1; //!< Fusion measurement status: camera
810 FpaMeasStatus fusion_ws; //!< Fusion measurement status: wheelspeed
811 FpaMeasStatus fusion_markers; //!< Fusion measurement status: markers
812 FpaImuStatus imu_status; //!< IMU bias status
813 FpaImuNoise imu_noise; //!< IMU variance status
814 FpaImuConv imu_conv; //!< IMU convergence status
815 FpaGnssStatus gnss1_status; //!< GNSS 1 status
816 FpaGnssStatus gnss2_status; //!< GNSS 2 status
817 FpaBaselineStatus baseline_status; //!< Baseline status
818 FpaCorrStatus corr_status; //!< GNSS correction status
819 FpaCamStatus cam1_status; //!< Camera 1 status
820 FpaWsStatus ws_status; //!< Wheelspeed status
821 FpaWsConv ws_conv; //!< Wheelspeed convergence status
823 FpaMarkersConv markers_conv; //!< Marker convergence status
824 // clang-format on
825
826 /**
827 * @brief Set data from message
828 *
829 * @param[in] msg Pointer to the FP_A message
830 * @param[in] msg_size Size of the FP_A message (>= 11)
831 *
832 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
833 * otherwise (fields are now invalid)
834 */
835 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
836
837 static constexpr const char* MSG_NAME = "FP_A-ODOMSTATUS"; //!< Message name
838};
839
840/**
841 * @brief FP_A-TEXT (version 1) message payload
842 */
844{ // clang-format off
845 FpaTextLevel level; //!< Level
846 char text[MAX_FP_A_SIZE] = { 0 }; //!< Text (nul-terminated string)
847 // clang-format on
848
849 /**
850 * @brief Set data from message
851 *
852 * @param[in] msg Pointer to the FP_A message
853 * @param[in] msg_size Size of the FP_A message (>= 11)
854 *
855 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
856 * otherwise (fields are now invalid)
857 */
858 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
859
860 static constexpr const char* MSG_NAME = "FP_A-TEXT"; //!< Message name
861};
862
863/**
864 * @brief FP_A-TF (version 2) message payload
865 */
867{ // clang-format off
869 char frame_a[10] = { 0 }; //!< Target frame (nul-terminated string)
870 char frame_b[10] = { 0 }; //!< Initial frame (nul-terminated string)
871 FpaFloat3 translation; //!< Translation, X/Y/Z components
872 FpaFloat4 orientation; //!< Rotation in quaternion, W/X/Y/Z components
873 // clang-format on
874
875 /**
876 * @brief Set data from message
877 *
878 * @param[in] msg Pointer to the FP_A message
879 * @param[in] msg_size Size of the FP_A message (>= 11)
880 *
881 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
882 * otherwise (fields are now invalid)
883 */
884 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
885
886 static constexpr const char* MSG_NAME = "FP_A-TF"; //!< Message name
887};
888
889/**
890 * @brief FP_A-TP (versions 1 and 2) message payload
891 */
893{ // clang-format off
894 char tp_name[10] = { 0 }; //!< Timepulse name (nul-terminated string)
897 FpaInt tp_week; //!< Timepulse week number (only since version 2 of the message)
898 FpaInt tp_tow_sec; //!< Timepulse time seconds of week, integer second part (0--604799)
899 FpaFloat tp_tow_psec; //!< Timepulse time seconds of week, sub-second part (0.000000000000--0.999999999999)
900 FpaInt gps_leaps; //!< GPS leapseconds
901 // clang-format on
902
903 /**
904 * @brief Set data from message
905 *
906 * @param[in] msg Pointer to the FP_A message
907 * @param[in] msg_size Size of the FP_A message (>= 11)
908 *
909 * @returns true if sentence payload was correct and all data could be extracted (fields are now valid), or false
910 * otherwise (fields are now invalid)
911 */
912 bool SetFromMsg(const uint8_t* msg, const std::size_t msg_size);
913
914 static constexpr const char* MSG_NAME = "FP_A-TP"; //!< Message name
915};
916
917/* ****************************************************************************************************************** */
918} // namespace fpa
919} // namespace parser
920} // namespace common
921} // namespace fpsdk
922#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:446
@ 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)
FpaTextLevel
FP_A text levels.
Definition fpa.hpp:424
FpaAntPower
FP_A GNSS antenna power.
Definition fpa.hpp:414
@ 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:403
@ 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:435
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:664
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:667
FP_A-EOE (version 1) message payload.
Definition fpa.hpp:538
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:553
FpaEpoch epoch
Indicates which epoch ended ("FUSION", "GNSS", "GNSS1", "GNSS2")
Definition fpa.hpp:540
FP_A three float values.
Definition fpa.hpp:486
std::array< double, 3 > values
Values.
Definition fpa.hpp:488
FP_A four float values.
Definition fpa.hpp:495
std::array< double, 4 > values
Values.
Definition fpa.hpp:497
FP_A six float values.
Definition fpa.hpp:504
std::array< double, 6 > values
Values.
Definition fpa.hpp:506
FP_A-GNSSANT (version 1) message payload.
Definition fpa.hpp:560
FpaAntPower gnss1_power
GNSS1 antenna power.
Definition fpa.hpp:563
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:581
FpaAntPower gnss2_power
GNSS2 antenna power.
Definition fpa.hpp:566
FpaAntState gnss2_state
GNSS2 antenna state.
Definition fpa.hpp:565
FpaInt gnss1_age
Time since gnss1_state or gnss1_power information last changed, 0-604800.
Definition fpa.hpp:564
FpaAntState gnss1_state
GNSS1 antenna state.
Definition fpa.hpp:562
FpaInt gnss2_age
Time since gnss2_state or gnss2_power information last changed, 0-604800.
Definition fpa.hpp:567
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:588
FpaGnssFix gnss1_fix
Fix status of GNSS1.
Definition fpa.hpp:590
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:616
FpaInt gnss2_nsig_l1
Number of L1 signals with correction data tracked by GNSS2 receiver, range 0-100.
Definition fpa.hpp:594
FpaFloat corr_latency
Average correction data latency (10s window), range 0.0-99.9.
Definition fpa.hpp:596
FpaInt gnss1_nsig_l1
Number of L1 signals with correction data tracked by GNSS1 receiver, range 0-100.
Definition fpa.hpp:591
FpaInt sta_dist
Correction station baseline length (approximate 3d distance), range 0-100000.
Definition fpa.hpp:602
FpaInt gnss2_nsig_l2
Number of L2 signals with correction data tracked by GNSS2 receiver, range 0-100.
Definition fpa.hpp:595
FpaInt gnss1_nsig_l2
Number of L2 signals with correction data tracked by GNSS1 receiver, range 0-100.
Definition fpa.hpp:592
FpaInt sta_id
Correction station ID, range 0–4095.
Definition fpa.hpp:600
FpaFloat corr_msg_rate
Average correction message rate (10s window), range 0-50.
Definition fpa.hpp:599
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:601
FpaFloat corr_update_rate
Average correction update rate (10s window), range 0.0-0.0.
Definition fpa.hpp:597
FpaGnssFix gnss2_fix
Fix status of GNSS2 receiver.
Definition fpa.hpp:593
FpaFloat corr_data_rate
Average correction data rate (10s window), range 0.0-50.0.
Definition fpa.hpp:598
FpaInt week
GPS week number, range 0-9999, or null if time not (yet) available.
Definition fpa.hpp:514
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:515
FP_A-...IMU (version 1) messages payload.
Definition fpa.hpp:623
Which which
Indicates from which message the data is.
Definition fpa.hpp:631
FpaFloat3 acc
Raw acceleration in output frame, X/Y/Z components.
Definition fpa.hpp:634
FpaFloat3 rot
Raw angular velocity in output frame, X/Y/Z components.
Definition fpa.hpp:635
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:626
FP_A-IMUBIAS (version 1) message payload.
Definition fpa.hpp:674
FpaImuStatus imu_status
IMU bias status.
Definition fpa.hpp:677
FpaMeasStatus fusion_imu
Fusion measurement status: IMU.
Definition fpa.hpp:676
FpaFloat3 bias_cov_acc
Accelerometer bias covariance, X/Y/Z components.
Definition fpa.hpp:682
FpaFloat3 bias_cov_gyr
Gyroscope bias covariance, X/Y/Z components.
Definition fpa.hpp:683
FpaFloat3 bias_gyr
Gyroscope bias, X/Y/Z components.
Definition fpa.hpp:681
FpaImuConv imu_conv
IMU convergence status.
Definition fpa.hpp:679
FpaImuNoise imu_noise
IMU variance status.
Definition fpa.hpp:678
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:680
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:697
FP_A integer value.
Definition fpa.hpp:468
bool valid
Data is valid.
Definition fpa.hpp:469
FP_A-LLH (version 1) message payload.
Definition fpa.hpp:704
FpaFloat3 llh
Latitude/longitude/height [deg, deg, m].
Definition fpa.hpp:706
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:721
FpaFloat6 cov_enu
Position covariance in ENU, EE/NN/UU/EN/NU/EU components [m^2].
Definition fpa.hpp:707
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:728
Which
Data from which FP_A-...IMU is stored.
Definition fpa.hpp:731
FpaFusionStatusLegacy fusion_status
Fustion status.
Definition fpa.hpp:745
FpaWsStatusLegacy wheelspeed_status
Wheelspeed status.
Definition fpa.hpp:749
Which which
Indicates from which message the data is.
Definition fpa.hpp:738
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:748
FpaFloat6 vel_cov
Velocity covariance, XX/YY/ZZ/XY/YZ/XZ components.
Definition fpa.hpp:752
FpaGnssFix gnss1_fix
Fix status of GNSS1 receiver.
Definition fpa.hpp:747
FpaFloat3 vel
Velocity, X/Y/Z components.
Definition fpa.hpp:742
FpaImuStatusLegacy imu_bias_status
IMU bias status.
Definition fpa.hpp:746
FpaFloat6 orientation_cov
Orientation covariance, XX/YY/ZZ/XY/YZ/XZ components.
Definition fpa.hpp:751
FpaFloat3 acc
Bias corrected acceleration, X/Y/Z components.
Definition fpa.hpp:744
FpaFloat3 pos
Position, X/Y/Z components.
Definition fpa.hpp:740
FpaFloat6 pos_cov
Position covariance, XX/YY/ZZ/XY/YZ/XZ components.
Definition fpa.hpp:750
FpaFloat3 rot
Bias corrected angular velocity, X/Y/Z components.
Definition fpa.hpp:743
FpaFloat4 orientation
Quaternion, W/X/Y/Z components.
Definition fpa.hpp:741
FP_A-ODOMENU (version 1) messages payload (ENU0)
Definition fpa.hpp:782
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:785
FP_A-ODOMETRY (version 2) messages payload (ECEF)
Definition fpa.hpp:772
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:775
FP_A-ODOMSH (version 1) messages payload (ECEF)
Definition fpa.hpp:792
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:795
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:802
FpaWsStatus ws_status
Wheelspeed status.
Definition fpa.hpp:820
FpaMarkersConv markers_conv
Marker convergence status.
Definition fpa.hpp:823
FpaImuConv imu_conv
IMU convergence status.
Definition fpa.hpp:814
FpaMarkersStatus markers_status
Marker status.
Definition fpa.hpp:822
FpaGnssStatus gnss1_status
GNSS 1 status.
Definition fpa.hpp:815
FpaMeasStatus fusion_gnss1
Fusion measurement status: GNSS 1.
Definition fpa.hpp:806
FpaMeasStatus fusion_gnss2
Fusion measurement status: GNSS 2.
Definition fpa.hpp:807
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:837
FpaImuNoise imu_noise
IMU variance status.
Definition fpa.hpp:813
FpaBaselineStatus baseline_status
Baseline status.
Definition fpa.hpp:817
FpaInitStatus init_status
Fusion init status.
Definition fpa.hpp:804
FpaMeasStatus fusion_imu
Fusion measurement status: IMU.
Definition fpa.hpp:805
FpaWsConv ws_conv
Wheelspeed convergence status.
Definition fpa.hpp:821
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:809
FpaCamStatus cam1_status
Camera 1 status.
Definition fpa.hpp:819
FpaMeasStatus fusion_ws
Fusion measurement status: wheelspeed.
Definition fpa.hpp:810
FpaCorrStatus corr_status
GNSS correction status.
Definition fpa.hpp:818
FpaMeasStatus fusion_markers
Fusion measurement status: markers.
Definition fpa.hpp:811
FpaImuStatus imu_status
IMU bias status.
Definition fpa.hpp:812
FpaGnssStatus gnss2_status
GNSS 2 status.
Definition fpa.hpp:816
FpaMeasStatus fusion_corr
Fusion measurement status: GNSS corrections.
Definition fpa.hpp:808
FP_A payload base class.
Definition fpa.hpp:529
bool valid_
Payload successfully decoded (true), or not (yet) decoded (false)
Definition fpa.hpp:530
virtual ~FpaPayload()=default
Virtual dtor for polymorphism.
FP_A-RAWIMU (version 1) message payload.
Definition fpa.hpp:654
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:657
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:844
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:846
static constexpr const char * MSG_NAME
Message name.
Definition fpa.hpp:860
FP_A-TF (version 2) message payload.
Definition fpa.hpp:867
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:886
char frame_b[10]
Initial frame (nul-terminated string)
Definition fpa.hpp:870
FpaFloat4 orientation
Rotation in quaternion, W/X/Y/Z components.
Definition fpa.hpp:872
char frame_a[10]
Target frame (nul-terminated string)
Definition fpa.hpp:869
FpaFloat3 translation
Translation, X/Y/Z components.
Definition fpa.hpp:871
FP_A-TP (versions 1 and 2) message payload.
Definition fpa.hpp:893
FpaInt tp_tow_sec
Timepulse time seconds of week, integer second part (0–604799)
Definition fpa.hpp:898
FpaTimebase timebase
Time base.
Definition fpa.hpp:895
FpaInt tp_week
Timepulse week number (only since version 2 of the message)
Definition fpa.hpp:897
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:914
FpaTimeref timeref
Time reference.
Definition fpa.hpp:896
FpaFloat tp_tow_psec
Timepulse time seconds of week, sub-second part (0.000000000000–0.999999999999)
Definition fpa.hpp:899
FpaInt gps_leaps
GPS leapseconds.
Definition fpa.hpp:900
char tp_name[10]
Timepulse name (nul-terminated string)
Definition fpa.hpp:894
Fixposition SDK: Common types.