APM:Libraries
|
Copter PID control class. More...
#include <AC_PID_2D.h>
Classes | |
struct | ac_pid_flags |
Public Member Functions | |
AC_PID_2D (float initial_p, float initial_i, float initial_d, float initial_imax, float initial_filt_hz, float initial_filt_d_hz, float dt) | |
void | set_dt (float dt) |
void | set_input (const Vector2f &input) |
void | set_input (const Vector3f &input) |
Vector2f | get_pid () |
Vector2f | get_p () const |
Vector2f | get_i () |
Vector2f | get_i_shrink () |
Vector2f | get_d () |
void | reset_I () |
void | reset_filter () |
void | load_gains () |
void | save_gains () |
AP_Float & | kP () |
AP_Float & | kI () |
float | imax () const |
float | filt_hz () const |
float | get_filt_alpha () const |
float | filt_d_hz () const |
float | get_filt_alpha_D () 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 | filt_d_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 | set_input_filter_d (const Vector2f &input_delta) |
void | calc_filt_alpha () |
void | calc_filt_alpha_d () |
Protected Attributes | |
AP_Float | _kp |
AP_Float | _ki |
AP_Float | _kd |
AP_Float | _imax |
AP_Float | _filt_hz |
AP_Float | _filt_d_hz |
struct AC_PID_2D::ac_pid_flags | _flags |
float | _dt |
float | _filt_alpha |
float | _filt_alpha_d |
Vector2f | _integrator |
Vector2f | _input |
Vector2f | _derivative |
Copter PID control class.
Definition at line 13 of file AC_PID_2D.h.
AC_PID_2D::AC_PID_2D | ( | float | initial_p, |
float | initial_i, | ||
float | initial_d, | ||
float | initial_imax, | ||
float | initial_filt_hz, | ||
float | initial_filt_d_hz, | ||
float | dt | ||
) |
|
protected |
Definition at line 223 of file AC_PID_2D.cpp.
Referenced by filt_hz(), load_gains(), and set_dt().
|
protected |
Definition at line 236 of file AC_PID_2D.cpp.
Referenced by filt_d_hz(), load_gains(), and set_dt().
|
inline |
Definition at line 53 of file AC_PID_2D.h.
Referenced by AC_PID_2D(), and imax().
void AC_PID_2D::filt_d_hz | ( | const float | v | ) |
|
inline |
Definition at line 51 of file AC_PID_2D.h.
Referenced by AC_PID_2D(), and imax().
void AC_PID_2D::filt_hz | ( | const float | v | ) |
Vector2f AC_PID_2D::get_d | ( | ) |
Definition at line 180 of file AC_PID_2D.cpp.
Referenced by get_pid(), AC_PosControl::run_xy_controller(), and set_input().
|
inline |
Definition at line 52 of file AC_PID_2D.h.
|
inline |
Definition at line 54 of file AC_PID_2D.h.
Vector2f AC_PID_2D::get_i | ( | ) |
Definition at line 152 of file AC_PID_2D.cpp.
Referenced by get_pid(), AC_PosControl::run_xy_controller(), and set_input().
Vector2f AC_PID_2D::get_i_shrink | ( | ) |
Definition at line 166 of file AC_PID_2D.cpp.
Referenced by AC_PosControl::run_xy_controller(), and set_input().
|
inline |
Definition at line 64 of file AC_PID_2D.h.
Vector2f AC_PID_2D::get_p | ( | ) | const |
Definition at line 147 of file AC_PID_2D.cpp.
Referenced by get_pid(), AC_PosControl::run_xy_controller(), and set_input().
Vector2f AC_PID_2D::get_pid | ( | ) |
Definition at line 186 of file AC_PID_2D.cpp.
Referenced by set_input().
|
inline |
Definition at line 50 of file AC_PID_2D.h.
|
inline |
|
inline |
Definition at line 59 of file AC_PID_2D.h.
|
inline |
Definition at line 49 of file AC_PID_2D.h.
|
inline |
Definition at line 58 of file AC_PID_2D.h.
|
inline |
Definition at line 48 of file AC_PID_2D.h.
Referenced by AC_Loiter::calc_desired_velocity().
|
inline |
Definition at line 57 of file AC_PID_2D.h.
void AC_PID_2D::load_gains | ( | ) |
Definition at line 196 of file AC_PID_2D.cpp.
Referenced by set_input().
void AC_PID_2D::reset_filter | ( | ) |
void AC_PID_2D::reset_I | ( | ) |
Definition at line 191 of file AC_PID_2D.cpp.
Referenced by set_input().
void AC_PID_2D::save_gains | ( | ) |
Definition at line 212 of file AC_PID_2D.cpp.
Referenced by set_input().
void AC_PID_2D::set_dt | ( | float | dt | ) |
Definition at line 67 of file AC_PID_2D.cpp.
Referenced by AC_PosControl::set_dt().
void AC_PID_2D::set_input | ( | const Vector2f & | input | ) |
Definition at line 102 of file AC_PID_2D.cpp.
Referenced by AC_PosControl::run_xy_controller().
|
inline |
Definition at line 26 of file AC_PID_2D.h.
Referenced by set_input().
|
protected |
Definition at line 125 of file AC_PID_2D.cpp.
Referenced by set_input().
|
inline |
Definition at line 65 of file AC_PID_2D.h.
Referenced by AC_PosControl::init_vel_controller_xyz(), and AC_PosControl::init_xy_controller().
|
inline |
Definition at line 66 of file AC_PID_2D.h.
|
protected |
Definition at line 103 of file AC_PID_2D.h.
Referenced by get_d(), and set_input_filter_d().
|
protected |
Definition at line 98 of file AC_PID_2D.h.
Referenced by calc_filt_alpha(), calc_filt_alpha_d(), get_i(), get_i_shrink(), set_dt(), and set_input_filter_d().
|
protected |
Definition at line 99 of file AC_PID_2D.h.
Referenced by calc_filt_alpha(), get_filt_alpha(), and set_input().
|
protected |
Definition at line 100 of file AC_PID_2D.h.
Referenced by calc_filt_alpha_d(), get_filt_alpha_D(), and set_input_filter_d().
|
protected |
Definition at line 90 of file AC_PID_2D.h.
Referenced by calc_filt_alpha_d(), filt_d_hz(), load_gains(), and save_gains().
|
protected |
Definition at line 89 of file AC_PID_2D.h.
Referenced by calc_filt_alpha(), filt_d_hz(), filt_hz(), load_gains(), and save_gains().
|
protected |
Referenced by AC_PID_2D(), set_input(), and set_input_filter_d().
|
protected |
Definition at line 88 of file AC_PID_2D.h.
Referenced by AC_PID_2D(), get_i(), get_i_shrink(), imax(), load_gains(), and save_gains().
|
protected |
Definition at line 102 of file AC_PID_2D.h.
Referenced by get_i(), get_i_shrink(), get_p(), and set_input().
|
protected |
Definition at line 101 of file AC_PID_2D.h.
Referenced by get_i(), get_i_shrink(), get_integrator(), reset_I(), and set_integrator().
|
protected |
Definition at line 87 of file AC_PID_2D.h.
Referenced by AC_PID_2D(), get_d(), kD(), load_gains(), and save_gains().
|
protected |
Definition at line 86 of file AC_PID_2D.h.
Referenced by AC_PID_2D(), get_i(), get_i_shrink(), kI(), load_gains(), and save_gains().
|
protected |
Definition at line 85 of file AC_PID_2D.h.
Referenced by AC_PID_2D(), get_p(), kP(), load_gains(), and save_gains().
|
static |
Definition at line 69 of file AC_PID_2D.h.
Referenced by AC_PID_2D().