summaryrefslogtreecommitdiff
path: root/crc24q.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2008-06-30 21:41:39 +0000
committerEric S. Raymond <esr@thyrsus.com>2008-06-30 21:41:39 +0000
commitbf807d59c3bfe5ef654a7c10d45156ecdf3f88ee (patch)
treec3bcaca6333f7bf85f084474bd9cb5c81f00855c /crc24q.c
parentf13358016c59bc91b5b0753554ccc1d535160d62 (diff)
downloadgpsd-bf807d59c3bfe5ef654a7c10d45156ecdf3f88ee.tar.gz
Document the error polynomial.
Diffstat (limited to 'crc24q.c')
-rw-r--r--crc24q.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crc24q.c b/crc24q.c
index cabc5da1..d7c3fbe1 100644
--- a/crc24q.c
+++ b/crc24q.c
@@ -1,7 +1,11 @@
/*
* This is an implementation of the CRC-24Q cyclic redundancy checksum
- * used by Qualcomm, Nokia, and RTCM104V3. According to the RTCM104V3
- * standard,
+ * used by Qualcomm, RTCM104V3, and PGP 6.5.1. According to the RTCM104V3
+ * standard, it uses the error polynomial
+ *
+ * x^24+ x^23+ x^18+ x^17+ x^14+ x^11+ x^10+ x^7+ x^6+ x^5+ x^4+ x^3+ x+1
+ *
+ * This corresponds to a mask of 0x1864CFB.
*
* 1) It detects all single bit errors per 24-bit code word.
* 2) It detects all double bit error combinations in a code word.