Skip to content

Latest commit

 

History

History
379 lines (353 loc) · 29.2 KB

User_uart.rst

File metadata and controls

379 lines (353 loc) · 29.2 KB

ACEINNA protocol data format definition

Start 1 Start 2 Frame type 1 Frame type 2 Data length 1 Data content Check 1 Check 2

Description:

  • Start: Each frame of data starts with this, 2 bytes: 0x55 0x55.
  • Frame type: 2 bytes, high byte first.
  • Data length: 1 byte, refers to the byte length of the data content.
  • Data content: maximum 255 bytes.
  • Check: crc16 check, 2 bytes, low byte first, bytes from the beginning of the "Frame type" to the end of the "Data content" are included in the check calculation, and the check algorithm C code is as follows:
uint16_t CalculateCRC (uint8_t *buf, uint16_t  length)
{
   uint16_t crc = 0x1D0F;

   for (int i=0; i < length; i++) {
       crc ^= buf[i] << 8;
       for (int j=0; j<8; j++) {
           if (crc & 0x8000) {
               crc = (crc << 1) ^ 0x1021;
           }
           else {
               crc = crc << 1;
           }
       }
   }

   return ((crc << 8 ) & 0xFF00) | ((crc >> 8) & 0xFF);
}

USER UART Data Packet

Get the hardware version number

+-------------+--------------------------------------------------------------------------+ | Frame type | "pG" | +-------------+--------------------------------------------------------------------------+ | Description | Obtain the hardware version number, including product name, sensor name, | | | software platform number, and module serial number. | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 0 | None | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 | see below | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ +-----------------------------+----------------------------------------------------------+ | Product name | e.g. OpenRTK330L | +-----------------------------+----------------------------------------------------------+ | Sensor name | e.g. OpenIMU330BI | +-----------------------------+----------------------------------------------------------+ e.g. 8350-3021-01 0.1.1 | +-----------------------------+----------------------------------------------------------+ | Module serial number(S/N) | e.g. 1975000001 | +-----------------------------+----------------------------------------------------------+

Get the software version number

+-------------+--------------------------------------------------------------------------+ | Frame type | "gV" | +-------------+--------------------------------------------------------------------------+ | Description | Obtain the software version number. | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 0 | None | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 | see below | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ +-------------+---------------+----------------------------------------------------------+ e.g. OpenRTK330L RAWDATA App 1.1.1 | +-----------------------------+----------------------------------------------------------+

Get user parameters

+-------------+--------------------------------------------------------------------------+ | Frame type | "gA" | +-------------+--------------------------------------------------------------------------+ | Description | Obtain all user parameters. | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 0 | None | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 | see below | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ +------+--------------+-------------------+------+---------------------------------------+ Variable type| Name | Unit | Description | +------+--------------+-------------------+------+---------------------------------------+ | 0 | uint16 | dataCRC | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 2 | uint16 | dataSize | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 4 | char * 2 | userPacketType[2] | | UART data: currently only "s1" | +------+--------------+-------------------+------+---------------------------------------+ | 6 | uint16 | userPacketRate | Hz | UART data frequency | +------+--------------+-------------------+------+---------------------------------------+ | 8 | float | leverArmBx | m +------+--------------+-------------------+------+the offset from the IMU navigation + | 12 | float | leverArmBy | m +------+--------------+-------------------+------+ + | 16 | float | leverArmBz | m | | +------+--------------+-------------------+------+---------------------------------------+ | 20 | float | pointOfInterestBx | m +------+--------------+-------------------+------+, user lever arm z: the offset from the+ | 24 | float | pointOfInterestBy | m +------+--------------+-------------------+------+user-defined point. + | 28 | float | pointOfInterestBz | m | | +------+--------------+-------------------+------+---------------------------------------+ | 32 | float | rotationRbvx | deg +------+--------------+-------------------+------+rotation angle from the IMU coordinate + | 36 | float | rotationRbvy | deg +------+--------------+-------------------+------+. + | 40 | float | rotationRbvz | deg | | +------+--------------+-------------------+------+---------------------------------------+ | 44 | uint8 | ethMode | +------+--------------+-------------------+------+---------------------------------------+ | 45 | uint8 * 4 | staticIp[4] | | Static IP: ipv4 | +------+--------------+-------------------+------+---------------------------------------+ | 49 | uint8 * 4 | netmask[4] | | subnet mask | +------+--------------+-------------------+------+---------------------------------------+ | 53 | uint8 * 4 | gateway[4] | | gateway | +------+--------------+-------------------+------+---------------------------------------+ | 57 | uint8 * 6 | mac[6] | | Mac address | +------+--------------+-------------------+------+---------------------------------------+ | 63 | char * 23 | ip[23] | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 86 | uint16 | port | | NTRIP port | +------+--------------+-------------------+------+---------------------------------------+ | 88 | char * 20 | mountPoint[20] | | NTRIP mount point: the software | | | | | | defaults to adding "/" in front | +------+--------------+-------------------+------+---------------------------------------+ | 108 | char * 16 | username[16] | | NTRIP username | +------+--------------+-------------------+------+---------------------------------------+ | 124 | char * 24 | password[24] | | NTRIP password | +------+--------------+-------------------+------+---------------------------------------+ | 148 | uint16 | can_ecu_address | | Can password | +------+--------------+-------------------+------+---------------------------------------+ | 150 | uint16 | can_baudrate | | Can baud rate: 250K, 500K, 1000K | +------+--------------+-------------------+------+---------------------------------------+ | 152 | uint16 | can_packet_type | | Can packet | +------+--------------+-------------------+------+---------------------------------------+ | 154 | uint16 | can_packet_rate | +------+--------------+-------------------+------+---------------------------------------+ | 156 | uint16 | can_termresistor | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 158 | uint16 | | | | +------+--------------+-------------------+------+---------------------------------------+

