APM:Libraries
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
AC_AttitudeControl Class Referenceabstract

#include <AC_AttitudeControl.h>

Inheritance diagram for AC_AttitudeControl:
[legend]
Collaboration diagram for AC_AttitudeControl:
[legend]

Public Member Functions

 AC_AttitudeControl (AP_AHRS_View &ahrs, const AP_Vehicle::MultiCopter &aparm, AP_Motors &motors, float dt)
 
virtual ~AC_AttitudeControl ()
 
AC_Pget_angle_roll_p ()
 
AC_Pget_angle_pitch_p ()
 
AC_Pget_angle_yaw_p ()
 
virtual AC_PIDget_rate_roll_pid ()=0
 
virtual AC_PIDget_rate_pitch_pid ()=0
 
virtual AC_PIDget_rate_yaw_pid ()=0
 
float get_accel_roll_max () const
 
float get_accel_roll_max_radss () const
 
void set_accel_roll_max (float accel_roll_max)
 
void save_accel_roll_max (float accel_roll_max)
 
float get_accel_pitch_max () const
 
float get_accel_pitch_max_radss () const
 
void set_accel_pitch_max (float accel_pitch_max)
 
void save_accel_pitch_max (float accel_pitch_max)
 
float get_accel_yaw_max () const
 
float get_accel_yaw_max_radss () const
 
void set_accel_yaw_max (float accel_yaw_max)
 
void save_accel_yaw_max (float accel_yaw_max)
 
void set_input_tc (float input_tc)
 
void relax_attitude_controllers ()
 
void reset_rate_controller_I_terms ()
 
void set_attitude_target_to_current_attitude ()
 
void set_yaw_target_to_current_heading ()
 
void shift_ef_yaw_target (float yaw_shift_cd)
 
void inertial_frame_reset ()
 
void input_quaternion (Quaternion attitude_desired_quat)
 
virtual void input_euler_angle_roll_pitch_euler_rate_yaw (float euler_roll_angle_cd, float euler_pitch_angle_cd, float euler_yaw_rate_cds)
 
virtual void input_euler_angle_roll_pitch_yaw (float euler_roll_angle_cd, float euler_pitch_angle_cd, float euler_yaw_angle_cd, bool slew_yaw)
 
void input_euler_rate_roll_pitch_yaw (float euler_roll_rate_cds, float euler_pitch_rate_cds, float euler_yaw_rate_cds)
 
virtual void input_rate_bf_roll_pitch_yaw (float roll_rate_bf_cds, float pitch_rate_bf_cds, float yaw_rate_bf_cds)
 
void input_rate_bf_roll_pitch_yaw_2 (float roll_rate_bf_cds, float pitch_rate_bf_cds, float yaw_rate_bf_cds)
 
void input_rate_bf_roll_pitch_yaw_3 (float roll_rate_bf_cds, float pitch_rate_bf_cds, float yaw_rate_bf_cds)
 
virtual void input_angle_step_bf_roll_pitch_yaw (float roll_angle_step_bf_cd, float pitch_angle_step_bf_cd, float yaw_angle_step_bf_cd)
 
virtual void rate_controller_run ()=0
 
void euler_rate_to_ang_vel (const Vector3f &euler_rad, const Vector3f &euler_rate_rads, Vector3f &ang_vel_rads)
 
bool ang_vel_to_euler_rate (const Vector3f &euler_rad, const Vector3f &ang_vel_rads, Vector3f &euler_rate_rads)
 
void use_sqrt_controller (bool use_sqrt_cont)
 
Vector3f get_att_target_euler_cd () const
 
float get_att_error_angle_deg () const
 
void rate_bf_roll_target (float rate_cds)
 
void rate_bf_pitch_target (float rate_cds)
 
void rate_bf_yaw_target (float rate_cds)
 
float max_rate_step_bf_roll ()
 
float max_rate_step_bf_pitch ()
 
float max_rate_step_bf_yaw ()
 
float max_angle_step_bf_roll ()
 
float max_angle_step_bf_pitch ()
 
float max_angle_step_bf_yaw ()
 
Vector3f rate_bf_targets () const
 
void bf_feedforward (bool enable_or_disable)
 
void bf_feedforward_save (bool enable_or_disable)
 
bool get_bf_feedforward ()
 
void accel_limiting (bool enable_or_disable)
 
virtual void update_althold_lean_angle_max (float throttle_in)=0
 
virtual void set_throttle_out (float throttle_in, bool apply_angle_boost, float filt_cutoff)=0
 
void set_throttle_out_unstabilized (float throttle_in, bool reset_attitude_control, float filt_cutoff)
 
float get_throttle_in () const
 
float angle_boost () const
 
float get_althold_lean_angle_max () const
 
float lean_angle_max () const
 
void input_shaping_rate_predictor (Vector2f error_angle, Vector2f &target_ang_vel, float dt) const
 
void ang_vel_limit (Vector3f &euler_rad, float ang_vel_roll_max, float ang_vel_pitch_max, float ang_vel_yaw_max) const
 
Vector3f euler_accel_limit (Vector3f euler_rad, Vector3f euler_accel)
 
