From: Petr Štetiar Date: Wed, 27 Jul 2016 12:45:54 +0000 (+0200) Subject: Allow bigger lat/lng numbers in RMC message X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6924497ce8fcf3b4b3ecac067bf7c503a628077b;p=project%2Fugps.git Allow bigger lat/lng numbers in RMC message It works now with following message: $GPRMC,122536.0,A,4350.237769,N,01826.423315 Signed-off-by: Petr Štetiar --- diff --git a/nmea.c b/nmea.c index 4d9cb90..fecdef8 100644 --- a/nmea.c +++ b/nmea.c @@ -108,8 +108,9 @@ nmea_rmc_cb(void) } } - if (strlen(nmea_params[3].str) != 9 || strlen(nmea_params[5].str) != 10) { - ERROR("lat/lng have invalid string length\n"); + if (strlen(nmea_params[3].str) < 9 || strlen(nmea_params[5].str) < 10) { + ERROR("lat/lng have invalid string length %d<9, %d<10\n", + strlen(nmea_params[3].str), strlen(nmea_params[5].str)); } else { int latd, latm, lats; int lngd, lngm, lngs;