PX4 Firmware
PX4 Autopilot Software http://px4.io
ECL_YawController Class Reference

#include <ecl_yaw_controller.h>

Inheritance diagram for ECL_YawController:
Collaboration diagram for ECL_YawController:

Public Types

enum  { COORD_METHOD_OPEN = 0, COORD_METHOD_CLOSEACC = 1 }
 

Public Member Functions

 ECL_YawController ()=default
 
 ~ECL_YawController ()=default
 
float control_attitude (const struct ECL_ControlData &ctl_data) override
 
float control_euler_rate (const struct ECL_ControlData &ctl_data) override
 
float control_bodyrate (const struct ECL_ControlData &ctl_data) override
 
void set_coordinated_min_speed (float coordinated_min_speed)
 
void set_coordinated_method (int32_t coordinated_method)
 
- Public Member Functions inherited from ECL_Controller
 ECL_Controller ()
 
virtual ~ECL_Controller ()=default
 
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 control_attitude_impl_openloop (const struct ECL_ControlData &ctl_data)
 
float control_attitude_impl_accclosedloop (const struct ECL_ControlData &ctl_data)
 
- Protected Member Functions inherited from ECL_Controller
float constrain_airspeed (float airspeed, float minspeed, float maxspeed)
 

Protected Attributes

float _coordinated_min_speed {1.0f}
 
float _max_rate {0.0f}
 
int32_t _coordinated_method {COORD_METHOD_OPEN}
 
- Protected Attributes inherited from ECL_Controller
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 53 of file ecl_yaw_controller.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
COORD_METHOD_OPEN 
COORD_METHOD_CLOSEACC 

Definition at line 75 of file ecl_yaw_controller.h.

Constructor & Destructor Documentation

◆ ECL_YawController()

ECL_YawController::ECL_YawController ( )
default

◆ ~ECL_YawController()

ECL_YawController::~ECL_YawController ( )
default

Member Function Documentation

◆ control_attitude()

float ECL_YawController::control_attitude ( const struct ECL_ControlData ctl_data)
overridevirtual

Implements ECL_Controller.

Definition at line 46 of file ecl_yaw_controller.cpp.

References _coordinated_method, ECL_Controller::_rate_setpoint, control_attitude_impl_accclosedloop(), control_attitude_impl_openloop(), COORD_METHOD_CLOSEACC, COORD_METHOD_OPEN, ecl_absolute_time, ecl_elapsed_time, and ECL_WARN.

Referenced by FixedwingAttitudeControl::Run().

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

◆ control_attitude_impl_accclosedloop()

float ECL_YawController::control_attitude_impl_accclosedloop ( const struct ECL_ControlData ctl_data)
protected

Definition at line 187 of file ecl_yaw_controller.cpp.

Referenced by control_attitude().

Here is the caller graph for this function:

◆ control_attitude_impl_openloop()

float ECL_YawController::control_attitude_impl_openloop ( const struct ECL_ControlData ctl_data)
protected

Definition at line 67 of file ecl_yaw_controller.cpp.

References ECL_Controller::_rate_setpoint, ECL_ControlData::airspeed, ECL_ControlData::airspeed_min, CONSTANTS_ONE_G, math::constrain(), ECL_WARN, ISFINITE, ECL_ControlData::pitch, ECL_ControlData::pitch_rate_setpoint, math::radians(), ECL_ControlData::roll, ECL_ControlData::roll_rate_setpoint, and ECL_ControlData::roll_setpoint.

Referenced by control_attitude().

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

◆ control_bodyrate()

float ECL_YawController::control_bodyrate ( const struct ECL_ControlData ctl_data)
overridevirtual

◆ control_euler_rate()

float ECL_YawController::control_euler_rate ( const struct ECL_ControlData ctl_data)
overridevirtual

Implements ECL_Controller.

Definition at line 195 of file ecl_yaw_controller.cpp.

References ECL_Controller::_bodyrate_setpoint, ECL_Controller::_rate_setpoint, control_bodyrate(), ECL_ControlData::pitch, ECL_ControlData::pitch_rate_setpoint, ECL_ControlData::roll, and ECL_Controller::set_bodyrate_setpoint().

Referenced by FixedwingAttitudeControl::Run().

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

◆ set_coordinated_method()

void ECL_YawController::set_coordinated_method ( int32_t  coordinated_method)
inline

Definition at line 70 of file ecl_yaw_controller.h.

References _coordinated_method.

◆ set_coordinated_min_speed()

void ECL_YawController::set_coordinated_min_speed ( float  coordinated_min_speed)
inline

Definition at line 65 of file ecl_yaw_controller.h.

References _coordinated_min_speed.

Member Data Documentation

◆ _coordinated_method

int32_t ECL_YawController::_coordinated_method {COORD_METHOD_OPEN}
protected

Definition at line 84 of file ecl_yaw_controller.h.

Referenced by control_attitude(), control_bodyrate(), and set_coordinated_method().

◆ _coordinated_min_speed

float ECL_YawController::_coordinated_min_speed {1.0f}
protected

Definition at line 81 of file ecl_yaw_controller.h.

Referenced by set_coordinated_min_speed().

◆ _max_rate

float ECL_YawController::_max_rate {0.0f}
protected

Definition at line 82 of file ecl_yaw_controller.h.


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