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

#include <ecl_pitch_controller.h>

Inheritance diagram for ECL_PitchController:
Collaboration diagram for ECL_PitchController:

Public Member Functions

 ECL_PitchController ()=default
 
 ~ECL_PitchController ()=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_max_rate_pos (float max_rate_pos)
 
void set_max_rate_neg (float max_rate_neg)
 
void set_bodyrate_setpoint (float rate)
 
void set_roll_ff (float roll_ff)
 
- 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 Attributes

float _max_rate_neg {0.0f}
 
float _roll_ff {0.0f}
 
- 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
 

Additional Inherited Members

- Protected Member Functions inherited from ECL_Controller
float constrain_airspeed (float airspeed, float minspeed, float maxspeed)
 

Detailed Description

Definition at line 56 of file ecl_pitch_controller.h.

Constructor & Destructor Documentation

◆ ECL_PitchController()

ECL_PitchController::ECL_PitchController ( )
default

◆ ~ECL_PitchController()

ECL_PitchController::~ECL_PitchController ( )
default

Member Function Documentation

◆ control_attitude()

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

Implements ECL_Controller.

Definition at line 47 of file ecl_pitch_controller.cpp.

References ECL_Controller::_rate_setpoint, ECL_Controller::_tc, ECL_ControlData::airspeed, ECL_WARN, ISFINITE, ECL_ControlData::pitch, ECL_ControlData::pitch_setpoint, and ECL_ControlData::roll.

Referenced by FixedwingAttitudeControl::Run().

Here is the caller graph for this function:

◆ control_bodyrate()

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

◆ control_euler_rate()

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

Implements ECL_Controller.

Definition at line 124 of file ecl_pitch_controller.cpp.

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

Referenced by FixedwingAttitudeControl::Run().

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

◆ set_bodyrate_setpoint()

void ECL_PitchController::set_bodyrate_setpoint ( float  rate)
inline

Definition at line 78 of file ecl_pitch_controller.h.

References ECL_Controller::_bodyrate_setpoint, ECL_Controller::_max_rate, _max_rate_neg, and math::constrain().

Referenced by control_euler_rate(), and FixedwingAttitudeControl::Run().

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

◆ set_max_rate_neg()

void ECL_PitchController::set_max_rate_neg ( float  max_rate_neg)
inline

Definition at line 73 of file ecl_pitch_controller.h.

References _max_rate_neg.

Referenced by FixedwingAttitudeControl::FixedwingAttitudeControl(), and FixedwingAttitudeControl::Run().

Here is the caller graph for this function:

◆ set_max_rate_pos()

void ECL_PitchController::set_max_rate_pos ( float  max_rate_pos)
inline

Definition at line 68 of file ecl_pitch_controller.h.

References ECL_Controller::_max_rate.

Referenced by FixedwingAttitudeControl::FixedwingAttitudeControl(), and FixedwingAttitudeControl::Run().

Here is the caller graph for this function:

◆ set_roll_ff()

void ECL_PitchController::set_roll_ff ( float  roll_ff)
inline

Definition at line 83 of file ecl_pitch_controller.h.

References _roll_ff.

Member Data Documentation

◆ _max_rate_neg

float ECL_PitchController::_max_rate_neg {0.0f}
protected

Definition at line 89 of file ecl_pitch_controller.h.

Referenced by set_bodyrate_setpoint(), and set_max_rate_neg().

◆ _roll_ff

float ECL_PitchController::_roll_ff {0.0f}
protected

Definition at line 90 of file ecl_pitch_controller.h.

Referenced by set_roll_ff().


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