void thrust_heading_rotation_angles (Quaternion &att_to_quat, const Quaternion &att_from_quat, Vector3f &att_diff_angle, float &thrust_vec_dot)
 
void attitude_controller_run_quat ()
 
virtual void parameter_sanity_check ()
 
virtual bool is_throttle_mix_min () const
 
virtual void set_throttle_mix_min ()
 
virtual void set_throttle_mix_man ()
 
virtual void set_throttle_mix_max ()
 
virtual void set_throttle_mix_value (float value)
 
virtual float get_throttle_mix (void) const
 
virtual void use_flybar_passthrough (bool passthrough, bool tail_passthrough)
 
virtual void use_leaky_i (bool leaky_i)
 
virtual void set_hover_roll_trim_scalar (float scalar)
 
virtual void passthrough_bf_roll_pitch_rate_yaw (float roll_passthrough, float pitch_passthrough, float yaw_rate_bf_cds)
 
virtual void set_inverted_flight (bool inverted)
 
void control_monitor_log (void)
 
float control_monitor_rms_output_roll (void) const
 
float control_monitor_rms_output_roll_P (void) const
 
float control_monitor_rms_output_roll_D (void) const
 
float control_monitor_rms_output_pitch_P (void) const
 
float control_monitor_rms_output_pitch_D (void) const
 
float control_monitor_rms_output_pitch (void) const
 
float control_monitor_rms_output_yaw (void) const
 

Static Public Member Functions

static float sqrt_controller (float error, float p, float second_ord_lim, float dt)
 
static float stopping_point (float first_ord_mag, float p, float second_ord_lim)
 
static float input_shaping_angle (float error_angle, float smoothing_gain, float accel_max, float target_ang_vel, float dt)
 
static float input_shaping_ang_vel (float target_ang_vel, float desired_ang_vel, float accel_max, float dt)
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Protected Member Functions

Vector3f update_ang_vel_target_from_att_error (Vector3f attitude_error_rot_vec_rad)
 
float rate_target_to_motor_roll (float rate_actual_rads, float rate_target_rads)
 
float rate_target_to_motor_pitch (float rate_actual_rads, float rate_target_rads)
 
virtual float rate_target_to_motor_yaw (float rate_actual_rads, float rate_target_rads)
 
virtual float get_roll_trim_rad ()
 
float get_slew_yaw_rads ()
 
void control_monitor_filter_pid (float value, float &rms_P)
 
void control_monitor_update (void)
 

Protected Attributes

AP_Float _slew_yaw
 
AP_Float _ang_vel_roll_max
 
AP_Float _ang_vel_pitch_max
 
AP_Float _ang_vel_yaw_max
 
AP_Float _accel_roll_max
 
AP_Float _accel_pitch_max
 
AP_Float _accel_yaw_max
 
AP_Int8 _rate_bf_ff_enabled
 
AP_Int8 _angle_boost_enabled
 
AC_P _p_angle_roll
 
AC_P _p_angle_pitch
 
AC_P _p_angle_yaw
 
AP_Float _angle_limit_tc
 
AP_Float _input_tc
 
float _dt
 
Vector3f _attitude_target_euler_angle
 
Vector3f _attitude_target_euler_rate
 
Quaternion _attitude_target_quat
 
Vector3f _attitude_target_ang_vel
 
Vector3f _rate_target_ang_vel
 
Quaternion _attitude_ang_error
 
float _thrust_error_angle
 
float _throttle_in = 0.0f
 
float _angle_boost
 
bool _use_sqrt_controller
 
float _althold_lean_angle_max = 0.0f
 
float _throttle_rpy_mix_desired
 
float _throttle_rpy_mix
 
const AP_AHRS_View_ahrs
 
const AP_Vehicle::MultiCopter_aparm
 
AP_Motors_motors
 
struct {
   float   rms_roll_P
 
   float   rms_roll_D
 
   float   rms_pitch_P
 
   float   rms_pitch_D
 
