Skip to main content
Skip table of contents

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).

  • For input messages, set the message_time to 0.

Payload:

The structure of the FP_B message payload is:

#

Offset

Field

Type

Unit

Description

1

0

version

uint8_t

-

Version of the FP_B_MEASUREMENTS message (currently 1)

2

1

num_meas

uint8_t

-

Number of measurements present in the body of the message (1…10)

3

2

reserved0

uint8_t[6]

-

Reserved for future use. Set to 0.

The following fields are repeated num_meas times (i = 0…num_meas-1):

4 + i·12

8 + i·28

meas_x

int32_t

*

Measurement x axis (for example, [mm/s])

5 + i·12

12 + i·28

meas_y

int32_t

*

Measurement y axis (for example, [mm/s])

6 + i·12

16 + i·28

meas_z

int32_t

*

Measurement z axis (for example, [mm/s])

7 + i·12

20 + i·28

meas_x_valid

uint8_t

-

Validity of meas_x (1 = valid data, 0 = invalid data or n/a)

8 + i·12

21 + i·28

meas_y_valid

uint8_t

-

Validity of meas_y (1 = valid data, 0 = invalid data or n/a)

9 + i·12

22 + i·28

meas_z_valid

uint8_t

-

Validity of meas_z (1 = valid data, 0 = invalid data or n/a)

10 + i·12

23 + i·28

meas_type

uint8_t

-

Type of measurement (see below)

11 + i·12

24 + i·28

meas_loc

uint8_t

-

Location of measurement (see below)

12 + i·12

25 + i·28

reserved1

uint8_t[4]

-

Reserved for future use. Set to 0.

13 + i·12

29 + i·28

timestamp_type

uint8_t

-

Type of timestamp (see below)

14 + i·12

30 + i·28

gps_wno

uint16_t

-

GPS week number

15 + i·12

32 + i·28

gps_tow

uint32_t

*

GPS time of week [ms] or monotonic time [-]

The valid meas_type values are:

Value

Description

0

Unspecified

1

Velocity (wheel speed)

The valid meas_loc values are:

Value

Description

0

Unspecified

1

Measurement of a sensor at the rear-center (RC)

2

Measurement of a sensor at the front-right (FR)

3

Measurement of a sensor at the front-left (FL)

4

Measurement of a sensor at the rear-right (RR)

5

Measurement of a sensor at the rear-left (RL)

The valid timestamp_type values are:

Value

Description

0

Unspecified

1

Use time of arrival of the measurement (ignore gps_wno and gps_tow)

2

Use monotonic time [any] (stored in the gps_tow field)

3

Use GPS time (stored in gps_wno [-] and gps_tow [ms] fields)

Code:

Some example programs to create a FP_B-MEASUREMENTS message:

  • C++:

make_fpb_measurements.c

  • Python:

make_fpb_measurements.py

Example message:

A hexdump of the fp_b_rc.bin generated by make_fpb_measurements.c (see above):

CODE
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:

    CODE
    66 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:

    CODE
                             01 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:

    CODE
    66 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:

    CODE
                                         4e dd f9 a6
                                         ^^^^^^^^^^^
                                         |
                                         Checksum
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.