Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Nmea0183 Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-nmea0183-knowledge-patch)
---
name: nmea0183-knowledge-patch
description: NMEA 0183
version: "4.30"
license: MIT
metadata:
author: Nevaberry
---
# NMEA 0183 Knowledge Patch
Use this skill when wiring NMEA interfaces, parsing navigation sentences,
configuring receiver output, integrating OpenCPN, or capturing GNSS and
NMEA 2000 traffic. The references contain sentence layouts, receiver-specific
commands, motion conventions, and parser and capture-tool behavior.
## Reference index
| Reference | Topics |
| --- | --- |
| [Protocol and Wiring](references/protocol-and-wiring.md) | Electrical limits, polarity, isolation, checksums, queries, high-speed ports, NMEA 2000 wiring and capture |
| [GNSS and Receiver Output](references/gnss-and-receiver-output.md) | GNSS sentence changes, EBP, GGA source profiles, talker selection, PPS, NTRIP, receiver configuration |
| [Sentences and Navigation Semantics](references/sentences-and-navigation.md) | Bearings, routes, steering, legacy fixes, vessel measurements, SafetyNET distress |
| [OpenCPN Integration](references/opencpn-integration.md) | Core and Dashboard inputs, waypoint transfer, heading, radar, buddy and DSC positions |
| [Garmin and SiRF Extensions](references/garmin-and-sirf.md) | PGRM and PSRF configuration, output selection, diagnostics, ephemeris, timing, beacon data |
| [Inertial, Attitude, and Motion Output](references/inertial-and-motion.md) | sbgECom classes, INS quality, aiding data, proprietary attitude and motion layouts |
| [Parsers and Tools](references/parsers-and-tools.md) | Rust nmea0183, Hazer decoding, gpstool capture and routing, RTCM, CSV and JSON, build setup |
## Compatibility changes and receiver variants
- When upgrading to NMEA 0183 v4.30, review GNSS decoders against its revised
definitions. Use its expanded GNSS Identification Table for signal
identification, including RINEX observation codes.
- Release 2.102.3 aligned GGA talker IDs with NMEA 0183 v4.11. Legacy
`NMEA-GP-GGA_*` profiles can still carry multi-constellation data under `GP`;
the prefix alone does not establish a GPS-only fix.
- Older `GLL` can end after the longitude hemisphere, without UTC or validity.
On a v1.5 `APB` input path, allow an omitted checksum and validate any present.
- Legacy `PGRMC` field 11 uses `2` for no filtering. Revision C uses `0` for
no velocity filter, `1` for automatic, and `2`–`255` for seconds of filtering.
Revision C leaves fields 12–13 empty and puts dead-reckoning validity in 14.
- The altitude-source `PGRMZ` layout ends with `2` for user-entered altitude or
`3` for GPS altitude. Revision C instead defines fix type after `f`:
`1` no fix, `2` 2D, `3` 3D; its extra printed placeholder is unspecified.
## Wiring and physical ports
- Connect talker `A/+` to listener `A/+` and `B/-` to `B/-`. At idle and logic
`1`, A is negative relative to B; logic `0` makes A positive relative to B.
- A v2.0+ listener must be opto-isolated, receive 2.0 V differential while
drawing at most 2.0 mA at that voltage, and withstand ±15 V differential.
- Use shielded twisted pair; bond each listener cable shield to the talker
chassis only. Talkers drive during idle, so combine them through separate
multiplexer inputs. Use a buffer if listener load exceeds the drive rating.
- For a single-ended talker, connect data to `RX A/+` and signal ground to
`RX B/-`. Check the physical port even if it emits v2.0+ sentences.
- For a ground-referenced differential talker feeding a single-ended listener,
connect `TX A/+` to data and connect signal grounds, leaving `TX B/-` open.
Use `B/-` as the return only when the output is explicitly rated for it.
- Use an opto-isolated NMEA-to-RS-232 adapter or isolated NMEA-to-USB interface
to keep computer and instrument signal grounds separate.
- NMEA 0183-HS uses 38,400 baud for AIS and ARPA. Some equipment also offers
115,200 baud; configure both ends for a rate supported by the actual ports.
## Framing, checksums, and sentence length
- Verify raw sentences before normalizing fields. The documented `VTG`
receiver places a literal ASCII space in magnetic course; it affects checksum.
- Query addressing puts requester ID first, addressed talker ID second, then
`Q`, a comma, and the requested mnemonic. In the documented GPS example,
`$CCGPQ,GGA` with `\r\n` requests GGA once per second until another query.
- `PGRM` configuration inputs accept empty fields for unchanged settings and
shortened sentences. Their checksum is optional; supplied hex is uppercase.
End commands with `\r\n`.
- `PSRF` commands require all required fields, a two-digit checksum, and
`\r\n`. `PSRF103` output-checksum control does not remove that input requirement.
- High-precision `NMEA-GN-GGA_*` output can exceed 82 characters. The documented
sbgECom `PSBGB`, `PHOCT`, `INDYN`, and `PTNL,GGK` frames can also exceed
82 characters including terminators; size the buffer for configured output.
## GNSS source, quality, height, and timing
- Enable one GGA source per port: the `NMEA-GN-GGA_*` source suffix is absent
on the wire. The combined `NMEA-GN-GGA_GNSS` requires valid fixes from both
receivers, averages time and position, and takes fix type, satellite count,
and DOP from the best receiver.
- `NMEA-GN-GGA_FUSION` reports receiver fix quality while fusion uses GNSS,
`6` during dead reckoning, and `0` when fusion is invalid, including before
initialization even with a valid receiver fix.
- `NMEA-GN-GGA_*` height is ellipsoidal and both geoid-separation fields are
empty. Strict output limits satellite count to 12; high precision allows 99.
- `NMEA-GN-GGA_GNSS1TOS` emits strict GGA at 1 Hz on the GNSS1 second boundary
regardless of high precision. Use it, or corresponding RMC/ZDA TOS output,
with GNSS1 PPS.
- `NMEA-GN-GGA_NTRIP` uses strict 1 Hz output and a position retained for up
to 30 seconds, preferring GNSS1, GNSS2, then fusion. Use it to request a
virtual reference station; quality, satellite count, and DOP are synthetic.
- On receivers with `NMEATALKER`, factory `GP` restricts affected logs to GPS.
Use `AUTO` for multi-constellation output from `GPGLL`, `GPGRS`, `GPGSA`,
`GPGST`, `GPGSV`, `GPRMC`, and `GPVTG`. The reference gives the inertial and
fixed-talker exceptions, including `GPGGA` retaining `GP`.
- On the integrated GNSS/INS receiver, `GPGGA` uses `BESTPOS`, which can include
INS. Use the `BESTPOS` position type to identify it; INS GGA DOP updates at
1 Hz even if logged faster. `TIME` UTC status `VALID` identifies real almanac
parameters for `GPGGA` and `GPRMC`; both use the receiver's `DATUM` setting.
- In that receiver's `GPGGA`, `9` means WAAS/SBAS. TerraStar-L PPP uses `1`/`2`
for converging/converged; TerraStar-C PRO and TerraStar-X use `2`/`5`.
Read `BESTPOS` to distinguish these from single-point, differential, and RTK float fixes.
## Navigation and steering
- `BOD` gives fixed active-leg bearings; in GOTO mode its origin can be empty
and its bearing is from GOTO activation. `BWC` bearings use current position.
- With an active destination, `RMB` field 12 is closing velocity in knots:
`SOG × cos(COG − bearing)`, with a common angular reference. Arrival in
field 13 is separate from the receiver status in field 1.
- `APB` fields 8, 11, and 13 are origin-to-destination bearing, present-position
bearing to destination, and heading to steer, each with its following `M`/`T`.
Some autopilots interpret field 8 as present-position bearing and can steer
incorrectly off course.
- `RTE` fragment numbers are one-based. For working mode `w`, the OpenCPN
manual includes the departed waypoint; the APRS reference starts at destination.
- `STN` identifies the immediately following sentence's source, using `00`–`99`.
`VBW` water and ground velocity pairs have independent validity fields.
- In the documented v2.3 mode profile, only `A` and `D` indicate reliable data;
`E`, `N`, `S`, and empty mean estimated, invalid, simulated, and unspecified.
## OpenCPN integration
- The core skips `BOD` and received `RTE`, while GPS uploads send `WPL` and
`RTE`. Enable **Treat WPL sentences as APRS position reports** in AIS settings
to convert incoming `WPL` to AIS-APRS position reports.
- Variation comes from `HDG` when magnitude and `E`/`W` are present, otherwise
`RMC`, then configured manual variation or WMM. `THS` uses only mode `A`.
- Radar `TTM` and `TLL` pass through the AIS target decoder. Negative `TTM`
time to closest approach means opening; `TLL` ignores target number and
reference-target fields.
- Dashboard legacy `MDA` reads only pressure in bars from the second value/unit
pair, accepting 0.8–1.1. Use `XDR` for supported temperature and attitude;
its documented names and type/unit combinations are in the reference.
## Receiver commands and output control
- `PGRMI` restarts acquisition. `PGRMIE`, `PGRMCE`, and `PGRMC1E` query defaults;
successful updates echo input and errors echo current defaults. `PGRMC` and
`PGRMC1` settings persist across power cycles.
- Revision C `PGRMC` baud changes apply on the next power cycle or external
reset; other accepted changes apply on receipt. `PGRMC1` binary-phase
changes apply after reset or power cycle; its other changes apply immediately.
- `PGRMO` mode `4` restores factory output selection. Enabling `GPALM` sends
the stored almanac while suspending other sentences. Mode `G` switches to
the receiver's data-transfer protocol until the next power cycle.
- In binary mode, use binary message ID `129` to switch to NMEA before `PSRF`
commands. `PSRF100` and supported `PSRF102` save accepted settings to
battery-backed memory and restart immediately; binary serial mode requires 8N1.
- `PSRF103` periods count seconds normally and wake cycles in TricklePower.
Mode `1` queries once, mode `0` sets rate, and period `0` disables output.
## Inertial, attitude, and motion decoding
- sbgECom uses class `0x02` for standard outputs and `0x03` for proprietary
outputs. Set the output talker per interface; incoming aiding ignores talker.
- sbgECom INS quality derives from estimated horizontal position standard deviation;
an unaligned INS can report GGA quality `0` despite a receiver RTK fix.
INS horizontal DOP derives from north/east position standard deviations. The reference gives
the complete GGA/GGK/mode/RMC-status mapping and thresholds.
- sbgECom `VBW` needs valid DVL bottom and water tracks. Its positive body
directions are forward and starboard. `DPT` needs valid external pressure data
and reports surface-referenced depth positive down, with offset/range empty.
- sbgECom `ROT` needs valid roll, pitch, and heading; otherwise rate is empty
and status is `V`. Positive rate is clockwise around the down axis in °/min.
- For sbgECom `PASHR`, configured log ID `2` makes heave positive down and
`12` positive up. `PHLIN` surge/sway/heave are positive forward/port/up.
`PHOCT` pitch is positive bow down; `PSBGA` pitch is positive bow up.
- `PSBGI` direct IMU samples retain sensor bias, Earth rotation, and gravity.
`PSBGB` supplies compensated body rates. See the reference for their status
fields, axis signs, timing, and documented template differences.
## Streaming parsers and capture tools
- With Rust `nmea0183` 0.6.0, keep one `Parser::new()` per stream and feed raw
bytes. `parse_from_bytes(&[u8])` retains partial sentences across chunks.
After a format error, continue feeding the same parser instance.
- The Rust `strict` sentence limit is 79 characters; without `strict` it is
120. The public Galileo source variant is `Source::Gallileo`. Verify GSA/GSV
decoders with receiver input if needed: the overview lists them as planned.
- For Hazer C parsing, check the return first: nonnegative means valid input
and updated structures; negative with `errno == 0` is valid without a
solution and leaves structures untouched; negative with positive `errno`
means invalid input. Prefer GSA System ID over satellite-number inference.
- `gpstool` uses `-C FILE` for raw input, `-Q FILE` for validated frames,
`-G :PORT` to receive UDP, and `-G HOST:PORT` to forward validated frames.
Protocol masks are NMEA=1, UBX=2, RTCM=4, CPO=8; 15 accepts all four.
- `gpstool` CSV traces write unavailable values as `0.`. `csv2dgm -j` forwards a subset
as JSON; `csvfollow` follows live traces and `csvplayback` replays recordings.
## NMEA 2000 capture and transport
- A single backbone allows up to 50 devices, 6 m per drop, and 78 m of total
drops. Micro backbone cable can run up to 100 m; count drops separately.
- Power the backbone from grounded 9–16 V DC. Mini cable is rated up to 8 A,
Micro with a five-pin M12 connector up to 3 A; use cable ratings for sizing.
- Fast Packet carries up to 223 payload bytes. Group by CAN identifier and
sequence counter in byte 0, order by its frame counter, strip transport
bytes, and pass the payload length declared in frame 0's byte 1 to decoding.
- Engine gateways may publish only a subset of J1939 data. Decode original
J1939 PGNs with a J1939 DBC. For missing engine PGNs, capture the diagnostic
bus on a separate CAN input after verifying the diagnostic connector pinout.