Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
guidance_hybrid.h File Reference
+ Include dependency graph for guidance_hybrid.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void guidance_hybrid_run (void)
 Runs the Hybrid Guidance main functions. More...
 
void guidance_hybrid_init (void)
 Hybrid Guidance Initialization function. More...
 
void guidance_hybrid_set_cmd_i (struct Int32Eulers *sp_cmd)
 Creates the attitude set-points from an orientation vector. More...
 
void guidance_hybrid_airspeed_to_attitude (struct Int32Eulers *ypr_sp)
 Convert a required airspeed to a certain attitude for the Hybrid. More...
 
void guidance_hybrid_position_to_airspeed (void)
 Description. More...
 
void guidance_hybrid_determine_wind_estimate (void)
 Description. More...
 
void guidance_hybrid_reset_heading (struct Int32Eulers *sp_cmd)
 Description. More...
 
void guidance_hybrid_vertical (void)
 Description. More...
 

Variables

int32_t guidance_hybrid_norm_ref_airspeed
 
float alt_pitch_gain
 
int32_t max_airspeed
 
int32_t wind_gain
 
int32_t horizontal_speed_gain
 
float max_turn_bank
 
float turn_bank_gain
 
bool force_forward_flight
 

Detailed Description

Guidance controllers (horizontal and vertical) for Hybrid UAV configurations.

Definition in file guidance_hybrid.h.

Function Documentation

◆ guidance_hybrid_airspeed_to_attitude()

void guidance_hybrid_airspeed_to_attitude ( struct Int32Eulers ypr_sp)

Convert a required airspeed to a certain attitude for the Hybrid.

Parameters
ypr_spAttitude set-point

Convert a required airspeed to a certain attitude for the Hybrid.

if required speed is lower than 4 m/s act like a rotorcraft

if required speed is higher than 4 m/s act like a fixedwing

Definition at line 145 of file guidance_hybrid.c.

References airspeed_sp_heading_disp, ANGLE_BFP_OF_REAL, ANGLE_FLOAT_OF_BFP, FLOAT_ANGLE_NORMALIZE, guidance_hybrid_airspeed_sp, guidance_hybrid_norm_ref_airspeed, guidance_hybrid_ref_airspeed, heading_diff_disp, high_res_psi, INT32_ANGLE_FRAC, INT32_ANGLE_HIGH_RES_FRAC, INT32_ANGLE_HIGH_RES_NORMALIZE, INT32_ANGLE_PI, INT32_POS_FRAC, INT32_TRIG_FRAC, int32_vect2_norm(), max_turn_bank, norm_sp_airspeed_disp, omega_disp, Int32Eulers::phi, POS_FLOAT_OF_BFP, PPRZ_ITRIG_COS, PPRZ_ITRIG_SIN, Int32Eulers::psi, Int32Eulers::theta, turn_bank_gain, v_control_pitch, Int32Vect2::x, and Int32Vect2::y.

Referenced by guidance_hybrid_run().

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

◆ guidance_hybrid_determine_wind_estimate()

void guidance_hybrid_determine_wind_estimate ( void  )

Description.

Definition at line 332 of file guidance_hybrid.c.

References guidance_hybrid_ref_airspeed, INT32_VECT2_RSHIFT, stateGetSpeedNed_i(), VECT2_DIFF, wind_estimate, wind_estimate_high_res, wind_gain, Int32Vect2::x, and Int32Vect2::y.

Referenced by guidance_hybrid_run().

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

◆ guidance_hybrid_init()

◆ guidance_hybrid_position_to_airspeed()

◆ guidance_hybrid_reset_heading()

void guidance_hybrid_reset_heading ( struct Int32Eulers sp_cmd)

Description.

Parameters
sp_cmdAdd Description

Definition at line 137 of file guidance_hybrid.c.

References guidance_hybrid_ypr_sp, high_res_psi, INT32_ANGLE_FRAC, INT32_ANGLE_HIGH_RES_FRAC, Int32Eulers::psi, and stabilization_attitude_set_rpy_setpoint_i().

Referenced by guidance_h_from_nav().

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

◆ guidance_hybrid_run()

void guidance_hybrid_run ( void  )

Runs the Hybrid Guidance main functions.

Definition at line 129 of file guidance_hybrid.c.

References guidance_hybrid_airspeed_to_attitude(), guidance_hybrid_determine_wind_estimate(), guidance_hybrid_position_to_airspeed(), guidance_hybrid_set_cmd_i(), and guidance_hybrid_ypr_sp.

Referenced by guidance_h_from_nav().

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

◆ guidance_hybrid_set_cmd_i()

void guidance_hybrid_set_cmd_i ( struct Int32Eulers sp_cmd)

Creates the attitude set-points from an orientation vector.

Parameters
sp_cmdThe orientation vector
Todo:
calc sp_quat in fixed-point

Definition at line 350 of file guidance_hybrid.c.

References ANGLE_FLOAT_OF_BFP, float_quat_of_orientation_vect(), int32_eulers_of_quat(), int32_quat_comp(), int32_quat_of_axis_angle(), Int32Eulers::phi, Int32Eulers::psi, QUAT_BFP_OF_REAL, stab_att_sp_euler, stab_att_sp_quat, Int32Eulers::theta, FloatVect3::x, FloatVect3::y, and FloatVect3::z.

Referenced by guidance_hybrid_run().

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

◆ guidance_hybrid_vertical()

void guidance_hybrid_vertical ( void  )

Variable Documentation

◆ alt_pitch_gain

float alt_pitch_gain

Definition at line 50 of file guidance_hybrid.c.

Referenced by guidance_hybrid_vertical().

◆ force_forward_flight

bool force_forward_flight

Definition at line 72 of file guidance_hybrid.c.

Referenced by guidance_hybrid_init(), and guidance_hybrid_position_to_airspeed().

◆ guidance_hybrid_norm_ref_airspeed

◆ horizontal_speed_gain

int32_t horizontal_speed_gain

Definition at line 53 of file guidance_hybrid.c.

Referenced by guidance_hybrid_init(), and guidance_hybrid_position_to_airspeed().

◆ max_airspeed

int32_t max_airspeed

Definition at line 51 of file guidance_hybrid.c.

Referenced by guidance_hybrid_position_to_airspeed().

◆ max_turn_bank

float max_turn_bank

Definition at line 54 of file guidance_hybrid.c.

Referenced by guidance_hybrid_airspeed_to_attitude(), and guidance_hybrid_init().

◆ turn_bank_gain

float turn_bank_gain

Definition at line 55 of file guidance_hybrid.c.

Referenced by guidance_hybrid_airspeed_to_attitude(), and guidance_hybrid_init().

◆ wind_gain

int32_t wind_gain