Library containing Crazyflie 2.0 controller classes: - Attitude estimator - Horizontal estimator - Vertical estimator - Attitude controller - Horizontal controller - Vertical controller - Mixer
Parameters/Parameters.h
- Committer:
- fbob
- Date:
- 2018-10-03
- Revision:
- 15:155ca63b7884
- Parent:
- 14:7439203a9e44
- Child:
- 16:54d2f299e404
File content as of revision 15:155ca63b7884:
#ifndef Parameters_h #define Parameters_h // Interrupt frequencies const float f = 500.0f; // Hz const float f_range = 20.0f; // Hz const float f_flow = 200.0f; // Hz const float dt = 1.0f/f; // s const float dt_range = 1.0f/f_range;// s const float dt_flow = 1.0f/f_flow; // s // Motor constants const float alpha = 1.16e-07f; const float beta = 7.149e-10f; // Propeller constants const float kl = 1.726e-08f; // N.s^2/rad^2 const float kd = 1.426e-10f; // N.m.s^2/rad^2 // Quadcopter dimensions const float l = 0.033f; // m const float m = 0.030f; // kg const float I_xx = 16.0e-6f; // kg.m^2 const float I_yy = 16.0e-6f; // kg.m^2 const float I_zz = 29.0e-6f; // kg.m^2 // Gravity constant const float g = 9.81f; // m/s^2 // Attitude estimator weighthing (accelerometer X gyroscope) const float rho_att = 0.01f; // Attitude controller time constants const float T_phi = 0.16f; // s const float T_theta = 0.16f; // s const float T_psi = 0.2f; // s const float T_p = 0.04f; // s const float T_q = 0.04f; // s const float T_r = 0.1f; // s // Vertical estimator weighthing (measurement X prediction) const float rho_ver = 0.3f; // Vertical controller time constants const float zeta = 0.7f; const float omega_n = 2.0f; // rad/s const float K_z = pow(omega_n,2.0f); const float K_w = 2.0f*zeta*omega_n; // Horizontal estimator weighthing (measurement X prediction) const float rho_hor = 0.5f; // Horizontal controller time constants const float T_u = 2.0f; // s const float T_v = 2.0f; // s #endif