   float   rms_yaw
 
_control_monitor
 
bool _inverted_flight
 

Detailed Description

Definition at line 45 of file AC_AttitudeControl.h.

Constructor & Destructor Documentation

◆ AC_AttitudeControl()

AC_AttitudeControl::AC_AttitudeControl ( AP_AHRS_View ahrs,
const AP_Vehicle::MultiCopter aparm,
AP_Motors motors,
float  dt 
)
inline

Definition at line 47 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ ~AC_AttitudeControl()

virtual AC_AttitudeControl::~AC_AttitudeControl ( )
inlinevirtual

Definition at line 67 of file AC_AttitudeControl.h.

Member Function Documentation

◆ accel_limiting()

void AC_AttitudeControl::accel_limiting ( bool  enable_or_disable)

Definition at line 882 of file AC_AttitudeControl.cpp.

Referenced by get_bf_feedforward().

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

◆ ang_vel_limit()

void AC_AttitudeControl::ang_vel_limit ( Vector3f euler_rad,
float  ang_vel_roll_max,
float  ang_vel_pitch_max,
float  ang_vel_yaw_max 
) const

Definition at line 683 of file AC_AttitudeControl.cpp.

Referenced by attitude_controller_run_quat(), input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_quaternion(), input_shaping_rate_predictor(), and lean_angle_max().

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

◆ ang_vel_to_euler_rate()

bool AC_AttitudeControl::ang_vel_to_euler_rate ( const Vector3f euler_rad,
const Vector3f ang_vel_rads,
Vector3f euler_rate_rads 
)

Definition at line 764 of file AC_AttitudeControl.cpp.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_quaternion(), input_rate_bf_roll_pitch_yaw(), input_rate_bf_roll_pitch_yaw_2(), input_rate_bf_roll_pitch_yaw_3(), AC_AttitudeControl_Heli::passthrough_bf_roll_pitch_rate_yaw(), and set_yaw_target_to_current_heading().

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

◆ angle_boost()

float AC_AttitudeControl::angle_boost ( ) const
inline

Definition at line 230 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ attitude_controller_run_quat()

void AC_AttitudeControl::attitude_controller_run_quat ( )

Definition at line 526 of file AC_AttitudeControl.cpp.

Referenced by input_angle_step_bf_roll_pitch_yaw(), input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_euler_rate_roll_pitch_yaw(), input_quaternion(), input_rate_bf_roll_pitch_yaw(), and lean_angle_max().

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

◆ bf_feedforward()

void AC_AttitudeControl::bf_feedforward ( bool  enable_or_disable)
inline

Definition at line 206 of file AC_AttitudeControl.h.

◆ bf_feedforward_save()

void AC_AttitudeControl::bf_feedforward_save ( bool  enable_or_disable)
inline

Definition at line 209 of file AC_AttitudeControl.h.

◆ control_monitor_filter_pid()

void AC_AttitudeControl::control_monitor_filter_pid ( float  value,
float &  rms_P 
)
protected

Definition at line 14 of file ControlMonitor.cpp.

Referenced by control_monitor_update().

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

◆ control_monitor_log()

void AC_AttitudeControl::control_monitor_log ( void  )

Definition at line 42 of file ControlMonitor.cpp.

Here is the call graph for this function:

◆ control_monitor_rms_output_pitch()

float AC_AttitudeControl::control_monitor_rms_output_pitch ( void  ) const

Definition at line 81 of file ControlMonitor.cpp.

◆ control_monitor_rms_output_pitch_D()

float AC_AttitudeControl::control_monitor_rms_output_pitch_D ( void  ) const

Definition at line 97 of file ControlMonitor.cpp.

◆ control_monitor_rms_output_pitch_P()

float AC_AttitudeControl::control_monitor_rms_output_pitch_P ( void  ) const

Definition at line 89 of file ControlMonitor.cpp.

◆ control_monitor_rms_output_roll()

float AC_AttitudeControl::control_monitor_rms_output_roll ( void  ) const

Definition at line 57 of file ControlMonitor.cpp.

◆ control_monitor_rms_output_roll_D()

float AC_AttitudeControl::control_monitor_rms_output_roll_D ( void  ) const

Definition at line 73 of file ControlMonitor.cpp.

◆ control_monitor_rms_output_roll_P()

float AC_AttitudeControl::control_monitor_rms_output_roll_P ( void  ) const

Definition at line 65 of file ControlMonitor.cpp.

◆ control_monitor_rms_output_yaw()

float AC_AttitudeControl::control_monitor_rms_output_yaw ( void  ) const

Definition at line 105 of file ControlMonitor.cpp.

◆ control_monitor_update()

void AC_AttitudeControl::control_monitor_update ( void  )
protected

Definition at line 25 of file ControlMonitor.cpp.

Referenced by AC_AttitudeControl_Sub::rate_controller_run(), and AC_AttitudeControl_Multi::rate_controller_run().

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

◆ euler_accel_limit()

Vector3f AC_AttitudeControl::euler_accel_limit ( Vector3f  euler_rad,
Vector3f  euler_accel 
)

Definition at line 706 of file AC_AttitudeControl.cpp.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_euler_rate_roll_pitch_yaw(), and lean_angle_max().

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

◆ euler_rate_to_ang_vel()

void AC_AttitudeControl::euler_rate_to_ang_vel ( const Vector3f euler_rad,
const Vector3f euler_rate_rads,
Vector3f ang_vel_rads 
)

Definition at line 750 of file AC_AttitudeControl.cpp.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_euler_rate_roll_pitch_yaw(), and set_yaw_target_to_current_heading().

Here is the caller graph for this function:

◆ get_accel_pitch_max()

float AC_AttitudeControl::get_accel_pitch_max ( ) const
inline

Definition at line 88 of file AC_AttitudeControl.h.

◆ get_accel_pitch_max_radss()

float AC_AttitudeControl::get_accel_pitch_max_radss ( ) const
inline

Definition at line 89 of file AC_AttitudeControl.h.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_euler_rate_roll_pitch_yaw(), input_quaternion(), input_rate_bf_roll_pitch_yaw(), input_rate_bf_roll_pitch_yaw_2(), input_rate_bf_roll_pitch_yaw_3(), input_shaping_rate_predictor(), and update_ang_vel_target_from_att_error().

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

◆ get_accel_roll_max()

float AC_AttitudeControl::get_accel_roll_max ( ) const
inline

Definition at line 78 of file AC_AttitudeControl.h.

◆ get_accel_roll_max_radss()

float AC_AttitudeControl::get_accel_roll_max_radss ( ) const
inline

Definition at line 79 of file AC_AttitudeControl.h.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_euler_rate_roll_pitch_yaw(), input_quaternion(), input_rate_bf_roll_pitch_yaw(), input_rate_bf_roll_pitch_yaw_2(), input_rate_bf_roll_pitch_yaw_3(), input_shaping_rate_predictor(), and update_ang_vel_target_from_att_error().

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

◆ get_accel_yaw_max()

float AC_AttitudeControl::get_accel_yaw_max ( ) const
inline

Definition at line 98 of file AC_AttitudeControl.h.

◆ get_accel_yaw_max_radss()

float AC_AttitudeControl::get_accel_yaw_max_radss ( ) const
inline

Definition at line 99 of file AC_AttitudeControl.h.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_euler_rate_roll_pitch_yaw(), input_quaternion(), input_rate_bf_roll_pitch_yaw(), input_rate_bf_roll_pitch_yaw_2(), input_rate_bf_roll_pitch_yaw_3(), AC_AttitudeControl_Heli::passthrough_bf_roll_pitch_rate_yaw(), and update_ang_vel_target_from_att_error().

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

◆ get_althold_lean_angle_max()

float AC_AttitudeControl::get_althold_lean_angle_max ( ) const

Definition at line 903 of file AC_AttitudeControl.cpp.

Referenced by angle_boost(), and AC_PosControl::run_xy_controller().

Here is the caller graph for this function:

◆ get_angle_pitch_p()

AC_P& AC_AttitudeControl::get_angle_pitch_p ( )
inline

Definition at line 71 of file AC_AttitudeControl.h.

◆ get_angle_roll_p()

AC_P& AC_AttitudeControl::get_angle_roll_p ( )
inline

Definition at line 70 of file AC_AttitudeControl.h.

◆ get_angle_yaw_p()

AC_P& AC_AttitudeControl::get_angle_yaw_p ( )
inline

Definition at line 72 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ get_att_error_angle_deg()

float AC_AttitudeControl::get_att_error_angle_deg ( ) const
inline

Definition at line 173 of file AC_AttitudeControl.h.

◆ get_att_target_euler_cd()

Vector3f AC_AttitudeControl::get_att_target_euler_cd ( ) const
inline

Definition at line 170 of file AC_AttitudeControl.h.

Referenced by AC_WPNav::get_yaw(), and AC_Loiter::init_target().

Here is the caller graph for this function:

◆ get_bf_feedforward()

bool AC_AttitudeControl::get_bf_feedforward ( )
inline

Definition at line 212 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ get_rate_pitch_pid()

virtual AC_PID& AC_AttitudeControl::get_rate_pitch_pid ( )
pure virtual

Implemented in AC_AttitudeControl_Heli, AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Referenced by control_monitor_update(), get_angle_yaw_p(), max_rate_step_bf_pitch(), rate_target_to_motor_pitch(), relax_attitude_controllers(), and reset_rate_controller_I_terms().

Here is the caller graph for this function:

◆ get_rate_roll_pid()

virtual AC_PID& AC_AttitudeControl::get_rate_roll_pid ( )
pure virtual

Implemented in AC_AttitudeControl_Heli, AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Referenced by control_monitor_update(), get_angle_yaw_p(), max_rate_step_bf_roll(), rate_target_to_motor_roll(), relax_attitude_controllers(), and reset_rate_controller_I_terms().

Here is the caller graph for this function:

◆ get_rate_yaw_pid()

virtual AC_PID& AC_AttitudeControl::get_rate_yaw_pid ( )
pure virtual

Implemented in AC_AttitudeControl_Heli, AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Referenced by control_monitor_update(), get_angle_yaw_p(), max_rate_step_bf_yaw(), rate_target_to_motor_yaw(), relax_attitude_controllers(), and reset_rate_controller_I_terms().

Here is the caller graph for this function:

◆ get_roll_trim_rad()

virtual float AC_AttitudeControl::get_roll_trim_rad ( )
inlineprotectedvirtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 315 of file AC_AttitudeControl.h.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), and input_euler_angle_roll_pitch_yaw().

