Xbeeを実装、speakをfunctionに、rotate消した、calibrationで回るように、ゴール判定を消した

Dependencies:   ATP3012 mbed a HMC US015_2 getGPS

Revision:
4:975b0d9bd51b
Parent:
3:ec2b7587be78
Child:
5:cc7917e8c442
--- a/main.cpp	Wed Nov 10 08:36:55 2021 +0000
+++ b/main.cpp	Wed Nov 10 09:16:37 2021 +0000
@@ -99,7 +99,9 @@
                 
                 double lati = 111132.8715;    //1度あたりの緯度の距離(m)
                 double longi = 91535.79099;    //1度あたりの経度の距離(m)
-                if ((next_CP_x - GPS_x)*(next_CP_x - GPS_x)*lati*lati + (next_CP_y = GPS_y)*(next_CP_y = GPS_y)*longi*longi < 25) { // CP到着判定 //試験で調整
+                GPS_x = gps.latitude;
+                GPS_y = gps.longitude;
+                if ((next_CP_x - GPS_x)*(next_CP_x - GPS_x)*lati*lati + (next_CP_y - GPS_y)*(next_CP_y - GPS_y)*longi*longi < 25) { // CP到着判定 //試験で調整
                     pc.printf("now leach cp[%d]=x_%f,y_%f",i,next_CP_x ,next_CP_y);
                     xbee.printf("now leach cp[%d]=x_%f,y_%f",i,next_CP_x ,next_CP_y);
                     break;