Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_attitude.h File Reference

General attitude stabilization interface for rotorcrafts. More...

#include "firmwares/rotorcraft/stabilization.h"
#include "math/pprz_algebra_int.h"
#include <STABILIZATION_ATTITUDE_TYPE_H>
+ Include dependency graph for stabilization_attitude.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void stabilization_attitude_init (void)
 stabilization_attitude_init More...
 
void stabilization_attitude_read_rc (bool in_flight, bool in_carefree, bool 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 in_flight)
 

Detailed Description

General attitude stabilization interface for rotorcrafts.

The actual implementation is automatically included.

Definition in file stabilization_attitude.h.

Function Documentation

void stabilization_attitude_init ( void  )

stabilization_attitude_init

Initialize the heli indi attitude controller.

Definition at line 98 of file stabilization_attitude_euler_float.c.

References actuator_model, actuator_notchfilter, delayed_first_order_lowpass_filter_t::alpha, alpha_yaw_dec, alpha_yaw_inc, ANGLE_BFP_OF_REAL, IndiController_int::apply_actuator_filters, IndiController_int::apply_actuator_models, IndiController_int::apply_compensator_filters, IndiController_int::apply_measurement_filters, 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, DELAYED_FIRST_ORDER_LOWPASS_FILTER_FILTER_ALPHA_SHIFT, delayed_first_order_lowpass_initialize(), IndiController_int::enable_notch, FALSE, Int32AttitudeGains::ffd, FLOAT_EULERS_ZERO, float_quat_identity(), FLOAT_RATES_ZERO, heli_indi_ctl, Int32AttitudeGains::i, FloatAttitudeGains::i, indi_apply_actuator_butterworth_filters(), indi_apply_actuator_models(), indi_apply_actuator_notch_filters(), indi_apply_compensator_filters(), indi_apply_measurement_butterworth_filters(), indi_apply_measurement_notch_filters(), INDI_PITCH, INDI_ROLL, INDI_THRUST, INDI_YAW, init_butterworth_2_low_pass_int(), int32_quat_identity(), INT_EULERS_ZERO, IndiController_int::invG, INVG_00, INVG_11, INVG_22, INVG_33, last_body_rate, MAX_PPRZ, measurement_notchfilter, IndiController_int::motor_rpm, notch_filter_init(), Int32AttitudeGains::p, FloatAttitudeGains::p, p, phi_ddgain, phi_dgain, phi_dgain_d, phi_igain, phi_pgain, IndiController_int::pitch_comp_angle, psi_ddgain, psi_dgain, psi_dgain_d, psi_igain, psi_pgain, register_periodic_telemetry(), IndiController_int::roll_comp_angle, send_ahrs_ref_quat(), send_att(), send_att_ref(), IndiController_int::sp_offset_pitch, IndiController_int::sp_offset_roll, 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_ATTITUDE_HELI_INDI_BUTTERW_CUTOFF_PITCH, STABILIZATION_ATTITUDE_HELI_INDI_BUTTERW_CUTOFF_ROLL, STABILIZATION_ATTITUDE_HELI_INDI_BUTTERW_CUTOFF_THRUST, STABILIZATION_ATTITUDE_HELI_INDI_BUTTERW_CUTOFF_YAW, STABILIZATION_ATTITUDE_HELI_INDI_NOTCHFILT_BW_PITCH, STABILIZATION_ATTITUDE_HELI_INDI_NOTCHFILT_BW_ROLL, STABILIZATION_ATTITUDE_HELI_INDI_NOTCHFILT_BW_THRUST, STABILIZATION_ATTITUDE_HELI_INDI_NOTCHFILT_BW_YAW, STABILIZATION_ATTITUDE_HELI_INDI_PITCH_COMMAND_ROTATION, STABILIZATION_ATTITUDE_HELI_INDI_ROLL_COMMAND_ROTATION, stabilization_attitude_heli_indi_set_steadystate_pitchroll(), STABILIZATION_ATTITUDE_HELI_INDI_STEADY_STATE_PITCH, STABILIZATION_ATTITUDE_HELI_INDI_STEADY_STATE_ROLL, STABILIZATION_ATTITUDE_PHI_FFDGAIN, STABILIZATION_ATTITUDE_PSI_FFDGAIN, STABILIZATION_ATTITUDE_THETA_FFDGAIN, stabilization_gains, stabilization_indi_init(), theta_ddgain, theta_dgain, theta_dgain_d, theta_igain, theta_pgain, TRUE, and VECT3_ASSIGN.

