Eigen
Dependencies: Eigen
Dependents: optWingforHAPS_Eigen
Diff: Autopilot.cpp
- Revision:
- 8:7f3ff375fd30
- Parent:
- 7:988905aed916
diff -r 988905aed916 -r 7f3ff375fd30 Autopilot.cpp --- a/Autopilot.cpp Fri Nov 19 05:54:55 2021 +0000 +++ b/Autopilot.cpp Fri Nov 19 08:22:01 2021 +0000 @@ -77,7 +77,7 @@ float v2 = vel_ned.x*vel_ned.x + vel_ned.y*vel_ned.y + vel_ned.z*vel_ned.z; float E = alt + v2 / (2*G); float Esp = alt_obj + vel_obj*vel_obj / (2*G); - float dT_cruise = 0.4f; + float dT_cruise = 0.0f; dT_obj = dT_cruise; dT_obj += p_control(Esp - E, 0.05f); @@ -111,8 +111,8 @@ //dT目標値を0~1に制限 if (dT_obj > 1.0f) dT_obj = 1.0f; - else if (dT_obj < 0.0f) - dT_obj = 0.0f; + else if (dT_obj < -1.0f) + dT_obj = -1.0f; } float Autopilot::p_control(float diff, float kp)