FP_B-MEASUREMENTS
Description:
For streaming input measurements, such as wheel speed, to the Vision-RTK2 via any UART serial or TCP port, the message format FP_B-MEASUREMENTS, introduced by Fixposition, is used. Note that the maximum number of measurements in the same message is 10 (n ≤ 10). The message format consists of a fixed structure using little-endian signed and unsigned integers of 8, 16, and 32 bits and IEEE 754 single (32 bits) precision. The format is as follows:
Notes:
The message ID for FP_B-MEASUREMENTS is 2001 (0x07d1).
Currently, only time of arrival (ToA) timestamping is supported.
Payload:
The structure of the FP_B message payload is:
# | Offset | Field | Type | Unit | Description |
---|---|---|---|---|---|
1 | 0 |
| uint8_t | - | Version of the FP_B_MEASUREMENTS message (currently 1) |
2 | 1 |
| uint8_t | - | Number of measurements present in the body of the message (1…10) |
3 | 2 |
| uint8_t[6] | - | Reserved for future use. Set to 0. |
The following fields are repeated | |||||
4 + i·12 | 8 + i·28 |
| int32_t | * | Measurement x axis (for example, [mm/s]) |
5 + i·12 | 12 + i·28 |
| int32_t | * | Measurement y axis (for example, [mm/s]) |
6 + i·12 | 16 + i·28 |
| int32_t | * | Measurement z axis (for example, [mm/s]) |
7 + i·12 | 20 + i·28 |
| uint8_t | - | Validity of |
8 + i·12 | 21 + i·28 |
| uint8_t | - | Validity of |
9 + i·12 | 22 + i·28 |
| uint8_t | - | Validity of |
10 + i·12 | 23 + i·28 |
| uint8_t | - | Type of measurement (see below) |
11 + i·12 | 24 + i·28 |
| uint8_t | - | Location of measurement (see below) |
12 + i·12 | 25 + i·28 |
| uint8_t[4] | - | Reserved for future use. Set to 0. |
13 + i·12 | 29 + i·28 |
| uint8_t | - | Type of timestamp (see below) |
14 + i·12 | 30 + i·28 |
| uint16_t | - | GPS week number |
15 + i·12 | 32 + i·28 |
| uint32_t | * | GPS time of week [ms] or monotonic time [-] |
The valid meas_type
values are:
Value | Description |
---|---|
| Unspecified |
| Velocity (wheel speed) |
The valid meas_loc
values are:
Value | Description |
---|---|
| Unspecified |
| Measurement of a sensor at the rear-center (RC) |
| Measurement of a sensor at the front-right (FR) |
| Measurement of a sensor at the front-left (FL) |
| Measurement of a sensor at the rear-right (RR) |
| Measurement of a sensor at the rear-left (RL) |
The valid timestamp_type
values are:
Value | Description |
---|---|
| Unspecified |
| Use time of arrival of the measurement1 |
| reserved |
| reserved |
1 Currently only supported by the VRTK-2. We recommend leaving the gps_wno
and gps_tow
empty when using the timestamp_type = 1
. Here, the timestamp is done by the VRTK-2 in a Time of Arrival (ToA) fashion. See the recommended setup below.
Currently supported measurements
The supported meas_type
, meas_loc
and timestamp_type
values depend on the sensor software and configuration used. Currently (FW 2.102.2), this is the recommended setup:
|
|
|
---|---|---|
|
|
|
Code:
Some example programs to create a FP_B-MEASUREMENTS message:
https://github.com/fixposition/fixposition-sdk/tree/main/examples/fpb_measurements
C++:
Python:
Example message:
A hexdump of the fp_b_rc.bin
generated by make_fpb_measurements.c
(see above):
00000000 66 21 d1 07 24 00 00 00 01 01 00 00 00 00 00 00
00000010 66 00 00 00 c2 00 00 00 dd ff ff ff 01 01 01 01
00000020 01 00 00 00 00 01 00 00 00 00 00 00 4e dd f9 a6
Let’s decompose it:
First we have the start of the FP_B frame and its meta data:
CODE66 21 d1 07 24 00 00 00 ^^^^^ ^^^^^ ^^^^^ ^^^^^ | | | | | | | Msg time = 0x0000 = 0 (as expected for input messages) | | Payload size = 0x0024 = 36 | Message ID = 0x07d1 = 2001 = FP_B-MEASUREMENTS FP_B sync chars
Then follows payload, which starts with a fixed-sized part:
CODE01 01 00 00 00 00 00 00 ^^ ^^ ^^^^^^^^^^^^^^^^^ | | | | | .reserved0 | .num_meas = 0x01 = 1 (this message contains one measurement) .version = 0x01 = 1 (as expected for this message)
Then follows
num_meas
times a measurement, consisting of a couple of fields with the data:CODE66 00 00 00 c2 00 00 00 dd ff ff ff 01 01 01 01 ^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^ ^^ ^^ ^^ ^^ | | | | | | | | | | | | | .meas_type = 0x01 = 1 = velocity | | | | | .meas_z_valid | | | | .meas_y_valid | | | .meas_x_valid | | .meas_z = 0xffffffdd = -35 (two's complement) | .meas_y = 0x000000c2 = 194 .meas_x = 0x00000066 = 102 01 00 00 00 00 01 00 00 00 00 00 00 ^^ ^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^ | | | | | | | | | .gps_tow = 0x00000000 = 0 (as expected for timestamp_type = 1) | | | .gps_wno = 0x0000 = 0 (as expected for timestamp_type = 1 | | .timestamp_type = 0x01 = 1 = time of arrival | .reserved1 .meas_loc = 0x01 = 1 = rear-centre (RC)
Finally, the message ends with a checksum across all of the above:
CODE4e dd f9 a6 ^^^^^^^^^^^ | Checksum