APM:Libraries
|
Copter PID control class. More...
#include <AC_PI_2D.h>
Classes | |
struct | ac_pid_flags |
Public Member Functions | |
AC_PI_2D (float initial_p, float initial_i, float initial_imax, float initial_filt_hz, float dt) | |
void | set_dt (float dt) |
void | set_input (const Vector2f &input) |
void | set_input (const Vector3f &input) |
Vector2f | get_pi () |
Vector2f | get_p () const |
Vector2f | get_i () |
Vector2f | get_i_shrink () |
void | reset_I () |
void | reset_filter () |
void | load_gains () |
void | save_gains () |
void | operator() (float p, float i, float imaxval, float input_filt_hz, float dt) |
operator function call for easy initialisation More... | |
AP_Float & | kP () |
AP_Float & | kI () |
float | imax () const |
float | filt_hz () const |
float | get_filt_alpha () const |
void | kP (const float v) |
void | kI (const float v) |
void | imax (const float v) |
void | filt_hz (const float v) |
Vector2f | get_integrator () const |
void | set_integrator (const Vector2f &i) |
void | set_integrator (const Vector3f &i) |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
Protected Member Functions | |
void | calc_filt_alpha () |
Protected Attributes | |
AP_Float | _kp |
AP_Float | _ki |
AP_Float | _imax |
AP_Float | _filt_hz |
struct AC_PI_2D::ac_pid_flags | _flags |
float | _dt |
Vector2f | _integrator |
Vector2f | _input |
float | _filt_alpha |
Copter PID control class.
Definition at line 16 of file AC_PI_2D.h.
AC_PI_2D::AC_PI_2D | ( | float | initial_p, |
float | initial_i, | ||
float | initial_imax, | ||
float | initial_filt_hz, | ||
float | dt | ||
) |
|
protected |
Definition at line 166 of file AC_PI_2D.cpp.
Referenced by filt_hz(), load_gains(), operator()(), and set_dt().
|
inline |
Definition at line 56 of file AC_PI_2D.h.
Referenced by AC_PI_2D(), and imax().
void AC_PI_2D::filt_hz | ( | const float | v | ) |
|
inline |
Definition at line 57 of file AC_PI_2D.h.
Vector2f AC_PI_2D::get_i | ( | ) |
Definition at line 94 of file AC_PI_2D.cpp.
Referenced by get_pi(), and set_input().
Vector2f AC_PI_2D::get_i_shrink | ( | ) |
Definition at line 108 of file AC_PI_2D.cpp.
Referenced by set_input().
|
inline |
Definition at line 65 of file AC_PI_2D.h.
Vector2f AC_PI_2D::get_p | ( | ) | const |
Definition at line 89 of file AC_PI_2D.cpp.
Referenced by get_pi(), and set_input().
Vector2f AC_PI_2D::get_pi | ( | ) |
Definition at line 122 of file AC_PI_2D.cpp.
Referenced by set_input().
|
inline |
Definition at line 55 of file AC_PI_2D.h.
|
inline |
|
inline |
Definition at line 54 of file AC_PI_2D.h.
|
inline |
Definition at line 61 of file AC_PI_2D.h.
|
inline |
Definition at line 53 of file AC_PI_2D.h.
|
inline |
Definition at line 60 of file AC_PI_2D.h.
void AC_PI_2D::load_gains | ( | ) |
Definition at line 132 of file AC_PI_2D.cpp.
Referenced by set_input().
void AC_PI_2D::operator() | ( | float | p, |
float | i, | ||
float | imaxval, | ||
float | input_filt_hz, | ||
float | dt | ||
) |
operator function call for easy initialisation
Overload the function call operator to permit easy initialisation.
Definition at line 154 of file AC_PI_2D.cpp.
Referenced by set_input().
void AC_PI_2D::reset_filter | ( | ) |
void AC_PI_2D::reset_I | ( | ) |
Definition at line 127 of file AC_PI_2D.cpp.
Referenced by set_input().
void AC_PI_2D::save_gains | ( | ) |
Definition at line 145 of file AC_PI_2D.cpp.
Referenced by set_input().
void AC_PI_2D::set_dt | ( | float | dt | ) |
void AC_PI_2D::set_input | ( | const Vector2f & | input | ) |
Definition at line 71 of file AC_PI_2D.cpp.
|
inline |
Definition at line 29 of file AC_PI_2D.h.
Referenced by set_input().
|
inline |
Definition at line 66 of file AC_PI_2D.h.
|
inline |
Definition at line 67 of file AC_PI_2D.h.
|
protected |
Definition at line 89 of file AC_PI_2D.h.
Referenced by calc_filt_alpha(), get_i(), get_i_shrink(), operator()(), and set_dt().
|
protected |
Definition at line 92 of file AC_PI_2D.h.
Referenced by calc_filt_alpha(), get_filt_alpha(), and set_input().
|
protected |
Definition at line 81 of file AC_PI_2D.h.
Referenced by calc_filt_alpha(), filt_hz(), load_gains(), operator()(), and save_gains().
|
protected |
Referenced by AC_PI_2D(), and set_input().
|
protected |
Definition at line 80 of file AC_PI_2D.h.
Referenced by AC_PI_2D(), get_i(), get_i_shrink(), imax(), load_gains(), operator()(), and save_gains().
|
protected |
Definition at line 91 of file AC_PI_2D.h.
Referenced by get_i(), get_i_shrink(), get_p(), and set_input().
|
protected |
Definition at line 90 of file AC_PI_2D.h.
Referenced by get_i(), get_i_shrink(), get_integrator(), reset_I(), and set_integrator().
|
protected |
Definition at line 79 of file AC_PI_2D.h.
Referenced by AC_PI_2D(), get_i(), get_i_shrink(), kI(), load_gains(), operator()(), and save_gains().
|
protected |
Definition at line 78 of file AC_PI_2D.h.
Referenced by AC_PI_2D(), get_p(), kP(), load_gains(), operator()(), and save_gains().
|
static |