PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <ecl_controller.h>
Public Member Functions | |
ECL_Controller () | |
virtual | ~ECL_Controller ()=default |
virtual float | control_attitude (const struct ECL_ControlData &ctl_data)=0 |
virtual float | control_euler_rate (const struct ECL_ControlData &ctl_data)=0 |
virtual float | control_bodyrate (const struct ECL_ControlData &ctl_data)=0 |
void | set_time_constant (float time_constant) |
void | set_k_p (float k_p) |
void | set_k_i (float k_i) |
void | set_k_ff (float k_ff) |
void | set_integrator_max (float max) |
void | set_max_rate (float max_rate) |
void | set_bodyrate_setpoint (float rate) |
float | get_rate_error () |
float | get_desired_rate () |
float | get_desired_bodyrate () |
float | get_integrator () |
void | reset_integrator () |
Protected Member Functions | |
float | constrain_airspeed (float airspeed, float minspeed, float maxspeed) |
Protected Attributes | |
uint64_t | _last_run |
float | _tc |
float | _k_p |
float | _k_i |
float | _k_ff |
float | _integrator_max |
float | _max_rate |
float | _last_output |
float | _integrator |
float | _rate_error |
float | _rate_setpoint |
float | _bodyrate_setpoint |
Definition at line 75 of file ecl_controller.h.
ECL_Controller::ECL_Controller | ( | ) |
Definition at line 54 of file ecl_controller.cpp.
|
virtualdefault |
|
protected |
Definition at line 132 of file ecl_controller.cpp.
References ISFINITE.
|
pure virtual |
Implemented in ECL_PitchController, ECL_RollController, ECL_WheelController, and ECL_YawController.
|
pure virtual |
Implemented in ECL_PitchController, ECL_RollController, ECL_WheelController, and ECL_YawController.
|
pure virtual |
Implemented in ECL_WheelController, ECL_PitchController, ECL_RollController, and ECL_YawController.
float ECL_Controller::get_desired_bodyrate | ( | ) |
Definition at line 122 of file ecl_controller.cpp.
References _bodyrate_setpoint.
Referenced by FixedwingAttitudeControl::Run().
float ECL_Controller::get_desired_rate | ( | ) |
Definition at line 117 of file ecl_controller.cpp.
References _rate_setpoint.
Referenced by FixedwingAttitudeControl::Run().
float ECL_Controller::get_integrator | ( | ) |
Definition at line 127 of file ecl_controller.cpp.
References _integrator.
Referenced by FixedwingAttitudeControl::Run().
float ECL_Controller::get_rate_error | ( | ) |
Definition at line 112 of file ecl_controller.cpp.
References _rate_error.
void ECL_Controller::reset_integrator | ( | ) |
Definition at line 70 of file ecl_controller.cpp.
References _integrator.
Referenced by FixedwingAttitudeControl::Run().
void ECL_Controller::set_bodyrate_setpoint | ( | float | rate | ) |
Definition at line 107 of file ecl_controller.cpp.
References _bodyrate_setpoint, _max_rate, and math::constrain().
Referenced by ECL_YawController::control_euler_rate(), ECL_RollController::control_euler_rate(), and FixedwingAttitudeControl::Run().
void ECL_Controller::set_integrator_max | ( | float | max | ) |
Definition at line 97 of file ecl_controller.cpp.
References _integrator_max, and math::max().
Referenced by FixedwingAttitudeControl::parameters_update().
void ECL_Controller::set_k_ff | ( | float | k_ff | ) |
Definition at line 92 of file ecl_controller.cpp.
References _k_ff.
Referenced by FixedwingAttitudeControl::parameters_update().
void ECL_Controller::set_k_i | ( | float | k_i | ) |
Definition at line 87 of file ecl_controller.cpp.
References _k_i.
Referenced by FixedwingAttitudeControl::parameters_update().
void ECL_Controller::set_k_p | ( | float | k_p | ) |
Definition at line 82 of file ecl_controller.cpp.
References _k_p.
Referenced by FixedwingAttitudeControl::parameters_update().
void ECL_Controller::set_max_rate | ( | float | max_rate | ) |
Definition at line 102 of file ecl_controller.cpp.
References _max_rate.
Referenced by FixedwingAttitudeControl::FixedwingAttitudeControl(), FixedwingAttitudeControl::parameters_update(), and FixedwingAttitudeControl::Run().
void ECL_Controller::set_time_constant | ( | float | time_constant | ) |
Definition at line 75 of file ecl_controller.cpp.
Referenced by FixedwingAttitudeControl::parameters_update().
|
protected |
Definition at line 114 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_PitchController::control_bodyrate(), ECL_YawController::control_euler_rate(), ECL_RollController::control_euler_rate(), ECL_PitchController::control_euler_rate(), get_desired_bodyrate(), ECL_PitchController::set_bodyrate_setpoint(), and set_bodyrate_setpoint().
|
protected |
Definition at line 111 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_WheelController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_PitchController::control_bodyrate(), get_integrator(), and reset_integrator().
|
protected |
Definition at line 108 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_WheelController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_PitchController::control_bodyrate(), and set_integrator_max().
|
protected |
Definition at line 107 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_WheelController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_PitchController::control_bodyrate(), and set_k_ff().
|
protected |
Definition at line 106 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_WheelController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_PitchController::control_bodyrate(), and set_k_i().
|
protected |
Definition at line 105 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_WheelController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_PitchController::control_bodyrate(), and set_k_p().
|
protected |
Definition at line 110 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_WheelController::control_bodyrate(), and ECL_PitchController::control_bodyrate().
|
protected |
Definition at line 103 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_WheelController::control_bodyrate(), and ECL_PitchController::control_bodyrate().
|
protected |
Definition at line 109 of file ecl_controller.h.
Referenced by ECL_WheelController::control_attitude(), ECL_PitchController::set_bodyrate_setpoint(), set_bodyrate_setpoint(), set_max_rate(), and ECL_PitchController::set_max_rate_pos().
|
protected |
Definition at line 112 of file ecl_controller.h.
Referenced by ECL_YawController::control_bodyrate(), ECL_WheelController::control_bodyrate(), ECL_RollController::control_bodyrate(), ECL_PitchController::control_bodyrate(), and get_rate_error().
|
protected |
Definition at line 113 of file ecl_controller.h.
Referenced by ECL_YawController::control_attitude(), ECL_RollController::control_attitude(), ECL_WheelController::control_attitude(), ECL_PitchController::control_attitude(), ECL_YawController::control_attitude_impl_openloop(), ECL_WheelController::control_bodyrate(), ECL_YawController::control_euler_rate(), ECL_PitchController::control_euler_rate(), and get_desired_rate().
|
protected |
Definition at line 104 of file ecl_controller.h.
Referenced by ECL_RollController::control_attitude(), ECL_WheelController::control_attitude(), ECL_PitchController::control_attitude(), and set_time_constant().