programa final

Branch:
yuri
Revision:
8:1ad52489f6f3
diff -r 7a447d4ae677 -r 1ad52489f6f3 HorizontalController/HorizontalController.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HorizontalController/HorizontalController.h	Fri Nov 30 19:23:29 2018 +0000
@@ -0,0 +1,22 @@
+#ifndef HorizontalController_h
+#define HorizontalController_h
+#include "mbed.h"
+#include "Library.h"
+// Horizontal controller class
+class HorizontalController
+{
+    public :
+        // Class constructor
+        HorizontalController () ;
+        // Control reference roll and pitch angles given reference horizontal positions and current horizontal positions and velocities
+        void control ( float x_r , float y_r , float x, float y, float u, float v);
+        // Reference roll and pitch angles ( rad)
+        float phi_r , theta_r ;
+    private :
+        // Control acceleration given reference position and current position and velocity with given controller gains
+        float control_single ( float pos_r , float pos , float vel , float kp_hori , float kd_hori);
+        // Last horizontal positions error (m)
+        float x_e_last , y_e_last ;
+        float pos_e_last;
+};
+# endif
\ No newline at end of file