Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
eff_scheduling_rotwing.c File Reference
+ Include dependency graph for eff_scheduling_rotwing.c:

Go to the source code of this file.

Macros

#define WING_ROTATION_CAN_ROTWING_ID   ABI_BROADCAST
 ABI binding wing position data. More...
 
#define AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT   16
 

Functions

float bound_or_zero (float value, float low_lim, float up_lim)
 
void eff_scheduling_rotwing_update_wing_angle (void)
 
void eff_scheduling_rotwing_update_MMOI (void)
 
void eff_scheduling_rotwing_update_cmd (void)
 
void eff_scheduling_rotwing_update_airspeed (void)
 
void eff_scheduling_rotwing_update_hover_motor_effectiveness (void)
 
void eff_scheduling_rotwing_update_elevator_effectiveness (void)
 
void eff_scheduling_rotwing_update_rudder_effectiveness (void)
 
void eff_scheduling_rotwing_update_aileron_effectiveness (void)
 
void eff_scheduling_rotwing_update_flaperon_effectiveness (void)
 
void eff_scheduling_rotwing_update_pusher_effectiveness (void)
 
void eff_scheduling_rotwing_schedule_liftd (void)
 
float guidance_indi_get_liftd (float pitch UNUSED, float theta UNUSED)
 
void stabilization_indi_set_wls_settings (void)
 Function that sets the u_min, u_max and u_pref if function not elsewhere defined. More...
 
void guidance_indi_hybrid_set_wls_settings (float body_v[3], float roll_angle, float pitch_angle)
 
static void wing_position_cb (uint8_t sender_id UNUSED, struct act_feedback_t *pos_msg, uint8_t num_act)
 
void eff_scheduling_rotwing_init (void)
 
void eff_scheduling_rotwing_periodic (void)
 

Variables

struct rotwing_eff_sched_param_t eff_sched_p
 
int32_t rw_flap_offset = 0
 
float eff_sched_pusher_time = 0.002
 
float roll_eff_slider = 12.f
 
static const float Wu_gih_original [GUIDANCE_INDI_HYBRID_U] = GUIDANCE_INDI_WLS_WU
 
struct rotwing_eff_sched_var_t eff_sched_var
 
static abi_event wing_position_ev
 
float eff_scheduling_rotwing_lift_d = 0.0f
 

Detailed Description

Author
Dennis van Wijngaarden D.C.v.nosp@m.anWi.nosp@m.jngaa.nosp@m.rden.nosp@m.@tude.nosp@m.lft..nosp@m.nl The control effectiveness scheduler for the rotating wing drone type

Definition in file eff_scheduling_rotwing.c.

Macro Definition Documentation

◆ AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT

#define AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT   16

◆ WING_ROTATION_CAN_ROTWING_ID

#define WING_ROTATION_CAN_ROTWING_ID   ABI_BROADCAST

ABI binding wing position data.

Definition at line 200 of file eff_scheduling_rotwing.c.

Function Documentation

◆ bound_or_zero()

float bound_or_zero ( float  value,
float  low_lim,
float  up_lim 
)
inline

Definition at line 155 of file eff_scheduling_rotwing.c.

Referenced by eff_scheduling_rotwing_update_aileron_effectiveness(), and eff_scheduling_rotwing_update_hover_motor_effectiveness().

+ Here is the caller graph for this function:

◆ eff_scheduling_rotwing_init()

◆ eff_scheduling_rotwing_periodic()

◆ eff_scheduling_rotwing_schedule_liftd()

◆ eff_scheduling_rotwing_update_aileron_effectiveness()

void eff_scheduling_rotwing_update_aileron_effectiveness ( void  )
inline

◆ eff_scheduling_rotwing_update_airspeed()

void eff_scheduling_rotwing_update_airspeed ( void  )
inline

Definition at line 302 of file eff_scheduling_rotwing.c.

References rotwing_eff_sched_var_t::airspeed, rotwing_eff_sched_var_t::airspeed2, eff_sched_var, and stateGetAirspeed_f().

Referenced by eff_scheduling_rotwing_periodic().

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

◆ eff_scheduling_rotwing_update_cmd()

void eff_scheduling_rotwing_update_cmd ( void  )
inline

◆ eff_scheduling_rotwing_update_elevator_effectiveness()

◆ eff_scheduling_rotwing_update_flaperon_effectiveness()

void eff_scheduling_rotwing_update_flaperon_effectiveness ( void  )
inline

◆ eff_scheduling_rotwing_update_hover_motor_effectiveness()

◆ eff_scheduling_rotwing_update_MMOI()

◆ eff_scheduling_rotwing_update_pusher_effectiveness()

void eff_scheduling_rotwing_update_pusher_effectiveness ( void  )
inline

◆ eff_scheduling_rotwing_update_rudder_effectiveness()

◆ eff_scheduling_rotwing_update_wing_angle()

