programa final
Diff: Library/Library.h
- Branch:
- yuri
- Revision:
- 8:1ad52489f6f3
- Parent:
- 1:579511e9f0b8
diff -r 7a447d4ae677 -r 1ad52489f6f3 Library/Library.h --- a/Library/Library.h Wed Oct 17 12:18:29 2018 +0000 +++ b/Library/Library.h Fri Nov 30 19:23:29 2018 +0000 @@ -1,14 +1,14 @@ #ifndef Library_h #define Library_h //Attitude Controller VARIABLES -float const dt2 = 0.005f; +float const dt_alti = 0.005f; // Controller gains and /or time constants -float const Kp_phi = 3.63*1.96; +float const Kp_phi = 200; float const Kp_theta = Kp_phi; -float const Td_phi = 1.96; +float const Td_phi = 30; float const Td_theta = Td_phi; -float const Kp_psi = 2.57*0.81; -float const Td_psi = 0.81; +float const Kp_psi = 2.57*0.81*2.5*10; +float const Td_psi = 0.81*10*1.2; // Quadcopter moments of inertia (kg.m ^2) float const I_xx = 16.0e-6f; float const I_yy = 16.0e-6f; @@ -23,4 +23,16 @@ const float kl = 2.69E-8; const float kd = 1.59E-10; const float l = 33E-3; +const float m = 0.03f; +const float g = 9.81f; +//verrtical +const float p_verti = 0.3f; +const float dt_ver_pre=0.002f; +const float dt_ver_cor=0.05f; +const float dt_range=0.02f; + +//horizontal +float kp_hori = 1.35f; +float kd_hori = 2; + # endif