Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
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.
#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.
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 199 of file eff_scheduling_rotwing.c.

Referenced by eff_scheduling_rotwing_init().

Function Documentation

◆ bound_or_zero()

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

Definition at line 154 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()

void eff_scheduling_rotwing_init ( void )

Definition at line 218 of file eff_scheduling_rotwing.c.

References eff_sched_p, eff_sched_var, wing_position_cb(), wing_position_ev, and WING_ROTATION_CAN_ROTWING_ID.

Here is the call graph for this function:

◆ eff_scheduling_rotwing_periodic()

◆ eff_scheduling_rotwing_schedule_liftd()

void eff_scheduling_rotwing_schedule_liftd ( void )
inline

Definition at line 431 of file eff_scheduling_rotwing.c.

References eff_sched_p, eff_sched_var, and eff_scheduling_rotwing_lift_d.

Referenced by eff_scheduling_rotwing_periodic().

Here is the caller graph for this function:

◆ eff_scheduling_rotwing_update_aileron_effectiveness()

void eff_scheduling_rotwing_update_aileron_effectiveness ( void )
inline

Definition at line 395 of file eff_scheduling_rotwing.c.

References bound_or_zero(), eff_sched_p, eff_sched_var, g1g2, RW_ap, and RW_aq.

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_airspeed()

void eff_scheduling_rotwing_update_airspeed ( void )
inline

Definition at line 301 of file eff_scheduling_rotwing.c.

References 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

Definition at line 292 of file eff_scheduling_rotwing.c.

References actuator_state_filt_vect, and eff_sched_var.

Referenced by eff_scheduling_rotwing_periodic().

Here is the caller graph for this function:

◆ eff_scheduling_rotwing_update_elevator_effectiveness()

void eff_scheduling_rotwing_update_elevator_effectiveness ( void )
inline

Definition at line 355 of file eff_scheduling_rotwing.c.

References eff_sched_p, eff_sched_var, g1g2, and RW_aq.

Referenced by eff_scheduling_rotwing_periodic().

Here is the caller graph for this function:

◆ eff_scheduling_rotwing_update_flaperon_effectiveness()

void eff_scheduling_rotwing_update_flaperon_effectiveness ( void )
inline

Definition at line 408 of file eff_scheduling_rotwing.c.

References eff_sched_p, eff_sched_var, g1g2, and RW_ap.

Referenced by eff_scheduling_rotwing_periodic().

Here is the caller graph for this function:

◆ eff_scheduling_rotwing_update_hover_motor_effectiveness()

void eff_scheduling_rotwing_update_hover_motor_effectiveness ( void )
inline

Definition at line 309 of file eff_scheduling_rotwing.c.

References actuator_state_filt_vect, bound_or_zero(), eff_sched_p, eff_sched_var, g1g2, MAX_PPRZ, RW_ap, and RW_aq.

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_MMOI()

void eff_scheduling_rotwing_update_MMOI ( void )
inline

Definition at line 282 of file eff_scheduling_rotwing.c.

References eff_sched_p, and eff_sched_var.

Referenced by eff_scheduling_rotwing_periodic().

Here is the caller graph for this function:

◆ eff_scheduling_rotwing_update_pusher_effectiveness()

void eff_scheduling_rotwing_update_pusher_effectiveness ( void )
inline

Definition at line 416 of file eff_scheduling_rotwing.c.

References eff_sched_p, eff_sched_var, g1g2, and RW_aX.

Referenced by eff_scheduling_rotwing_periodic().

Here is the caller graph for this function:

◆ eff_scheduling_rotwing_update_rudder_effectiveness()

void eff_scheduling_rotwing_update_rudder_effectiveness ( void )
inline

Definition at line 377 of file eff_scheduling_rotwing.c.

References eff_sched_p, eff_sched_var, g1g2, and RW_ar.

Referenced by eff_scheduling_rotwing_periodic().

Here is the caller graph for this function:

◆ eff_scheduling_rotwing_update_wing_angle()

void eff_scheduling_rotwing_update_wing_angle ( void )
inline

Definition at line 267 of file eff_scheduling_rotwing.c.

References eff_sched_var.

Referenced by eff_scheduling_rotwing_periodic().

Here is the caller graph for this function:

◆ guidance_indi_get_liftd()

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

Definition at line 446 of file eff_scheduling_rotwing.c.

◆ 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 450 of file eff_scheduling_rotwing.c.

References act_is_servo, act_pref, actuator_state_filt_vect, actuators_pprz, eff_sched_pusher_time, MAX_PPRZ, rw_flap_offset, and wls_stab_p.

◆ wing_position_cb()

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

Definition at line 204 of file eff_scheduling_rotwing.c.

References eff_sched_var, UNUSED, and wing_position_cb().

Referenced by eff_scheduling_rotwing_init(), wing_position_cb(), wing_position_cb(), wing_position_cb(), and wing_position_cb().

Here is the call graph for this function:
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 127 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(), eff_scheduling_rotwing_update_rudder_effectiveness(), and stabilization_indi_set_wls_settings().

◆ eff_sched_pusher_time

float eff_sched_pusher_time = 0.002

Definition at line 172 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

Definition at line 173 of file eff_scheduling_rotwing.c.

◆ rw_flap_offset

int32_t rw_flap_offset = 0

Definition at line 151 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 202 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 175 of file eff_scheduling_rotwing.c.

Referenced by guidance_indi_hybrid_set_wls_settings().