controlador de atitude
AttitudeController/AttitudeController.h@8:c96125e9ac70, 2018-11-21 (annotated)
- Committer:
- yurindes
- Date:
- Wed Nov 21 10:07:00 2018 +0000
- Branch:
- yuri
- Revision:
- 8:c96125e9ac70
- Parent:
- 2:54fabc943f25
teste controlador atitude;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yvesyuzo | 0:3871dc7bedf7 | 1 | #ifndef AttitudeController_h |
yvesyuzo | 0:3871dc7bedf7 | 2 | #define AttitudeController_h |
yvesyuzo | 0:3871dc7bedf7 | 3 | |
yvesyuzo | 0:3871dc7bedf7 | 4 | #include "mbed.h" |
yvesyuzo | 0:3871dc7bedf7 | 5 | #include "Library.h" |
yvesyuzo | 0:3871dc7bedf7 | 6 | |
yvesyuzo | 0:3871dc7bedf7 | 7 | class AttitudeController |
yvesyuzo | 0:3871dc7bedf7 | 8 | { |
yvesyuzo | 0:3871dc7bedf7 | 9 | public : |
yvesyuzo | 0:3871dc7bedf7 | 10 | // Class constructor |
yvesyuzo | 0:3871dc7bedf7 | 11 | AttitudeController () ; |
yvesyuzo | 0:3871dc7bedf7 | 12 | // Control torques given reference angles and current angles and angular velocities |
yvesyuzo | 0:3871dc7bedf7 | 13 | void control(float phi_r, float theta_r, float psi_r, float phi, float theta, float psi); |
yvesyuzo | 0:3871dc7bedf7 | 14 | // Torques (N.m) |
yvesyuzo | 0:3871dc7bedf7 | 15 | float tau_phi, tau_theta, tau_psi; |
yvesyuzo | 2:54fabc943f25 | 16 | |
yvesyuzo | 0:3871dc7bedf7 | 17 | private : |
yvesyuzo | 0:3871dc7bedf7 | 18 | // 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 ) |
yvesyuzo | 0:3871dc7bedf7 | 19 | float single_axis_control(float angle_r, float angle, float K_angle, float K_rate , float I, float last_erro_angle); |
yvesyuzo | 2:54fabc943f25 | 20 | |
yvesyuzo | 0:3871dc7bedf7 | 21 | float last_erro_phi, last_erro_theta, last_erro_psi; |
yvesyuzo | 2:54fabc943f25 | 22 | |
yvesyuzo | 0:3871dc7bedf7 | 23 | float last_erro; |
yvesyuzo | 0:3871dc7bedf7 | 24 | }; |
yvesyuzo | 0:3871dc7bedf7 | 25 | # endif |
yvesyuzo | 0:3871dc7bedf7 | 26 |