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.
AttitudeController.h
00001 #ifndef AttitudeController_h 00002 #define AttitudeController_h 00003 00004 #include "mbed.h" 00005 #include "Library.h" 00006 00007 class AttitudeController 00008 { 00009 public : 00010 // Class constructor 00011 AttitudeController () ; 00012 // Control torques given reference angles and current angles and angular velocities 00013 void control(float phi_r, float theta_r, float psi_r, float phi, float theta, float psi); 00014 // Torques (N.m) 00015 float tau_phi, tau_theta, tau_psi; 00016 00017 private : 00018 // Control torque of a single axis given reference angles and current angles and angular velocities ( with given gains and /or time constants and moments of inertia ) 00019 float single_axis_control(float angle_r, float angle, float K_angle, float K_rate , float I, float last_erro_angle); 00020 00021 float last_erro_phi, last_erro_theta, last_erro_psi; 00022 00023 float last_erro; 00024 }; 00025 # endif 00026
Generated on Fri Jul 15 2022 13:09:41 by
