Eigen
Dependencies: Eigen
Dependents: optWingforHAPS_Eigen
Diff: Autopilot.cpp
- Revision:
- 9:6c3e1d574f86
- Parent:
- 7:988905aed916
- Child:
- 10:c8b1ab9841c9
diff -r 988905aed916 -r 6c3e1d574f86 Autopilot.cpp --- a/Autopilot.cpp Fri Nov 19 05:54:55 2021 +0000 +++ b/Autopilot.cpp Fri Nov 19 09:21:41 2021 +0000 @@ -77,9 +77,9 @@ 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); + dT_obj += p_control(Esp - E, 1.0f); float B = alt - v2 / (2*G); float Bsp = alt_obj - vel_obj*vel_obj / (2*G); @@ -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)