Crazyflie 2.0 controller
Dependents: Drones-Controlador
Diff: AttitudeController/AttitudeController.cpp
- Revision:
- 7:fb6174d2ea78
- Parent:
- 6:09cc3b307252
diff -r 09cc3b307252 -r fb6174d2ea78 AttitudeController/AttitudeController.cpp --- a/AttitudeController/AttitudeController.cpp Wed Oct 31 01:04:12 2018 +0000 +++ b/AttitudeController/AttitudeController.cpp Mon Nov 05 11:12:11 2018 +0000 @@ -10,15 +10,15 @@ void AttitudeController::control ( float phi_r, float theta_r, float psi_r, float phi, float theta, float psi) { tau_phi = single_axis_control ( phi_r , phi , Kp_phi , Td_phi , I_xx, last_erro_phi); - + last_erro_phi = last_erro; - + tau_theta = single_axis_control ( psi_r , psi , Kp_psi , Td_psi , I_zz, last_erro_psi); - + last_erro_theta = last_erro; - + tau_psi = single_axis_control ( theta_r , theta , Kp_theta , Td_theta , I_yy, last_erro_theta); - + last_erro_psi = last_erro; } // 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 )