GPS精度実験

Dependents:   GPSLOG_program

Fork of MBed_Adafruit-GPS-Library by aigamozu

Files at this revision

API Documentation at this revision

Comitter:
s1200058
Date:
Fri Oct 14 07:58:49 2016 +0000
Parent:
7:3f389529228e
Commit message:
test;

Changed in this revision

MBed_Adafruit_GPS.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 3f389529228e -r f1c5757af8dd MBed_Adafruit_GPS.cpp
--- a/MBed_Adafruit_GPS.cpp	Thu Oct 06 15:29:58 2016 +0000
+++ b/MBed_Adafruit_GPS.cpp	Fri Oct 14 07:58:49 2016 +0000
@@ -50,7 +50,8 @@
     // found GSA
     char *p = nmea;
     GPGSAdata = nmea;
-    if(count_[0] == 1){
+    count_[0]++;
+    if(count_[0] %5 == 0){
     printf("%s\n",nmea);
     count_[0] = 0;
     }
@@ -64,7 +65,8 @@
     // found GGA
     char *p = nmea;
     GPGGAdata = nmea;
-    if(count_[1] == 1){
+    count_[1]++;
+    if(count_[1]%5 == 0){
     printf("%s\n",nmea);
     count_[1] = 0;
     }
@@ -145,7 +147,8 @@
    // found RMC
     char *p = nmea;
   GPRMCdata = nmea;
-    if(count_[2] == 1){
+  count_[2]++;
+    if(count_[2]%5== 0){
    printf("%s\n",nmea);
    count_[2] = 0;
    }
@@ -237,7 +240,7 @@
     char *p = nmea;
     GPGSVdata = nmea;
     char flag = GPGSVdata[9];
-    if(flag == '1'){
+/*    if(flag == '1'){
             GPGSVdataA = nmea;
             GPGSVdataB = "";
             GPGSVdataC = "";
@@ -258,11 +261,11 @@
     else{
         print_ok = 0;
     }
-       // printf("%s\n",GPGSVdata);
+*/       // printf("%s\n",GPGSVdata);
       printf("%s\n",nmea);
-    count_[0] = 1;
-    count_[1] = 1;
-    count_[2] = 1;
+        count_[0] = 1;
+        count_[1] = 1;
+        count_[2] = 1;
         return true;
     }