Skip to content

Error parsing NMEA sentence with TinyGPSPlus #133

@AlverGant

Description

@AlverGant

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions