Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ADXL345 AigamozuControlPackets HMC5843 ITG3200 MBed_Adafruit-GPS-Library XBee agzIDLIST mbed
Fork of Aigamozu_Robot_ver4_1 by
Diff: main.cpp
- Revision:
- 5:522c47c78401
- Parent:
- 4:f36986ceb73d
- Child:
- 6:13f212b75e71
--- 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);
}