Set user parameters

+-------------+--------------------------------------------------------------------------+ | Frame type | "uP" | +-------------+--------------------------------------------------------------------------+ | Description | Set user parameters (only one parameter can be set at a time) | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 | see below | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ +------+--------------+-------------------+------+---------------------------------------+ | 0 | uint32 | parameter numbe | | | | | | | | | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 4 Parameter value | | Variable type see "gA" | +------+------+-------+-----+-------------+------+------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 4 | see below | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ +------+--------------+-------------------+------+---------------------------------------+ Variable type| Name | Unit | Description | +------+--------------+-------------------+------+---------------------------------------+ | 0 | int32 | Setting result | | | | | +------+--------------+-------------------+------+---------------------------------------+

Save user parameters

+-------------+--------------------------------------------------------------------------+ | Frame type | "sC" | +-------------+--------------------------------------------------------------------------+ | Description | Save user parameters | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 0 | None | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 0 | None | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ | If saving is successful, return as it is; if saving fails, return NAK frame | +----------------------------------------------------------------------------------------+

Failed frame

+-------------+------------------------------------------------------------------------------+ | Frame type | 0x15 0x15 | +-------------+------------------------------------------------------------------------------+ | Description | NAK frame | +-------------+-------------+-------------+-------------+-----------------+------------------+ Start | Frame type | Data length Check | + +-------------+-------------+-------------+-----------------+------------------+ | | 0x55 0x55 2 CRC_L CRC_H | +-------------+-------------+-------------+-------------+-----------------+------------------+

IMU raw data packet

+-------------+--------------------------------------------------------------------------+ | Frame type | "s1" | +-------------+--------------------------------------------------------------------------+ | Description | IMU raw data | +-------------+-------------+-------------+-------------+-------------+------------------+ | Data Frame | Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 36 | see below | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ +------+--------------+-------------------+------+---------------------------------------+ Variable type| Name | Unit | Description | +------+--------------+-------------------+------+---------------------------------------+ | 0 | uint32 | week | +------+--------------+-------------------+------+time + | 4 | double | timeOfWeek | s | | +------+--------------+-------------------+------+---------------------------------------+ | 12 | float * 3 | accel_g[3] | m/s^2| accelerometer(x,y,z) | +------+--------------+-------------------+------+---------------------------------------+ | 24 | float * 3 | rate_dps[3] | deg/s| gyroscope (x,y,z) | +------+--------------+-------------------+------+---------------------------------------+

Combined solution PVA packet