+ Here is the call graph for this function:

void stabilization_attitude_read_rc ( bool  in_flight,
bool  in_carefree,
bool  coordinated_turn 
)
void stabilization_attitude_run ( bool  in_flight)

Definition at line 176 of file stabilization_attitude_euler_float.c.

References __k, AttRefEulerInt::accel, AttRefEulerFloat::accel, AttRefQuatFloat::accel, AttRefQuatInt::accel, IndiController_int::actuator_out, IndiController_int::apply_actuator_filters, IndiController_int::apply_actuator_models, IndiController_int::apply_compensator_filters, IndiController_int::apply_measurement_filters, 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(), autopilot_get_motors_on(), body_rate_d, CMD_SHIFT, IndiController_int::command_out, Int32AttitudeGains::d, FloatAttitudeGains::d, Int32AttitudeGains::dd, FloatAttitudeGains::dd, IndiController_int::du, IndiController_int::enable_notch, IndiController_int::error, AttRefEulerInt::euler, AttRefEulerFloat::euler, EULERS_ADD, EULERS_BOUND_CUBE, EULERS_COPY, EULERS_DIFF, FALSE, Int32AttitudeGains::ffd, IndiController_int::filtered_actuator, IndiController_int::filtered_measurement, FLOAT_ANGLE_NORMALIZE, FLOAT_EULERS_ZERO, float_quat_identity(), float_quat_inv_comp(), float_quat_wrap_shortest(), FLOAT_RATES_ZERO, gain_idx, heli_indi_ctl, Int32AttitudeGains::i, FloatAttitudeGains::i, IERROR_SCALE, INDI_DOF, INDI_NR_FILTERS, INDI_PITCH, INDI_ROLL, INDI_THRUST, INDI_YAW, INT32_ANGLE_FRAC, INT32_ANGLE_NORMALIZE, INT32_EULERS_LSHIFT, INT32_INVG_FRAC, int32_quat_comp_inv(), int32_quat_identity(), int32_quat_inv_comp(), int32_quat_normalize(), int32_quat_wrap_shortest(), INT32_RATE_FRAC, int32_rmat_vmult(), int32_vect_copy(), int32_vect_diff(), int32_vect_sum(), INT_EULERS_ZERO, INT_RATES_ZERO, INTEGRATOR_BOUND, IndiController_int::invG, last_body_rate, MAT_MUL_VECT, MAX_PPRZ, MAX_SUM_ERR, IndiController_int::measurement, IndiController_int::motor_rpm, OFFSET_AND_ROUND, OFFSET_AND_ROUND2, Int32AttitudeGains::p, FloatAttitudeGains::p, FloatRates::p, Int32Rates::p, FloatEulers::phi, Int32Eulers::phi, IndiController_int::pitch_comp_angle, HeliIndiGains::pitch_p, pprz_itrig_cos(), pprz_itrig_sin(), 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, IndiController_int::reference, IndiController_int::roll_comp_angle, HeliIndiGains::roll_p, rpm_sensor_get_rpm(), sp_offset, stab_att_sp_euler, stab_att_sp_quat, stabilization_att_fb_cmd, stabilization_att_ff_cmd, stabilization_att_sum_err, stabilization_att_sum_err_quat, stabilization_cmd, stabilization_gains, stabilization_indi_run(), stateGetAccelNed_i(), stateGetBodyRates_f(), stateGetBodyRates_i(), stateGetNedToBodyEulers_f(), stateGetNedToBodyEulers_i(), stateGetNedToBodyQuat_f(), stateGetNedToBodyQuat_i(), stateGetNedToBodyRMat_i(), FloatEulers::theta, Int32Eulers::theta, TRAJ_MAX_BANK, IndiController_int::u_setpoint, FloatVect3::x, NedCoor_i::x, Int32Vect3::x, FloatVect3::y, NedCoor_i::y, Int32Vect3::y, HeliIndiGains::yaw_d, HeliIndiGains::yaw_p, FloatVect3::z, NedCoor_i::z, and Int32Vect3::z.

Referenced by guidance_flip_run(), guidance_h_from_nav(), guidance_h_guided_run(), guidance_h_module_run(), and guidance_h_run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stabilization_attitude_set_rpy_setpoint_i ( struct Int32Eulers rpy)