huming2207 / on9nmea

Dumb & Tiny (1.1KB) FSM-based NMEA parser for embedded devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On9 NMEA

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.

Usage

  1. Copy on9nmea.c and on9nmea.h to your project, or clone this repo as a submodule
  2. Initialise the context by on9_nmea_init()
  3. Call on9_nmea_feed_char() till it returns ON9_NMEA_STATE_DONE or ON9_NMEA_STATE_ERROR_*

Size

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

License

MIT or Apache-2.0

About

Dumb & Tiny (1.1KB) FSM-based NMEA parser for embedded devices


Languages

Language:C 98.2%Language:CMake 1.8%