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)
 
int32_t guidance_pid_v_run_pos (bool in_flight, struct VerticalGuidance *gv)
 
int32_t guidance_pid_v_run_speed (bool in_flight, struct VerticalGuidance *gv)
 
int32_t 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 415 of file guidance_pid.c.

References guidance_pid_pos_err.

◆ guidance_pid_h_enter()

void guidance_pid_h_enter ( void  )

Definition at line 387 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 402 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 408 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 393 of file guidance_pid.c.

References guidance_pid_z_sum_err.

◆ guidance_pid_v_run_accel()

int32_t guidance_pid_v_run_accel ( bool  in_flight,
struct VerticalGuidance gv 
)

◆ guidance_pid_v_run_pos()

int32_t guidance_pid_v_run_pos ( bool  in_flight,
struct VerticalGuidance gv 
)

Definition at line 371 of file guidance_pid.c.

References guidance_pid_v_run().

Referenced by guidance_hybrid_v_run_pos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ guidance_pid_v_run_speed()

int32_t guidance_pid_v_run_speed ( bool  in_flight,
struct VerticalGuidance gv 
)

Definition at line 376 of file guidance_pid.c.

References guidance_pid_v_run().

Referenced by guidance_hybrid_v_run_speed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ guidance_pid