NOV_B-RAWDMI


Deprecated interface:
This interface is deprecated and replaced with FP_B-MEASUREMENTS input.

 

To send wheelspeed data through UART, please ensure the correct baud rate is set up. For more information on the UART port configuration, please refer to section 5.4.1 of the Integration Manual.

For streaming wheelspeed information via the UART serial or TCP ports, the message format NOV_B-RAWDMI is used.

 

Framing

The structure of the NOV_B-RAWDMI message frame is:

 

#

Offset

Field

Type

Unit

Description

-

0

sync1

uint8_t

-

Sync byte 1 (always 0xaa)

-

1

sync2

uint8_t

-

Sync byte 2 (always 0x44)

-

2

sync3

uint8_t

-

Sync byte 3 (always 0x13)

-

3

payload_len

uint8_t

-

Payload length (always 20 for this message)

-

4

msg_id

uint16_t

-

Message ID (always 2269 for this message)

1

6

gps_wno

uint16_t

-

GPS week number, set to 0, not supported by VRTK2

2

8

gps_tow

int32_t

ms

GPS time of week [ms], set to 0, no supported by VRTK2

3

12

dmi1

int32_t

-

Measurement value 1, for RC or FR wheel

4

16

dmi2

int32_t

-

Measurement value 2, for FL wheel or YW sensor

5

20

dmi3

int32_t

-

Measurement value 3, for RR wheel

6

24

dmi4

int32_t

-

Measurement value 4, for RL wheel

-

28

mask

uint32_t

-

Bitfield:

7

 

dmi1_valid

bit 0

-

Validity flag for dmi1 value (0 = invalid, 1 = valid)

8

 

dmi2_valid

bit 1

-

Validity flag for dmi2 value (0 = invalid, 1 = valid)

9

 

dmi3_valid

bit 2

-

Validity flag for dmi3 value (0 = invalid, 1 = valid)

10

 

dmi4_valid

bit 3

-

Validity flag for dmi4 value (0 = invalid, 1 = valid)

11

 

dmi1_type

bits 10…4

-

Type of measurement present in dmi1 value (see below)

12

 

dmi2_type

bits 17…11

-

Type of measurement present in dmi2 value (see below)

13

 

dmi3_type

bits 24…18

-

Type of measurement present in dmi3 value (see below)

14

 

dmi4_type

bits 31…25

-

Type of measurement present in dmi3 value (see below)

-

32

checksum

uint32_t

-

CRC32 checksum (see protocol documentation)

 

 

Measurement types (dmi1_typedmi2_typedmi3_type and dmi4_type):

 

Value

Description

0

Linear velocity (speed)

1

Angular velocity

 

 

The checksum is a 32 bit cyclic redundancy check (CRC) with the polynomial 0x04c11db7.

 

 

As a struct:

 

/**
* @brief NOV_B-RAWDMI payload
*
* See https://docs.novatel.com/OEM7/Content/SPAN_Logs/RAWDMI.htm
*/
struct NovbRawdmi {  // clang-format off
    int32_t  dmi1;            //!< DMI1 value (RC wheel or FR wheel)
    int32_t  dmi2;            //!< DMI2 value (FL wheel or YW sensor)
    int32_t  dmi3;            //!< DMI3 value (RR wheel)
    int32_t  dmi4;            //!< DMI4 value (RL wheel)
    uint32_t dmi1_valid : 1;  //!< DMI1 value valid flag (1 = dmi1 value is valid)
    uint32_t dmi2_valid : 1;  //!< DMI2 value valid flag (1 = dmi2 value is valid)
    uint32_t dmi3_valid : 1;  //!< DMI3 value valid flag (1 = dmi3 value is valid)
    uint32_t dmi4_valid : 1;  //!< DMI4 value valid flag (1 = dmi4 value is valid)
    uint32_t dmi1_type  : 7;  //!< DMI1 value type (0 = linear speed, 1 = angular velocity)
    uint32_t dmi2_type  : 7;  //!< DMI2 value type (0 = linear speed, 1 = angular velocity)
    uint32_t dmi3_type  : 7;  //!< DMI3 value type (0 = linear speed, 1 = angular velocity)
    uint32_t dmi4_type  : 7;  //!< DMI4 value type (0 = linear speed, 1 = angular velocity)
};  // clang-format on

static_assert(sizeof(NovbRawdmi) == 20, "");

 

 

Details

The mask is divided into eight fields and determines which of the dmi1..4 values contain valid data and also the type of data the value is represented.

 

The dmiX_mask fields can be either 0 or 1, depending if the dmiX value is invalid or valid, respectively.

 

The dmiX_type is a 7 bit unsigned integer representing the the type of represented value in the dmiX field. Currently only two values are supported: 0 for a linear speed or 1 for an angular velocity.

 

Some example masks:

 

 

The dmi1…4 values are speed values in an arbitrary unit. The resolution should be chosen such that small movements produce a useful signal. Ideally, these values will come in [mm/s], and [mrad/s]. Coarse resolution, such as [km/h], will not work well, in particular at slow speeds.

 

 

An example message with hexdump of the binary data:

 

 

0x0000 00000   aa 44 13 14  dd 08 00 00  00 00 00 00  6f 00 00 00
               ^^^^^^^^^^^constant header^^^^^^^^^^^  ^^^^dmi1^^^
0x0010 00016   32 a9 ff ff  15 16 05 00  d4 ff ff ff  0f 00 00 00
               ^^^^dmi2^^^  ^^^^dmi3^^^  ^^^^dmi4^^^  ^^^^mask^^^
0x0020 00032   69 9d 53 7b
               ^^checksum^

 

Code

Here is an example implementation in C: make_nov_b_rawdmi.c

Create your own Knowledge Base