Library containing Crazyflie 2.0 controller classes: - Attitude estimator - Horizontal estimator - Vertical estimator - Attitude controller - Horizontal controller - Vertical controller - Mixer
HorizontalController/HorizontalController.h@17:f682b4a5686d, 2018-10-05 (annotated)
- Committer:
- fbob
- Date:
- Fri Oct 05 19:32:35 2018 +0000
- Revision:
- 17:f682b4a5686d
- Parent:
- 16:54d2f299e404
- Child:
- 21:169cc2b1d2ff
Comments;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fbob | 8:d05fe9f8bfb6 | 1 | #ifndef HorizontalController_h |
fbob | 8:d05fe9f8bfb6 | 2 | #define HorizontalController_h |
fbob | 8:d05fe9f8bfb6 | 3 | |
fbob | 8:d05fe9f8bfb6 | 4 | #include "mbed.h" |
fbob | 8:d05fe9f8bfb6 | 5 | #include "Parameters.h" |
fbob | 8:d05fe9f8bfb6 | 6 | |
fbob | 8:d05fe9f8bfb6 | 7 | class HorizontalController |
fbob | 8:d05fe9f8bfb6 | 8 | { |
fbob | 8:d05fe9f8bfb6 | 9 | public: |
fbob | 8:d05fe9f8bfb6 | 10 | // Class constructor |
fbob | 8:d05fe9f8bfb6 | 11 | HorizontalController(); |
fbob | 17:f682b4a5686d | 12 | // Control reference roll and pitch angles (rad) given reference horizontal velocities (m/s) and current horizontal velocities (m/s) |
fbob | 16:54d2f299e404 | 13 | void control(float u_r, float v_r, float u, float v); |
fbob | 17:f682b4a5686d | 14 | // Control roll and pitch references (rad) given reference horizontal velocities (m/s) and current horizontal velocities (m/s) on take-off |
fbob | 16:54d2f299e404 | 15 | void control_take_off(float u_r, float v_r, float u, float v); |
fbob | 17:f682b4a5686d | 16 | // Roll and pitch references (rad) |
fbob | 8:d05fe9f8bfb6 | 17 | float phi_r, theta_r; |
fbob | 8:d05fe9f8bfb6 | 18 | private: |
fbob | 17:f682b4a5686d | 19 | // Control reference angle (rad) given reference horizontal velocity (m/s) and current horizontal velocity (m/s) with given time constant (s) |
fbob | 8:d05fe9f8bfb6 | 20 | float control_single(float velocity_r, float velocity, float T_velocity); |
fbob | 8:d05fe9f8bfb6 | 21 | }; |
fbob | 8:d05fe9f8bfb6 | 22 | |
fbob | 8:d05fe9f8bfb6 | 23 | #endif |