統合プログラム

Dependencies:   mbed Servo BMP180

Revision:
7:74994694ec04
Parent:
6:6fe6e3554a46
Child:
8:7209c810309d
--- a/direction.h	Thu Oct 28 13:50:27 2021 +0000
+++ b/direction.h	Thu Oct 28 14:44:25 2021 +0000
@@ -65,7 +65,7 @@
     }
         
     if(x_0 == x_1 && x_1 != x_2){
-        theta_1 = atan((y_1 - y_2)/(x_1- x_2));  
+        theta_1 = atan(9*(y_1 - y_2)/11*(x_1- x_2));  
         
         if(y_0 - y_1 > 0){
             theta_0 =  90;
@@ -92,7 +92,7 @@
     
     if(x_0 != x_1 && x_1 == x_2){
         
-        theta_0 = atan((y_0 - y_1)/(x_0 - x_1));  
+        theta_0 = atan(9*(y_0 - y_1)/11*(x_0 - x_1));  
     
         if(y_0 - y_1 > 0 && x_0 - x_1 < 0){
             theta_0 = theta_0 - 180;
@@ -116,8 +116,8 @@
     }
     
     else{
-        theta_0 = atan((y_0 - y_1)/(x_0 - x_1));
-        theta_1 = atan((y_1 - y_2)/(x_1- x_2));  
+        theta_0 = atan(9*(y_0 - y_1)/11*(x_0 - x_1));
+        theta_1 = atan(9*(y_1 - y_2)/11*(x_1- x_2));  
     
         if(y_0 - y_1 > 0 && x_0 - x_1 < 0){
             theta_0 = theta_0 - 180;