Here is the caller graph for this function:

◆ get_slew_yaw_rads()

float AC_AttitudeControl::get_slew_yaw_rads ( )
inlineprotected

Definition at line 318 of file AC_AttitudeControl.h.

Referenced by input_euler_angle_roll_pitch_yaw().

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

◆ get_throttle_in()

float AC_AttitudeControl::get_throttle_in ( ) const
inline

Definition at line 227 of file AC_AttitudeControl.h.

◆ get_throttle_mix()

virtual float AC_AttitudeControl::get_throttle_mix ( void  ) const
inlinevirtual

Reimplemented in AC_AttitudeControl_Multi.

Definition at line 279 of file AC_AttitudeControl.h.

◆ inertial_frame_reset()

void AC_AttitudeControl::inertial_frame_reset ( )

Definition at line 735 of file AC_AttitudeControl.cpp.

Referenced by set_yaw_target_to_current_heading().

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

◆ input_angle_step_bf_roll_pitch_yaw()

void AC_AttitudeControl::input_angle_step_bf_roll_pitch_yaw ( float  roll_angle_step_bf_cd,
float  pitch_angle_step_bf_cd,
float  yaw_angle_step_bf_cd 
)
virtual

Definition at line 501 of file AC_AttitudeControl.cpp.

Referenced by set_yaw_target_to_current_heading().

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

