zaari / nmea-parser

Rust NMEA 0183 sentence parser for AIS and GNSS messages.
Apache License 2.0
40 stars 25 forks source link

Extending parser with proprietary sentences #36

Open jtojnar opened 2 years ago

jtojnar commented 2 years ago

I need to interact with a proprietary GPS logger that sends sentences like:

$PMTK182,8,0001F800,FFFFFFFFFFFFFF…FFFFF*52

Now I could wrap the parse_sentence function and handle those proprietary functions in the wrapper but I would have to duplicate code like checksum verification.

Possible solutions:

zaari commented 1 year ago

I would be in favor of the first option (ParseError::UnsupportedSentenceType). Feel free to make a pull request.