Skip to content

Commit ba91ede

Browse files
committed
Adding support for Glonass sentences
Now works with GNRMC and GNGGA sentences.
1 parent 88c9db5 commit ba91ede

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

TinyGPS++.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2828
#include <stdlib.h>
2929

3030
#define _GPRMCterm "GPRMC"
31+
#define _GNRMCterm "GNRMC"
3132
#define _GPGGAterm "GPGGA"
33+
#define _GNGGAterm "GNGGA"
3234

3335
TinyGPSPlus::TinyGPSPlus()
3436
: parity(0)
@@ -209,8 +211,12 @@ bool TinyGPSPlus::endOfTermHandler()
209211
{
210212
if (!strcmp(term, _GPRMCterm))
211213
curSentenceType = GPS_SENTENCE_GPRMC;
214+
else if (!strcmp(term, _GNRMCterm))
215+
curSentenceType = GPS_SENTENCE_GPRMC;
212216
else if (!strcmp(term, _GPGGAterm))
213217
curSentenceType = GPS_SENTENCE_GPGGA;
218+
else if (!strcmp(term, _GNGGAterm))
219+
curSentenceType = GPS_SENTENCE_GPGGA;
214220
else
215221
curSentenceType = GPS_SENTENCE_OTHER;
216222

0 commit comments

Comments
 (0)