Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.3 KB

File metadata and controls

31 lines (20 loc) · 1.3 KB

MAVLink CRC

MAVLink services that need to use a Cyclic Redundancy Check (CRC) should choose the CRC32 algorithm described below.

:::info Using the same CRC implementation for all cases means that only one implementation is required. Do not introduce another unless there is a compelling technical reason. :::

:::info This CRC is used for higher level services (it is not related to the CRC16 used for the checksum in MAVLink serialization). :::

CRC32 Algorithm

The CRC32 algorithm used by MAVLink is similar to (but different from) the ISO 3309 standard based on the polygon 0x04C11DB7. It is commonly referred to as "the CRC32 based on Gary Brown's work".

The difference of MAVLink's implementation versus the standard are:

  • Start at 0 instead of 0xFFFFFFFF.
  • Missing final XOR out operation with 0xFFFFFFFF.

The effects of the initial value and final XOR operation are documented in this brief tutorial on CRC computation of the Linux kernel.

구현

This implementation is currently used in: