NMEA 0183 sentence checksum for GPS and marine navigation systems. XOR of all characters between ‘$’ and ‘’ delimiters. Standard protocol format: $…data…CC where CC is 2-digit hex checksum. Used in marine electronics worldwide.
| Property | Value |
|---|---|
| Category | Checksums |
| Sub-category | Navigation Protocol |
| Security status | 🎓 Educational Only |
| Complexity | Beginner |
| Inventor | National Marine Electronics Association |
| Year | 1983 |
| Origin | 🇺🇸 United States |
| Source | algorithms/checksum/nmea-0183.js |
Status: 🎓 Educational Only
No vulnerabilities are recorded for this implementation.
3 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — GPRMC sentence
| Field | Value |
|---|---|
input |
4750524d432c3132333531392c412c34 3830372e3033382c4e2c30313133312e 3030302c452c3032322e342c3038342e 342c3233303339342c3030332e312c57 |
expected |
6a |
Vector 2 — GPGGA sentence
Source: NMEA sentence checksum
| Field | Value |
|---|---|
input |
47504747412c3132333531392c343830 372e3033382c4e2c30313133312e3030 302c452c312c30382c302e392c353435 2e342c4d2c34362e392c4d2c2c |
expected |
47 |
Vector 3 — Simple test
Source: XOR checksum
| Field | Value |
|---|---|
input |
54455354 |
expected |
16 |