Skip to main content

Structure of raw data

Messages received from the raw data subscription are referred to as batches. Each batch contains one or more vehicle data frames. A frame, in turn, consists of one or more messages, which may include sensor data from GPS and IMU sources, as well as raw CAN bus messages.

Data frames

A data batch contains one or more vehicle data frame a vehicle data frame has the following format:

Field nameTypeOffsetLengthDescription
headerbyte01ASCII character 'F', indicating the beginning of the frame
versionbyte11Data frame version identifier (currently must be 0x01)
vehicle_idbyte array216Unique vehicle identifier (GUID)
data_lengthint184Length of the data payload
databyte array22nData payload containing the messages

Messages

The vehicle data frames contains messages. There are three different data message types:

  • GPS
  • IMU
  • CAN

General structure of the messages:

Field nameTypeOffsetLengthDescription
typebyte01Message type
lengthbyte11Message length (size of the timestamp and data fields)
timestampint24Message timestamp (motorola byte order, resolution is 50 microseconds)
typebyte array6nMessage data

Example: 21 10 00 29 2C 30 40 00 00 A5 79 04 CD 78 8D 20 20 81

  • type: 0x21
  • length: 0x10 = 16
  • timestamp: 0x00292C30 = 2 698 288 * 50 us = 134 914 400 us
  • data: 0x40 0x00 0x00 0xA5 0x79 0x04 0xCD 0x78 0x8D 0x20 0x20 0x81