Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
guidance_indi_hybrid.h File Reference

A guidance mode based on Incremental Nonlinear Dynamic Inversion Come to ICRA2016 to learn more! More...

Include dependency graph for guidance_indi_hybrid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  guidance_indi_hybrid_params

Enumerations

enum  GuidanceIndiHybrid_HMode { GUIDANCE_INDI_HYBRID_H_POS , GUIDANCE_INDI_HYBRID_H_SPEED , GUIDANCE_INDI_HYBRID_H_ACCEL }
enum  GuidanceIndiHybrid_VMode { GUIDANCE_INDI_HYBRID_V_POS , GUIDANCE_INDI_HYBRID_V_SPEED , GUIDANCE_INDI_HYBRID_V_ACCEL }

Functions

void guidance_indi_init (void)
 Init function.
void guidance_indi_enter (void)
 Call upon entering indi guidance.
float guidance_indi_get_liftd (float pitch, float theta)
void guidance_indi_calcg_wing (float Gmat[GUIDANCE_INDI_HYBRID_V][GUIDANCE_INDI_HYBRID_U], struct FloatVect3 a_diff, float v_body[GUIDANCE_INDI_HYBRID_V])
 Perform WLS.
struct StabilizationSetpoint guidance_indi_run (struct FloatVect3 *accep_sp, float heading_sp)
struct StabilizationSetpoint guidance_indi_run_mode (bool in_flight, struct HorizontalGuidance *gh, struct VerticalGuidance *gv, enum GuidanceIndiHybrid_HMode h_mode, enum GuidanceIndiHybrid_VMode v_mode)
struct FloatVect3 guidance_indi_controller (bool in_flight, struct HorizontalGuidance *gh, struct VerticalGuidance *gv, enum GuidanceIndiHybrid_HMode h_mode, enum GuidanceIndiHybrid_VMode v_mode)
void guidance_set_min_max_airspeed (float min_airspeed, float max_airspeed)
void guidance_set_max_bank_angle (float max_bank)
 Guidance limit setters called by rotwing_state (also implemented by guidance_indi_hybrid).
void guidance_set_max_climb_speed (float max_climb_speed_quad, float max_climb_speed_fwd)
void guidance_set_max_descend_speed (float max_descend_speed_quad, float max_descend_speed_fwd)

Variables

struct FloatVect3 gi_speed_sp
struct guidance_indi_hybrid_params gih_params
float guidance_indi_pitch_pref_deg
float gi_unbounded_airspeed_sp
float guidance_indi_thrust_z_eff
float guidance_indi_specific_force_gain
bool take_heading_control
float guidance_indi_max_bank
float guidance_indi_min_pitch
bool force_forward
 forward flight for hybrid nav
bool guidance_indi_airspeed_filtering
bool coordinated_turn_use_accel
QuatButterworthLowPass quat_filt

Detailed Description

A guidance mode based on Incremental Nonlinear Dynamic Inversion Come to ICRA2016 to learn more!

Definition in file guidance_indi_hybrid.h.


Data Structure Documentation

◆ guidance_indi_hybrid_params

struct guidance_indi_hybrid_params

Definition at line 80 of file guidance_indi_hybrid.h.

Data Fields
float climb_vspeed_fwd
float climb_vspeed_quad
float descend_vspeed_fwd
float descend_vspeed_quad
float heading_bank_gain
float liftd_asq
float liftd_p50
float liftd_p80
float max_airspeed
float min_airspeed
float pos_gain
float pos_gainz
float speed_gain
float speed_gainz
float stall_protect_gain

Enumeration Type Documentation

◆ GuidanceIndiHybrid_HMode

Enumerator
GUIDANCE_INDI_HYBRID_H_POS 
GUIDANCE_INDI_HYBRID_H_SPEED 
GUIDANCE_INDI_HYBRID_H_ACCEL 

Definition at line 60 of file guidance_indi_hybrid.h.

◆ GuidanceIndiHybrid_VMode

Enumerator
GUIDANCE_INDI_HYBRID_V_POS 
GUIDANCE_INDI_HYBRID_V_SPEED 
GUIDANCE_INDI_HYBRID_V_ACCEL 

Definition at line 66 of file guidance_indi_hybrid.h.

Function Documentation

◆ guidance_indi_calcg_wing()

void guidance_indi_calcg_wing ( float Gmat[GUIDANCE_INDI_HYBRID_V][GUIDANCE_INDI_HYBRID_U],
struct FloatVect3 a_diff,
float v_gih[GUIDANCE_INDI_HYBRID_V] )
extern

Perform WLS.

Parameters
GmatDynamics matrix
a_diffacceleration errors in earth frame
body_v3D vector to write the control objective v

Perform WLS.

the NED accelerations, taking into account the lift of a wing that is horizontal at -90 degrees pitch

Parameters
GmatDynamics matrix
a_diffacceleration errors in earth frame
body_v3D vector to write the control objective v

Definition at line 86 of file guidance_indi_hybrid_quadplane.c.

References accel_bodyz_filt, float_eulers_of_quat_zxy(), Gmat, guidance_indi_get_liftd(), GUIDANCE_INDI_PITCH_EFF_SCALING, FloatEulers::phi, FloatEulers::psi, quat_filt, stateGetAirspeed_f(), FloatEulers::theta, v_gih, FloatVect3::x, FloatVect3::y, and FloatVect3::z.

Referenced by guidance_indi_run().

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

◆ guidance_indi_controller()

◆ guidance_indi_enter()

◆ guidance_indi_get_liftd()

float guidance_indi_get_liftd ( float pitch UNUSED,
float theta UNUSED )
externinline

Definition at line 446 of file eff_scheduling_rotwing.c.

