measurements.h
Go to the documentation of this file.
1 /**************************************************************************/ /**
2  * @brief Sensor measurement messages.
3  * @file
4  ******************************************************************************/
5 
6 #pragma once
7 
10 
11 namespace point_one {
12 namespace fusion_engine {
13 namespace messages {
14 
15 // Enforce 4-byte alignment and packing of all data structures and values.
16 // Floating point values are aligned on platforms that require it. This is done
17 // with a combination of setting struct attributes, and manual alignment
18 // within the definitions. See the "Message Packing" section of the README.
19 #pragma pack(push, 1)
20 
21 /**
22  * @defgroup measurement_messages Sensor Measurement Message Definitions
23  * @brief Measurement data from available sensors.
24  * @ingroup messages
25  *
26  * See also @ref messages.
27  */
28 
29 /**
30  * @brief The source of received sensor measurements, if known.
31  * @ingroup measurement_messages
32  */
33 enum class SensorDataSource : uint8_t {
34  /** Data source not known. */
35  UNKNOWN = 0,
36  /**
37  * Sensor data captured internal to the device (embedded IMU, GNSS receiver,
38  * etc.).
39  */
40  INTERNAL = 1,
41  /**
42  * Sensor data generated via hardware voltage signal (wheel tick, external
43  * event, etc.).
44  */
45  HARDWARE_IO = 2,
46  /** Sensor data captured from a vehicle CAN bus. */
47  CAN = 3,
48  /** Sensor data provided over a serial connection. */
49  SERIAL = 4,
50  /** Sensor data provided over a network connection. */
51  NETWORK = 5,
52 };
53 
54 /**
55  * @brief Get a human-friendly string name for the specified @ref
56  * SensorDataSource.
57  * @ingroup measurement_messages
58  *
59  * @param val The enum to get the string name for.
60  *
61  * @return The corresponding string name.
62  */
64  switch (val) {
66  return "Unknown";
68  return "Internal";
70  return "Hardware I/O";
72  return "CAN";
74  return "Serial";
76  return "Network";
77  default:
78  return "Unrecognized";
79  }
80 }
81 
82 /**
83  * @brief @ref SensorDataSource stream operator.
84  * @ingroup measurement_messages
85  */
87  stream << to_string(val) << " (" << (int)val << ")";
88  return stream;
89 }
90 
91 /**
92  * @brief The source of a @ref point_one::fusion_engine::messages::Timestamp
93  * used to represent the time of applicability of an incoming sensor
94  * measurement.
95  * @ingroup measurement_messages
96  */
97 enum class SystemTimeSource : uint8_t {
98  /** Timestamp not valid. */
99  INVALID = 0,
100  /** Message timestamped in P1 time. */
101  P1_TIME = 1,
102  /**
103  * Message timestamped in system time, generated when received by the device.
104  */
106  /**
107  * Message timestamp was generated from a monotonic clock of an external
108  * system.
109  */
110  SENDER_SYSTEM_TIME = 3,
111  /**
112  * Message timestamped in GPS time, referenced to 1980/1/6.
113  */
114  GPS_TIME = 4,
115 };
116 
117 /**
118  * @brief Get a human-friendly string name for the specified @ref
119  * SystemTimeSource.
120  * @ingroup measurement_messages
121  *
122  * @param val The enum to get the string name for.
123  *
124  * @return The corresponding string name.
125  */
127  switch (val) {
129  return "Invalid";
131  return "P1 Time";
133  return "Timestamped on Reception";
135  return "Sender System Time";
137  return "GPS Time";
138  default:
139  return "Unrecognized";
140  }
141 }
142 
143 /**
144  * @brief @ref SystemTimeSource stream operator.
145  * @ingroup measurement_messages
146  */
148  stream << to_string(val) << " (" << (int)val << ")";
149  return stream;
150 }
151 
152 /**
153  * @brief The time of applicability and additional information for an incoming
154  * sensor measurement.
155  * @ingroup measurement_messages
156  *
157  * By convention this will be the first member of any message containing
158  * input measurements by the host to the device, as well as raw measurement
159  * outputs from the device.
160  *
161  * The @ref measurement_time field stores time of applicability/reception for
162  * the measurement data, expressed in one of the available source time bases
163  * (see @ref SystemTimeSource). The timestamp will be converted to P1 time
164  * automatically by FusionEngine using an internal model of P1 vs. the specified
165  * source time.
166  *
167  * @section meas_details_on_arrival Timestamp On Arrival
168  *
169  * On most platforms, incoming sensor measurements are timestamped automatically
170  * by FusionEngine when they arrive. To request timestamp on arrival, set @ref
171  * measurement_time_source to either @ref
172  * SystemTimeSource::TIMESTAMPED_ON_RECEPTION or @ref SystemTimeSource::INVALID.
173  *
174  * @section meas_details_external_time Timestamp Externally
175  *
176  * On some platforms, incoming sensor measurements may be timestamped
177  * externally by the host prior to arrival, either in GPS time (@ref
178  * SystemTimeSource::GPS_TIME), or using a monotonic clock controlled by the
179  * host system (@ref SystemTimeSource::SENDER_SYSTEM_TIME). For those platforms,
180  * the @ref measurement_time field should be specified in the incoming message.
181  *
182  * @note
183  * Use of an external monotonic clock requires additional coordination with the
184  * target FusionEngine device.
185  *
186  * @section meas_details_p1_time Timestamp With External P1 Time
187  *
188  * Measurements may only be timestamped externally using P1 time (@ref
189  * SystemTimeSource::P1_TIME) if the external system supports remote
190  * synchronization of the P1 time clock model. This is intended for internal
191  * use only.
192  */
194  /**
195  * The measurement time of applicability, if available, in a user-specified
196  * time base. The source of this value is specified in @ref
197  * measurement_time_source. The timestamp will be converted to P1 time
198  * internally by the device before use.
199  */
201 
202  /**
203  * The source for @ref measurement_time.
204  */
205  SystemTimeSource measurement_time_source = SystemTimeSource::INVALID;
206 
207  /**
208  * The source of the incoming data, if known.
209  */
211 
212  uint8_t reserved[2] = {0};
213 
214  /**
215  * The P1 time corresponding with the measurement time of applicability, if
216  * available.
217  *
218  * For inputs to the device, this field will be populated automatically by the
219  * device on arrival based on @ref measurement_time. Any existing value will
220  * be overwritten. To specify a known P1 time, specify the value in @ref
221  * measurement_time and set @ref measurement_time_source to @ref
222  * SystemTimeSource::P1_TIME.
223  *
224  * For outputs from the device, this field will always be populated with the
225  * P1 time corresponding with the measurement.
226  */
228 };
229 
230 ////////////////////////////////////////////////////////////////////////////////
231 // IMU Measurements
232 ////////////////////////////////////////////////////////////////////////////////
233 
234 /**
235  * @brief IMU sensor measurement input (@ref MessageType::IMU_INPUT,
236  * version 1.0).
237  * @ingroup measurement_messages
238  *
239  * This message is an input to the device containing raw IMU acceleration and
240  * rotation rate measurements.
241  *
242  * See also @ref IMUOutput.
243  */
244 struct P1_ALIGNAS(4) IMUInput : public MessagePayload {
245  static constexpr MessageType MESSAGE_TYPE = MessageType::IMU_INPUT;
246  static constexpr uint8_t MESSAGE_VERSION = 0;
247 
248  /**
249  * Measurement timestamp and additional information, if available. See @ref
250  * MeasurementDetails for details.
251  */
253 
254  uint8_t reserved[6] = {0};
255 
256  /**
257  * The IMU temperature (in deg Celcius * 2^-7). Set to 0x7FFF if invalid.
258  */
259  int16_t temperature = INT16_MAX;
260 
261  /**
262  * Measured x/y/z acceleration (in meters/second^2 * 2^-16), resolved in the
263  * sensor measurement frame. Set to 0x7FFFFFFF if invalid.
264  */
265  int32_t accel[3] = {INT32_MAX, INT32_MAX, INT32_MAX};
266 
267  /**
268  * Measured x/y/z rate of rotation (in radians/second * 2^-20), resolved in
269  * the sensor measurement frame. Set to 0x7FFFFFFF if invalid.
270  */
271  int32_t gyro[3] = {INT32_MAX, INT32_MAX, INT32_MAX};
272 };
273 
274 /**
275  * @brief IMU sensor measurement output with calibration and corrections applied
276  * (@ref MessageType::IMU_OUTPUT, version 1.0).
277  * @ingroup measurement_messages
278  *
279  * This message is an output from the device containing IMU acceleration and
280  * rotation rate measurements. The measurements been corrected for biases and
281  * scale factors, and have been rotated into the vehicle body frame from the
282  * original IMU orientation, including calibrated mounting error estimates.
283  *
284  * See also @ref RawIMUOutput.
285  */
286 struct P1_ALIGNAS(4) IMUOutput : public MessagePayload {
287  static constexpr MessageType MESSAGE_TYPE = MessageType::IMU_OUTPUT;
288  static constexpr uint8_t MESSAGE_VERSION = 0;
289 
290  /** The time of the measurement, in P1 time (beginning at power-on). */
292 
293  /**
294  * Corrected vehicle x/y/z acceleration (in meters/second^2), resolved in the
295  * body frame.
296  */
297  double accel_mps2[3] = {NAN, NAN, NAN};
298 
299  /**
300  * Corrected vehicle x/y/z acceleration standard deviation (in
301  * meters/second^2), resolved in the body frame.
302  */
303  double accel_std_mps2[3] = {NAN, NAN, NAN};
304 
305  /**
306  * Corrected vehicle x/y/z rate of rotation (in radians/second), resolved in
307  * the body frame.
308  */
309  double gyro_rps[3] = {NAN, NAN, NAN};
310 
311  /**
312  * Corrected vehicle x/y/z rate of rotation standard deviation (in
313  * radians/second), resolved in the body frame.
314  */
315  double gyro_std_rps[3] = {NAN, NAN, NAN};
316 };
317 
318 /**
319  * @brief Raw (uncorrected) IMU sensor measurement output (@ref
320  MessageType::RAW_IMU_OUTPUT, version 1.0).
321  * @ingroup measurement_messages
322  *
323  * This message is an output from the device containing raw IMU acceleration and
324  * rotation rate measurements. These measurements come directly from the sensor,
325  * and do not have any corrections or calibration applied.
326  *
327  * See also @ref IMUOutput.
328  */
330  static constexpr MessageType MESSAGE_TYPE = MessageType::RAW_IMU_OUTPUT;
331  static constexpr uint8_t MESSAGE_VERSION = 0;
332 
333  /**
334  * Measurement timestamp and additional information, if available. See @ref
335  * MeasurementDetails for details.
336  */
338 
339  uint8_t reserved[6] = {0};
340 
341  /**
342  * The IMU temperature (in deg Celcius * 2^-7). Set to 0x7FFF if invalid.
343  */
344  int16_t temperature = INT16_MAX;
345 
346  /**
347  * Measured x/y/z acceleration (in meters/second^2 * 2^-16), resolved in the
348  * sensor measurement frame. Set to 0x7FFFFFFF if invalid.
349  */
350  int32_t accel[3] = {INT32_MAX, INT32_MAX, INT32_MAX};
351 
352  /**
353  * Measured x/y/z rate of rotation (in radians/second * 2^-20), resolved in
354  * the sensor measurement frame. Set to 0x7FFFFFFF if invalid.
355  */
356  int32_t gyro[3] = {INT32_MAX, INT32_MAX, INT32_MAX};
357 };
358 
359 ////////////////////////////////////////////////////////////////////////////////
360 // Different Wheel Speed Measurements
361 ////////////////////////////////////////////////////////////////////////////////
362 
363 /**
364  * @brief The current transmission gear used by the vehicle.
365  * @ingroup measurement_messages
366  */
367 enum class GearType : uint8_t {
368  /**
369  * The transmission gear is not known, or does not map to a supported
370  * GearType.
371  */
372  UNKNOWN = 0,
373  FORWARD = 1, ///< The vehicle is in a forward gear.
374  REVERSE = 2, ///< The vehicle is in reverse.
375  PARK = 3, ///< The vehicle is parked.
376  NEUTRAL = 4, ///< The vehicle is in neutral.
377 };
378 
379 /**
380  * @brief Get a human-friendly string name for the specified @ref GearType.
381  * @ingroup measurement_messages
382  *
383  * @param val The enum to get the string name for.
384  *
385  * @return The corresponding string name.
386  */
388  switch (val) {
389  case GearType::UNKNOWN:
390  return "Unknown";
391  case GearType::FORWARD:
392  return "Forward";
393  case GearType::REVERSE:
394  return "Reverse";
395  case GearType::PARK:
396  return "Park";
397  case GearType::NEUTRAL:
398  return "Neutral";
399  default:
400  return "Unrecognized";
401  }
402 }
403 
404 /**
405  * @brief @ref GearType stream operator.
406  * @ingroup measurement_messages
407  */
408 inline p1_ostream& operator<<(p1_ostream& stream, GearType val) {
409  stream << to_string(val) << " (" << (int)val << ")";
410  return stream;
411 }
412 
413 /**
414  * @brief Differential wheel speed measurement input (@ref
415  * MessageType::WHEEL_SPEED_INPUT, version 1.0).
416  * @ingroup measurement_messages
417  *
418  * This message is an input to the device, used to convey the speed of each
419  * individual wheel on the vehicle. The number and type of wheels expected
420  * varies by vehicle. For single along-track speed measurements, see @ref
421  * VehicleSpeedInput.
422  *
423  * To use wheel speed data, you must first configure the device by issuing a
424  * @ref SetConfigMessage message containing a @ref WheelConfig payload
425  * describing the vehicle sensor configuration (speed data signed/unsigned,
426  * etc.).
427  *
428  * Some platforms may have an additional signal used to indicate direction of
429  * motion, have direction or gear information available from a vehicle CAN bus,
430  * etc. If direction/gear information is available, it may be provided in the
431  * @ref gear field.
432  *
433  * To send wheel tick counts from software, use @ref WheelTickInput instead.
434  *
435  * See also @ref WheelSpeedOutput for measurement output.
436  */
438  static constexpr MessageType MESSAGE_TYPE = MessageType::WHEEL_SPEED_INPUT;
439  static constexpr uint8_t MESSAGE_VERSION = 0;
440 
441  /**
442  * Set this flag if the measured wheel speeds are signed (positive forward,
443  * negative reverse). Otherwise, if the values are assumed to be unsigned
444  * (positive in both directions).
445  */
446  static constexpr uint8_t FLAG_SIGNED = 0x1;
447 
448  /**
449  * Measurement timestamp and additional information, if available. See @ref
450  * MeasurementDetails for details.
451  */
453 
454  /**
455  * The front left wheel speed (in m/s * 2^-10). Set to 0x7FFFFFFF if not
456  * available.
457  */
458  int32_t front_left_speed = INT32_MAX;
459 
460  /**
461  * The front right wheel speed (in m/s * 2^-10). Set to 0x7FFFFFFF if not
462  * available.
463  */
464  int32_t front_right_speed = INT32_MAX;
465 
466  /**
467  * The rear left wheel speed (in m/s * 2^-10). Set to 0x7FFFFFFF if not
468  * available.
469  */
470  int32_t rear_left_speed = INT32_MAX;
471 
472  /**
473  * The rear right wheel speed (in m/s * 2^-10). Set to 0x7FFFFFFF if not
474  * available.
475  */
476  int32_t rear_right_speed = INT32_MAX;
477 
478  /**
479  * The transmission gear currently in use, or direction of motion, if
480  * available.
481  *
482  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
483  * direction information is available externally.
484  */
486 
487  /** A bitmask of flags associated with the measurement data. */
488  uint8_t flags = 0x0;
489 
490  uint8_t reserved[2] = {0};
491 };
492 
493 /**
494  * @brief Differential wheel speed measurement output with calibration and
495  * corrections applied (@ref MessageType::WHEEL_SPEED_OUTPUT, version
496  1.0).
497  * @ingroup measurement_messages
498  *
499  * This message is an output from the device that contains the speed of each
500  * individual wheel on the vehicle, after applying any estimated corrections for
501  * wheel scale factor, sign, etc.
502  *
503  * Wheel odometry data may be received via a software input from a host machine,
504  * a vehicle CAN bus, or a hardware voltage signal (wheel ticks). The @ref
505  * data_source field will indicate which type of data source provided the
506  * measurements to the device.
507  *
508  * @note
509  * When odometry is provided using hardware wheel ticks, the output rate of this
510  * message may differ from the wheel tick input rate. For high accuracy
511  * applications, FusionEngine may integrate tick counts over longer intervals to
512  * improve performance.
513  *
514  * See also @ref WheelSpeedInput and @ref RawWheelSpeedOutput.
515  */
517  static constexpr MessageType MESSAGE_TYPE = MessageType::WHEEL_SPEED_OUTPUT;
518  static constexpr uint8_t MESSAGE_VERSION = 0;
519 
520  /**
521  * Set this flag if the measured wheel speeds are signed (positive forward,
522  * negative reverse). Otherwise, if the values are assumed to be unsigned
523  * (positive in both directions).
524  */
525  static constexpr uint8_t FLAG_SIGNED = 0x1;
526 
527  /** The time of the measurement, in P1 time (beginning at power-on). */
529 
530  /**
531  * The source of the incoming data, if known.
532  */
534 
535  /**
536  * The transmission gear currently in use, or direction of motion, if
537  * available.
538  */
540 
541  /** A bitmask of flags associated with the measurement data. */
542  uint8_t flags = 0x0;
543 
544  uint8_t reserved = 0;
545 
546  /** The front left wheel speed (in m/s). Set to NAN if not available. */
547  float front_left_speed_mps = NAN;
548 
549  /** The front right wheel speed (in m/s). Set to NAN if not available. */
550  float front_right_speed_mps = NAN;
551 
552  /** The rear left wheel speed (in m/s). Set to NAN if not available. */
553  float rear_left_speed_mps = NAN;
554 
555  /** The rear right wheel speed (in m/s). Set to NAN if not available. */
556  float rear_right_speed_mps = NAN;
557 };
558 
559 /**
560  * @brief Raw (uncorrected) dfferential wheel speed measurement output (@ref
561  * MessageType::RAW_WHEEL_SPEED_OUTPUT, version 1.0).
562  * @ingroup measurement_messages
563  *
564  * This message is an output from the device that contains the speed of each
565  * individual wheel on the vehicle. These measurements come directly from the
566  * sensor, and do not have any corrections or calibration applied.
567  *
568  * See @ref WheelSpeedOutput for more details. See also @ref WheelSpeedInput.
569  */
571  static constexpr MessageType MESSAGE_TYPE =
573  static constexpr uint8_t MESSAGE_VERSION = 0;
574 
575  /**
576  * Set this flag if the measured wheel speeds are signed (positive forward,
577  * negative reverse). Otherwise, if the values are assumed to be unsigned
578  * (positive in both directions).
579  */
580  static constexpr uint8_t FLAG_SIGNED = 0x1;
581 
582  /**
583  * Measurement timestamp and additional information, if available. See @ref
584  * MeasurementDetails for details.
585  */
587 
588  /**
589  * The front left wheel speed (in m/s * 2^-10). Set to 0x7FFFFFFF if not
590  * available.
591  */
592  int32_t front_left_speed = INT32_MAX;
593 
594  /**
595  * The front right wheel speed (in m/s * 2^-10). Set to 0x7FFFFFFF if not
596  * available.
597  */
598  int32_t front_right_speed = INT32_MAX;
599 
600  /**
601  * The rear left wheel speed (in m/s * 2^-10). Set to 0x7FFFFFFF if not
602  * available.
603  */
604  int32_t rear_left_speed = INT32_MAX;
605 
606  /**
607  * The rear right wheel speed (in m/s * 2^-10). Set to 0x7FFFFFFF if not
608  * available.
609  */
610  int32_t rear_right_speed = INT32_MAX;
611 
612  /**
613  * The transmission gear currently in use, or direction of motion, if
614  * available.
615  *
616  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
617  * direction information is available externally.
618  */
620 
621  /** A bitmask of flags associated with the measurement data. */
622  uint8_t flags = 0x0;
623 
624  uint8_t reserved[2] = {0};
625 };
626 
627 ////////////////////////////////////////////////////////////////////////////////
628 // Vehicle Speed Measurements
629 ////////////////////////////////////////////////////////////////////////////////
630 
631 /**
632  * @brief Vehicle body speed measurement input (@ref
633  * MessageType::VEHICLE_SPEED_INPUT, version 1.0).
634  * @ingroup measurement_messages
635  *
636  * This message is an input to the device, used to convey the along-track speed
637  * of the vehicle (forward/backward). For differential speed measurements for
638  * multiple wheels, see @ref WheelSpeedInput.
639  *
640  * To use vehicle speed data, you must first configure the device by issuing a
641  * @ref SetConfigMessage message containing a @ref WheelConfig payload
642  * describing the vehicle sensor configuration (speed data signed/unsigned,
643  * etc.).
644  *
645  * Some platforms may have an additional signal used to indicate direction of
646  * motion, have direction or gear information available from a vehicle CAN bus,
647  * etc. If direction/gear information is available, it may be provided in the
648  * @ref gear field.
649  *
650  * To send wheel tick counts from software, use @ref VehicleTickInput instead.
651  *
652  * See also @ref VehicleSpeedOutput for measurement output.
653  */
655  static constexpr MessageType MESSAGE_TYPE = MessageType::VEHICLE_SPEED_INPUT;
656  static constexpr uint8_t MESSAGE_VERSION = 0;
657 
658  /**
659  * Set this flag if the measured wheel speeds are signed (positive forward,
660  * negative reverse). Otherwise, if the values are assumed to be unsigned
661  * (positive in both directions).
662  */
663  static constexpr uint8_t FLAG_SIGNED = 0x1;
664 
665  /**
666  * Measurement timestamp and additional information, if available. See @ref
667  * MeasurementDetails for details.
668  */
670 
671  /**
672  * The current vehicle speed estimate (in m/s * 2^-10). Set to 0x7FFFFFFF if
673  * not available.
674  */
675  int32_t vehicle_speed = INT32_MAX;
676 
677  /**
678  * The transmission gear currently in use, or direction of motion, if
679  * available.
680  *
681  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
682  * direction information is available externally.
683  */
685 
686  /** A bitmask of flags associated with the measurement data. */
687  uint8_t flags = 0x0;
688 
689  uint8_t reserved[2] = {0};
690 };
691 
692 /**
693  * @brief Vehicle body speed measurement output with calibration and corrections
694  * applied (@ref MessageType::VEHICLE_SPEED_OUTPUT, version 1.0).
695  * @ingroup measurement_messages
696  *
697  * This message is an output from the device that contains the along-track speed
698  * of the vehicle (forward/backward), after applying any estimated corrections
699  * for scale factor, etc.
700  *
701  * Odometry data may be received via a software input from a host machine, a
702  * vehicle CAN bus, or a hardware voltage signal (wheel ticks). The @ref
703  * data_source field will indicate which type of data source provided the
704  * measurements to the device.
705  *
706  * @note
707  * When odometry is provided using hardware wheel ticks, the output rate of this
708  * message may differ from the wheel tick input rate. For high accuracy
709  * applications, FusionEngine may integrate tick counts over longer intervals to
710  * improve performance.
711  *
712  * See also @ref VehicleSpeedInput and @ref RawVehicleSpeedOutput.
713  */
715  static constexpr MessageType MESSAGE_TYPE = MessageType::VEHICLE_SPEED_OUTPUT;
716  static constexpr uint8_t MESSAGE_VERSION = 0;
717 
718  /**
719  * Set this flag if the measured wheel speeds are signed (positive forward,
720  * negative reverse). Otherwise, if the values are assumed to be unsigned
721  * (positive in both directions).
722  */
723  static constexpr uint8_t FLAG_SIGNED = 0x1;
724 
725  /** The time of the measurement, in P1 time (beginning at power-on). */
727 
728  /**
729  * The source of the incoming data, if known.
730  */
732 
733  /**
734  * The transmission gear currently in use, or direction of motion, if
735  * available.
736  *
737  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
738  * direction information is available externally.
739  */
741 
742  /** A bitmask of flags associated with the measurement data. */
743  uint8_t flags = 0x0;
744 
745  uint8_t reserved = 0;
746 
747  /** The current vehicle speed estimate (in m/s). */
748  float vehicle_speed_mps = NAN;
749 };
750 
751 /**
752  * @brief Raw (uncorrected) vehicle body speed measurement output (@ref
753  * MessageType::RAW_VEHICLE_SPEED_OUTPUT, version 1.0).
754  * @ingroup measurement_messages
755  *
756  * This message is an output from the device that contains the along-track speed
757  * of the vehicle (forward/backward). These measurements come directly from the
758  * sensor, and do not have any corrections or calibration applied.
759  *
760  * See @ref VehicleSpeedOutput for more details. See also @ref
761  * VehicleSpeedInput.
762  */
764  static constexpr MessageType MESSAGE_TYPE =
766  static constexpr uint8_t MESSAGE_VERSION = 0;
767 
768  /**
769  * Set this flag if the measured wheel speeds are signed (positive forward,
770  * negative reverse). Otherwise, if the values are assumed to be unsigned
771  * (positive in both directions).
772  */
773  static constexpr uint8_t FLAG_SIGNED = 0x1;
774 
775  /**
776  * Measurement timestamp and additional information, if available. See @ref
777  * MeasurementDetails for details.
778  */
780 
781  /**
782  * The current vehicle speed estimate (in m/s * 2^-10). Set to 0x7FFFFFFF if
783  * not available.
784  */
785  int32_t vehicle_speed = INT32_MAX;
786 
787  /**
788  * The transmission gear currently in use, or direction of motion, if
789  * available.
790  *
791  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
792  * direction information is available externally.
793  */
795 
796  /** A bitmask of flags associated with the measurement data. */
797  uint8_t flags = 0x0;
798 
799  uint8_t reserved[2] = {0};
800 };
801 
802 ////////////////////////////////////////////////////////////////////////////////
803 // Wheel Tick Measurements
804 ////////////////////////////////////////////////////////////////////////////////
805 
806 /**
807  * @brief Differential wheel encoder tick input (@ref
808  * MessageType::WHEEL_TICK_INPUT, version 1.0).
809  * @ingroup measurement_messages
810  *
811  * This message is an input to the device, used to convey the wheel encoder tick
812  * counts for one or more wheels. The number and type of wheels expected, and
813  * the interpretation of the tick count values, varies by vehicle.
814  *
815  * To use wheel encoder data, you must first configure the device by issuing a
816  * @ref SetConfigMessage message containing a @ref WheelConfig payload
817  * describing the vehicle sensor configuration (tick counts signed/unsigned,
818  * etc.).
819  *
820  * Some platforms may have an additional signal used to indicate direction of
821  * motion, have direction or gear information available from a vehicle CAN bus,
822  * etc. If direction/gear information is available, it may be provided in the
823  * @ref gear field.
824  *
825  * See also @ref RawWheelTickOutput for measurement output.
826  */
828  static constexpr MessageType MESSAGE_TYPE = MessageType::WHEEL_TICK_INPUT;
829  static constexpr uint8_t MESSAGE_VERSION = 0;
830 
831  /**
832  * Measurement timestamp and additional information, if available. See @ref
833  * MeasurementDetails for details.
834  */
836 
837  /**
838  * The front left wheel ticks. The interpretation of these ticks is
839  * defined outside of this message.
840  */
841  uint32_t front_left_wheel_ticks = 0;
842 
843  /**
844  * The front right wheel ticks. The interpretation of these ticks is
845  * defined outside of this message.
846  */
847  uint32_t front_right_wheel_ticks = 0;
848 
849  /**
850  * The rear left wheel ticks. The interpretation of these ticks is
851  * defined outside of this message.
852  */
853  uint32_t rear_left_wheel_ticks = 0;
854 
855  /**
856  * The rear right wheel ticks. The interpretation of these ticks is
857  * defined outside of this message.
858  */
859  uint32_t rear_right_wheel_ticks = 0;
860 
861  /**
862  * The transmission gear currently in use, or direction of motion, if
863  * available.
864  *
865  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
866  * direction information is available externally.
867  */
869 
870  uint8_t reserved[3] = {0};
871 };
872 
873 /**
874  * @brief Raw (uncorrected) dfferential wheel encoder tick output (@ref
875  * MessageType::RAW_WHEEL_TICK_OUTPUT, version 1.0).
876  * @ingroup measurement_messages
877  *
878  * This message is an output from the device that contains wheel encoder tick
879  * counts for each individual wheel on the vehicle. Wheel ticks may be captured
880  * in hardware from an external voltage pulse, conveyed via software using a
881  * @ref WheelTickInput message, or decoded from a vehicle CAN bus. The number
882  * and type of wheels expected, and the interpretation of the tick count values,
883  * varies by vehicle.
884  *
885  * These measurements come directly from the sensor, and do not have any
886  * corrections or calibration applied.
887  *
888  * See also @ref WheelTickInput.
889  */
891  static constexpr MessageType MESSAGE_TYPE =
893  static constexpr uint8_t MESSAGE_VERSION = 0;
894 
895  /**
896  * Measurement timestamp and additional information, if available. See @ref
897  * MeasurementDetails for details.
898  */
900 
901  /**
902  * The front left wheel ticks. The interpretation of these ticks is
903  * defined outside of this message.
904  */
905  uint32_t front_left_wheel_ticks = 0;
906 
907  /**
908  * The front right wheel ticks. The interpretation of these ticks is
909  * defined outside of this message.
910  */
911  uint32_t front_right_wheel_ticks = 0;
912 
913  /**
914  * The rear left wheel ticks. The interpretation of these ticks is
915  * defined outside of this message.
916  */
917  uint32_t rear_left_wheel_ticks = 0;
918 
919  /**
920  * The rear right wheel ticks. The interpretation of these ticks is
921  * defined outside of this message.
922  */
923  uint32_t rear_right_wheel_ticks = 0;
924 
925  /**
926  * The transmission gear currently in use, or direction of motion, if
927  * available.
928  *
929  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
930  * direction information is available externally.
931  */
933 
934  uint8_t reserved[3] = {0};
935 };
936 
937 ////////////////////////////////////////////////////////////////////////////////
938 // Vehicle Tick Measurements
939 ////////////////////////////////////////////////////////////////////////////////
940 
941 /**
942  * @brief Single wheel encoder tick input, representing vehicle body speed
943  * (@ref MessageType::VEHICLE_TICK_INPUT, version 1.0).
944  * @ingroup measurement_messages
945  *
946  * This message is an input to the device, used to convey a single wheel encoder
947  * tick count representing the along-track speed of the vehicle
948  * (forward/backward). The interpretation of the tick count values varies by
949  * vehicle.
950  *
951  * To use wheel encoder data, you must first configure the device by issuing a
952  * @ref SetConfigMessage message containing either a @ref WheelConfig payload
953  * describing the vehicle sensor configuration (tick counts signed/unsigned,
954  * etc.). Note that you should _not_ use the @ref HardwareTickConfig payload,
955  * which is used when configuring the device to capture a wheel tick voltage
956  * signal in hardware.
957  *
958  * Some platforms may have an additional signal used to indicate direction of
959  * motion, have direction or gear information available from a vehicle CAN bus,
960  * etc. If direction/gear information is available, it may be provided in the
961  * @ref gear field.
962  *
963  * See also @ref RawVehicleTickOutput for measurement output.
964  */
966  static constexpr MessageType MESSAGE_TYPE = MessageType::VEHICLE_TICK_INPUT;
967  static constexpr uint8_t MESSAGE_VERSION = 0;
968 
969  /**
970  * Measurement timestamp and additional information, if available. See @ref
971  * MeasurementDetails for details.
972  */
974 
975  /**
976  * The current encoder tick count. The interpretation of these ticks is
977  * defined outside of this message.
978  */
979  uint32_t tick_count = 0;
980 
981  /**
982  * The transmission gear currently in use, or direction of motion, if
983  * available.
984  *
985  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
986  * direction information is available externally.
987  */
989 
990  uint8_t reserved[3] = {0};
991 };
992 
993 /**
994  * @brief Raw (uncorrected) single wheel encoder tick output (@ref
995  * MessageType::RAW_VEHICLE_TICK_OUTPUT, version 1.0).
996  * @ingroup measurement_messages
997  *
998  * This message is an output from the device that contains a wheel encoder tick
999  * count representing the along-track speed of the vehicle (forward/backward).
1000  * Wheel ticks may be captured in hardware from an external voltage pulse,
1001  * conveyed via software using a @ref VehicleTickInput message, or decoded from
1002  * a vehicle CAN bus. The interpretation of the tick count values varies by
1003  * vehicle.
1004  *
1005  * This value comes directly from the sensor, and does not have any corrections
1006  * or calibration applied.
1007  *
1008  * See also @ref VehicleTickInput.
1009  */
1011  static constexpr MessageType MESSAGE_TYPE =
1013  static constexpr uint8_t MESSAGE_VERSION = 0;
1014 
1015  /**
1016  * Measurement timestamp and additional information, if available. See @ref
1017  * MeasurementDetails for details.
1018  */
1020 
1021  /**
1022  * The current encoder tick count. The interpretation of these ticks is
1023  * defined outside of this message.
1024  */
1025  uint32_t tick_count = 0;
1026 
1027  /**
1028  * The transmission gear currently in use, or direction of motion, if
1029  * available.
1030  *
1031  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
1032  * direction information is available externally.
1033  */
1035 
1036  uint8_t reserved[3] = {0};
1037 };
1038 
1039 ////////////////////////////////////////////////////////////////////////////////
1040 // Deprecated Speed Measurement Definitions
1041 ////////////////////////////////////////////////////////////////////////////////
1042 
1043 /**
1044  * @brief (Deprecated) Differential wheel speed measurement (@ref
1045  * MessageType::DEPRECATED_WHEEL_SPEED_MEASUREMENT, version 1.0).
1046  * @ingroup measurement_messages
1047  *
1048  * @deprecated
1049  * This message is deprecated as of version 1.18.0 and may be removed in the
1050  * future. It should not used for new development. See @ref WheelSpeedInput and
1051  * @ref WheelSpeedOutput instead.
1052  */
1054  static constexpr MessageType MESSAGE_TYPE =
1056  static constexpr uint8_t MESSAGE_VERSION = 0;
1057 
1058  /**
1059  * Measurement timestamp and additional information, if available. See @ref
1060  * MeasurementDetails for details.
1061  */
1063 
1064  /** The front left wheel speed (in m/s). Set to NAN if not available. */
1065  float front_left_speed_mps = NAN;
1066 
1067  /** The front right wheel speed (in m/s). Set to NAN if not available. */
1068  float front_right_speed_mps = NAN;
1069 
1070  /** The rear left wheel speed (in m/s). Set to NAN if not available. */
1071  float rear_left_speed_mps = NAN;
1072 
1073  /** The rear right wheel speed (in m/s). Set to NAN if not available. */
1074  float rear_right_speed_mps = NAN;
1075 
1076  /**
1077  * The transmission gear currently in use, or direction of motion, if
1078  * available.
1079  *
1080  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
1081  * direction information is available externally.
1082  */
1084 
1085  /**
1086  * `true` if the wheel speeds are signed (positive forward, negative reverse),
1087  * or `false` if the values are unsigned (positive in both directions).
1088  */
1089  bool is_signed = true;
1090 
1091  uint8_t reserved[2] = {0};
1092 };
1093 
1094 /**
1095  * @brief (Deprecated) Vehicle body speed measurement (@ref
1096  * MessageType::DEPRECATED_VEHICLE_SPEED_MEASUREMENT, version 1.0).
1097  * @ingroup measurement_messages
1098  *
1099  * @deprecated
1100  * This message is deprecated as of version 1.18.0 and may be removed in the
1101  * future. It should not used for new development. See @ref VehicleSpeedInput
1102  * and @ref VehicleSpeedOutput instead.
1103  */
1105  static constexpr MessageType MESSAGE_TYPE =
1107  static constexpr uint8_t MESSAGE_VERSION = 0;
1108 
1109  /**
1110  * Measurement timestamp and additional information, if available. See @ref
1111  * MeasurementDetails for details.
1112  */
1114 
1115  /** The current vehicle speed estimate (in m/s). */
1116  float vehicle_speed_mps = NAN;
1117 
1118  /**
1119  * The transmission gear currently in use, or direction of motion, if
1120  * available.
1121  *
1122  * Set to @ref GearType::FORWARD or @ref GearType::REVERSE where vehicle
1123  * direction information is available externally.
1124  */
1126 
1127  /**
1128  * `true` if the wheel speeds are signed (positive forward, negative reverse),
1129  * or `false` if the values are unsigned (positive in both directions).
1130  */
1131  bool is_signed = true;
1132 
1133  uint8_t reserved[2] = {0};
1134 };
1135 
1136 ////////////////////////////////////////////////////////////////////////////////
1137 // Attitude Sensor Definitions
1138 ////////////////////////////////////////////////////////////////////////////////
1139 
1140 /**
1141  * @brief Multi-antenna GNSS attitude sensor measurement output with offset
1142  * corrections applied (@ref MessageType::GNSS_ATTITUDE_OUTPUT, version
1143  * 1.0).
1144  * @ingroup measurement_messages
1145  *
1146  * This message is an output from the device contaning orientation measurements
1147  * generated using multiple GNSS antennas/receivers. On supported devices, the
1148  * device will measure vehicle yaw (heading) and pitch based on the relative
1149  * positions of two GNSS antennas. When more than two antennas are present, the
1150  * device may additionally measure roll angle.
1151  *
1152  * @note
1153  * This message contains vehicle body angle measurements generated from GNSS
1154  * measurements. These measurements inputs to the navigation engine, not the
1155  * filtered output from engine. They may be less accurate than the vehicle body
1156  * orientation estimate in @ref PoseMessage.
1157  *
1158  * The measurements in this message have user-specified corrections applied for
1159  * the horizontal and vertical offsets between the two GNSS antennas. See also
1160  * @ref RawGNSSAttitudeOutput.
1161  */
1163  static constexpr MessageType MESSAGE_TYPE = MessageType::GNSS_ATTITUDE_OUTPUT;
1164  static constexpr uint8_t MESSAGE_VERSION = 0;
1165 
1166  /**
1167  * Measurement timestamp and additional information, if available. See @ref
1168  * MeasurementDetails for details.
1169  */
1171 
1172  /**
1173  * Set to @ref SolutionType::RTKFixed when heading is available, or @ref
1174  * SolutionType::Invalid otherwise.
1175  */
1177 
1178  uint8_t reserved[3] = {0};
1179 
1180  /** A bitmask of flags associated with the solution. */
1181  uint32_t flags = 0;
1182 
1183  /**
1184  * The measured vehicle body orientation (in degrees).
1185  *
1186  * YPR is defined as an intrinsic Euler-321 rotation, i.e., yaw, pitch, then
1187  * roll with respect to the local ENU tangent plane. See @ref
1188  * PoseMessage::ypr_deg for a complete rotation definition.
1189  *
1190  * If any angles are not available, they will be set to `NAN`. For
1191  * dual-antenna systems, the device will measure yaw and pitch, but not roll.
1192  *
1193  * Note that yaw is measured from east in a counter-clockwise direction. For
1194  * example, north is +90 degrees. Heading with respect to true north can be
1195  * computed as `heading = 90.0 - ypr_deg[0]`.
1196  */
1197  float ypr_deg[3] = {NAN, NAN, NAN};
1198 
1199  /**
1200  * The standard deviation of the orientation measurement (in degrees).
1201  */
1202  float ypr_std_deg[3] = {NAN, NAN, NAN};
1203 
1204  /**
1205  * The estimated distance between primary and secondary antennas (in meters).
1206  */
1207  float baseline_distance_m = NAN;
1208 
1209  /**
1210  * The standard deviation of the baseline distance estimate (in meters).
1211  */
1212  float baseline_distance_std_m = NAN;
1213 };
1214 
1215 /**
1216  * @brief Raw (uncorrected) GNSS attitude sensor measurement output (@ref
1217  * MessageType::RAW_GNSS_ATTITUDE_OUTPUT, version 1.0).
1218  * @ingroup measurement_messages
1219  *
1220  * This message is an output from the device contaning raw orientation
1221  * measurements generated using multiple GNSS antennas/receivers that have not
1222  * been corrected for horizontal/vertical offsets between the antennas. Here,
1223  * orientation is represented as the vector from a primary GNSS antenna to a
1224  * secondary GNSS antenna.
1225  *
1226  * For vehicle body angle measurements, and for measurements corrected for
1227  * horizontal/vertical offsets, see @ref GNSSAttitudeOutput.
1228  */
1230  static constexpr MessageType MESSAGE_TYPE =
1232  static constexpr uint8_t MESSAGE_VERSION = 0;
1233 
1234  /**
1235  * Measurement timestamp and additional information, if available. See @ref
1236  * MeasurementDetails for details.
1237  */
1239 
1240  /**
1241  * Set to @ref SolutionType::RTKFixed when heading is available, or @ref
1242  * SolutionType::Invalid otherwise.
1243  */
1245 
1246  uint8_t reserved[3] = {0};
1247 
1248  /** A bitmask of flags associated with the solution. */
1249  uint32_t flags = 0;
1250 
1251  /**
1252  * The position of the secondary GNSS antenna relative to the primary antenna
1253  * (in meters), resolved with respect to the local ENU tangent plane: east,
1254  * north, up.
1255  *
1256  * Position is measured with respect to the primary antenna as follows:
1257  * @f[
1258  * \Delta r_{ENU} = C^{ENU}_{ECEF} (r_{Secondary, ECEF} - r_{Primary, ECEF})
1259  * @f]
1260  */
1261  float relative_position_enu_m[3] = {NAN, NAN, NAN};
1262 
1263  /**
1264  * The standard deviation of the relative position vector (in meters),
1265  * resolved with respect to the local ENU tangent plane: east, north, up.
1266  */
1267  float position_std_enu_m[3] = {NAN, NAN, NAN};
1268 };
1269 
1270 ////////////////////////////////////////////////////////////////////////////////
1271 // Binary Sensor Data Definitions
1272 ////////////////////////////////////////////////////////////////////////////////
1273 
1274 /**
1275  * @brief A block of incoming sensor data whose definition depends on the value
1276  * of @ ref data_type. (@ref MessageType::INPUT_DATA_WRAPPER).
1277  * @ingroup measurement_messages
1278  *
1279  * This message has the remainder of the payload_size_bytes filled with the
1280  * wrapped data. The payload is not guaranteed to be aligned to a specific
1281  * message boundary, or to contain complete messages.
1282  *
1283  * ```
1284  * {MessageHeader, InputDataWrapperMessage, [wrapped data]}
1285  * ```
1286  */
1288  static constexpr MessageType MESSAGE_TYPE = MessageType::INPUT_DATA_WRAPPER;
1289  static constexpr uint8_t MESSAGE_VERSION = 0;
1290 
1291 #if !defined(_MSC_VER)
1292  // Default member initializers for bit-fields only available with c++20.
1293  InputDataWrapperMessage() : system_time_cs(0) {}
1294 #endif
1295 
1296 // The MSVC compiler does not allow unaligned bit fields:
1297 // https://stackoverflow.com/questions/4310728/forcing-unaligned-bitfield-packing-in-msvc
1298 // unlike Clang and GCC. This means that `uint64_t system_time_cs : 40;` is 5
1299 // bytes in GCC and 8 bytes in MSVC. On MSVC, you must cast
1300 // @ref system_time_cs_bytes to read and write the timestamp.
1301 #if defined(_MSC_VER)
1302  /**
1303  * 5 byte system wall-clock timestamp in centiseconds (hundredths of a
1304  * second). Set to POSIX time (time since 1/1/1970) where available.
1305  */
1306  uint8_t system_time_cs_bytes[5] = {0};
1307 #else
1308  /**
1309  * 5 byte system wall-clock timestamp in centiseconds (hundredths of a
1310  * second). Set to POSIX time (time since 1/1/1970) where available.
1311  */
1312  uint64_t system_time_cs : 40;
1313 #endif
1314 
1315  uint8_t reserved[1] = {0};
1316 
1317  /** Type identifier for the serialized message to follow. */
1318  uint16_t data_type = 0;
1319 
1320  /**
1321  * The rest of this message contains the wrapped data. The size of the data is
1322  * found by subtracting the size of the other fields in this message from the
1323  * header `payload_size_bytes` (i.e. `size_t content_size =
1324  * header->payload_size_bytes - sizeof(InputDataWrapperMessage)`). The data is
1325  * interpreted based on the value of `data_type`.
1326  */
1327 };
1328 static_assert(sizeof(InputDataWrapperMessage) == 8,
1329  "InputDataWrapperMessage does not match expected packed size.");
1330 
1331 #pragma pack(pop)
1332 
1333 } // namespace messages
1334 } // namespace fusion_engine
1335 } // namespace point_one
@ RAW_VEHICLE_SPEED_OUTPUT
RawVehicleSpeedOutput
@ GPS_TIME
Message timestamped in GPS time, referenced to 1980/1/6.
@ CAN
Sensor data captured from a vehicle CAN bus.
SystemTimeSource
The source of a point_one::fusion_engine::messages::Timestamp used to represent the time of applicabi...
Definition: measurements.h:97
@ IMU_INPUT
IMUInput
Raw (uncorrected) dfferential wheel encoder tick output (MessageType::RAW_WHEEL_TICK_OUTPUT,...
Definition: measurements.h:890
(Deprecated) Differential wheel speed measurement (MessageType::DEPRECATED_WHEEL_SPEED_MEASUREMENT,...
Differential wheel encoder tick input (MessageType::WHEEL_TICK_INPUT, version 1.0).
Definition: measurements.h:827
MessageType
Identifiers for the defined output message types.
Definition: defs.h:34
Library portability helper definitions.
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:252
Raw (uncorrected) single wheel encoder tick output (MessageType::RAW_VEHICLE_TICK_OUTPUT,...
@ INVALID
Timestamp not valid.
Single wheel encoder tick input, representing vehicle body speed (MessageType::VEHICLE_TICK_INPUT,...
Definition: measurements.h:965
SolutionType
Navigation solution type definitions.
Definition: defs.h:503
P1_CONSTEXPR_FUNC const char * to_string(ConfigType type)
Get a human-friendly string name for the specified ConfigType.
Timestamp measurement_time
The measurement time of applicability, if available, in a user-specified time base.
Definition: measurements.h:200
#define P1_ALIGNAS(N)
Definition: portability.h:57
@ RAW_VEHICLE_TICK_OUTPUT
RawVehicleTickOutput
@ DEPRECATED_WHEEL_SPEED_MEASUREMENT
DeprecatedWheelSpeedMeasurement
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:899
Raw (uncorrected) vehicle body speed measurement output (MessageType::RAW_VEHICLE_SPEED_OUTPUT,...
Definition: measurements.h:763
@ SERIAL
Sensor data provided over a serial connection.
@ INPUT_DATA_WRAPPER
InputDataWrapperMessage
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:337
@ RAW_WHEEL_SPEED_OUTPUT
RawWheelSpeedOutput
@ TIMESTAMPED_ON_RECEPTION
Message timestamped in system time, generated when received by the device.
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:586
@ NEUTRAL
The vehicle is in neutral.
MeasurementDetails details
Measurement timestamp and additional information, if available.
Raw (uncorrected) dfferential wheel speed measurement output (MessageType::RAW_WHEEL_SPEED_OUTPUT,...
Definition: measurements.h:570
MeasurementDetails details
Measurement timestamp and additional information, if available.
Timestamp p1_time
The P1 time corresponding with the measurement time of applicability, if available.
Definition: measurements.h:227
@ DEPRECATED_VEHICLE_SPEED_MEASUREMENT
DeprecatedVehicleSpeedMeasurement
The base class for all message payloads.
Definition: defs.h:687
Raw (uncorrected) IMU sensor measurement output (MessageType::RAW_IMU_OUTPUT, version 1....
Definition: measurements.h:329
SensorDataSource
The source of received sensor measurements, if known.
Definition: measurements.h:33
A block of incoming sensor data whose definition depends on the value of @ ref data_type.
@ SENDER_SYSTEM_TIME
Message timestamp was generated from a monotonic clock of an external system.
MeasurementDetails details
Measurement timestamp and additional information, if available.
@ REVERSE
The vehicle is in reverse.
Differential wheel speed measurement input (MessageType::WHEEL_SPEED_INPUT, version 1....
Definition: measurements.h:437
@ Invalid
Invalid, no position available.
GNSS signal and frequency type definitions.
Definition: logging.h:38
@ GNSS_ATTITUDE_OUTPUT
GNSSAttitudeOutput
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:779
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:669
@ RAW_GNSS_ATTITUDE_OUTPUT
RawGNSSAttitudeOutput
uint64_t system_time_cs
5 byte system wall-clock timestamp in centiseconds (hundredths of a second).
@ IMU_OUTPUT
IMUOutput
Timestamp p1_time
The time of the measurement, in P1 time (beginning at power-on).
Definition: measurements.h:291
@ RAW_IMU_OUTPUT
RawIMUOutput
GearType
The current transmission gear used by the vehicle.
Definition: measurements.h:367
Raw (uncorrected) GNSS attitude sensor measurement output (MessageType::RAW_GNSS_ATTITUDE_OUTPUT,...
std::ostream p1_ostream
Definition: portability.h:75
IMU sensor measurement output with calibration and corrections applied (MessageType::IMU_OUTPUT,...
Definition: measurements.h:286
@ VEHICLE_SPEED_INPUT
VehicleSpeedInput
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:452
p1_ostream & operator<<(p1_ostream &stream, ConfigType type)
ConfigType stream operator.
MeasurementDetails details
Measurement timestamp and additional information, if available.
The time of applicability and additional information for an incoming sensor measurement.
Definition: measurements.h:193
@ NETWORK
Sensor data provided over a network connection.
@ WHEEL_SPEED_INPUT
WheelSpeedInput
@ UNKNOWN
Data source not known.
@ WHEEL_SPEED_OUTPUT
WheelSpeedOutput
@ RAW_WHEEL_TICK_OUTPUT
RawWheelTickOutput
#define P1_CONSTEXPR_FUNC
Definition: portability.h:105
@ INTERNAL
Sensor data captured internal to the device (embedded IMU, GNSS receiver, etc.).
@ VEHICLE_SPEED_OUTPUT
VehicleSpeedOutput
@ VEHICLE_TICK_INPUT
VehicleTickInput
Timestamp p1_time
The time of the measurement, in P1 time (beginning at power-on).
Definition: measurements.h:726
MeasurementDetails details
Measurement timestamp and additional information, if available.
Timestamp p1_time
The time of the measurement, in P1 time (beginning at power-on).
Definition: measurements.h:528
(Deprecated) Vehicle body speed measurement (MessageType::DEPRECATED_VEHICLE_SPEED_MEASUREMENT,...
@ P1_TIME
Message timestamped in P1 time.
Vehicle body speed measurement input (MessageType::VEHICLE_SPEED_INPUT, version 1....
Definition: measurements.h:654
@ FORWARD
The vehicle is in a forward gear.
Point One FusionEngine output message common definitions.
@ PARK
The vehicle is parked.
Generic timestamp representation.
Definition: defs.h:588
InputDataWrapperMessage()
Vehicle body speed measurement output with calibration and corrections applied (MessageType::VEHICLE_...
Definition: measurements.h:714
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:973
@ HARDWARE_IO
Sensor data generated via hardware voltage signal (wheel tick, external event, etc....
@ UNKNOWN
The transmission gear is not known, or does not map to a supported GearType.
Differential wheel speed measurement output with calibration and corrections applied (MessageType::WH...
Definition: measurements.h:516
Multi-antenna GNSS attitude sensor measurement output with offset corrections applied (MessageType::G...
MeasurementDetails details
Measurement timestamp and additional information, if available.
Definition: measurements.h:835
@ WHEEL_TICK_INPUT
WheelTickInput
IMU sensor measurement input (MessageType::IMU_INPUT, version 1.0).
Definition: measurements.h:244