+-------------+--------------------------------------------------------------------------+ | Frame type | "pS" | +-------------+--------------------------------------------------------------------------+ | Description | position, speed, attitude | +-------------+-------------+-------------+-------------+-------------+------------------+ | Data Frame | Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 124 | see below | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ +------+--------------+-------------------+------+---------------------------------------+ Variable type| Name | Unit | Description | +------+--------------+-------------------+------+---------------------------------------+ | 0 | uint32 | week | +------+--------------+-------------------+------+time, accurate to milliseconds within a+ | 4 | double | timeOfWeek | s +------+--------------+-------------------+------+---------------------------------------+ | 12 | uint32 | positionMode | | | | | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 16 | double | latitude | deg | latitude | +------+--------------+-------------------+------+---------------------------------------+ | 24 | double | longitude | deg | longitude | +------+--------------+-------------------+------+---------------------------------------+ | 32 | double | height | m | height | +------+--------------+-------------------+------+---------------------------------------+ | 40 | uint32 | numberOfSVs | | Number of satellites | +------+--------------+-------------------+------+---------------------------------------+ | 44 | float | hdop | | horizontal component precision factor | +------+--------------+-------------------+------+---------------------------------------+ | 48 | float | differential_age | s | differential time difference | +------+--------------+-------------------+------+---------------------------------------+ | 52 | uint32 | vel_mode | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 56 | uint32 | insStatus | | | | | | | | | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 60 | uint32 | insPositionType | | | | | | | | | | | | | | | | | +------+--------------+-------------------+------+---------------------------------------+ | 64 | float | north_vel | m/s | speed (north) | +------+--------------+-------------------+------+---------------------------------------+ | 68 | float | east_vel | m/s | speed (east) | +------+--------------+-------------------+------+---------------------------------------+ | 72 | float | up_vel | m/s | speed (up) | +------+--------------+-------------------+------+---------------------------------------+ | 76 | float | roll | deg | roll angle | +------+--------------+-------------------+------+---------------------------------------+ | 80 | float | pitch | deg | pitch angle | +------+--------------+-------------------+------+---------------------------------------+ | 84 | float | heading | deg | yaw angle | +------+--------------+-------------------+------+---------------------------------------+ | 88 | float | latitude_std | | Latitude standard deviation | +------+--------------+-------------------+------+---------------------------------------+ | 92 | float | longitude_std | | Longitude standard deviation | +------+--------------+-------------------+------+---------------------------------------+ | 96 | float | height_std | | Height standard deviation | +------+--------------+-------------------+------+---------------------------------------+ | 100 | float | north_vel_std | | Speed ​​(north) standard deviation | +------+--------------+-------------------+------+---------------------------------------+ | 104 | float | east_vel_std | | Speed ​​(East) standard deviation | +------+--------------+-------------------+------+---------------------------------------+ | 108 | float | up_vel_std | | Speed ​​(up) standard deviation | +------+--------------+-------------------+------+---------------------------------------+ | 112 | float | roll_std | | roll angle standard deviation | +------+--------------+-------------------+------+---------------------------------------+ | 116 | float | pitch_std | | pitch angle standard deviation | +------+--------------+-------------------+------+---------------------------------------+ | 120 | float | heading_std | | yaw angle standard deviation | +------+--------------+-------------------+------+---------------------------------------+

Satellite information for positioning solution

+-------------+--------------------------------------------------------------------------+ | Frame type | "sK" | +-------------+--------------------------------------------------------------------------+ | Description | Satellite information | +-------------+-------------+-------------+-------------+-------------+------------------+ | Data Frame | Start | Frame type | Data length Check | + +-------------+-------------+-------------+-------------+------------------+ | | 0x55 0x55 21*n | see below | CRC_L CRC_H | +-------------+-------------+-------------+-------------+-------------+------------------+ +-------+-------------+-------------------+------+---------------------------------------+ Variable type| Name | Unit | Description | +-------+-------------+-------------------+------+---------------------------------------+ double | timeOfWeek | s | | | | +-------+-------------+-------------------+------+---------------------------------------+ uint8 | satelliteId | | atellite number | +-------+-------------+-------------------+------+---------------------------------------+ uint8 | systemId | | | | | +-------+-------------+-------------------+------+---------------------------------------+ uint8 | antennaId | | | | | +-------+-------------+-------------------+------+---------------------------------------+ uint8 | l1cn0 | | S/N ratio 1: L1 | +-------+-------------+-------------------+------+---------------------------------------+ uint8 | l2cn0 | | S/N ratio 2: L2 / L5 | +-------+-------------+-------------------+------+---------------------------------------+ float | azimuth | deg | azimuth | +-------+-------------+-------------------+------+---------------------------------------+ float | elevation | m | height | +-------+-------------+-------------------+------+---------------------------------------+