|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/ctrl/control_mixing_heewing.h"#include "modules/radio_control/radio_control.h"#include "generated/modules.h"#include "modules/core/commands.h"#include "modules/actuators/actuators.h"#include "autopilot.h"#include "state.h"#include "firmwares/rotorcraft/stabilization.h"#include "firmwares/rotorcraft/guidance.h"#include "firmwares/rotorcraft/navigation.h"#include "firmwares/rotorcraft/guidance/guidance_plane.h"#include "firmwares/rotorcraft/stabilization/stabilization_indi.h"#include "firmwares/rotorcraft/stabilization/stabilization_attitude_plane_pid.h"Go to the source code of this file.
Macros | |
| #define | CMH_TILT_FORWARD 0 |
| #define | CMH_TILT_VERTICAL 8700 |
| #define | CMH_TILT_DIFF_MAX (MAX_PPRZ-CMH_TILT_VERTICAL) |
| #define | CMH_MOTOR_IDLE 800 |
| #define | CMH_TRANSITION_TIME 4.f |
| #define | CMH_TRANSITION_AIRSPEED 10.f |
| #define | TRANSITION_TO_HOVER false |
| #define | TRANSITION_TO_FORWARD true |
Functions | |
| static void | transition_run (bool to_forward) |
| static int32_t | command_from_transition (int32_t hover_cmd, int32_t forward_cmd) |
| void | control_mixing_heewing_init (void) |
| void | control_mixing_heewing_manual (void) |
| Direct manual control in plane style flight. | |
| void | control_mixing_heewing_attitude_direct (void) |
| Stabilization in attitude direct mode. | |
| void | control_mixing_heewing_attitude_direct_enter (void) |
| void | stabilization_indi_set_wls_settings (void) |
| Function that sets the u_min, u_max and u_pref if function not elsewhere defined. | |
| void | control_mixing_heewing_attitude_plane_enter (void) |
| void | control_mixing_heewing_attitude_plane (void) |
| void | control_mixing_heewing_nav_enter (void) |
| void | control_mixing_heewing_nav_run (void) |
Variables | |
| static float | transition_ratio |
| static const float | transition_increment = 1.f / (CMH_TRANSITION_TIME * PERIODIC_FREQUENCY) |
Definition in file control_mixing_heewing.c.
| #define CMH_MOTOR_IDLE 800 |
Definition at line 57 of file control_mixing_heewing.c.
Referenced by stabilization_indi_set_wls_settings().
| #define CMH_TILT_DIFF_MAX (MAX_PPRZ-CMH_TILT_VERTICAL) |
Definition at line 52 of file control_mixing_heewing.c.
Referenced by stabilization_indi_set_wls_settings().
| #define CMH_TILT_FORWARD 0 |
Definition at line 42 of file control_mixing_heewing.c.
Referenced by control_mixing_heewing_attitude_plane(), control_mixing_heewing_manual(), and control_mixing_heewing_nav_run().
| #define CMH_TILT_VERTICAL 8700 |
Definition at line 47 of file control_mixing_heewing.c.
Referenced by control_mixing_heewing_attitude_direct(), control_mixing_heewing_attitude_plane(), and control_mixing_heewing_nav_run().
| #define CMH_TRANSITION_AIRSPEED 10.f |
Definition at line 67 of file control_mixing_heewing.c.
Referenced by transition_run().
| #define CMH_TRANSITION_TIME 4.f |
Definition at line 62 of file control_mixing_heewing.c.
| #define TRANSITION_TO_FORWARD true |
Definition at line 71 of file control_mixing_heewing.c.
| #define TRANSITION_TO_HOVER false |
Definition at line 70 of file control_mixing_heewing.c.
Definition at line 93 of file control_mixing_heewing.c.
References transition_ratio.
Referenced by control_mixing_heewing_attitude_plane(), and control_mixing_heewing_nav_run().
| void control_mixing_heewing_attitude_direct | ( | void | ) |
Stabilization in attitude direct mode.
Definition at line 117 of file control_mixing_heewing.c.
References actuators_pprz, autopilot, autopilot_get_motors_on(), autopilot_in_flight(), CMH_ACT_MOTOR_LEFT, CMH_ACT_MOTOR_RIGHT, CMH_ACT_MOTOR_TAIL, CMH_ACT_YAW, CMH_TILT_VERTICAL, COMMAND_PITCH, COMMAND_ROLL, commands, guidance_v_run(), MAX_PPRZ, stabilization, stabilization_run(), transition_run(), and TRANSITION_TO_HOVER.
| void control_mixing_heewing_attitude_direct_enter | ( | void | ) |
Definition at line 145 of file control_mixing_heewing.c.
References guidance_h_mode_changed(), GUIDANCE_H_MODE_NONE, guidance_v_mode_changed(), GUIDANCE_V_MODE_RC_DIRECT, STABILIZATION_ATT_SUBMODE_HEADING, STABILIZATION_MODE_ATTITUDE, stabilization_mode_changed(), and STABILIZATION_MODE_NONE.
| void control_mixing_heewing_attitude_plane | ( | void | ) |
Definition at line 182 of file control_mixing_heewing.c.
References actuators_pprz, autopilot, autopilot_in_flight(), CMH_ACT_MOTOR_LEFT, CMH_ACT_MOTOR_RIGHT, CMH_ACT_MOTOR_TAIL, CMH_TILT_FORWARD, CMH_TILT_VERTICAL, command_from_transition(), COMMAND_PITCH, COMMAND_ROLL, commands, guidance_v_run(), MAX_PPRZ, radio_control_get(), RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, stab_sp_from_eulers_f(), stabilization, stabilization_attitude_plane_pid_run(), stabilization_run(), th_sp_from_thrust_i(), THRUST_AXIS_X, transition_ratio, transition_run(), and TRANSITION_TO_FORWARD.
| void control_mixing_heewing_attitude_plane_enter | ( | void | ) |
Definition at line 173 of file control_mixing_heewing.c.
References guidance_h_mode_changed(), GUIDANCE_H_MODE_NONE, guidance_v_mode_changed(), GUIDANCE_V_MODE_RC_DIRECT, STABILIZATION_ATT_SUBMODE_HEADING, stabilization_attitude_plane_pid_enter(), STABILIZATION_MODE_ATTITUDE, and stabilization_mode_changed().
| void control_mixing_heewing_init | ( | void | ) |
Definition at line 98 of file control_mixing_heewing.c.
References transition_ratio.
| void control_mixing_heewing_manual | ( | void | ) |
Direct manual control in plane style flight.
Definition at line 103 of file control_mixing_heewing.c.
References autopilot, CMH_TILT_FORWARD, COMMAND_PITCH, COMMAND_ROLL, commands, MIN_PPRZ, radio_control_get(), RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, transition_run(), and TRANSITION_TO_FORWARD.
| void control_mixing_heewing_nav_enter | ( | void | ) |
Definition at line 225 of file control_mixing_heewing.c.
References guidance_h_mode_changed(), GUIDANCE_H_MODE_NAV, guidance_v_mode_changed(), GUIDANCE_V_MODE_NAV, STABILIZATION_ATT_SUBMODE_HEADING, STABILIZATION_MODE_ATTITUDE, and stabilization_mode_changed().
| void control_mixing_heewing_nav_run | ( | void | ) |
Definition at line 232 of file control_mixing_heewing.c.
References actuators_pprz, autopilot, autopilot_get_motors_on(), autopilot_in_flight(), CMH_ACT_MOTOR_LEFT, CMH_ACT_MOTOR_RIGHT, CMH_ACT_MOTOR_TAIL, CMH_ACT_YAW, CMH_TILT_FORWARD, CMH_TILT_VERTICAL, command_from_transition(), COMMAND_PITCH, COMMAND_ROLL, commands, guidance_h_run(), guidance_plane, guidance_plane_attitude_from_nav(), guidance_plane_thrust_from_nav(), guidance_v_run(), MAX_PPRZ, MIN_PPRZ, nav, NAV_HORIZONTAL_MODE_CIRCLE, NAV_HORIZONTAL_MODE_ROUTE, FloatEulers::psi, stab_sp_from_eulers_f(), stabilization, stabilization_attitude_plane_pid_run(), stabilization_run(), stateGetNedToBodyEulers_f(), transition_ratio, transition_run(), TRANSITION_TO_FORWARD, and TRANSITION_TO_HOVER.
| 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 153 of file control_mixing_heewing.c.
References act_pref, CMH_ACT_MOTOR_LEFT, CMH_ACT_MOTOR_RIGHT, CMH_ACT_MOTOR_TAIL, CMH_ACT_YAW, CMH_MOTOR_IDLE, CMH_TILT_DIFF_MAX, MAX_PPRZ, and wls_stab_p.
|
static |
Definition at line 76 of file control_mixing_heewing.c.
References CMH_TRANSITION_AIRSPEED, stateGetAirspeed_f(), stateIsAirspeedValid(), transition_increment, and transition_ratio.
Referenced by control_mixing_heewing_attitude_direct(), control_mixing_heewing_attitude_plane(), control_mixing_heewing_manual(), and control_mixing_heewing_nav_run().
|
static |
Definition at line 74 of file control_mixing_heewing.c.
|
static |
Definition at line 73 of file control_mixing_heewing.c.
Referenced by command_from_transition(), control_mixing_heewing_attitude_plane(), control_mixing_heewing_init(), control_mixing_heewing_nav_run(), and transition_run().