MAVLink services that need to use a Cyclic Redundancy Check (CRC) should choose the CRC32 algorithm described below.
Using the same CRC implementation for all cases means that only one implementation is required. Do not introduce another unless there without a compelling technical reason.
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
- Missing final XOR out operation with
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: