Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
HorizontalController.h
00001 #ifndef HorizontalController_h 00002 #define HorizontalController_h 00003 #include "mbed.h" 00004 #include "Library.h" 00005 // Horizontal controller class 00006 class HorizontalController 00007 { 00008 public : 00009 // Class constructor 00010 HorizontalController () ; 00011 // Control reference roll and pitch angles given reference horizontal positions and current horizontal positions and velocities 00012 void control ( float x_r , float y_r , float x, float y, float u, float v); 00013 // Reference roll and pitch angles ( rad) 00014 float phi_r , theta_r ; 00015 private : 00016 // Control acceleration given reference position and current position and velocity with given controller gains 00017 float control_single ( float pos_r , float pos , float vel , float kp_hori , float kd_hori); 00018 // Last horizontal positions error (m) 00019 float x_e_last , y_e_last ; 00020 float pos_e_last; 00021 }; 00022 # endif
Generated on Fri Jul 15 2022 13:09:41 by
