pynmeagps is an original Python 3 parser aimed primarily at the subset of the NMEA 0183 © v4 protocol relevant to GNSS/GPS receivers. It provides functionalities for both parsing incoming NMEA messages from various streams (e.g., serial, socket, file) and generating outbound NMEA messages. The library is actively maintained, currently at version 1.1.2, with regular updates and bug fixes.
pip install pynmeagpsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to parse an NMEA message from a string using `NMEAReader.parse()` and how to construct a new NMEA message using the `NMEAMessage` class. It includes basic error handling and illustrates accessing parsed attributes and generating checksummed NMEA output. Note that NMEA messages should generally be byte strings (e.g., `b'$GPGGA...'`).
Use the standard Python iterator pattern directly on the `NMEAReader` object. E.g., `for raw, parsed in NMEAReader(stream): ...`
Install the `pygnssutils` package (`pip install pygnssutils`) and use its `gnssdump` utility.
Ensure your project uses Python 3.10 or later (currently requires Python >=3.10).
From release 1.0.41 onwards, unknown messages can be parsed to a nominal structure by *not* setting the `VALMSGID` flag. For user-defined proprietary messages, pass a `userdefined` dictionary to `NMEAReader` or `NMEAReader.parse()`.
Either disable `VALMSGID` validation (e.g., `validate=VALCKSUM`) to parse it to a nominal structure, or provide a `userdefined` payload definition dictionary if it's a proprietary message.
Replace calls to `NMEAReader.iterate()` with direct iteration over the `NMEAReader` object itself (e.g., `for raw, parsed in nmr: ...`).
Version 1.1.2 includes a workaround for this specific Unicore firmware error. Update to `pynmeagps` version 1.1.2 or later.
No dependency data recorded yet.