programa final

Committer:
yurindes
Date:
Fri Nov 30 19:23:29 2018 +0000
Branch:
yuri
Revision:
8:1ad52489f6f3
final;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yurindes 8:1ad52489f6f3 1 #ifndef HorizontalController_h
yurindes 8:1ad52489f6f3 2 #define HorizontalController_h
yurindes 8:1ad52489f6f3 3 #include "mbed.h"
yurindes 8:1ad52489f6f3 4 #include "Library.h"
yurindes 8:1ad52489f6f3 5 // Horizontal controller class
yurindes 8:1ad52489f6f3 6 class HorizontalController
yurindes 8:1ad52489f6f3 7 {
yurindes 8:1ad52489f6f3 8 public :
yurindes 8:1ad52489f6f3 9 // Class constructor
yurindes 8:1ad52489f6f3 10 HorizontalController () ;
yurindes 8:1ad52489f6f3 11 // Control reference roll and pitch angles given reference horizontal positions and current horizontal positions and velocities
yurindes 8:1ad52489f6f3 12 void control ( float x_r , float y_r , float x, float y, float u, float v);
yurindes 8:1ad52489f6f3 13 // Reference roll and pitch angles ( rad)
yurindes 8:1ad52489f6f3 14 float phi_r , theta_r ;
yurindes 8:1ad52489f6f3 15 private :
yurindes 8:1ad52489f6f3 16 // Control acceleration given reference position and current position and velocity with given controller gains
yurindes 8:1ad52489f6f3 17 float control_single ( float pos_r , float pos , float vel , float kp_hori , float kd_hori);
yurindes 8:1ad52489f6f3 18 // Last horizontal positions error (m)
yurindes 8:1ad52489f6f3 19 float x_e_last , y_e_last ;
yurindes 8:1ad52489f6f3 20 float pos_e_last;
yurindes 8:1ad52489f6f3 21 };
yurindes 8:1ad52489f6f3 22 # endif