Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
example vertical controller More...
#include "modules/ctrl/vertical_ctrl_module_demo.h"
#include "generated/airframe.h"
#include "autopilot.h"
#include "paparazzi.h"
#include "modules/core/abi.h"
#include "firmwares/rotorcraft/guidance/guidance_h.h"
#include "firmwares/rotorcraft/stabilization.h"
Go to the source code of this file.
Macros | |
#define | VERTICAL_CTRL_MODULE_AGL_ID ABI_BROADCAST |
#define | VERTICAL_CTRL_MODULE_PGAIN 1.0 |
#define | VERTICAL_CTRL_MODULE_IGAIN 0.01 |
Functions | |
static void | vertical_ctrl_agl_cb (uint8_t sender_id, uint32_t stamp, float distance) |
Callback function of the ground altitude. More... | |
void | vertical_ctrl_module_init (void) |
static struct ThrustSetpoint | vertical_ctrl_module_run (bool in_flight) |
void | guidance_module_enter (void) |
Entering the module (user switched to module) More... | |
void | guidance_module_run (bool in_flight) |
Variables | |
static abi_event | agl_ev |
The altitude ABI event. More... | |
struct VerticalCtrlDemo | v_ctrl |
example vertical controller
Definition in file vertical_ctrl_module_demo.c.
#define VERTICAL_CTRL_MODULE_AGL_ID ABI_BROADCAST |
Definition at line 38 of file vertical_ctrl_module_demo.c.
#define VERTICAL_CTRL_MODULE_IGAIN 0.01 |
Definition at line 47 of file vertical_ctrl_module_demo.c.
#define VERTICAL_CTRL_MODULE_PGAIN 1.0 |
Definition at line 43 of file vertical_ctrl_module_demo.c.
void guidance_module_enter | ( | void | ) |
Entering the module (user switched to module)
Definition at line 97 of file vertical_ctrl_module_demo.c.
References guidance_h_mode_changed(), GUIDANCE_H_MODE_HOVER, VerticalCtrlDemo::sum_err, and v_ctrl.
void guidance_module_run | ( | bool | in_flight | ) |
Definition at line 105 of file vertical_ctrl_module_demo.c.
References Stabilization::cmd, guidance_h_run(), stabilization, stabilization_run(), and vertical_ctrl_module_run().
Callback function of the ground altitude.
Definition at line 89 of file vertical_ctrl_module_demo.c.
References VerticalCtrlDemo::agl, and v_ctrl.
Referenced by vertical_ctrl_module_init().
void vertical_ctrl_module_init | ( | void | ) |
Definition at line 58 of file vertical_ctrl_module_demo.c.
References VerticalCtrlDemo::agl, agl_ev, VerticalCtrlDemo::igain, VerticalCtrlDemo::pgain, VerticalCtrlDemo::setpoint, VerticalCtrlDemo::sum_err, v_ctrl, vertical_ctrl_agl_cb(), VERTICAL_CTRL_MODULE_AGL_ID, VERTICAL_CTRL_MODULE_IGAIN, and VERTICAL_CTRL_MODULE_PGAIN.
|
static |
Definition at line 58 of file vertical_ctrl_module_demo.c.
Referenced by guidance_module_run().
|
static |
The altitude ABI event.
Definition at line 50 of file vertical_ctrl_module_demo.c.
Referenced by vertical_ctrl_module_init().
struct VerticalCtrlDemo v_ctrl |
Definition at line 53 of file vertical_ctrl_module_demo.c.
Referenced by guidance_module_enter(), vertical_ctrl_agl_cb(), and vertical_ctrl_module_init().