Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/ctrl/eff_scheduling_nederdrone.h"
#include "firmwares/rotorcraft/stabilization/stabilization_indi.h"
#include "state.h"
#include "autopilot.h"
#include "modules/radio_control/radio_control.h"
#include "modules/actuators/actuators.h"
Go to the source code of this file.
Macros | |
#define | INDI_SCHEDULING_LOWER_BOUND_G1 0.0001 |
#define | INDI_SCHEDULING_LOW_AIRSPEED 12.0 |
#define | INDI_SCHEDULING_TRIM_ELEVATOR 0.0 |
#define | INDI_SCHEDULING_TRIM_FLAPS 0.0 |
Functions | |
void | schdule_control_effectiveness (void) |
Function that calculates control effectiveness values for the Nederdrone inner loop. More... | |
void | ctrl_eff_scheduling_init (void) |
Initialises periodic loop;. More... | |
void | ctrl_eff_scheduling_periodic (void) |
Periodic function that interpolates between gain sets depending on the scheduling variable. More... | |
Variables | |
float | trim_elevator = INDI_SCHEDULING_TRIM_ELEVATOR |
float | trim_flaps = INDI_SCHEDULING_TRIM_FLAPS |
float | pref_flaps_factor = INDI_SCHEDULING_PREF_FLAPS_FACTOR |
float | indi_Wu_original [INDI_NUM_ACT] = STABILIZATION_INDI_WLS_WU |
bool | all_act_fwd_sched = false |
int32_t | use_scheduling = 1 |
float | thrust_eff_scaling = 1.0 |
float | backwing_thrust_eff_scaling = 1.0 |
float | backwing_pitch_eff_scaling = 1.0 |
static float | g_forward [4][INDI_NUM_ACT] = {STABILIZATION_INDI_G1_ROLL_FWD, STABILIZATION_INDI_G1_PITCH_FWD, STABILIZATION_INDI_G1_YAW_FWD, STABILIZATION_INDI_G1_THRUST_FWD} |
static float | g_hover [4][INDI_NUM_ACT] = {STABILIZATION_INDI_G1_ROLL, STABILIZATION_INDI_G1_PITCH, STABILIZATION_INDI_G1_YAW, STABILIZATION_INDI_G1_THRUST} |
float | sched_ratio_tip_props = 1.0 |
float | sched_tip_prop_upper_pitch_limit_deg = -45 |
float | sched_tip_prop_lower_pitch_limit_deg = -65 |
bool | sched_tip_props_always_on = false |
If instead using online adaptation is an option, be sure to not use this module at the same time!
Definition in file eff_scheduling_nederdrone.c.
#define INDI_SCHEDULING_LOW_AIRSPEED 12.0 |
Definition at line 41 of file eff_scheduling_nederdrone.c.
#define INDI_SCHEDULING_LOWER_BOUND_G1 0.0001 |
Definition at line 37 of file eff_scheduling_nederdrone.c.
#define INDI_SCHEDULING_TRIM_ELEVATOR 0.0 |
Definition at line 49 of file eff_scheduling_nederdrone.c.
#define INDI_SCHEDULING_TRIM_FLAPS 0.0 |
Definition at line 53 of file eff_scheduling_nederdrone.c.
void ctrl_eff_scheduling_init | ( | void | ) |
Initialises periodic loop;.
Definition at line 92 of file eff_scheduling_nederdrone.c.
References g_forward, g_hover, and INDI_G_SCALING.
void ctrl_eff_scheduling_periodic | ( | void | ) |
Periodic function that interpolates between gain sets depending on the scheduling variable.
Definition at line 108 of file eff_scheduling_nederdrone.c.
References act_pref, schdule_control_effectiveness(), sched_ratio_tip_props, trim_elevator, and trim_flaps.
void schdule_control_effectiveness | ( | void | ) |
Function that calculates control effectiveness values for the Nederdrone inner loop.
Default requency: 20 Hz.
Definition at line 131 of file eff_scheduling_nederdrone.c.
References all_act_fwd_sched, backwing_pitch_eff_scaling, backwing_thrust_eff_scaling, eulers_zxy, float_eulers_of_quat_zxy(), g1g2, g_forward, g_hover, INDI_SCHEDULING_LOW_AIRSPEED, indi_Wu_original, pref_flaps_factor, RADIO_AUX2, radio_control, sched_ratio_tip_props, sched_tip_prop_lower_pitch_limit_deg, sched_tip_prop_upper_pitch_limit_deg, sched_tip_props_always_on, stateGetAirspeed_f(), stateGetNedToBodyQuat_f(), FloatEulers::theta, thrust_eff_scaling, use_scheduling, RadioControl::values, wls_stab_p, and WLS_t::Wu.
Referenced by ctrl_eff_scheduling_periodic().
bool all_act_fwd_sched = false |
Definition at line 65 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
float backwing_pitch_eff_scaling = 1.0 |
Definition at line 71 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
float backwing_thrust_eff_scaling = 1.0 |
Definition at line 70 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
|
static |
Definition at line 73 of file eff_scheduling_nederdrone.c.
Referenced by ctrl_eff_scheduling_init(), and schdule_control_effectiveness().
|
static |
Definition at line 78 of file eff_scheduling_nederdrone.c.
Referenced by ctrl_eff_scheduling_init(), and schdule_control_effectiveness().
float indi_Wu_original[INDI_NUM_ACT] = STABILIZATION_INDI_WLS_WU |
Definition at line 63 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
float pref_flaps_factor = INDI_SCHEDULING_PREF_FLAPS_FACTOR |
Definition at line 61 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
float sched_ratio_tip_props = 1.0 |
Definition at line 82 of file eff_scheduling_nederdrone.c.
Referenced by ctrl_eff_scheduling_periodic(), and schdule_control_effectiveness().
float sched_tip_prop_lower_pitch_limit_deg = -65 |
Definition at line 86 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
float sched_tip_prop_upper_pitch_limit_deg = -45 |
Definition at line 84 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
bool sched_tip_props_always_on = false |
Definition at line 88 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
float thrust_eff_scaling = 1.0 |
Definition at line 69 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().
float trim_elevator = INDI_SCHEDULING_TRIM_ELEVATOR |
Definition at line 56 of file eff_scheduling_nederdrone.c.
Referenced by ctrl_eff_scheduling_periodic().
float trim_flaps = INDI_SCHEDULING_TRIM_FLAPS |
Definition at line 57 of file eff_scheduling_nederdrone.c.
Referenced by ctrl_eff_scheduling_periodic().
int32_t use_scheduling = 1 |
Definition at line 67 of file eff_scheduling_nederdrone.c.
Referenced by schdule_control_effectiveness().