![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
2015/05/16
Dependencies: ADXL345 AigamozuControlPackets HMC5843 ITG3200 MBed_Adafruit-GPS-Library XBee agzIDLIST mbed
Fork of Aigamozu_Robot_ver3_1 by
Diff: main.cpp
- Revision:
- 5:522c47c78401
- Parent:
- 4:f36986ceb73d
- Child:
- 6:13f212b75e71
diff -r f36986ceb73d -r 522c47c78401 main.cpp --- a/main.cpp Wed May 13 08:43:55 2015 +0000 +++ b/main.cpp Wed May 13 08:56:04 2015 +0000 @@ -290,6 +290,12 @@ } +void print_gps(int count){ + + printf("%d times:\n", count); + printf("%f, %f\n", agz.get_agzPointKalman_lati(), agz.get_agzPointKalman_longi()); + +} ///////////////////////////////////////// // @@ -383,6 +389,7 @@ const int refresh_Time = 2000; //refresh time in ms Timer auto_Timer; const int auto_Time = 2000; //refresh time in ms + int count = 0; myGPS.begin(GPS_BAUD_RATE); char SenderIDc; @@ -450,12 +457,14 @@ //check if we recieved a new message from GPS, if so, attempt to parse it, if ( myGPS.newNMEAreceived() ) { if ( !myGPS.parse(myGPS.lastNMEA()) ) { + count++; continue; } } //一定時間ごとに自分のGPSデータを取得し、AigamozuControlPacketsないのagzPointとagzPointKalmanに格納する if (refresh_Timer.read_ms() >= refresh_Time) { refresh_Timer.reset(); + print_gps(count); Get_GPS(&myGPS); }