◆ input_euler_angle_roll_pitch_euler_rate_yaw()

void AC_AttitudeControl::input_euler_angle_roll_pitch_euler_rate_yaw ( float  euler_roll_angle_cd,
float  euler_pitch_angle_cd,
float  euler_yaw_rate_cds 
)
virtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 244 of file AC_AttitudeControl.cpp.

Referenced by AC_AttitudeControl_Heli::input_euler_angle_roll_pitch_euler_rate_yaw(), and set_yaw_target_to_current_heading().

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

◆ input_euler_angle_roll_pitch_yaw()

void AC_AttitudeControl::input_euler_angle_roll_pitch_yaw ( float  euler_roll_angle_cd,
float  euler_pitch_angle_cd,
float  euler_yaw_angle_cd,
bool  slew_yaw 
)
virtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 295 of file AC_AttitudeControl.cpp.

Referenced by AC_AttitudeControl_Heli::input_euler_angle_roll_pitch_yaw(), and set_yaw_target_to_current_heading().

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

◆ input_euler_rate_roll_pitch_yaw()

void AC_AttitudeControl::input_euler_rate_roll_pitch_yaw ( float  euler_roll_rate_cds,
float  euler_pitch_rate_cds,
float  euler_yaw_rate_cds 
)

Definition at line 353 of file AC_AttitudeControl.cpp.

Referenced by set_yaw_target_to_current_heading().

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

◆ input_quaternion()

void AC_AttitudeControl::input_quaternion ( Quaternion  attitude_desired_quat)

Definition at line 210 of file AC_AttitudeControl.cpp.

Referenced by set_yaw_target_to_current_heading().

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

◆ input_rate_bf_roll_pitch_yaw()

void AC_AttitudeControl::input_rate_bf_roll_pitch_yaw ( float  roll_rate_bf_cds,
float  pitch_rate_bf_cds,
float  yaw_rate_bf_cds 
)
virtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 395 of file AC_AttitudeControl.cpp.

Referenced by AC_AttitudeControl_Heli::input_rate_bf_roll_pitch_yaw(), and set_yaw_target_to_current_heading().

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

◆ input_rate_bf_roll_pitch_yaw_2()

void AC_AttitudeControl::input_rate_bf_roll_pitch_yaw_2 ( float  roll_rate_bf_cds,
float  pitch_rate_bf_cds,
float  yaw_rate_bf_cds 
)

Definition at line 432 of file AC_AttitudeControl.cpp.

Referenced by set_yaw_target_to_current_heading().

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

◆ input_rate_bf_roll_pitch_yaw_3()

void AC_AttitudeControl::input_rate_bf_roll_pitch_yaw_3 ( float  roll_rate_bf_cds,
float  pitch_rate_bf_cds,
float  yaw_rate_bf_cds 
)

Definition at line 455 of file AC_AttitudeControl.cpp.

Referenced by set_yaw_target_to_current_heading().

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

◆ input_shaping_ang_vel()

float AC_AttitudeControl::input_shaping_ang_vel ( float  target_ang_vel,
float  desired_ang_vel,
float  accel_max,
float  dt 
)
static

Definition at line 651 of file AC_AttitudeControl.cpp.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_rate_roll_pitch_yaw(), input_rate_bf_roll_pitch_yaw(), input_rate_bf_roll_pitch_yaw_2(), input_rate_bf_roll_pitch_yaw_3(), input_shaping_angle(), and lean_angle_max().

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

◆ input_shaping_angle()

float AC_AttitudeControl::input_shaping_angle ( float  error_angle,
float  smoothing_gain,
float  accel_max,
float  target_ang_vel,
float  dt 
)
static

Definition at line 641 of file AC_AttitudeControl.cpp.

Referenced by input_euler_angle_roll_pitch_euler_rate_yaw(), input_euler_angle_roll_pitch_yaw(), input_quaternion(), input_shaping_rate_predictor(), and lean_angle_max().

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

◆ input_shaping_rate_predictor()

void AC_AttitudeControl::input_shaping_rate_predictor ( Vector2f  error_angle,
Vector2f target_ang_vel,
float  dt 
) const

Definition at line 664 of file AC_AttitudeControl.cpp.

Referenced by lean_angle_max(), and AC_Loiter::set_pilot_desired_acceleration().

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

◆ is_throttle_mix_min()

virtual bool AC_AttitudeControl::is_throttle_mix_min ( ) const
inlinevirtual

Reimplemented in AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Definition at line 272 of file AC_AttitudeControl.h.

◆ lean_angle_max()

float AC_AttitudeControl::lean_angle_max ( ) const
inline

Definition at line 236 of file AC_AttitudeControl.h.

Referenced by AC_WPNav::AC_WPNav(), AC_Loiter::get_angle_max_cd(), AC_PosControl::get_lean_angle_max_cd(), and AC_Loiter::sanity_check_params().

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

