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 7:220ce3839be8 1 #ifndef VerticalController_h
fbob 7:220ce3839be8 2 #define VerticalController_h
fbob 7:220ce3839be8 3
fbob 7:220ce3839be8 4 #include "mbed.h"
fbob 7:220ce3839be8 5 #include "Parameters.h"
fbob 7:220ce3839be8 6
fbob 21:169cc2b1d2ff 7 // Vertical controller class
fbob 7:220ce3839be8 8 class VerticalController
fbob 7:220ce3839be8 9 {
fbob 7:220ce3839be8 10 public:
fbob 7:220ce3839be8 11 // Class constructor
fbob 7:220ce3839be8 12 VerticalController();
fbob 21:169cc2b1d2ff 13 // Control total thrust force (N) given reference vertical position (m) and current vertical position (m) and velocity (m/s)
fbob 16:54d2f299e404 14 void control(float z_r, float z, float w);
fbob 21:169cc2b1d2ff 15 // Total thrust force (N)
fbob 7:220ce3839be8 16 float f_t;
fbob 21:169cc2b1d2ff 17 private:
fbob 21:169cc2b1d2ff 18 // Control aceleration given reference position (m) and current position (m) and velocity (m/s) with given controller gains
fbob 21:169cc2b1d2ff 19 float control_state_regulator(float position_r, float position, float velocity, float kp, float kd);
fbob 7:220ce3839be8 20 };
fbob 7:220ce3839be8 21
fbob 7:220ce3839be8 22 #endif