Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
example empty controller More...
#include "modules/ctrl/ctrl_module_innerloop_demo.h"
#include "state.h"
#include "modules/radio_control/radio_control.h"
#include "generated/radio.h"
#include "firmwares/rotorcraft/stabilization.h"
Go to the source code of this file.
Data Structures | |
struct | ctrl_module_demo_struct |
Functions | |
void | ctrl_module_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_module_demo_struct | ctrl_module_demo |
float | ctrl_module_demo_pr_ff_gain = 0.2f |
float | ctrl_module_demo_pr_d_gain = 0.1f |
float | ctrl_module_demo_y_ff_gain = 0.4f |
float | ctrl_module_demo_y_d_gain = 0.05f |
example empty controller
Implements an example simple rate controller in a module.
Definition in file ctrl_module_innerloop_demo.c.
struct ctrl_module_demo_struct |
Definition at line 33 of file ctrl_module_innerloop_demo.c.
Data Fields | ||
---|---|---|
struct Int32Eulers | cmd | |
struct AttitudeRCInput | rc_sp | |
int | rc_t | |
int | rc_x | |
int | rc_y | |
int | rc_z |
void ctrl_module_init | ( | void | ) |
Definition at line 46 of file ctrl_module_innerloop_demo.c.
References ctrl_module_demo, ctrl_module_demo_struct::rc_t, ctrl_module_demo_struct::rc_x, ctrl_module_demo_struct::rc_y, and ctrl_module_demo_struct::rc_z.
Referenced by guidance_module_enter().
|
static |
Definition at line 55 of file ctrl_module_innerloop_demo.c.
References Stabilization::cmd, ctrl_module_demo, ctrl_module_demo_pr_d_gain, ctrl_module_demo_pr_ff_gain, ctrl_module_demo_y_d_gain, ctrl_module_demo_y_ff_gain, Int32Rates::p, Int32Rates::q, Int32Rates::r, ctrl_module_demo_struct::rc_t, ctrl_module_demo_struct::rc_x, ctrl_module_demo_struct::rc_y, ctrl_module_demo_struct::rc_z, stabilization, and stateGetBodyRates_i().
Referenced by guidance_module_run().
void guidance_module_enter | ( | void | ) |
Definition at line 77 of file ctrl_module_innerloop_demo.c.
References ctrl_module_init().
void guidance_module_run | ( | bool | in_flight | ) |
Definition at line 82 of file ctrl_module_innerloop_demo.c.
References ctrl_module_demo, ctrl_module_run(), radio_control, RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, RADIO_YAW, ctrl_module_demo_struct::rc_t, ctrl_module_demo_struct::rc_x, ctrl_module_demo_struct::rc_y, ctrl_module_demo_struct::rc_z, and RadioControl::values.
struct ctrl_module_demo_struct ctrl_module_demo |
Referenced by ctrl_module_init(), ctrl_module_run(), and guidance_module_run().
float ctrl_module_demo_pr_d_gain = 0.1f |
Definition at line 42 of file ctrl_module_innerloop_demo.c.
Referenced by ctrl_module_run().
float ctrl_module_demo_pr_ff_gain = 0.2f |
Definition at line 41 of file ctrl_module_innerloop_demo.c.
Referenced by ctrl_module_run().
float ctrl_module_demo_y_d_gain = 0.05f |
Definition at line 44 of file ctrl_module_innerloop_demo.c.
Referenced by ctrl_module_run().
float ctrl_module_demo_y_ff_gain = 0.4f |
Definition at line 43 of file ctrl_module_innerloop_demo.c.
Referenced by ctrl_module_run().