◆ max_angle_step_bf_pitch()

float AC_AttitudeControl::max_angle_step_bf_pitch ( )
inline

Definition at line 197 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ max_angle_step_bf_roll()

float AC_AttitudeControl::max_angle_step_bf_roll ( )
inline

Definition at line 194 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ max_angle_step_bf_yaw()

float AC_AttitudeControl::max_angle_step_bf_yaw ( )
inline

Definition at line 200 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ max_rate_step_bf_pitch()

float AC_AttitudeControl::max_rate_step_bf_pitch ( )

Definition at line 981 of file AC_AttitudeControl.cpp.

Referenced by max_angle_step_bf_pitch(), and rate_bf_yaw_target().

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

◆ max_rate_step_bf_roll()

float AC_AttitudeControl::max_rate_step_bf_roll ( )

Definition at line 973 of file AC_AttitudeControl.cpp.

Referenced by max_angle_step_bf_roll(), and rate_bf_yaw_target().

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

◆ max_rate_step_bf_yaw()

float AC_AttitudeControl::max_rate_step_bf_yaw ( )

Definition at line 989 of file AC_AttitudeControl.cpp.

Referenced by max_angle_step_bf_yaw(), and rate_bf_yaw_target().

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

◆ parameter_sanity_check()

virtual void AC_AttitudeControl::parameter_sanity_check ( )
inlinevirtual

Reimplemented in AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Definition at line 269 of file AC_AttitudeControl.h.

◆ passthrough_bf_roll_pitch_rate_yaw()

virtual void AC_AttitudeControl::passthrough_bf_roll_pitch_rate_yaw ( float  roll_passthrough,
float  pitch_passthrough,
float  yaw_rate_bf_cds 
)
inlinevirtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 291 of file AC_AttitudeControl.h.

◆ rate_bf_pitch_target()

void AC_AttitudeControl::rate_bf_pitch_target ( float  rate_cds)
inline

Definition at line 179 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ rate_bf_roll_target()

void AC_AttitudeControl::rate_bf_roll_target ( float  rate_cds)
inline

Definition at line 176 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ rate_bf_targets()

Vector3f AC_AttitudeControl::rate_bf_targets ( ) const
inline

Definition at line 203 of file AC_AttitudeControl.h.

Referenced by DataFlash_Class::Log_Write_Rate().

Here is the caller graph for this function:

◆ rate_bf_yaw_target()

void AC_AttitudeControl::rate_bf_yaw_target ( float  rate_cds)
inline

Definition at line 182 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ rate_controller_run()

virtual void AC_AttitudeControl::rate_controller_run ( )
pure virtual

Implemented in AC_AttitudeControl_Multi, AC_AttitudeControl_Heli, and AC_AttitudeControl_Sub.

Referenced by set_yaw_target_to_current_heading().

Here is the caller graph for this function:

◆ rate_target_to_motor_pitch()

float AC_AttitudeControl::rate_target_to_motor_pitch ( float  rate_actual_rads,
float  rate_target_rads 
)
protected

Definition at line 836 of file AC_AttitudeControl.cpp.

Referenced by AC_AttitudeControl_Sub::rate_controller_run(), and AC_AttitudeControl_Multi::rate_controller_run().

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

◆ rate_target_to_motor_roll()

float AC_AttitudeControl::rate_target_to_motor_roll ( float  rate_actual_rads,
float  rate_target_rads 
)
protected

Definition at line 813 of file AC_AttitudeControl.cpp.

Referenced by AC_AttitudeControl_Sub::rate_controller_run(), and AC_AttitudeControl_Multi::rate_controller_run().

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

◆ rate_target_to_motor_yaw()

float AC_AttitudeControl::rate_target_to_motor_yaw ( float  rate_actual_rads,
float  rate_target_rads 
)
protectedvirtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 859 of file AC_AttitudeControl.cpp.

Referenced by AC_AttitudeControl_Sub::rate_controller_run(), and AC_AttitudeControl_Multi::rate_controller_run().

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

◆ relax_attitude_controllers()

void AC_AttitudeControl::relax_attitude_controllers ( )

Definition at line 162 of file AC_AttitudeControl.cpp.

Referenced by set_input_tc(), and set_throttle_out_unstabilized().

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

◆ reset_rate_controller_I_terms()

void AC_AttitudeControl::reset_rate_controller_I_terms ( )

Definition at line 178 of file AC_AttitudeControl.cpp.

Referenced by set_input_tc().

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

◆ save_accel_pitch_max()

void AC_AttitudeControl::save_accel_pitch_max ( float  accel_pitch_max)
inline

Definition at line 95 of file AC_AttitudeControl.h.

◆ save_accel_roll_max()

void AC_AttitudeControl::save_accel_roll_max ( float  accel_roll_max)
inline

Definition at line 85 of file AC_AttitudeControl.h.

◆ save_accel_yaw_max()

void AC_AttitudeControl::save_accel_yaw_max ( float  accel_yaw_max)
inline

Definition at line 105 of file AC_AttitudeControl.h.

◆ set_accel_pitch_max()

void AC_AttitudeControl::set_accel_pitch_max ( float  accel_pitch_max)
inline

