From e8e2be5bbf06d6cbe2ae25d895778fee6cd5f807 Mon Sep 17 00:00:00 2001 From: Aldric-shield Date: Tue, 4 Oct 2022 11:54:28 +0200 Subject: [PATCH] Added GLRMC and GLGGA support --- src/TinyGPS++.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TinyGPS++.cpp b/src/TinyGPS++.cpp index e1ec777..5a66ff9 100644 --- a/src/TinyGPS++.cpp +++ b/src/TinyGPS++.cpp @@ -31,6 +31,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define _GPGGAterm "GPGGA" #define _GNRMCterm "GNRMC" #define _GNGGAterm "GNGGA" +#define _GLRMCterm "GLRMC" +#define _GLGGAterm "GLGGA" TinyGPSPlus::TinyGPSPlus() : parity(0) @@ -209,9 +211,9 @@ bool TinyGPSPlus::endOfTermHandler() // the first term determines the sentence type if (curTermNumber == 0) { - if (!strcmp(term, _GPRMCterm) || !strcmp(term, _GNRMCterm)) + if (!strcmp(term, _GPRMCterm) || !strcmp(term, _GNRMCterm) || !strcmp(term, _GLRMCterm)) curSentenceType = GPS_SENTENCE_GPRMC; - else if (!strcmp(term, _GPGGAterm) || !strcmp(term, _GNGGAterm)) + else if (!strcmp(term, _GPGGAterm) || !strcmp(term, _GNGGAterm) || !strcmp(term, _GLGGAterm)) curSentenceType = GPS_SENTENCE_GPGGA; else curSentenceType = GPS_SENTENCE_OTHER;