mikalhart / TinyGPS

A compact Arduino NMEA (GPS) parsing library
http://arduiniana.org
387 stars 257 forks source link

TinyGPS Not recognizing sentences #21

Closed fscii closed 3 years ago

fscii commented 4 years ago

Arduino UNO R3 Serial GPS @ 9600 Running Example: simple_test

Results: Simple TinyGPS library v. 13 by Mikal Hart $GPTXT,01,01,02,ANTSTATUS=OK*3B $GNRMC,012413.00,A,4327.6782,N,07238.9898,W,4.403,,280220,,,A,V*0D $GNGGA,012413.00,4327.6782,N,07238.9898,W,1,05,4.66,430.1,M,,M,,*4B $GNGLL,4327.6782,N,07238.9898,W,012413.00,A,A*67 $GNGSA,A,3,17,03,06,28,22,,,,,,,,4.76,4.66,1.00,1*08 $GNGSA,A,3,,,,,,,,,,,,,4.76,4.66,1.00,4*04 $GPGSV,2,1,08,01,13,052,,03,40,072,18,06,48,237,20,12,03,319,,0*64 $GPGSV,2,2,08,17,73,021,17,19,63,314,,22,24,050,18,28,55,161,24,0*61 $GBGSV,1,1,00,0*77 $GNVTG,,T,,M,4.403,N,8.155,K,A*37 CHARS=511 SENTENCES=0 CSUM ERR=0

With 0 checksum errors and sentences looking well formed (to me), what is wrong?!

Thank you in advance for help. I really need this to work.

(running the "test_with_gps_device" example results in all * * etc.

prlombaard commented 4 years ago

@fscii i had the same issue. The reason is because the GPS you are connecting is configured to receive GLONAS messages.

In TinyGPS.cpp change the define statements at the top to

define _GPRMC_TERM "GNRMC"

define _GPGGA_TERM "GNGGA"

fscii commented 3 years ago

@prlombaard Sorry I didn't see this for so long but thank you for the info. I just went back to revisit some GPS code and came across your answer before I got started. Thanks again!

PS: If author is looking I'd like to suggest moving these defines into the users code so library source doesn't need to be touched.