The TinyGPS library that is frequently referenced on the Arduino forums have issues. The library needs some updating.
I've posted an issue on github, but it library isn't being updated
In the defines for TinyGPS we see:
#define _GPRMC_TERM "GPRMC"
#define _GPGGA_TERM "GPGGA"
the issue is that not all GPS receivers respond with the RMC data by preceding with GP. The same is true for the GCA data.
Thus using a defined term which includes the full GPRMC results in no valid sentences being found.
The first two characters after the $ sentence start, may be:
BD BDS - Chinese GPS system
GP GPS - Original USA GPS
GL GLOSNASS - Russian GPS system
GA Galileo - European GPS
GN GNSS (Global Navigation Satellite System)
The data following the identifiers are still in the NMEA 0183 format
The defines are found by using this TinyGPS code snippet.
int TinyGPS::gpsstrcmp(const char *str1, const char *str2)
{
while (*str1 && *str1 == *str2)
++str1, ++str2;
return *str1;
}
If the original defines are change to
#define _GPRMC_TERM "RMC"
#define _GPGGA_TERM "GGA
the TinyGPS software would then work with more receivers.
An alternative might be to include two new defines:
#define _GNRMC_TERM "GNRMC"
#define _GNGGA_TERM "GNGGA"
and then look for those strings and take action -- it's more cumbersome...
Sample data from the GPS receiver:
$GNZDA,201846.000,10,08,2023,00,004B
$GPTXT,01,01,01,ANTENNA OK35
$GNGGA,201847.990,4743.25572,N,12211.02802,W,6,08,2.4,77.8,M,-21.2,M,,4F
$GNGLL,4743.25572,N,12211.02802,W,201847.990,A,E53
$GNGSA,A,3,10,18,23,27,32,,,,,,,,5.7,2.4,5.2,13F
$GNGSA,A,3,27,33,41,,,,,,,,,,5.7,2.4,5.2,437
$GPGSV,3,1,11,02,09,305,,08,38,295,,10,80,315,29,15,11,045,,067
$GPGSV,3,2,11,18,30,121,26,21,17,305,,23,53,063,35,24,21,076,,06B
$GPGSV,3,3,11,27,49,244,30,32,38,189,41,194,06,291,,063
$BDGSV,2,1,05,14,25,055,,27,65,274,32,28,48,170,,33,53,056,31,071
$BDGSV,2,2,05,41,71,227,32,044
$GNRMC,201847.990,A,4743.25572,N,12211.02802,W,2.75,113.84,100823,,,E,V19
$GNVTG,113.84,T,,M,2.75,N,5.09,K,E*24