[LEDE-DEV] [PATCH ugps 7/7] Allow bigger lat/lng numbers in RMC message

Petr Štetiar ynezz at true.cz
Wed Jul 27 05:45:54 PDT 2016


It works now with following message:

  $GPRMC,122536.0,A,4350.237769,N,01826.423315

Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 nmea.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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;
-- 
1.9.1




More information about the Lede-dev mailing list