Port of Arduino TinyGPS library to mbed. Added extra methods to flag receipt/parsing of particular sentences.
Fork of TinyGPS by
Diff: TinyGPS.h
- Revision:
- 2:af534d51739f
- Parent:
- 0:8a347288f82c
--- a/TinyGPS.h Thu Apr 28 15:24:13 2011 +0000 +++ b/TinyGPS.h Wed May 10 07:23:27 2017 +0000 @@ -200,7 +200,9 @@ */ inline void reset_ready() { _gsv_ready = _rmc_ready = _gga_ready = false; } - enum {GPS_INVALID_AGE = 0xFFFFFFFF, GPS_INVALID_ANGLE = 999999999, GPS_INVALID_ALTITUDE = 999999999, GPS_INVALID_DATE = 0, + inline void reset_pos() { _latitude = _longitude = GPS_INVALID_ANGLE; _altitude = GPS_INVALID_ALTITUDE; } + + enum {GPS_INVALID_AGE = 0xFFFFFFFF, GPS_INVALID_ANGLE = 999999999, GPS_INVALID_ALTITUDE = 9999, GPS_INVALID_DATE = 0, GPS_INVALID_TIME = 0xFFFFFFFF, GPS_INVALID_SPEED = 999999999, GPS_INVALID_FIX_TIME = 0xFFFFFFFF}; private: @@ -211,7 +213,7 @@ unsigned long _date, _new_date; long _latitude, _new_latitude; long _longitude, _new_longitude; - long _altitude, _new_altitude; + int16_t _altitude, _new_altitude; unsigned long _speed, _new_speed; unsigned long _course, _new_course; unsigned long _hdop, _new_hdop; @@ -222,7 +224,7 @@ // parsing state variables byte _parity; bool _is_checksum_term; - char _term[15]; + char _term[1024]; byte _sentence_type; byte _term_number; byte _term_offset;