connected GPS and motor driver

Dependencies:   mbed getGPS

Files at this revision

API Documentation at this revision

Comitter:
kaipon
Date:
Wed Oct 20 07:48:38 2021 +0000
Parent:
4:fca767ac5f69
Commit message:
a

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r fca767ac5f69 -r 978542e79cb7 main.cpp
--- a/main.cpp	Wed Oct 20 07:46:17 2021 +0000
+++ b/main.cpp	Wed Oct 20 07:48:38 2021 +0000
@@ -35,7 +35,7 @@
 }
 
 int main(){
-    double v,w,x,y;
+    double u,v,x,y;
     double m, n;
     double i,w;
     double j,k,l;
@@ -49,9 +49,9 @@
         gps.getgps();
         m=gps.latitude; //現在の経度
         n=gps.longitude; //現在の緯度
-        v=m-x;
-        w=n-y;
-        double a[2]={v,w};
+        u=m-x;
+        v=n-y;
+        double a[2]={u,v};
         double b[2]={0-m,0-n}; //目的地の座標を(0,0)とした
         k=b[0]/0.000008983148616;
         l=b[1]/0.000010966382364;