◆ guidance_indi_get_liftd()

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

Definition at line 468 of file eff_scheduling_rotwing.c.

References eff_scheduling_rotwing_lift_d.

◆ guidance_indi_hybrid_set_wls_settings()

◆ stabilization_indi_set_wls_settings()

void stabilization_indi_set_wls_settings ( void  )

Function that sets the u_min, u_max and u_pref if function not elsewhere defined.

Definition at line 472 of file eff_scheduling_rotwing.c.

References act_is_servo, act_pref, actuator_state_filt_vect, eff_sched_pusher_time, MAX_PPRZ, rw_flap_offset, WLS_t::u_max, WLS_t::u_min, WLS_t::u_pref, and wls_stab_p.

◆ wing_position_cb()

static void wing_position_cb ( uint8_t sender_id  UNUSED,
struct act_feedback_t pos_msg,
uint8_t  num_act 
)
static

Definition at line 205 of file eff_scheduling_rotwing.c.

References eff_sched_var, and rotwing_eff_sched_var_t::wing_rotation_rad.

Referenced by eff_scheduling_rotwing_init().

+ Here is the caller graph for this function:

Variable Documentation

◆ eff_sched_p

struct rotwing_eff_sched_param_t eff_sched_p
Initial value:
= {
.Ixx_body = ROTWING_EFF_SCHED_IXX_BODY,
.Iyy_body = ROTWING_EFF_SCHED_IYY_BODY,
.Izz = ROTWING_EFF_SCHED_IZZ,
.Ixx_wing = ROTWING_EFF_SCHED_IXX_WING,
.Iyy_wing = ROTWING_EFF_SCHED_IYY_WING,
.m = ROTWING_EFF_SCHED_M,
.DMdpprz_hover_pitch = ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_PITCH,
.DMdpprz_hover_roll = ROTWING_EFF_SCHED_DM_DPPRZ_HOVER_ROLL,
.hover_roll_pitch_coef = ROTWING_EFF_SCHED_HOVER_ROLL_PITCH_COEF,
.hover_roll_roll_coef = ROTWING_EFF_SCHED_HOVER_ROLL_ROLL_COEF,
.k_elevator = ROTWING_EFF_SCHED_K_ELEVATOR,
.k_rudder = ROTWING_EFF_SCHED_K_RUDDER,
.k_aileron = ROTWING_EFF_SCHED_K_AILERON,
.k_flaperon = ROTWING_EFF_SCHED_K_FLAPERON,
.k_pusher = ROTWING_EFF_SCHED_K_PUSHER,
.k_elevator_deflection = ROTWING_EFF_SCHED_K_ELEVATOR_DEFLECTION,
.d_rudder_d_pprz = ROTWING_EFF_SCHED_D_RUDDER_D_PPRZ,
.k_rpm_pprz_pusher = ROTWING_EFF_SCHED_K_RPM_PPRZ_PUSHER,
.k_lift_wing = ROTWING_EFF_SCHED_K_LIFT_WING,
.k_lift_fuselage = ROTWING_EFF_SCHED_K_LIFT_FUSELAGE,
.k_lift_tail = ROTWING_EFF_SCHED_K_LIFT_TAIL
}

Definition at line 1 of file eff_scheduling_rotwing.c.

Referenced by eff_scheduling_rotwing_init(), eff_scheduling_rotwing_schedule_liftd(), eff_scheduling_rotwing_update_aileron_effectiveness(), eff_scheduling_rotwing_update_elevator_effectiveness(), eff_scheduling_rotwing_update_flaperon_effectiveness(), eff_scheduling_rotwing_update_hover_motor_effectiveness(), eff_scheduling_rotwing_update_MMOI(), eff_scheduling_rotwing_update_pusher_effectiveness(), and eff_scheduling_rotwing_update_rudder_effectiveness().

◆ eff_sched_pusher_time

float eff_sched_pusher_time = 0.002

Definition at line 173 of file eff_scheduling_rotwing.c.

Referenced by stabilization_indi_set_wls_settings().

◆ eff_sched_var

◆ eff_scheduling_rotwing_lift_d

float eff_scheduling_rotwing_lift_d = 0.0f

◆ roll_eff_slider

float roll_eff_slider = 12.f

◆ rw_flap_offset

int32_t rw_flap_offset = 0

Definition at line 152 of file eff_scheduling_rotwing.c.

Referenced by stabilization_indi_set_wls_settings().

◆ wing_position_ev

abi_event wing_position_ev
static

Definition at line 203 of file eff_scheduling_rotwing.c.

Referenced by eff_scheduling_rotwing_init().

◆ Wu_gih_original

const float Wu_gih_original[GUIDANCE_INDI_HYBRID_U] = GUIDANCE_INDI_WLS_WU
static

Definition at line 176 of file eff_scheduling_rotwing.c.

Referenced by guidance_indi_hybrid_set_wls_settings().