|
TinyRobotics
|
Parses NMEA sentences from GPS modules and extracts GPS data. More...
#include <NMEAParser.h>
Public Member Functions | |
| NMEAParser (GPSFormat fmt) | |
| bool | parse (const char *sentence, GPSCoordinate &gps) const |
| bool | parse (const std::string &sentence, GPSCoordinate &gps) const |
Protected Member Functions | |
| bool | parseGGA (const std::string &sentence, GPSCoordinate &gps) const |
| bool | parseRMC (const std::string &sentence, GPSCoordinate &gps) const |
| std::vector< std::string > | split (const std::string &str, char delim) |
Static Protected Member Functions | |
| static bool | safe_stof (const std::string &s, float &out) |
| static bool | safe_stoi (const std::string &s, int &out) |
Protected Attributes | |
| GPSFormat | format |
Parses NMEA sentences from GPS modules and extracts GPS data.
The NMEAParser class supports parsing of common NMEA sentences such as GGA (fix data) and RMC (recommended minimum), converting them into structured GPSCoordinate objects.
Features:
Example usage: