航空研究会 / Mbed 2 deprecated Autoflight2018_48

Dependencies:   HCSR04_2 MPU6050_2 mbed SDFileSystem3

Fork of Autoflight2018_47 by 航空研究会

Files at this revision

API Documentation at this revision

Comitter:
taknokolat
Date:
Tue Sep 25 09:28:13 2018 +0000
Parent:
36:197b514eae3b
Commit message:
a;

Changed in this revision

config/falfalla.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/config/falfalla.h	Tue Sep 25 06:58:19 2018 +0000
+++ b/config/falfalla.h	Tue Sep 25 09:28:13 2018 +0000
@@ -15,8 +15,10 @@
 static float g_kdAIL=0.0;
 
 static float g_rightloopROLL=-17.0;
+static float g_rightloopROLL_aproach=-17.0;
 static float g_rightloopPITCH=-6.3;
 static float g_leftloopROLL=16.0;
+static float g_leftloopROLL_aproach=16.0;
 static float g_leftloopPITCH=-6.0;
 static float g_gostraightROLL=2.0;
 static float g_gostraightPITCH=-3.0;
@@ -32,8 +34,10 @@
 static float g_glideloopPITCH = 0.0;
 
 static int g_rightloopRUD = 1500;
+static int g_rightloopRUD_aproach=1500;
 static int g_rightloopshortRUD = 1500;
 static int g_leftloopRUD = 1500;
+static int g_leftloopRUD_aproach = 1500;
 static int g_leftloopshortRUD = 1500;
 static int g_glideloopRUD = 1500;
 
--- a/main.cpp	Tue Sep 25 06:58:19 2018 +0000
+++ b/main.cpp	Tue Sep 25 09:28:13 2018 +0000
@@ -1404,9 +1404,9 @@
                 UpdateTargetAngle_Rightloop_zero(targetAngle);
                 }
                 else{
-                targetAngle[ROLL] = g_rightloopROLL;
+                targetAngle[ROLL] = g_rightloopROLL_aproach;
         targetAngle[PITCH] = g_rightloopPITCH ;
-        autopwm[RUD]=g_rightloopRUD;              //RUD固定
+        autopwm[RUD]=g_rightloopRUD_aproach;              //RUD固定
             if(autopwm[AIL_R]<trimpwm[AIL_R]){                                                                                  //エルロン上がりやすさ調節
                 autopwm[AIL_L]=trimpwm[AIL_L]+AIL_L_correctionrightloop+(autopwm[AIL_R]-trimpwm[AIL_R])*AIL_L_RatioRising;
                 }
@@ -1422,9 +1422,9 @@
                     UpdateTargetAngle_Leftloop_zero(targetAngle);
                 }
                     else{
-                        targetAngle[ROLL] = g_leftloopROLL;
+                        targetAngle[ROLL] = g_leftloopROLL_aproach;
                         targetAngle[PITCH] = g_leftloopPITCH;
-                        autopwm[RUD]=g_leftloopRUD;
+                        autopwm[RUD]=g_leftloopRUD_aproach;
                         if(autopwm[AIL_R]<trimpwm[AIL_R]){
                             autopwm[AIL_L]=trimpwm[AIL_L]+AIL_L_correctionleftloop+(autopwm[AIL_R]-trimpwm[AIL_R])*AIL_L_RatioRising;
                         }
@@ -1567,9 +1567,9 @@
 //右旋回(着陸時スロットル0の時)
 void UpdateTargetAngle_Rightloop_zero(float targetAngle[3]){ //右旋回
     autopwm[THR]=minpwm[THR];
-    targetAngle[ROLL] = g_rightloopROLL;
+    targetAngle[ROLL] = g_rightloopROLL_aproach;
     targetAngle[PITCH] = g_rightloopPITCH ;
-    autopwm[RUD]=g_rightloopRUD;              //RUD固定
+    autopwm[RUD]=g_rightloopRUD_aproach;              //RUD固定
     if(autopwm[AIL_R]<trimpwm[AIL_R]){                                                                                  //エルロン上がりやすさ調節
             autopwm[AIL_L]=trimpwm[AIL_L]+AIL_L_correctionrightloop+(autopwm[AIL_R]-trimpwm[AIL_R])*AIL_L_RatioRising;
             }
@@ -1613,9 +1613,9 @@
 //左旋回(着陸時スロットル0のとき)
 void UpdateTargetAngle_Leftloop_zero(float targetAngle[3]){
     
-    targetAngle[ROLL] = g_leftloopROLL;
+    targetAngle[ROLL] = g_leftloopROLL_aproach;
     targetAngle[PITCH] = g_leftloopPITCH;
-    autopwm[RUD]=g_leftloopRUD;
+    autopwm[RUD]=g_leftloopRUD_aproach;
     autopwm[THR] = minpwm[THR];
     if(autopwm[AIL_R]<trimpwm[AIL_R]){
         autopwm[AIL_L]=trimpwm[AIL_L]+AIL_L_correctionleftloop+(autopwm[AIL_R]-trimpwm[AIL_R])*AIL_L_RatioRising;