Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing NMEA sentence with TinyGPSPlus #133

Open
AlverGant opened this issue Jan 19, 2024 · 1 comment
Open

Error parsing NMEA sentence with TinyGPSPlus #133

AlverGant opened this issue Jan 19, 2024 · 1 comment

Comments

@AlverGant
Copy link

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
Copy link
Owner

mikalhart commented May 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants