Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "math/pprz_algebra_int.h"
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 |
Guidance controllers (horizontal and vertical) for Hybrid UAV configurations.
Definition in file guidance_hybrid.h.
void guidance_hybrid_airspeed_to_attitude | ( | struct Int32Eulers * | ypr_sp | ) |
Convert a required airspeed to a certain attitude for the Hybrid.
ypr_sp | Attitude 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().
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().
void guidance_hybrid_init | ( | void | ) |
Hybrid Guidance Initialization function.
Definition at line 99 of file guidance_hybrid.c.
References DefaultPeriodic, force_forward_flight, guidance_hovering, guidance_hybrid_airspeed_ref, guidance_hybrid_airspeed_sp, guidance_hybrid_norm_ref_airspeed, guidance_hybrid_ref_airspeed, guidance_hybrid_ypr_sp, high_res_psi, horizontal_speed_gain, INT_EULERS_ZERO, INT_VECT2_ZERO, max_turn_bank, register_periodic_telemetry(), send_hybrid_guidance(), turn_bank_gain, wind_estimate, wind_estimate_high_res, and wind_gain.
void guidance_hybrid_position_to_airspeed | ( | void | ) |
Description.
Definition at line 264 of file guidance_hybrid.c.
References force_forward_flight, guidance_h, guidance_h_pos_err, guidance_hybrid_airspeed_sp, guidance_hybrid_ypr_sp, horizontal_speed_gain, INT32_TRIG_FRAC, int32_vect2_norm(), INT_MULT_RSHIFT, INT_VECT2_ZERO, max_airspeed, HorizontalGuidanceSetpoint::pos, POS_BFP_OF_REAL, POS_FLOAT_OF_BFP, PPRZ_ITRIG_COS, PPRZ_ITRIG_SIN, Int32Eulers::psi, HorizontalGuidance::sp, stateGetPositionNed_i(), VECT2_ADD, VECT2_DIFF, VECT2_SDIV, wind_estimate, Int32Vect2::x, and Int32Vect2::y.
Referenced by guidance_hybrid_run().
void guidance_hybrid_reset_heading | ( | struct Int32Eulers * | sp_cmd | ) |
Description.
sp_cmd | Add 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().
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().
void guidance_hybrid_set_cmd_i | ( | struct Int32Eulers * | sp_cmd | ) |
Creates the attitude set-points from an orientation vector.
sp_cmd | The orientation vector |
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().
void guidance_hybrid_vertical | ( | void | ) |
Description.
Definition at line 378 of file guidance_hybrid.c.
References alt_pitch_gain, ANGLE_BFP_OF_REAL, guidance_hybrid_norm_ref_airspeed, guidance_v_delta_t, guidance_v_kd, guidance_v_ki, guidance_v_kp, guidance_v_nominal_throttle, INT_MULT_RSHIFT, MAX_PPRZ, stabilization_cmd, and v_control_pitch.
Referenced by guidance_v_from_nav().
float alt_pitch_gain |
Definition at line 50 of file guidance_hybrid.c.
Referenced by guidance_hybrid_vertical().
bool force_forward_flight |
Definition at line 72 of file guidance_hybrid.c.
Referenced by guidance_hybrid_init(), and guidance_hybrid_position_to_airspeed().
int32_t guidance_hybrid_norm_ref_airspeed |
Definition at line 49 of file guidance_hybrid.c.
Referenced by guidance_h_mode_changed(), guidance_hybrid_airspeed_to_attitude(), guidance_hybrid_init(), guidance_hybrid_vertical(), and send_hybrid_guidance().
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().
int32_t max_airspeed |
Definition at line 51 of file guidance_hybrid.c.
Referenced by guidance_hybrid_position_to_airspeed().
float max_turn_bank |
Definition at line 54 of file guidance_hybrid.c.
Referenced by guidance_hybrid_airspeed_to_attitude(), and guidance_hybrid_init().
float turn_bank_gain |
Definition at line 55 of file guidance_hybrid.c.
Referenced by guidance_hybrid_airspeed_to_attitude(), and guidance_hybrid_init().
int32_t wind_gain |
Definition at line 52 of file guidance_hybrid.c.
Referenced by guidance_hybrid_determine_wind_estimate(), and guidance_hybrid_init().