Definition at line 92 of file AC_AttitudeControl.h.

◆ set_accel_roll_max()

void AC_AttitudeControl::set_accel_roll_max ( float  accel_roll_max)
inline

Definition at line 82 of file AC_AttitudeControl.h.

◆ set_accel_yaw_max()

void AC_AttitudeControl::set_accel_yaw_max ( float  accel_yaw_max)
inline

Definition at line 102 of file AC_AttitudeControl.h.

◆ set_attitude_target_to_current_attitude()

void AC_AttitudeControl::set_attitude_target_to_current_attitude ( )
inline

Definition at line 117 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ set_hover_roll_trim_scalar()

virtual void AC_AttitudeControl::set_hover_roll_trim_scalar ( float  scalar)
inlinevirtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 288 of file AC_AttitudeControl.h.

◆ set_input_tc()

void AC_AttitudeControl::set_input_tc ( float  input_tc)
inline

Definition at line 108 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ set_inverted_flight()

virtual void AC_AttitudeControl::set_inverted_flight ( bool  inverted)
inlinevirtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 294 of file AC_AttitudeControl.h.

◆ set_throttle_mix_man()

virtual void AC_AttitudeControl::set_throttle_mix_man ( )
inlinevirtual

Reimplemented in AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Definition at line 276 of file AC_AttitudeControl.h.

◆ set_throttle_mix_max()

virtual void AC_AttitudeControl::set_throttle_mix_max ( )
inlinevirtual

Reimplemented in AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Definition at line 277 of file AC_AttitudeControl.h.

◆ set_throttle_mix_min()

virtual void AC_AttitudeControl::set_throttle_mix_min ( )
inlinevirtual

Reimplemented in AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Definition at line 275 of file AC_AttitudeControl.h.

◆ set_throttle_mix_value()

virtual void AC_AttitudeControl::set_throttle_mix_value ( float  value)
inlinevirtual

Reimplemented in AC_AttitudeControl_Multi.

Definition at line 278 of file AC_AttitudeControl.h.

◆ set_throttle_out()

virtual void AC_AttitudeControl::set_throttle_out ( float  throttle_in,
bool  apply_angle_boost,
float  filt_cutoff 
)
pure virtual

Implemented in AC_AttitudeControl_Heli, AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Referenced by get_bf_feedforward(), and AC_PosControl::run_z_controller().

Here is the caller graph for this function:

◆ set_throttle_out_unstabilized()

void AC_AttitudeControl::set_throttle_out_unstabilized ( float  throttle_in,
bool  reset_attitude_control,
float  filt_cutoff 
)

Definition at line 150 of file AC_AttitudeControl.cpp.

Referenced by get_bf_feedforward().

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

◆ set_yaw_target_to_current_heading()

void AC_AttitudeControl::set_yaw_target_to_current_heading ( )
inline

Definition at line 120 of file AC_AttitudeControl.h.

Here is the call graph for this function:

◆ shift_ef_yaw_target()

void AC_AttitudeControl::shift_ef_yaw_target ( float  yaw_shift_cd)

Definition at line 726 of file AC_AttitudeControl.cpp.

Referenced by set_yaw_target_to_current_heading().

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

◆ sqrt_controller()

float AC_AttitudeControl::sqrt_controller ( float  error,
float  p,
float  second_ord_lim,
float  dt 
)
static

Definition at line 910 of file AC_AttitudeControl.cpp.

Referenced by AC_Loiter::calc_desired_velocity(), AC_Avoid::get_max_speed(), input_shaping_angle(), lean_angle_max(), AC_PosControl::run_z_controller(), and update_ang_vel_target_from_att_error().

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

◆ stopping_point()

float AC_AttitudeControl::stopping_point ( float  first_ord_mag,
float  p,
float  second_ord_lim 
)
static

Definition at line 945 of file AC_AttitudeControl.cpp.

Referenced by lean_angle_max().

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

◆ thrust_heading_rotation_angles()

void AC_AttitudeControl::thrust_heading_rotation_angles ( Quaternion att_to_quat,
const Quaternion att_from_quat,
Vector3f att_diff_angle,
float &  thrust_vec_dot 
)

Definition at line 584 of file AC_AttitudeControl.cpp.

Referenced by attitude_controller_run_quat(), and lean_angle_max().

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

◆ update_althold_lean_angle_max()

virtual void AC_AttitudeControl::update_althold_lean_angle_max ( float  throttle_in)
pure virtual

Implemented in AC_AttitudeControl_Heli, AC_AttitudeControl_Multi, and AC_AttitudeControl_Sub.

Referenced by get_bf_feedforward().

Here is the caller graph for this function:

◆ update_ang_vel_target_from_att_error()

Vector3f AC_AttitudeControl::update_ang_vel_target_from_att_error ( Vector3f  attitude_error_rot_vec_rad)
protected

Definition at line 783 of file AC_AttitudeControl.cpp.

Referenced by attitude_controller_run_quat(), input_rate_bf_roll_pitch_yaw_3(), and AC_AttitudeControl_Heli::passthrough_bf_roll_pitch_rate_yaw().

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

◆ use_flybar_passthrough()

