Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Windtunnel automatic step controller. More...
#include "modules/ctrl/ctrl_windtunnel.h"
#include "state.h"
#include "modules/radio_control/radio_control.h"
#include "firmwares/rotorcraft/stabilization.h"
#include "modules/energy/electrical.h"
#include "modules/datalink/telemetry.h"
Go to the source code of this file.
Data Structures | |
struct | ctrl_windtunnel_struct |
Macros | |
#define | WINDTUNNEL_TO_BODY_PHI 0 |
#define | WINDTUNNEL_TO_BODY_THETA 0 |
#define | WINDTUNNEL_TO_BODY_PSI 0 |
Functions | |
static void | send_windtunnel_meas (struct transport_tx *trans, struct link_device *dev) |
void | ctrl_windtunnel_init (void) |
static void | ctrl_module_run (bool in_flight) |
void | guidance_module_enter (void) |
void | guidance_module_run (bool in_flight) |
Variables | |
struct ctrl_windtunnel_struct | ctrl_windtunnel |
float | ctrl_windtunnel_steptime = CTRL_WINDTUNNEL_STEPTIME |
struct min_max_ctrl_t | ctrl_windtunnel_throttle = {.min = CTRL_WINDTUNNEL_THR_MIN, .max = CTRL_WINDTUNNEL_THR_MAX, .step = CTRL_WINDTUNNEL_THR_STEP} |
struct min_max_ctrl_t | ctrl_windtunnel_flaps = {.min = CTRL_WINDTUNNEL_FLAP_MIN, .max = CTRL_WINDTUNNEL_FLAP_MAX, .step = CTRL_WINDTUNNEL_FLAP_STEP} |
static float | last_time = 0 |
Windtunnel automatic step controller.
Definition in file ctrl_windtunnel.c.
struct ctrl_windtunnel_struct |
Definition at line 45 of file ctrl_windtunnel.c.
Data Fields | ||
---|---|---|
int | rc_pitch | |
int | rc_roll | |
int | rc_throttle | |
int | rc_yaw | |
struct OrientationReps | rotation |
#define WINDTUNNEL_TO_BODY_PHI 0 |
Definition at line 34 of file ctrl_windtunnel.c.
#define WINDTUNNEL_TO_BODY_PSI 0 |
Definition at line 42 of file ctrl_windtunnel.c.
#define WINDTUNNEL_TO_BODY_THETA 0 |
Definition at line 38 of file ctrl_windtunnel.c.
|
static |
Definition at line 94 of file ctrl_windtunnel.c.
References Stabilization::cmd, ctrl_windtunnel, ctrl_windtunnel_flaps, ctrl_windtunnel_steptime, ctrl_windtunnel_throttle, min_max_ctrl_t::current, get_sys_time_float(), last_time, min_max_ctrl_t::max, MAX_PPRZ, min_max_ctrl_t::min, ctrl_windtunnel_struct::rc_throttle, stabilization, and min_max_ctrl_t::step.
Referenced by guidance_module_run().
void ctrl_windtunnel_init | ( | void | ) |
Definition at line 77 of file ctrl_windtunnel.c.
References ctrl_windtunnel, DefaultPeriodic, orientationSetEulers_f(), ctrl_windtunnel_struct::rc_pitch, ctrl_windtunnel_struct::rc_roll, ctrl_windtunnel_struct::rc_throttle, ctrl_windtunnel_struct::rc_yaw, register_periodic_telemetry(), ctrl_windtunnel_struct::rotation, send_windtunnel_meas(), WINDTUNNEL_TO_BODY_PHI, WINDTUNNEL_TO_BODY_PSI, and WINDTUNNEL_TO_BODY_THETA.
void guidance_module_enter | ( | void | ) |
Definition at line 139 of file ctrl_windtunnel.c.
References ctrl_windtunnel, ctrl_windtunnel_struct::rc_pitch, ctrl_windtunnel_struct::rc_roll, ctrl_windtunnel_struct::rc_throttle, and ctrl_windtunnel_struct::rc_yaw.
void guidance_module_run | ( | bool | in_flight | ) |
Definition at line 147 of file ctrl_windtunnel.c.
References ctrl_module_run(), ctrl_windtunnel, radio_control, RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, RADIO_YAW, ctrl_windtunnel_struct::rc_pitch, ctrl_windtunnel_struct::rc_roll, ctrl_windtunnel_struct::rc_throttle, ctrl_windtunnel_struct::rc_yaw, and RadioControl::values.
|
static |
Definition at line 61 of file ctrl_windtunnel.c.
References air_data, AirData::airspeed, Stabilization::cmd, ctrl_windtunnel, Electrical::current, dev, electrical, float_eulers_of_quat(), float_quat_comp_inv(), orientationGetQuat_f(), ctrl_windtunnel_struct::rotation, stabilization, stateGetNedToBodyQuat_f(), FloatEulers::theta, and Electrical::vsupply.
Referenced by ctrl_windtunnel_init().
struct ctrl_windtunnel_struct ctrl_windtunnel |
Referenced by ctrl_module_run(), ctrl_windtunnel_init(), guidance_module_enter(), guidance_module_run(), and send_windtunnel_meas().
struct min_max_ctrl_t ctrl_windtunnel_flaps = {.min = CTRL_WINDTUNNEL_FLAP_MIN, .max = CTRL_WINDTUNNEL_FLAP_MAX, .step = CTRL_WINDTUNNEL_FLAP_STEP} |
Definition at line 53 of file ctrl_windtunnel.c.
Referenced by ctrl_module_run().
float ctrl_windtunnel_steptime = CTRL_WINDTUNNEL_STEPTIME |
Definition at line 53 of file ctrl_windtunnel.c.
Referenced by ctrl_module_run().
struct min_max_ctrl_t ctrl_windtunnel_throttle = {.min = CTRL_WINDTUNNEL_THR_MIN, .max = CTRL_WINDTUNNEL_THR_MAX, .step = CTRL_WINDTUNNEL_THR_STEP} |
Definition at line 53 of file ctrl_windtunnel.c.
Referenced by ctrl_module_run().
|
static |
Definition at line 56 of file ctrl_windtunnel.c.
Referenced by actuators_faulhaber_periodic(), and ctrl_module_run().