Library containing Crazyflie 2.0 controller classes: - Attitude estimator - Horizontal estimator - Vertical estimator - Attitude controller - Horizontal controller - Vertical controller - Mixer

Committer:
fbob
Date:
Thu Dec 06 16:44:40 2018 +0000
Revision:
24:7b9e3beb61d5
Parent:
21:169cc2b1d2ff
Adjust

Who changed what in which revision?

UserRevisionLine numberNew 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 21:169cc2b1d2ff 7 // Attitude controller class
fbob 0:b1f2c9e88e32 8 class AttitudeController
fbob 0:b1f2c9e88e32 9 {
fbob 0:b1f2c9e88e32 10 public:
fbob 0:b1f2c9e88e32 11 // Class constructor
fbob 0:b1f2c9e88e32 12 AttitudeController();
fbob 17:f682b4a5686d 13 // Control torques (N.m) given reference angles (rad) and current angles (rad) and angular velocities (rad/s)
fbob 2:7e01bc32bf4c 14 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 15 // Torques (N.m)
fbob 0:b1f2c9e88e32 16 float tau_phi, tau_theta, tau_psi;
fbob 0:b1f2c9e88e32 17 private:
fbob 21:169cc2b1d2ff 18 // Control torque (N.m) given reference angle (rad) and current angle (rad) and angular velocity (rad/s) with given controller gains and moment of inertia (kg.m^2)
fbob 21:169cc2b1d2ff 19 float control_state_regulator(float angle_r, float angle, float rate, float kp, float kd, float I);
fbob 0:b1f2c9e88e32 20 };
fbob 0:b1f2c9e88e32 21
fbob 3:e782fe31ace2 22 #endif