changeset 206:d9828055da57 main

Improved NMEA parsing.
author Bob Cook <bob@bobcookdev.com>
date Thu, 17 Apr 2014 21:49:16 -0700
parents dd178ee6f0a0
children b903d0499d23
files main/packages/common/gps/nmea.cpp
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/main/packages/common/gps/nmea.cpp	Thu Apr 17 21:46:50 2014 -0700
+++ b/main/packages/common/gps/nmea.cpp	Thu Apr 17 21:49:16 2014 -0700
@@ -237,6 +237,16 @@
         return;
     }
 
+    g_longitude_min = convert_digit_char( *buffer++ );
+
+    if ( ! is_digit_char( *buffer ) )
+    {
+        return;
+    }
+
+    g_longitude_min *= 10;
+    g_longitude_min += convert_digit_char( *buffer++ );
+
     if ( *buffer != '.' )
     {
         return;