NMEA 0183 (National Marine Electronics Association) is the communication standard for devices used in marine environments as an aid to navigation. The most common use outside of marine environments is for GPS devices, which use NMEA to broadcast their position.
I wrote this library for Loguino in order to provide global positioning metrics to the logger. For Loguino 2.0 I needed to simplify the build, which means moving non-core libraries into their own packages, a lot of people also use the libraries on their own without Loguino, so it’s about time this was the case.
The code is available on GitHub, under the GPL.
bool addChar(const char c)
Add a character from the gps stream. Returns True when a valid NMEA sentence has been completed. Generally you want to loop through all the data in the serial buffer and call addChar with the output of serial.read() until it returns true. At which point you can interrogate the NMEA object to determine if the fix is valid and then grab the location information if required.
Returns true when the GPS has a valid fix.
Returns the course in degrees.
Returns the speed in Knots.
Returns the latitude.
Returns the longitude
Returns the date as a string.
Returns the time as a string.