|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/ctrl/eff_scheduling_rotwing_rpm_ctrl.h"#include "generated/airframe.h"#include "state.h"#include "firmwares/rotorcraft/stabilization/stabilization_indi.h"#include "firmwares/rotorcraft/guidance/guidance_indi_hybrid.h"#include "modules/rotwing_drone/rotwing_state.h"#include "autopilot.h"#include "modules/actuators/actuators.h"#include "modules/core/abi.h"#include "modules/core/commands.h"Go to the source code of this file.
Macros | |
| #define | ROTWING_PITCH_MOTOR_TILT_ANGLE_DEG 10.0 |
| #define | WING_ROTATION_CAN_ROTWING_ID ABI_BROADCAST |
| ABI binding wing position data. | |
| #define | AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT 16 |
Variables | |
| struct rotwing_eff_sched_param_t | eff_sched_p |
| int32_t | rw_flap_offset = 0 |
| float | eff_scheduling_rotwing_lift_d = 0.0f |
| 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 |
| #define AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT 16 |
| #define ROTWING_PITCH_MOTOR_TILT_ANGLE_DEG 10.0 |
Definition at line 141 of file eff_scheduling_rotwing_rpm_ctrl.c.
Referenced by eff_scheduling_rotwing_update_hover_motor_effectiveness().
| #define WING_ROTATION_CAN_ROTWING_ID ABI_BROADCAST |
ABI binding wing position data.
Definition at line 217 of file eff_scheduling_rotwing_rpm_ctrl.c.
|
inline |
Definition at line 172 of file eff_scheduling_rotwing_rpm_ctrl.c.
Referenced by eff_scheduling_rotwing_update_aileron_effectiveness(), and eff_scheduling_rotwing_update_hover_motor_effectiveness().
| void eff_scheduling_rotwing_init | ( | void | ) |
Definition at line 236 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_p, eff_sched_var, wing_position_cb(), wing_position_ev, and WING_ROTATION_CAN_ROTWING_ID.
| void eff_scheduling_rotwing_periodic | ( | void | ) |
Definition at line 261 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_scheduling_rotwing_schedule_liftd(), eff_scheduling_rotwing_update_aileron_effectiveness(), eff_scheduling_rotwing_update_airspeed(), eff_scheduling_rotwing_update_cmd(), 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 eff_scheduling_rotwing_update_wing_angle().
|
inline |
Definition at line 440 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_p, eff_sched_var, and eff_scheduling_rotwing_lift_d.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 406 of file eff_scheduling_rotwing_rpm_ctrl.c.
References bound_or_zero(), eff_sched_p, eff_sched_var, g1g2, RW_ap, and RW_aq.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 314 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_var, and stateGetAirspeed_f().
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 305 of file eff_scheduling_rotwing_rpm_ctrl.c.
References actuator_state_filt_vect, and eff_sched_var.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 366 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_p, eff_sched_var, g1g2, and RW_aq.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 419 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_p, eff_sched_var, g1g2, and RW_ap.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 322 of file eff_scheduling_rotwing_rpm_ctrl.c.
References bound_or_zero(), eff_sched_p, eff_sched_var, g1g2, MAX_PPRZ, ROTWING_PITCH_MOTOR_TILT_ANGLE_DEG, RW_ap, and RW_aq.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 295 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_p, and eff_sched_var.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 427 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_p, g1g2, MAX_PPRZ, and RW_aX.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 388 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_p, eff_sched_var, g1g2, and RW_ar.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 280 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_var.
Referenced by eff_scheduling_rotwing_periodic().
|
inline |
Definition at line 455 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_scheduling_rotwing_lift_d, and UNUSED.
|
inline |
Definition at line 517 of file eff_scheduling_rotwing_rpm_ctrl.c.
References actuator_state_filt_vect, AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT, eulers_zxy, float_eulers_of_quat_zxy(), g1g2, guidance_indi_max_bank, GUIDANCE_INDI_MAX_PITCH, GUIDANCE_INDI_MIN_PITCH, guidance_indi_pitch_pref_deg, GUIDANCE_INDI_WLS_PRIORITIES, MAX_PPRZ, ROTWING_QUAD_PREF_PITCH, ROTWING_SKEW_ANGLE_STEP, rotwing_state, rotwing_state_hover_motors_idling(), rotwing_state_hover_motors_running(), rotwing_state_pusher_motor_running(), RW_aX, RW_aZ, stateGetAirspeed_f(), stateGetNedToBodyQuat_f(), and Wu_gih_original.
|
static |
Convert PPRZ command back to u^2.
| pprz_cmd | PPRZ command |
| max | Motor max value (e.g., SERVO_MOTOR_FRONT_MAX) |
| neutral | Motor neutral value |
| travel_up | Motor travel up value |
Definition at line 631 of file eff_scheduling_rotwing_rpm_ctrl.c.
References MAX_PPRZ.
Referenced by stabilization_indi_get_actuator_state().
| void stabilization_indi_commit_actuator_cmd | ( | int32_t * | cmd | ) |
Definition at line 687 of file eff_scheduling_rotwing_rpm_ctrl.c.
References actuator_state, actuators_pprz, indi_u, stabilization_indi_get_act_is_thruster_z(), stabilization_indi_get_act_state(), stabilization_indi_get_act_to_commands(), stabilization_indi_get_indi_u(), stabilization_indi_get_num_thrusters(), and u_squared_to_pprz_cmd().
| void stabilization_indi_get_actuator_state | ( | void | ) |
Function that tries to get actuator feedback.
If this is not available it will use a first order filter to approximate the actuator state. It is also possible to model rate limits (unit: PPRZ/loop cycle)
Definition at line 637 of file eff_scheduling_rotwing_rpm_ctrl.c.
References act_dyn_discrete, actuator_state, indi_u, pprz_cmd_to_u_squared(), stabilization_indi_get_act_dyn(), stabilization_indi_get_act_state(), stabilization_indi_get_indi_u(), and u_squared_to_pprz_cmd().
| 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 459 of file eff_scheduling_rotwing_rpm_ctrl.c.
References act_is_servo, act_pref, actuator_state_filt_vect, actuators_pprz, eff_sched_p, eff_sched_pusher_time, electrical, MAX_PPRZ, Min, rw_flap_offset, and wls_stab_p.
|
static |
Convert u^2 to PPRZ command.
| u_squared | Value in squared domain |
| max | Motor max value (e.g., SERVO_MOTOR_FRONT_MAX) |
| neutral | Motor neutral value |
| travel_up | Motor travel up value |
Definition at line 616 of file eff_scheduling_rotwing_rpm_ctrl.c.
References MAX_PPRZ.
Referenced by stabilization_indi_commit_actuator_cmd(), and stabilization_indi_get_actuator_state().
|
static |
Definition at line 222 of file eff_scheduling_rotwing_rpm_ctrl.c.
References eff_sched_var, UNUSED, and wing_position_cb().
| struct rotwing_eff_sched_param_t eff_sched_p |
Definition at line 144 of file eff_scheduling_rotwing_rpm_ctrl.c.
| float eff_sched_pusher_time = 0.002 |
Definition at line 190 of file eff_scheduling_rotwing_rpm_ctrl.c.
| struct rotwing_eff_sched_var_t eff_sched_var |
Definition at line 195 of file eff_scheduling_rotwing_rpm_ctrl.c.
| float eff_scheduling_rotwing_lift_d = 0.0f |
Definition at line 169 of file eff_scheduling_rotwing_rpm_ctrl.c.
| float roll_eff_slider = 12.f |
Definition at line 191 of file eff_scheduling_rotwing_rpm_ctrl.c.
| int32_t rw_flap_offset = 0 |
Definition at line 168 of file eff_scheduling_rotwing_rpm_ctrl.c.
|
static |
Definition at line 220 of file eff_scheduling_rotwing_rpm_ctrl.c.
|
static |
Definition at line 193 of file eff_scheduling_rotwing_rpm_ctrl.c.