Library containing Crazyflie 2.0 controller classes: - Attitude estimator - Horizontal estimator - Vertical estimator - Attitude controller - Horizontal controller - Vertical controller - Mixer
AttitudeController/AttitudeController.h@19:83b357d6806e, 2018-10-18 (annotated)
- Committer:
- fbob
- Date:
- Thu Oct 18 12:53:22 2018 +0000
- Revision:
- 19:83b357d6806e
- Parent:
- 17:f682b4a5686d
- Child:
- 21:169cc2b1d2ff
Included zeta and omega_n
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fbob | 0:b1f2c9e88e32 | 1 | #ifndef AttitudeController_h |
fbob | 0:b1f2c9e88e32 | 2 | #define AttitudeController_h |
fbob | 0:b1f2c9e88e32 | 3 | |
fbob | 0:b1f2c9e88e32 | 4 | #include "mbed.h" |
fbob | 5:b9947e3d20cf | 5 | #include "Parameters.h" |
fbob | 0:b1f2c9e88e32 | 6 | |
fbob | 0:b1f2c9e88e32 | 7 | class AttitudeController |
fbob | 0:b1f2c9e88e32 | 8 | { |
fbob | 0:b1f2c9e88e32 | 9 | public: |
fbob | 0:b1f2c9e88e32 | 10 | // Class constructor |
fbob | 0:b1f2c9e88e32 | 11 | AttitudeController(); |
fbob | 17:f682b4a5686d | 12 | // Control torques (N.m) given reference angles (rad) and current angles (rad) and angular velocities (rad/s) |
fbob | 2:7e01bc32bf4c | 13 | void control(float phi_r, float theta_r, float psi_r, float phi, float theta, float psi, float p, float q, float r); |
fbob | 0:b1f2c9e88e32 | 14 | // Torques (N.m) |
fbob | 0:b1f2c9e88e32 | 15 | float tau_phi, tau_theta, tau_psi; |
fbob | 0:b1f2c9e88e32 | 16 | private: |
fbob | 17:f682b4a5686d | 17 | // Control torque (N.m) given reference angle (rad) and current angle (rad) and angular velocity (rad/s) with given time constants (s) and moment of inertia (kg.m^2) |
fbob | 3:e782fe31ace2 | 18 | float control_single(float angle_r, float angle, float rate, float T_angle, float T_rate, float I); |
fbob | 19:83b357d6806e | 19 | // Control torque (N.m) given reference angle (rad) and current angle (rad) and angular velocity (rad/s) with given time constants (s) and moment of inertia (kg.m^2) |
fbob | 19:83b357d6806e | 20 | float control_single_regulator(float angle_r, float angle, float rate, float K_angle, float K_rate, float I); |
fbob | 0:b1f2c9e88e32 | 21 | }; |
fbob | 0:b1f2c9e88e32 | 22 | |
fbob | 3:e782fe31ace2 | 23 | #endif |