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.
Diff: main.cpp
- Revision:
- 5:d78746981e4f
- Parent:
- 4:962ecf61540b
diff -r 962ecf61540b -r d78746981e4f main.cpp
--- a/main.cpp Wed Dec 01 08:44:56 2021 +0000
+++ b/main.cpp Thu Dec 02 05:50:51 2021 +0000
@@ -63,7 +63,7 @@
while(gps.getgps() != true){
xbee.printf("false\r\n");
}
-
+ gps.getgps();
m=gps.latitude;
n=gps.longitude;
xbee.printf("m:%f,n:%f\r\n", m, n);
@@ -88,7 +88,7 @@
c = (e-f)/(1+e*f);
xbee.printf("c:%f\r\n",c);
//t[0]は回る時間、t[1]はかかる時間、rに何回進むプログラムを動かすかを決める
- double t[2] = {w/3.14159/0.9,2*j/3/1.2}; //再度図るのは、全体の2/3だけ進んだとき
+ double t[2] = {w/3.14159/0.9,2*j/3/1.0}; //再度図るのは、全体の2/3だけ進んだとき
r = t[1]/2.2;
wait(1);
xbee.printf("c*i:%f\r\n", c*i);
@@ -161,6 +161,7 @@
while(gps.getgps() != true){
// xbee.printf("false\r\n");
}
+ gps.getgps();
x = gps.latitude;
y = gps.longitude;
//5秒前進する
@@ -172,7 +173,7 @@
wait(2);
driveMotor(0,0);
//m,nに現在の経度、緯度を記録する
-
+ gps.getgps();
m=gps.latitude;
n=gps.longitude;
a[0]=m-x;