mikalhart / TinyGPSPlus

A new, customizable Arduino NMEA parsing library
http://arduiniana.org
1.05k stars 486 forks source link

Error parsing NMEA sentence with TinyGPSPlus #133

Open AlverGant opened 5 months ago

AlverGant commented 5 months ago

Hi,

Please help.

I have the following modem: Manufacturer: INCORPORATED Model: A7670SA-FASE Revision: A011B04A7670M7_F A7670M7_B04V02_220927 QCN: IMEI: 869731059073809 MEID: +GCAP: +CGSM,+FCLASS,+DS

I am trying to parse GPS data and it appears the modem is spilling a correct NMEA but parsing with tinyGPSPlus is giving me wrong coordinates...

Here is my startup GPS code

modem.sendAT("+CGDRT=4,1"); modem.sendAT("+CGSETV=4,0"); modem.sendAT("+CGNSSPWR=1,1"); modem.sendAT("+CGPS=0"); modem.sendAT("+CGNSSMODE=3"); modem.sendAT("+CGPSNMEA=1,1,1,1,1,1,0,0"); modem.sendAT("+CGPSNMEARATE=2"); modem.sendAT("+CGNSSTST=1"); modem.sendAT("+CGNSSPORTSWITCH=0,1");

Here is the NMEA string AT+CGNSSINFO +CGNSSINFO: 3,15,,05,07,22.9284973,S,43.1748390,W,190124,064019.00,110.3,2.196,,18.29,10.06,15.28, OK

But parsing with modem.getGPS(&lat, &lon) gives me wrong coordinates Latitude: -0.116667, Longitude: -0.000000

Also modem.getGPSTime(&year, &month, &day, &hour, &minute, &second) is giving me the wrong date Date: 2124-19-00, Time: 06:40:22

What could be wrong here

mikalhart commented 1 month ago

Hi @AlverGant,

That string

+CGNSSINFO: 3,15,,05,07,22.9284973,S,43.1748390,W,190124,064019.00,110.3,2.196,,18.29,10.06,15.28,

is not an NMEA string, and the methods you are calling are not TinyGPS++ methods. I think you need to post this question in the forum for your GSM (?) modem.