virtual void AC_AttitudeControl::use_flybar_passthrough ( bool  passthrough,
bool  tail_passthrough 
)
inlinevirtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 282 of file AC_AttitudeControl.h.

◆ use_leaky_i()

virtual void AC_AttitudeControl::use_leaky_i ( bool  leaky_i)
inlinevirtual

Reimplemented in AC_AttitudeControl_Heli.

Definition at line 285 of file AC_AttitudeControl.h.

◆ use_sqrt_controller()

void AC_AttitudeControl::use_sqrt_controller ( bool  use_sqrt_cont)
inline

Definition at line 164 of file AC_AttitudeControl.h.

Member Data Documentation

◆ _accel_pitch_max

AP_Float AC_AttitudeControl::_accel_pitch_max
protected

◆ _accel_roll_max

AP_Float AC_AttitudeControl::_accel_roll_max
protected

◆ _accel_yaw_max

AP_Float AC_AttitudeControl::_accel_yaw_max
protected

◆ _ahrs

const AP_AHRS_View& AC_AttitudeControl::_ahrs
protected

◆ _althold_lean_angle_max

float AC_AttitudeControl::_althold_lean_angle_max = 0.0f
protected

◆ _ang_vel_pitch_max

AP_Float AC_AttitudeControl::_ang_vel_pitch_max
protected

◆ _ang_vel_roll_max

AP_Float AC_AttitudeControl::_ang_vel_roll_max
protected

◆ _ang_vel_yaw_max

AP_Float AC_AttitudeControl::_ang_vel_yaw_max
protected

◆ _angle_boost

float AC_AttitudeControl::_angle_boost
protected

◆ _angle_boost_enabled

AP_Int8 AC_AttitudeControl::_angle_boost_enabled
protected

◆ _angle_limit_tc

AP_Float AC_AttitudeControl::_angle_limit_tc
protected

◆ _aparm

const AP_Vehicle::MultiCopter& AC_AttitudeControl::_aparm
protected

Definition at line 407 of file AC_AttitudeControl.h.

Referenced by lean_angle_max().

◆ _attitude_ang_error

Quaternion AC_AttitudeControl::_attitude_ang_error
protected

◆ _attitude_target_ang_vel

Vector3f AC_AttitudeControl::_attitude_target_ang_vel
protected

◆ _attitude_target_euler_angle

Vector3f AC_AttitudeControl::_attitude_target_euler_angle
protected

◆ _attitude_target_euler_rate

Vector3f AC_AttitudeControl::_attitude_target_euler_rate
protected

◆ _attitude_target_quat

Quaternion AC_AttitudeControl::_attitude_target_quat
protected

◆ _control_monitor

struct { ... } AC_AttitudeControl::_control_monitor

◆ _dt

float AC_AttitudeControl::_dt
protected

◆ _input_tc

AP_Float AC_AttitudeControl::_input_tc
protected

◆ _inverted_flight

bool AC_AttitudeControl::_inverted_flight
protected

◆ _motors

AP_Motors& AC_AttitudeControl::_motors
protected

◆ _p_angle_pitch

AC_P AC_AttitudeControl::_p_angle_pitch
protected

◆ _p_angle_roll

AC_P AC_AttitudeControl::_p_angle_roll
protected

◆ _p_angle_yaw

AC_P AC_AttitudeControl::_p_angle_yaw
protected

◆ _rate_bf_ff_enabled

AP_Int8 AC_AttitudeControl::_rate_bf_ff_enabled
protected

◆ _rate_target_ang_vel

Vector3f AC_AttitudeControl::_rate_target_ang_vel
protected

◆ _slew_yaw

AP_Float AC_AttitudeControl::_slew_yaw
protected

Definition at line 321 of file AC_AttitudeControl.h.

Referenced by get_slew_yaw_rads().

◆ _throttle_in

float AC_AttitudeControl::_throttle_in = 0.0f
protected

◆ _throttle_rpy_mix

float AC_AttitudeControl::_throttle_rpy_mix
protected

◆ _throttle_rpy_mix_desired

float AC_AttitudeControl::_throttle_rpy_mix_desired
protected

◆ _thrust_error_angle

float AC_AttitudeControl::_thrust_error_angle
protected

◆ _use_sqrt_controller

bool AC_AttitudeControl::_use_sqrt_controller
protected

◆ rms_pitch_D

float AC_AttitudeControl::rms_pitch_D

Definition at line 418 of file AC_AttitudeControl.h.

◆ rms_pitch_P

float AC_AttitudeControl::rms_pitch_P

Definition at line 417 of file AC_AttitudeControl.h.

◆ rms_roll_D

float AC_AttitudeControl::rms_roll_D

Definition at line 416 of file AC_AttitudeControl.h.

◆ rms_roll_P

float AC_AttitudeControl::rms_roll_P

Definition at line 415 of file AC_AttitudeControl.h.

◆ rms_yaw

float AC_AttitudeControl::rms_yaw

Definition at line 419 of file AC_AttitudeControl.h.

◆ var_info

const AP_Param::GroupInfo AC_AttitudeControl::var_info
static

Definition at line 297 of file AC_AttitudeControl.h.

Referenced by AC_AttitudeControl().


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