Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
vertical_ctrl_module_demo.c File Reference

example vertical controller More...

Include dependency graph for vertical_ctrl_module_demo.c:

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.
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).
void guidance_module_run (bool in_flight)

Variables

static abi_event agl_ev
 The altitude ABI event.
struct VerticalCtrlDemo v_ctrl

Detailed Description

example vertical controller

Definition in file vertical_ctrl_module_demo.c.

Macro Definition Documentation

◆ VERTICAL_CTRL_MODULE_AGL_ID

#define VERTICAL_CTRL_MODULE_AGL_ID   ABI_BROADCAST

Definition at line 38 of file vertical_ctrl_module_demo.c.

Referenced by vertical_ctrl_module_init().

◆ VERTICAL_CTRL_MODULE_IGAIN

#define VERTICAL_CTRL_MODULE_IGAIN   0.01

Definition at line 47 of file vertical_ctrl_module_demo.c.

Referenced by vertical_ctrl_module_init().

◆ VERTICAL_CTRL_MODULE_PGAIN

#define VERTICAL_CTRL_MODULE_PGAIN   1.0

Definition at line 43 of file vertical_ctrl_module_demo.c.

Referenced by vertical_ctrl_module_init().

Function Documentation

◆ guidance_module_enter()

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, and v_ctrl.

Here is the call graph for this function:

◆ guidance_module_run()

void guidance_module_run ( bool in_flight)

Definition at line 105 of file vertical_ctrl_module_demo.c.

References guidance_h_run(), stabilization, stabilization_run(), and vertical_ctrl_module_run().

Here is the call graph for this function:

◆ vertical_ctrl_agl_cb()

void vertical_ctrl_agl_cb ( uint8_t sender_id ,
uint32_t stamp,
float distance )
static

Callback function of the ground altitude.

Definition at line 89 of file vertical_ctrl_module_demo.c.

References v_ctrl.

◆ vertical_ctrl_module_init()

void vertical_ctrl_module_init ( void )

Definition at line 58 of file vertical_ctrl_module_demo.c.

References agl_ev, v_ctrl, vertical_ctrl_agl_cb(), VERTICAL_CTRL_MODULE_AGL_ID, VERTICAL_CTRL_MODULE_IGAIN, and VERTICAL_CTRL_MODULE_PGAIN.

Here is the call graph for this function:

◆ vertical_ctrl_module_run()

struct ThrustSetpoint vertical_ctrl_module_run ( bool in_flight)
static

Definition at line 71 of file vertical_ctrl_module_demo.c.

References MAX_PPRZ, th_sp_from_thrust_i(), THRUST_AXIS_Z, v_ctrl, and vertical_ctrl_module_run().

Here is the call graph for this function:

Variable Documentation

◆ agl_ev

abi_event agl_ev
static

The altitude ABI event.

Definition at line 50 of file vertical_ctrl_module_demo.c.

◆ v_ctrl