NOV_B-RAWDMI (Deprecated)
Deprecated interface:
This interface is deprecated and replaced with FP_B-MEASUREMENTS input.
From firmware 2.102.2 on, this message is not supported anymore at all.
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, introduced by Fixposition, is used. The message format is as follows:
Framing:
The structure of the NOV_B-RAWDMI message frame is:
# | Offset | Field | Type | Unit | Description |
---|---|---|---|---|---|
- | 0 |
| uint8_t | - | Sync byte 1 (always |
- | 1 |
| uint8_t | - | Sync byte 2 (always |
- | 2 |
| uint8_t | - | Sync byte 3 (always |
- | 3 |
| uint8_t | - | Payload length (always |
- | 4 |
| uint16_t | - | Message ID (always |
1 | 6 |
| uint16_t | - | GPS week number, set to |
2 | 8 |
| int32_t | ms | GPS time of week [ms], set to |
3 | 12 |
| int32_t | - | Measurement value 1, for RC or FR wheel |
4 | 16 |
| int32_t | - | Measurement value 2, for FL wheel or YW sensor |
5 | 20 |
| int32_t | - | Measurement value 3, for RR wheel |
6 | 24 |
| int32_t | - | Measurement value 4, for RL wheel |
- | 28 |
| uint32_t | - | Bitfield: |
7 |
| bit 0 | - | Validity flag for dmi1 value (0 = invalid, 1 = valid) | |
8 |
| bit 1 | - | Validity flag for dmi2 value (0 = invalid, 1 = valid) | |
9 |
| bit 2 | - | Validity flag for dmi3 value (0 = invalid, 1 = valid) | |
10 |
| bit 3 | - | Validity flag for dmi4 value (0 = invalid, 1 = valid) | |
11 |
| bits 10…4 | - | Type of measurement present in dmi1 value (see below) | |
12 |
| bits 17…11 | - | Type of measurement present in dmi2 value (see below) | |
13 |
| bits 24…18 | - | Type of measurement present in dmi3 value (see below) | |
14 |
| bits 31…25 | - | Type of measurement present in dmi3 value (see below) | |
- | 32 |
| uint32_t | - | CRC32 checksum (see protocol documentation) |
Measurement types (dmi1_type
, dmi2_type
, dmi3_type
and dmi4_type
):
Value | Description |
---|---|
| Linear velocity (speed) |
| Angular velocity |
The checksum is a 32 bit cyclic redundancy check (CRC) with the polynomial 0x04c11db7.
Notes:
All fields are little-endian
Signed fields are 2’s complement
Possible integer types are:
int8_t
,uint8_t
,int16_t
,uint16_t
,int32_t
,uint32_t
,int64_t
,uint64_t
Possible float types are:
float
(32 bits) anddouble
(64 bits), as per IEEE 754
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 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:
0x00000001
= dmi1 value is valid and represents a linear velocity0x00000802
= dmi2 value is valid and represents an angular velocity0x00000004
= dmi3 value is valid and represents a linear velocity0x02000008
= dmi4 value is valid and represents an angular velocity
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.
dmi1 is for RC wheel or FR wheel
dmi2 is for FL wheel or YW sensor
dmi3 is for RR wheel
dmi4 is for RL wheel
An example message with hexdump of the binary data:
dmi1 = 111 = 0x0000006f =
6f 00 00 00
(at offset 12)dmi2 = -22222 = 0xfffff752 =
32 a9 ff ff
(at offset 16)dmi3 = 333333 = 0x00051615 =
15 16 05 00
(at offset 20)dmi4 = -44 = 0xffffffd4 =
d4 ff ff ff
(at offset 24)mask = 0x00000001 | 0x00000002 | 0x00000004 | 0x00000008 = 0x0000000f =
0f 00 00 00
(at offset 28)
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