programa final

Committer:
yurindes
Date:
Fri Nov 30 19:23:29 2018 +0000
Branch:
yuri
Revision:
8:1ad52489f6f3
Parent:
1:579511e9f0b8
final;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yvesyuzo 0:3871dc7bedf7 1 #ifndef Library_h
yvesyuzo 0:3871dc7bedf7 2 #define Library_h
yvesyuzo 1:579511e9f0b8 3 //Attitude Controller VARIABLES
yurindes 8:1ad52489f6f3 4 float const dt_alti = 0.005f;
yvesyuzo 0:3871dc7bedf7 5 // Controller gains and /or time constants
yurindes 8:1ad52489f6f3 6 float const Kp_phi = 200;
yvesyuzo 0:3871dc7bedf7 7 float const Kp_theta = Kp_phi;
yurindes 8:1ad52489f6f3 8 float const Td_phi = 30;
yvesyuzo 0:3871dc7bedf7 9 float const Td_theta = Td_phi;
yurindes 8:1ad52489f6f3 10 float const Kp_psi = 2.57*0.81*2.5*10;
yurindes 8:1ad52489f6f3 11 float const Td_psi = 0.81*10*1.2;
yvesyuzo 0:3871dc7bedf7 12 // Quadcopter moments of inertia (kg.m ^2)
yvesyuzo 0:3871dc7bedf7 13 float const I_xx = 16.0e-6f;
yvesyuzo 0:3871dc7bedf7 14 float const I_yy = 16.0e-6f;
yvesyuzo 0:3871dc7bedf7 15 float const I_zz = 29.0e-6f;
yvesyuzo 1:579511e9f0b8 16 // Attitude Estimator constants
yvesyuzo 0:3871dc7bedf7 17 float const pi = 3.14159265f;
yvesyuzo 0:3871dc7bedf7 18 float const dt = 0.005f;
yvesyuzo 0:3871dc7bedf7 19 float const rho = 0.05f;
yvesyuzo 0:3871dc7bedf7 20 // Mixer
yvesyuzo 0:3871dc7bedf7 21 const float alpha = 1.081E-7;
yvesyuzo 0:3871dc7bedf7 22 const float beta = 2.678E-11;
yvesyuzo 0:3871dc7bedf7 23 const float kl = 2.69E-8;
yvesyuzo 0:3871dc7bedf7 24 const float kd = 1.59E-10;
yvesyuzo 0:3871dc7bedf7 25 const float l = 33E-3;
yurindes 8:1ad52489f6f3 26 const float m = 0.03f;
yurindes 8:1ad52489f6f3 27 const float g = 9.81f;
yurindes 8:1ad52489f6f3 28 //verrtical
yurindes 8:1ad52489f6f3 29 const float p_verti = 0.3f;
yurindes 8:1ad52489f6f3 30 const float dt_ver_pre=0.002f;
yurindes 8:1ad52489f6f3 31 const float dt_ver_cor=0.05f;
yurindes 8:1ad52489f6f3 32 const float dt_range=0.02f;
yurindes 8:1ad52489f6f3 33
yurindes 8:1ad52489f6f3 34 //horizontal
yurindes 8:1ad52489f6f3 35 float kp_hori = 1.35f;
yurindes 8:1ad52489f6f3 36 float kd_hori = 2;
yurindes 8:1ad52489f6f3 37
yvesyuzo 0:3871dc7bedf7 38 # endif