Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
General attitude stabilization interface for rotorcrafts. More...
#include "firmwares/rotorcraft/stabilization.h"
#include "math/pprz_algebra_int.h"
#include <STABILIZATION_ATTITUDE_TYPE_H>
Go to the source code of this file.
Functions | |
void | stabilization_attitude_init (void) |
void | stabilization_attitude_read_rc (bool_t in_flight, bool_t in_carefree, bool_t coordinated_turn) |
void | stabilization_attitude_enter (void) |
void | stabilization_attitude_set_failsafe_setpoint (void) |
void | stabilization_attitude_set_rpy_setpoint_i (struct Int32Eulers *rpy) |
void | stabilization_attitude_set_earth_cmd_i (struct Int32Vect2 *cmd, int32_t heading) |
void | stabilization_attitude_run (bool_t in_flight) |
General attitude stabilization interface for rotorcrafts.
The actual implementation is automatically included.
Definition in file stabilization_attitude.h.
void stabilization_attitude_enter | ( | void | ) |
Definition at line 136 of file stabilization_attitude_euler_float.c.
References IndiVariables::angular_accel_ref, att_ref_euler_f, att_ref_quat_f, att_ref_quat_i, attitude_ref_euler_float_enter(), attitude_ref_quat_float_enter(), attitude_ref_quat_int_enter(), IndiVariables::du, IndiVariables::filtered_rate, IndiVariables::filtered_rate_2deriv, IndiVariables::filtered_rate_deriv, FLOAT_EULERS_ZERO, float_quat_identity(), FLOAT_RATES_ZERO, int32_quat_identity(), INT_EULERS_ZERO, FloatEulers::psi, Int32Eulers::psi, reset_psi_ref_from_body(), stab_att_sp_euler, stabilization_att_sum_err, stabilization_att_sum_err_quat, stabilization_attitude_get_heading_f(), stabilization_attitude_get_heading_i(), stateGetNedToBodyEulers_i(), IndiVariables::u, IndiVariables::u_act_dyn, IndiVariables::u_in, IndiVariables::udot, and IndiVariables::udotdot.
Referenced by guidance_h_mode_changed().
void stabilization_attitude_init | ( | void | ) |
Definition at line 98 of file stabilization_attitude_euler_float.c.
References att_ref_euler_f, att_ref_euler_i, att_ref_quat_f, att_ref_quat_i, attitude_ref_euler_float_init(), attitude_ref_euler_int_init(), attitude_ref_quat_float_init(), attitude_ref_quat_float_schedule(), attitude_ref_quat_int_init(), body_rate_d, Int32AttitudeGains::d, FloatAttitudeGains::d, Int32AttitudeGains::dd, FloatAttitudeGains::dd, DefaultPeriodic, FLOAT_EULERS_ZERO, float_quat_identity(), FLOAT_RATES_ZERO, Int32AttitudeGains::i, FloatAttitudeGains::i, int32_quat_identity(), INT_EULERS_ZERO, last_body_rate, Int32AttitudeGains::p, FloatAttitudeGains::p, p, phi_ddgain, phi_dgain, phi_dgain_d, phi_igain, phi_pgain, psi_ddgain, psi_dgain, psi_dgain_d, psi_igain, psi_pgain, register_periodic_telemetry(), stab_att_sp_euler, stab_att_sp_quat, stabilization_att_sum_err, stabilization_att_sum_err_quat, STABILIZATION_ATTITUDE_GAIN_IDX_DEFAULT, STABILIZATION_ATTITUDE_GAIN_NB, stabilization_gains, theta_ddgain, theta_dgain, theta_dgain_d, theta_igain, theta_pgain, and VECT3_ASSIGN.
Referenced by autopilot_init().
void stabilization_attitude_read_rc | ( | bool_t | in_flight, |
bool_t | in_carefree, | ||
bool_t | coordinated_turn | ||
) |
Definition at line 131 of file stabilization_attitude_euler_float.c.
References QUAT_BFP_OF_REAL, stab_att_sp_euler, stab_att_sp_quat, stabilization_attitude_read_rc_setpoint_eulers(), stabilization_attitude_read_rc_setpoint_eulers_f(), stabilization_attitude_read_rc_setpoint_quat_earth_bound_f(), and stabilization_attitude_read_rc_setpoint_quat_f().
Referenced by guidance_h_read_rc().
void stabilization_attitude_run | ( | bool_t | in_flight | ) |
Definition at line 176 of file stabilization_attitude_euler_float.c.
References AttRefEulerInt::accel, AttRefEulerFloat::accel, AttRefQuatFloat::accel, AttRefQuatInt::accel, att_ref_euler_f, att_ref_euler_i, att_ref_quat_f, att_ref_quat_i, attitude_ref_euler_float_update(), attitude_ref_euler_int_update(), attitude_ref_quat_float_update(), attitude_ref_quat_int_update(), attitude_run_fb(), attitude_run_ff(), attitude_run_indi(), body_rate_d, CMD_SHIFT, Int32AttitudeGains::d, FloatAttitudeGains::d, Int32AttitudeGains::dd, FloatAttitudeGains::dd, AttRefEulerInt::euler, AttRefEulerFloat::euler, EULERS_ADD, EULERS_BOUND_CUBE, EULERS_COPY, EULERS_DIFF, IndiVariables::filtered_rate, IndiVariables::filtered_rate_2deriv, IndiVariables::filtered_rate_deriv, FLOAT_ANGLE_NORMALIZE, FLOAT_EULERS_ZERO, float_quat_identity(), float_quat_inv_comp(), float_quat_wrap_shortest(), FLOAT_RATES_ZERO, gain_idx, Int32AttitudeGains::i, FloatAttitudeGains::i, IERROR_SCALE, INT32_ANGLE_FRAC, INT32_ANGLE_NORMALIZE, INT32_EULERS_LSHIFT, int32_quat_identity(), int32_quat_inv_comp(), INT32_QUAT_INV_COMP, int32_quat_normalize(), int32_quat_wrap_shortest(), INT32_RATE_FRAC, INT_EULERS_ZERO, INT_RATES_ZERO, INTEGRATOR_BOUND, last_body_rate, MAX_PPRZ, MAX_SUM_ERR, OFFSET_AND_ROUND, OFFSET_AND_ROUND2, Int32AttitudeGains::p, FloatAttitudeGains::p, FloatRates::p, Int32Rates::p, PERIODIC_FREQUENCY, FloatEulers::phi, Int32Eulers::phi, FloatEulers::psi, Int32Eulers::psi, FloatRates::q, Int32Rates::q, AttRefQuatFloat::quat, AttRefQuatInt::quat, FloatQuat::qx, Int32Quat::qx, FloatQuat::qy, Int32Quat::qy, FloatQuat::qz, Int32Quat::qz, FloatRates::r, Int32Rates::r, AttRefEulerInt::rate, AttRefEulerFloat::rate, AttRefQuatFloat::rate, AttRefQuatInt::rate, RATES_COPY, RATES_DIFF, REF_ANGLE_FRAC, REF_RATE_FRAC, stab_att_sp_euler, stab_att_sp_quat, stabilization_att_fb_cmd, stabilization_att_ff_cmd, stabilization_att_indi_cmd, stabilization_att_sum_err, stabilization_att_sum_err_quat, stabilization_cmd, stabilization_gains, STABILIZATION_INDI_FILT_OMEGA, STABILIZATION_INDI_FILT_OMEGA_R, STABILIZATION_INDI_FILT_ZETA, stabilization_indi_second_order_filter(), stateGetBodyRates_f(), stateGetBodyRates_i(), stateGetNedToBodyEulers_f(), stateGetNedToBodyEulers_i(), stateGetNedToBodyQuat_f(), stateGetNedToBodyQuat_i(), FloatEulers::theta, Int32Eulers::theta, TRAJ_MAX_BANK, FloatVect3::x, Int32Vect3::x, FloatVect3::y, Int32Vect3::y, FloatVect3::z, and Int32Vect3::z.
Referenced by guidance_flip_run(), guidance_h_module_run(), and guidance_h_run().
void stabilization_attitude_set_earth_cmd_i | ( | struct Int32Vect2 * | cmd, |
int32_t | heading | ||
) |
Definition at line 159 of file stabilization_attitude_euler_float.c.
References ANGLE_FLOAT_OF_BFP, heading, INT32_TRIG_FRAC, FloatEulers::phi, Int32Eulers::phi, PPRZ_ITRIG_COS, PPRZ_ITRIG_SIN, FloatEulers::psi, Int32Eulers::psi, quat_from_earth_cmd_f(), quat_from_earth_cmd_i(), stab_att_sp_euler, stab_att_sp_quat, stateGetNedToBodyEulers_f(), stateGetNedToBodyEulers_i(), FloatEulers::theta, Int32Eulers::theta, FloatVect2::x, Int32Vect2::x, FloatVect2::y, and Int32Vect2::y.
Referenced by guidance_flip_run(), and guidance_h_run().
void stabilization_attitude_set_failsafe_setpoint | ( | void | ) |
Definition at line 147 of file stabilization_attitude_euler_float.c.
References FloatEulers::phi, Int32Eulers::phi, PPRZ_ITRIG_COS, PPRZ_ITRIG_SIN, FloatEulers::psi, Int32Eulers::psi, FloatQuat::qi, Int32Quat::qi, FloatQuat::qx, Int32Quat::qx, FloatQuat::qy, Int32Quat::qy, FloatQuat::qz, Int32Quat::qz, stab_att_sp_euler, stab_att_sp_quat, stabilization_attitude_get_heading_f(), stabilization_attitude_get_heading_i(), stateGetNedToBodyEulers_f(), stateGetNedToBodyEulers_i(), FloatEulers::theta, and Int32Eulers::theta.
Referenced by autopilot_set_mode().
void stabilization_attitude_set_rpy_setpoint_i | ( | struct Int32Eulers * | rpy | ) |
Definition at line 154 of file stabilization_attitude_euler_float.c.
References EULERS_FLOAT_OF_BFP, float_quat_of_eulers(), int32_quat_of_eulers(), stab_att_sp_euler, and stab_att_sp_quat.
Referenced by guidance_h_module_run(), and guidance_h_run().