kosma/minmea logo

kosma/minmea

Free

a lightweight GPS NMEA 0183 parser library in pure C

FreeFree tier
Type
Open Source

About kosma/minmea

Minmea is a minimalistic GPS NMEA 0183 parser library written in pure C (ISO C99) designed for resource-constrained platforms such as microcontrollers and embedded systems. It requires no dynamic memory allocation and uses no floating point in the core library, offering both fixed and floating point value support. The library is distributed as a single source file and header, making integration trivial. It has been tested on Linux, macOS, Windows, and embedded ARM GCC, and includes a test suite and static analysis. Supported NMEA sentences include GBS, GGA, GLL, GSA, GST, GSV, RMC, VTG, and ZDA, and extending support for additional sentences is straightforward.

Key Features

Written in ISO C99
No dynamic memory allocation
No floating point usage in the core library
Supports both fixed and floating point values
Single source file and header for simple integration
Tested on Linux, macOS, Windows, and embedded ARM GCC
Easily extendable to support new NMEA sentences
Complete with a test suite and static analysis

Pros & Cons

Pros
  • Extremely lightweight with no dependencies
  • No dynamic memory allocation ensures predictable behavior
  • No floating point usage in core reduces hardware requirements
  • Easy to integrate (single .c and .h file)
  • Well-tested across multiple platforms
  • Extensible sentence support
  • Includes static analysis and test suite
Cons
  • Only supports NMEA 0183 protocol (not NMEA 2000 or binary protocols)
  • Coordinate format (DDMM.MMMM) requires manual conversion to more common formats
  • Limited to GPS data; no support for GLONASS or other constellations directly
  • Requires users to handle serial I/O separately

Best For

Parsing GPS data on microcontrollers and embedded systemsReading NMEA 0183 sentences from GPS receivers in resource-constrained environmentsIntegrating GPS functionality into IoT devices or low-power hardwareLightweight GPS parsing for applications where memory is limited

FAQ

What are the key features of minmea?
Minmea is written in ISO C99, uses no dynamic memory allocation, avoids floating point in the core library, supports both fixed and floating point values, and consists of a single source file and header. It is tested on Linux, OS X, Windows, and embedded ARM GCC, and includes a test suite and static analysis.
Which NMEA sentences does minmea support?
Minmea supports GBS (Satellite Fault Detection), GGA (Fix Data), GLL (Geographic Position), GSA (DOP and active satellites), GST (Pseudorange Noise Statistics), GSV (Satellites in view), RMC (Recommended Minimum), VTG (Track made good and Ground speed), and ZDA (Time Date). Adding support for more sentences is trivial.
Is minmea suitable for microcontrollers?
Yes, minmea is designed for resource-constrained platforms, especially microcontrollers and embedded systems. It requires no dynamic memory allocation and uses no floating point in the core library.
How can I extend minmea to support additional NMEA sentences?
Extending minmea is straightforward; you can add new sentence parsers by following the patterns in the minmea.c source file. The library is designed to be easily extendable.