1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/nmeaparser.h

44 lines
1.1 KiB
C
Raw Normal View History

2016-11-16 23:54:15 +01:00
#ifndef NMEAPARSER_H
#define NMEAPARSER_H
#include <QDate>
#include "parser.h"
class NMEAParser : public Parser
{
public:
NMEAParser(QList<TrackData> &tracks, QList<RouteData> &routes,
QList<Waypoint> &waypoints) : Parser(tracks, routes, waypoints)
{_errorLine = 0; _GGA = false;}
~NMEAParser() {}
bool loadFile(QFile *file);
QString errorString() const {return _errorString;}
int errorLine() const {return _errorLine;}
private:
2016-11-22 00:13:41 +01:00
bool readEW(const char *data, int len, qreal &lon);
bool readLon(const char *data, int len, qreal &lon);
bool readNS(const char *data, int len, qreal &lat);
bool readLat(const char *data, int len, qreal &lat);
bool readDate(const char *data, int len, QDate &date);
bool readTime(const char *data, int len, QTime &time);
bool readAltitude(const char *data, int len, qreal &ele);
bool readGeoidHeight(const char *data, int len, qreal &gh);
2016-11-16 23:54:15 +01:00
bool readRMC(const char *line, int len);
bool readGGA(const char *line, int len);
bool readWPL(const char *line, int len);
bool readZDA(const char *line, int len);
int _errorLine;
QString _errorString;
QDate _date;
2016-11-22 00:13:41 +01:00
QTime _time;
2016-11-16 23:54:15 +01:00
bool _GGA;
};
#endif // NMEAPARSER_H