Skip to content

Commit

Permalink
Support BDRMC and BDGGA terms
Browse files Browse the repository at this point in the history
  • Loading branch information
titan098 committed Apr 13, 2024
1 parent 964f75a commit 92c5551
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/TinyGPS++.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define _GAGGAterm "GAGGA"
#define _GLRMCterm "GLRMC"
#define _GLGGAterm "GLGGA"
#define _BDRMCterm "BDRMC"
#define _BDGGAterm "BDGGA"

TinyGPSPlus::TinyGPSPlus()
: parity(0)
Expand Down Expand Up @@ -304,9 +306,9 @@ bool TinyGPSPlus::endOfTermHandler(bool termIsNotEmpty)
// the first term determines the sentence type
if (curTermNumber == 0)
{
if (!strcmp(term, _GPRMCterm) || !strcmp(term, _GNRMCterm) || !strcmp(term, _GARMCterm) || !strcmp(term, _GLRMCterm))
if (!strcmp(term, _GPRMCterm) || !strcmp(term, _GNRMCterm) || !strcmp(term, _GARMCterm) || !strcmp(term, _GLRMCterm) || !strcmp(term, _BDRMCterm))
curSentenceType = GPS_SENTENCE_GPRMC;
else if (!strcmp(term, _GPGGAterm) || !strcmp(term, _GNGGAterm) || !strcmp(term, _GAGGAterm) || !strcmp(term, _GLRMCterm))
else if (!strcmp(term, _GPGGAterm) || !strcmp(term, _GNGGAterm) || !strcmp(term, _GAGGAterm) || !strcmp(term, _GLGGAterm) || !strcmp(term, _BDGGAterm))
curSentenceType = GPS_SENTENCE_GPGGA;
else if (!strcmp(term, _GPGSVterm))
curSentenceType = GPS_SENTENCE_GPGSV;
Expand Down

0 comments on commit 92c5551

Please sign in to comment.