GPS精度実験

Dependents:   GPSLOG_program

Fork of MBed_Adafruit-GPS-Library by aigamozu

Revision:
5:ce26d53dc358
Parent:
4:7ef0dd12940c
Child:
6:7b7e9dc49edd
--- a/MBed_Adafruit_GPS.cpp	Tue May 12 01:02:59 2015 +0000
+++ b/MBed_Adafruit_GPS.cpp	Tue Aug 09 13:04:23 2016 +0000
@@ -13,7 +13,7 @@
 #include "MBed_Adafruit_GPS.h"
 
 // how long are max NMEA lines to parse?
-#define MAXLINELENGTH 120
+#define MAXLINELENGTH 200
 
 // we double buffer: read one line in and leave one for the main program
 volatile char line1[MAXLINELENGTH];
@@ -46,9 +46,19 @@
   }
 
   // look for a few common sentences
+  if (strstr(nmea, "$GPGSA")) {
+    // found GSA
+    char *p = nmea;
+    GPGSAdata = nmea;
+    
+    return true;
+  }
+
+  // look for a few common sentences
   if (strstr(nmea, "$GPGGA")) {
     // found GGA
     char *p = nmea;
+    GPGGAdata = nmea;
     // get time
     p = strchr(p, ',')+1;
     float timef = atof(p);
@@ -123,7 +133,8 @@
   if (strstr(nmea, "$GPRMC")) {
    // found RMC
     char *p = nmea;
-
+    this->GPRMCdata = nmea;
+    //printf("B%s",this->GPRMCdata);
     // get time
     p = strchr(p, ',')+1;
     float timef = atof(p);