Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
stabilization_attitude.h File Reference

General attitude stabilization interface for rotorcrafts. More...

+ 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 init function. More...
 
struct StabilizationSetpoint stabilization_attitude_read_rc (bool in_flight, bool carefree, bool coordinated_turn, struct RadioControl *rc)
 Retrun attitude setpoint from RC as euler angles. More...
 
void stabilization_attitude_enter (void)
 Attitude control enter function. More...
 
void stabilization_attitude_run (bool in_flight, struct StabilizationSetpoint *sp, struct ThrustSetpoint *thrust, int32_t *cmd)
 Attitude control run function. More...
 

Detailed Description

General attitude stabilization interface for rotorcrafts.

The actual implementation is automatically included.

Definition in file stabilization_attitude.h.

Function Documentation

◆ stabilization_attitude_enter()

◆ stabilization_attitude_init()

void stabilization_attitude_init ( void  )

Stabilization init function.

needs to be implemented by the selected controller

◆ stabilization_attitude_read_rc()

struct StabilizationSetpoint stabilization_attitude_read_rc ( bool  in_flight,
bool  carefree,
bool  coordinated_turn,
struct RadioControl rc 
)

Retrun attitude setpoint from RC as euler angles.

weak function that can be re-implemeted if needed

Parameters
[in]in_flighttrue if in flight
[in]in_carefreetrue if in carefree mode
[in]coordinated_turntrue if in horizontal mode forward
[in]rcpointer to radio control structure
Returns
stabilization setpoint

Definition at line 138 of file stabilization.c.

References Stabilization::att_submode, Stabilization::mode, Stabilization::rc_in, stabilization, STABILIZATION_ATT_SUBMODE_CARE_FREE, stabilization_attitude_enter(), stabilization_attitude_reset_care_free_heading(), stabilization_attitude_reset_rc(), stabilization_direct_enter(), STABILIZATION_MODE_ATTITUDE, STABILIZATION_MODE_DIRECT, STABILIZATION_MODE_NONE, STABILIZATION_MODE_RATE, and stabilization_rate_enter().

Referenced by rc_cb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stabilization_attitude_run()

void stabilization_attitude_run ( bool  in_flight,
struct StabilizationSetpoint sp,
struct ThrustSetpoint thrust,
int32_t cmd 
)

Attitude control run function.

Parameters
[in]in_flighttrue if in flight
[in]sppointer to the stabilization setpoint structure
[in]thrustpointer to the thrust setoint structure
[out]cmdpointer to the output command vector

Definition at line 141 of file stabilization_attitude_euler_float.c.

References __k, AttRefEulerFloat::accel, AttRefEulerInt::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, FloatAttitudeGains::d, Int32AttitudeGains::d, FloatAttitudeGains::dd, Int32AttitudeGains::dd, IndiController_int::du, IndiController_int::enable_notch, IndiController_int::error, AttRefEulerFloat::euler, AttRefEulerInt::euler, EULERS_ADD, EULERS_BOUND_CUBE, EULERS_COPY, EULERS_DIFF, 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, heli_indi_gains, FloatAttitudeGains::i, Int32AttitudeGains::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, FloatAttitudeGains::p, Int32AttitudeGains::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, AttRefEulerFloat::rate, AttRefEulerInt::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, stab_sp_to_eulers_f(), stab_sp_to_eulers_i(), stab_sp_to_quat_f(), stab_sp_to_quat_i(), stabilization_att_fb_cmd, stabilization_att_ff_cmd, stabilization_att_sum_err, stabilization_att_sum_err_quat, stabilization_gains, stabilization_indi_attitude_run(), stateGetAccelNed_i(), stateGetBodyRates_f(), stateGetBodyRates_i(), stateGetNedToBodyEulers_f(), stateGetNedToBodyEulers_i(), stateGetNedToBodyQuat_f(), stateGetNedToBodyQuat_i(), stateGetNedToBodyRMat_i(), th_sp_to_thrust_i(), FloatEulers::theta, Int32Eulers::theta, THRUST_AXIS_Z, TRAJ_MAX_BANK, IndiController_int::u_setpoint, FloatVect3::x, Int32Vect3::x, NedCoor_i::x, FloatVect3::y, Int32Vect3::y, NedCoor_i::y, HeliIndiGains::yaw_d, HeliIndiGains::yaw_p, FloatVect3::z, Int32Vect3::z, and NedCoor_i::z.

Referenced by guidance_flip_run(), guidance_module_run(), stab_sp_rotate_f(), and vertical_ctrl_module_run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: