mikalhart / TinyGPSPlus

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

GPRMC won't parse #80

Closed Flupke1979 closed 3 years ago

Flupke1979 commented 3 years ago

Hello, Hope you can help me. I am using ai thinker A9G module. TinyGPS++ only parses the GPGGA sentence when the GPS sends all sentences. I get LAT, LON and Height, but no speed or date. When I process them 1 by 1 in a terminal program it works.

Sentence dump from GPS: +GPSRD:$GPGGA,172356.000,5051.8430,N,00510.3105,E,1,7,1.23,32.6,M,47.4,M,,62 $GPGSA,A,3,06,02,09,26,07,04,16,,,,,,1.53,1.23,0.9001 $GPGSV,3,1,12,09,71,066,14,07,51,161,18,02,45,280,20,06,45,214,1672 $GPGSV,3,2,12,04,32,068,31,37,29,159,,30,25,187,,05,22,299,137F $GPGSV,3,3,12,16,15,060,33,29,09,335,,26,07,025,18,03,02,120,1573 $GPRMC,172356.000,A,5051.8430,N,00510.3105,E,0.188,11.19,250820,,,A63 $GPVTG,11.19,T,,M,0.188,N,0.348,K,A*0B

Do you have any idea?

Thanks in advance. Kim

TD-er commented 3 years ago

Not sure what kind of NMEA dialect that is, but I cannot match it with the description here It looks like the checksum at the end of the line doesn't have a * followed by the checksum, but in case of the GPRMC example line you gave it has an A.

The GPVTG does seem to have a combination of both, but not according to the standard:

$GPVTG
Track Made Good and Ground Speed.

eg1. $GPVTG,360.0,T,348.7,M,000.0,N,000.0,K*43
eg2. $GPVTG,054.7,T,034.4,M,005.5,N,010.2,K

           054.7,T      True track made good
           034.4,M      Magnetic track made good
           005.5,N      Ground speed, knots
           010.2,K      Ground speed, Kilometers per hour

eg3. $GPVTG,t,T,,,s.ss,N,s.ss,K*hh
1    = Track made good
2    = Fixed text 'T' indicates that track made good is relative to true north
3    = not used
4    = not used
5    = Speed over ground in knots
6    = Fixed text 'N' indicates that speed over ground in in knots
7    = Speed over ground in kilometers/hour
8    = Fixed text 'K' indicates that speed over ground is in kilometers/hour
9    = Checksum
The actual track made good and speed relative to the ground.

$--VTG,x.x,T,x.x,M,x.x,N,x.x,K
x.x,T = Track, degrees True
x.x,M = Track, degrees Magnetic
x.x,N = Speed, knots
x.x,K = Speed, Km/hr

So simply stated, it looks like the checksum does fail here as it is not being recognized as a checksum field.

Flupke1979 commented 3 years ago

Thanks. I did a workaround by connecting the A9G secondary GPS-only TX to an extra RX input. This output sends proper sentences, that are parsed ok. Strange that the main A9G output sends wrong messages.