Dumb & tiny state machine based NMEA parser
"On 9" is an informal abbreviation of "戆鸠" in Cantonese, which means "dumb"
This library does NOT have any C standard library used. Only size_t
and uintXX_t
types used.
Currently, this library only supports RMC and GGA sentences.
- Copy
on9nmea.c
andon9nmea.h
to your project, or clone this repo as a submodule - Initialise the context by
on9_nmea_init()
- Call
on9_nmea_feed_char()
till it returnsON9_NMEA_STATE_DONE
orON9_NMEA_STATE_ERROR_*
As of commit 99b8ee66eabf6, compiled with ESP-IDF v5.1.2 + esp-12.2.0_20230208 toolchain for ESP32-S3 in -Os
:
.text
- 1119 bytes
.rodata
- 44 bytes
MIT or Apache-2.0