PX4 Firmware
PX4 Autopilot Software http://px4.io
ECL_Controller Class Referenceabstract

#include <ecl_controller.h>

Inheritance diagram for ECL_Controller:
Collaboration diagram for ECL_Controller:

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
 

Detailed Description

Definition at line 75 of file ecl_controller.h.

Constructor & Destructor Documentation

◆ ECL_Controller()

ECL_Controller::ECL_Controller ( )

Definition at line 54 of file ecl_controller.cpp.

◆ ~ECL_Controller()

virtual ECL_Controller::~ECL_Controller ( )
virtualdefault

Member Function Documentation

◆ constrain_airspeed()

float ECL_Controller::constrain_airspeed ( float  airspeed,
float  minspeed,
float  maxspeed 
)
protected

Definition at line 132 of file ecl_controller.cpp.

References ISFINITE.

◆ control_attitude()

virtual float ECL_Controller::control_attitude ( const struct ECL_ControlData ctl_data)
pure virtual

◆ control_bodyrate()

virtual float ECL_Controller::control_bodyrate ( const struct ECL_ControlData ctl_data)
pure virtual

◆ control_euler_rate()

virtual float ECL_Controller::control_euler_rate ( const struct ECL_ControlData ctl_data)
pure virtual

◆ get_desired_bodyrate()

float ECL_Controller::get_desired_bodyrate ( )

Definition at line 122 of file ecl_controller.cpp.

References _bodyrate_setpoint.

Referenced by FixedwingAttitudeControl::Run().

Here is the caller graph for this function:

◆ get_desired_rate()

float ECL_Controller::get_desired_rate ( )

Definition at line 117 of file ecl_controller.cpp.

References _rate_setpoint.

Referenced by FixedwingAttitudeControl::Run().

Here is the caller graph for this function:

◆ get_integrator()

float ECL_Controller::get_integrator ( )

Definition at line 127 of file ecl_controller.cpp.

References _integrator.

Referenced by FixedwingAttitudeControl::Run().

Here is the caller graph for this function:

◆ get_rate_error()

float ECL_Controller::get_rate_error ( )

Definition at line 112 of file ecl_controller.cpp.

References _rate_error.

◆ reset_integrator()

void ECL_Controller::reset_integrator ( )

Definition at line 70 of file ecl_controller.cpp.

References _integrator.

Referenced by FixedwingAttitudeControl::Run().

Here is the caller graph for this function:

◆ set_bodyrate_setpoint()

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().

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

◆ set_integrator_max()

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().

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

◆ set_k_ff()

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().

Here is the caller graph for this function:

◆ set_k_i()

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().

Here is the caller graph for this function:

◆ set_k_p()

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().

Here is the caller graph for this function:

◆ set_max_rate()

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().

Here is the caller graph for this function:

◆ set_time_constant()

void ECL_Controller::set_time_constant ( float  time_constant)

Definition at line 75 of file ecl_controller.cpp.

References _tc, and f().

Referenced by FixedwingAttitudeControl::parameters_update().

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

Member Data Documentation

◆ _bodyrate_setpoint

◆ _integrator

◆ _integrator_max

◆ _k_ff

◆ _k_i

◆ _k_p

◆ _last_output

◆ _last_run

◆ _max_rate

◆ _rate_error

◆ _rate_setpoint

◆ _tc


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