zaari / nmea-parser

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

Parsed UTC timestamps using local date instead of GPS date #24

Open DragynSlayer opened 2 years ago

DragynSlayer commented 2 years ago

I have a receiver that sends multiple messages with GPS/UTC time. When parsing the timestamp field returns the correct h/m/s, but not the correct date in most cases. (Appends the local computer date) This is most apparent when testing on a machine where the actual date is not the same as the real GPS/UTC date.

The RMC message does parse and return the correct date in the timestamp while the GLL and GGA messages ignore the date. The NMEA string appears to have the same UTC format, but the message parsers here use different utility functions. There may be additional instances in messages I'm not receiving.

zaari commented 2 years ago

That's a good find. @richardeoin, feel free to make a PR for this project.