References eff_scheduling_rotwing_lift_d, and UNUSED.

◆ guidance_indi_init()

◆ guidance_indi_run()

struct StabilizationSetpoint guidance_indi_run ( struct FloatVect3 * accel_sp,
float heading_sp )
extern
Parameters
accel_spaccel setpoint in NED frame [m/s^2]
heading_spthe desired heading [rad]
Returns
stabilization setpoint structure

main indi guidance function

Definition at line 235 of file guidance_indi.c.

References accely_filt, control_increment, du_gih, euler_cmd, eulers_zxy, filt_accel_ned, FLOAT_ANGLE_NORMALIZE, float_eulers_of_quat_yxz(), float_eulers_of_quat_zxy(), float_mat3_mult(), float_mat_inv_3d(), float_quat_normalize(), float_quat_of_eulers_yxz(), float_quat_of_eulers_zxy(), g1g2, Ga, Ga_inv, get_butterworth_2_low_pass_vect3(), gih_coordinated_turn_max_airspeed, gih_coordinated_turn_min_airspeed, Gmat, guidance_euler_cmd, guidance_indi_calcG(), guidance_indi_calcg_wing(), guidance_indi_hybrid_heading_sp, guidance_indi_hybrid_set_wls_settings(), guidance_indi_max_bank, GUIDANCE_INDI_MAX_PITCH, GUIDANCE_INDI_MAX_PUSHER_INCREMENT, guidance_indi_min_pitch, GUIDANCE_INDI_NU, GUIDANCE_INDI_NV, guidance_indi_propagate_filters(), guidance_indi_propagate_filters(), guidance_indi_run(), guidance_indi_set_wls_settings(), guidance_indi_specific_force_gain, heading, MAT33_INV, MAT33_VECT3_MUL, max_phi, MAX_PPRZ, FloatRates::p, FloatEulers::phi, FloatEulers::psi, FloatRates::q, quat_filt, FloatRates::r, RMAT_ELMT, sp_accel, stab_sp_from_quat_f(), stab_sp_from_quat_ff_rates_f(), stabilization, stabilization_attitude_get_heading_f(), stateGetAirspeed_f(), stateGetNedToBodyEulers_f(), stateGetNedToBodyEulersZxy_f(), take_heading_control, th_sp_from_incr_vect_f(), th_sp_from_thrust_i(), FloatEulers::theta, THRUST_AXIS_Z, thrust_filt, thrust_in, thrust_sp, thrust_vect, WLS_t::u, WLS_t::v, v_gih, VECT3_DIFF, wls_alloc(), FloatVect3::x, FloatVect3::y, and FloatVect3::z.

Referenced by guidance_indi_run(), guidance_indi_run_mode(), and guidance_indi_run_mode().

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

◆ guidance_indi_run_mode()

struct StabilizationSetpoint guidance_indi_run_mode ( bool in_flight,
struct HorizontalGuidance * gh,
struct VerticalGuidance * gv,
enum GuidanceIndiHybrid_HMode h_mode,
enum GuidanceIndiHybrid_VMode v_mode )
extern

◆ guidance_set_max_bank_angle()

void guidance_set_max_bank_angle ( float max_bank)
extern

Guidance limit setters called by rotwing_state (also implemented by guidance_indi_hybrid).

The one loop controller uses its own limits, so these are no-ops here.

Definition at line 388 of file guidance_indi_hybrid.c.

◆ guidance_set_max_climb_speed()

void guidance_set_max_climb_speed ( float max_climb_speed_quad,
float max_climb_speed_fwd )
extern

Definition at line 392 of file guidance_indi_hybrid.c.

◆ guidance_set_max_descend_speed()

void guidance_set_max_descend_speed ( float max_descend_speed_quad,
float max_descend_speed_fwd )
extern

Definition at line 397 of file guidance_indi_hybrid.c.

◆ guidance_set_min_max_airspeed()

void guidance_set_min_max_airspeed ( float min_airspeed,
float max_airspeed )
extern

Definition at line 383 of file guidance_indi_hybrid.c.

Variable Documentation

◆ coordinated_turn_use_accel

bool coordinated_turn_use_accel
extern

Definition at line 220 of file guidance_indi_hybrid.c.

◆ force_forward

bool force_forward
extern

forward flight for hybrid nav

Definition at line 171 of file guidance_indi_hybrid.c.

◆ gi_speed_sp

struct FloatVect3 gi_speed_sp
extern

◆ gi_unbounded_airspeed_sp

float gi_unbounded_airspeed_sp
extern

Definition at line 248 of file guidance_indi_hybrid.c.

◆ gih_params

struct guidance_indi_hybrid_params gih_params
extern

Definition at line 112 of file guidance_indi_hybrid.c.

◆ guidance_indi_airspeed_filtering

bool guidance_indi_airspeed_filtering
extern

Definition at line 173 of file guidance_indi_hybrid.c.

Referenced by compute_accel_from_speed_sp().

◆ guidance_indi_max_bank

◆ guidance_indi_min_pitch

float guidance_indi_min_pitch
extern

Definition at line 210 of file guidance_indi_hybrid.c.

Referenced by guidance_indi_run().

◆ guidance_indi_pitch_pref_deg

float guidance_indi_pitch_pref_deg
extern

Definition at line 133 of file guidance_indi_hybrid.c.

Referenced by guidance_indi_hybrid_set_wls_settings().

◆ guidance_indi_specific_force_gain

float guidance_indi_specific_force_gain
extern

◆ guidance_indi_thrust_z_eff

float guidance_indi_thrust_z_eff
extern

◆ quat_filt

◆ take_heading_control

bool take_heading_control
extern

Definition at line 169 of file guidance_indi_hybrid.c.

Referenced by guidance_indi_run().