Files
mavlink-devguide/en/guide/crc.md
T
Hamish Willee b6c49b2cd1 Test migration to vitepress (#551)
* Add package/.vitepress folders - more work to be done

* Fix up config and add site/favicons

* Update styles for wide tables

* Rename English files from README.md to index.md

* Add root home page

* Update .gitignore for vitepress

* Delete unused: travis, book, redirects

* Fix up all Notes

* Warnings and notes - convert to github format

* Add running workflow

* Add yarn lock file

* Fix up links README.md to index.md

* Add lock files
2024-11-27 16:59:53 +11:00

1.3 KiB

MAVLink CRC

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

Note

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.

Note

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.

Implementations

This implementation is currently used in: