for u-blox

Dependencies:   C027_Support

Fork of C027_SupportTest by u-blox

Files at this revision

API Documentation at this revision

Comitter:
kityann
Date:
Wed Jan 04 11:29:45 2017 +0000
Parent:
33:e27f40fada64
Commit message:
for u-blox

Changed in this revision

C027_Support.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/C027_Support.lib	Thu Aug 11 07:12:02 2016 +0000
+++ b/C027_Support.lib	Wed Jan 04 11:29:45 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/ublox/code/C027_Support/#7b747676de86
\ No newline at end of file
+https://developer.mbed.org/teams/aigamozu/code/C027_Support/#72b4265c91d1
--- a/main.cpp	Thu Aug 11 07:12:02 2016 +0000
+++ b/main.cpp	Wed Jan 04 11:29:45 2017 +0000
@@ -210,13 +210,24 @@
 #ifndef CELLOCATE
         while ((ret = gps.getMessage(buf, sizeof(buf))) > 0)
         {
+            
             int len = LENGTH(ret);
             //printf("NMEA: %.*s\r\n", len-2, msg); 
             if ((PROTOCOL(ret) == GPSParser::NMEA) && (len > 6))
             {
                 // talker is $GA=Galileo $GB=Beidou $GL=Glonass $GN=Combined $GP=GPS
                 if ((buf[0] == '$') || buf[1] == 'G') {
-                    #define _CHECK_TALKER(s) ((buf[3] == s[0]) && (buf[4] == s[1]) && (buf[5] == s[2]))
+                    #define _CHECK_TALKER(s) ((buf[1] == s[0]) && (buf[2] == s[1]) && (buf[3] == s[2]) && (buf[4] == s[3]) && (buf[5] == s[4]))
+                    if(_CHECK_TALKER("GPRMC")){
+                        printf("%s",buf);    
+                    }
+                    if(_CHECK_TALKER("GPGGA")){
+                        printf("%s",buf);    
+                    }
+                    if(_CHECK_TALKER("GPGSV")){
+                        printf("%s",buf);    
+                    }
+                    /*
                     if (_CHECK_TALKER("GLL")) {
                         double la = 0, lo = 0;
                         char ch;
@@ -237,6 +248,7 @@
                         if (gps.getNmeaItem(7,buf,len,s)) // speed [km/h]
                             printf("GPS Speed: %.1f\r\n", s); 
                     }
+                    */
                 }
             }
         }