GPS精度実験
Fork of MBed_Adafruit-GPS-Library by
Revision 8:f1c5757af8dd, committed 2016-10-14
- 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 |
--- 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;
}
