Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
guidance_pid.h File Reference

Guidance controller with PID for rotorcrafts. More...

+ Include dependency graph for guidance_pid.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GuidancePID
 

Functions

void guidance_pid_init (void)
 
void guidance_pid_h_enter (void)
 
void guidance_pid_v_enter (void)
 
struct StabilizationSetpoint guidance_pid_h_run_pos (bool in_flight, struct HorizontalGuidance *gh)
 
struct StabilizationSetpoint guidance_pid_h_run_speed (bool in_flight, struct HorizontalGuidance *gh)
 
struct StabilizationSetpoint guidance_pid_h_run_accel (bool in_flight, struct HorizontalGuidance *gh)
 
struct ThrustSetpoint guidance_pid_v_run_pos (bool in_flight, struct VerticalGuidance *gv)
 
struct ThrustSetpoint guidance_pid_v_run_speed (bool in_flight, struct VerticalGuidance *gv)
 
struct ThrustSetpoint guidance_pid_v_run_accel (bool in_flight, struct VerticalGuidance *gv)
 
void guidance_pid_set_h_igain (uint32_t igain)
 settings handler More...
 
void guidance_pid_set_v_igain (uint32_t igain)
 
const struct Int32Vect2guidance_pid_get_h_pos_err (void)
 Gets the position error. More...
 

Variables

struct GuidancePID guidance_pid
 Guidance PID structyre. More...
 

Detailed Description

Guidance controller with PID for rotorcrafts.

Definition in file guidance_pid.h.


Data Structure Documentation

◆ GuidancePID

struct GuidancePID

Definition at line 38 of file guidance_pid.h.

+ Collaboration diagram for GuidancePID:
Data Fields
bool adapt_throttle_enabled
bool approx_force_by_thrust
struct Int32Vect2 cmd_earth
int32_t cmd_thrust
int32_t ka
int32_t kd
int32_t ki
int32_t kp
int32_t kv
int32_t v_kd
int32_t v_ki
int32_t v_kp

Function Documentation

◆ guidance_pid_get_h_pos_err()

const struct Int32Vect2* guidance_pid_get_h_pos_err ( void  )

Gets the position error.

Parameters
none.
Returns
Pointer to a structure containing x and y position errors

Definition at line 417 of file guidance_pid.c.

References guidance_pid_pos_err.

◆ guidance_pid_h_enter()

void guidance_pid_h_enter ( void  )

Definition at line 389 of file guidance_pid.c.

References RotorcraftNavigation::heading, nav, FloatEulers::psi, and stateGetNedToBodyEulers_f().

+ Here is the call graph for this function:

◆ guidance_pid_h_run_accel()

struct StabilizationSetpoint guidance_pid_h_run_accel ( bool  in_flight,
struct HorizontalGuidance gh 
)

◆ guidance_pid_h_run_pos()

struct StabilizationSetpoint guidance_pid_h_run_pos ( bool  in_flight,
struct HorizontalGuidance gh 
)

Definition at line 184 of file guidance_pid.c.

◆ guidance_pid_h_run_speed()

struct StabilizationSetpoint guidance_pid_h_run_speed ( bool  in_flight,
struct HorizontalGuidance gh 
)

Definition at line 184 of file guidance_pid.c.

◆ guidance_pid_init()

void guidance_pid_init ( void  )

Definition at line 184 of file guidance_pid.c.

◆ guidance_pid_set_h_igain()

void guidance_pid_set_h_igain ( uint32_t  igain)

settings handler

Definition at line 404 of file guidance_pid.c.

References guidance_pid, guidance_pid_trim_att_integrator, INT_VECT2_ZERO, and GuidancePID::ki.

◆ guidance_pid_set_v_igain()

void guidance_pid_set_v_igain ( uint32_t  igain)

Definition at line 410 of file guidance_pid.c.

References guidance_pid, guidance_pid_z_sum_err, and GuidancePID::v_ki.

◆ guidance_pid_v_enter()

void guidance_pid_v_enter ( void  )

Definition at line 395 of file guidance_pid.c.

References guidance_pid_z_sum_err.

◆ guidance_pid_v_run_accel()

struct ThrustSetpoint guidance_pid_v_run_accel ( bool  in_flight,
struct VerticalGuidance gv 
)

◆ guidance_pid_v_run_pos()

struct ThrustSetpoint guidance_pid_v_run_pos ( bool  in_flight,
struct VerticalGuidance gv 
)

Definition at line 184 of file guidance_pid.c.

◆ guidance_pid_v_run_speed()

struct ThrustSetpoint guidance_pid_v_run_speed ( bool  in_flight,
struct VerticalGuidance gv 
)

Definition at line 184 of file guidance_pid.c.

Variable Documentation

◆ guidance_pid

struct GuidancePID guidance_pid
extern

Guidance PID structyre.

Definition at line 1 of file guidance_pid.c.

Referenced by guidance_pid_h_run(), guidance_pid_set_h_igain(), guidance_pid_set_v_igain(), send_hover_loop(), and send_vert_loop().