APM:Libraries
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
AC_HELI_PID Class Reference

Heli PID control class. More...

#include <AC_HELI_PID.h>

Inheritance diagram for AC_HELI_PID:
[legend]
Collaboration diagram for AC_HELI_PID:
[legend]

Public Member Functions

 AC_HELI_PID (float initial_p, float initial_i, float initial_d, float initial_imax, float initial_filt_hz, float dt, float initial_ff)
 Constructor for PID. More...
 
float get_leaky_i (float leak_rate)
 get_leaky_i - replacement for get_i but output is leaded at leak_rate More...
 
- Public Member Functions inherited from AC_PID
 AC_PID (float initial_p, float initial_i, float initial_d, float initial_imax, float initial_filt_hz, float dt, float initial_ff=0)
 
void set_dt (float dt)
 
void set_input_filter_all (float input)
 
void set_input_filter_d (float input)
 
float get_pid ()
 
float get_pi ()
 
float get_p ()
 
float get_i ()
 
float get_d ()
 
float get_ff (float requested_rate)
 
void reset_I ()
 
void reset_filter ()
 
void load_gains ()
 
void save_gains ()
 
void operator() (float p, float i, float d, float imaxval, float input_filt_hz, float dt, float ffval=0)
 operator function call for easy initialisation More...
 
AP_Float & kP ()
 
AP_Float & kI ()
 
AP_Float & kD ()
 
AP_Float & filt_hz ()
 
float imax () const
 
float get_filt_alpha () const
 
float ff () const
 
void kP (const float v)
 
void kI (const float v)
 
void kD (const float v)
 
void imax (const float v)
 
void filt_hz (const float v)
 
void ff (const float v)
 
float get_integrator () const
 
void set_integrator (float i)
 
void set_desired_rate (float desired)
 
const DataFlash_Class::PID_Infoget_pid_info (void) const
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 
- Static Public Attributes inherited from AC_PID
static const struct AP_Param::GroupInfo var_info []
 

Private Attributes

AP_Float _leak_min
 
float _last_requested_rate
 

Additional Inherited Members

- Protected Attributes inherited from AC_PID
AP_Float _kp
 
AP_Float _ki
 
AP_Float _kd
 
AP_Float _imax
 
AP_Float _filt_hz
 
AP_Float _ff
 
struct AC_PID::ac_pid_flags _flags
 
float _dt
 
float _integrator
 
float _input
 
float _derivative
 
DataFlash_Class::PID_Info _pid_info
 

Detailed Description

Heli PID control class.

Definition at line 16 of file AC_HELI_PID.h.

Constructor & Destructor Documentation

◆ AC_HELI_PID()

AC_HELI_PID::AC_HELI_PID ( float  initial_p,
float  initial_i,
float  initial_d,
float  initial_imax,
float  initial_filt_hz,
float  dt,
float  initial_ff 
)

Constructor for PID.

Definition at line 51 of file AC_HELI_PID.cpp.

Member Function Documentation

◆ get_leaky_i()

float AC_HELI_PID::get_leaky_i ( float  leak_rate)

get_leaky_i - replacement for get_i but output is leaded at leak_rate

Definition at line 60 of file AC_HELI_PID.cpp.

Referenced by AC_AttitudeControl_Heli::rate_bf_to_motor_roll_pitch().

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

Member Data Documentation

◆ _last_requested_rate

float AC_HELI_PID::_last_requested_rate
private

Definition at line 30 of file AC_HELI_PID.h.

Referenced by AC_HELI_PID().

◆ _leak_min

AP_Float AC_HELI_PID::_leak_min
private

Definition at line 28 of file AC_HELI_PID.h.

Referenced by get_leaky_i().

◆ var_info

const AP_Param::GroupInfo AC_HELI_PID::var_info
static

Definition at line 25 of file AC_HELI_PID.h.


The documentation for this class was generated from the following files: