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

Committer:
fbob
Date:
Fri Oct 05 19:32:35 2018 +0000
Revision:
17:f682b4a5686d
Parent:
5:b9947e3d20cf
Child:
19:83b357d6806e
Comments;

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 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 0:b1f2c9e88e32 19 };
fbob 0:b1f2c9e88e32 20
fbob 3:e782fe31ace2 21 #endif