APM:Libraries
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
AC_AttitudeControl_Multi Class Reference

#include <AC_AttitudeControl_Multi.h>

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

Public Member Functions

 AC_AttitudeControl_Multi (AP_AHRS_View &ahrs, const AP_Vehicle::MultiCopter &aparm, AP_MotorsMulticopter &motors, float dt)
 
virtual ~AC_AttitudeControl_Multi ()
 
AC_PIDget_rate_roll_pid ()
 
AC_PIDget_rate_pitch_pid ()
 
AC_PIDget_rate_yaw_pid ()
 
void update_althold_lean_angle_max (float throttle_in) override
 
void set_throttle_out (float throttle_in, bool apply_angle_boost, float filt_cutoff) override
 
float get_throttle_boosted (float throttle_in)
 
void set_throttle_mix_min () override
 
void set_throttle_mix_man () override
 
void set_throttle_mix_max () override
 
void set_throttle_mix_value (float value) override
 
float get_throttle_mix (void) const override
 
bool is_throttle_mix_min () const override
 
void rate_controller_run ()
 
void parameter_sanity_check ()
 
- Public Member Functions inherited from AC_AttitudeControl
 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 ()
 
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)
 
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)
 
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 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 Attributes

static const struct AP_Param::GroupInfo var_info []
 
- Static Public Attributes inherited from AC_AttitudeControl
static const struct AP_Param::GroupInfo var_info []
 

Protected Member Functions

void update_throttle_rpy_mix ()
 
float get_throttle_avg_max (float throttle_in)
 
- Protected Member Functions inherited from AC_AttitudeControl
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_MotorsMulticopter_motors_multi
 
AC_PID _pid_rate_roll
 
AC_PID _pid_rate_pitch
 
AC_PID _pid_rate_yaw
 
AP_Float _thr_mix_man
 
AP_Float _thr_mix_min
 
AP_Float _thr_mix_max
 
- Protected Attributes inherited from AC_AttitudeControl
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
 

Additional Inherited Members

- Static Public Member Functions inherited from AC_AttitudeControl
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)
 

Detailed Description

Definition at line 42 of file AC_AttitudeControl_Multi.h.

Constructor & Destructor Documentation

◆ AC_AttitudeControl_Multi()

AC_AttitudeControl_Multi::AC_AttitudeControl_Multi ( AP_AHRS_View ahrs,
const AP_Vehicle::MultiCopter aparm,
AP_MotorsMulticopter motors,
float  dt 
)

Definition at line 169 of file AC_AttitudeControl_Multi.cpp.

Here is the call graph for this function:

◆ ~AC_AttitudeControl_Multi()

virtual AC_AttitudeControl_Multi::~AC_AttitudeControl_Multi ( )
inlinevirtual

Definition at line 47 of file AC_AttitudeControl_Multi.h.

Member Function Documentation

◆ get_rate_pitch_pid()

AC_PID& AC_AttitudeControl_Multi::get_rate_pitch_pid ( )
inlinevirtual

Implements AC_AttitudeControl.

Definition at line 51 of file AC_AttitudeControl_Multi.h.

◆ get_rate_roll_pid()

AC_PID& AC_AttitudeControl_Multi::get_rate_roll_pid ( )
inlinevirtual

Implements AC_AttitudeControl.

Definition at line 50 of file AC_AttitudeControl_Multi.h.

◆ get_rate_yaw_pid()

AC_PID& AC_AttitudeControl_Multi::get_rate_yaw_pid ( )
inlinevirtual

Implements AC_AttitudeControl.

Definition at line 52 of file AC_AttitudeControl_Multi.h.

Here is the call graph for this function:

◆ get_throttle_avg_max()

float AC_AttitudeControl_Multi::get_throttle_avg_max ( float  throttle_in)
protected

Definition at line 233 of file AC_AttitudeControl_Multi.cpp.

Referenced by set_throttle_out().

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

◆ get_throttle_boosted()

float AC_AttitudeControl_Multi::get_throttle_boosted ( float  throttle_in)

Definition at line 213 of file AC_AttitudeControl_Multi.cpp.

Referenced by get_rate_yaw_pid(), and set_throttle_out().

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

◆ get_throttle_mix()

float AC_AttitudeControl_Multi::get_throttle_mix ( void  ) const
inlineoverridevirtual

Reimplemented from AC_AttitudeControl.

Definition at line 70 of file AC_AttitudeControl_Multi.h.

◆ is_throttle_mix_min()

bool AC_AttitudeControl_Multi::is_throttle_mix_min ( ) const
inlineoverridevirtual

Reimplemented from AC_AttitudeControl.

Definition at line 73 of file AC_AttitudeControl_Multi.h.

Here is the call graph for this function:

◆ parameter_sanity_check()

void AC_AttitudeControl_Multi::parameter_sanity_check ( )
virtual

Reimplemented from AC_AttitudeControl.

Definition at line 267 of file AC_AttitudeControl_Multi.cpp.

Referenced by is_throttle_mix_min().

Here is the caller graph for this function:

◆ rate_controller_run()

void AC_AttitudeControl_Multi::rate_controller_run ( )
virtual

Implements AC_AttitudeControl.

Definition at line 253 of file AC_AttitudeControl_Multi.cpp.

Referenced by is_throttle_mix_min().

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

◆ set_throttle_mix_man()

void AC_AttitudeControl_Multi::set_throttle_mix_man ( )
inlineoverridevirtual

Reimplemented from AC_AttitudeControl.

Definition at line 67 of file AC_AttitudeControl_Multi.h.

◆ set_throttle_mix_max()

void AC_AttitudeControl_Multi::set_throttle_mix_max ( )
inlineoverridevirtual

Reimplemented from AC_AttitudeControl.

Definition at line 68 of file AC_AttitudeControl_Multi.h.

◆ set_throttle_mix_min()

void AC_AttitudeControl_Multi::set_throttle_mix_min ( )
inlineoverridevirtual

Reimplemented from AC_AttitudeControl.

Definition at line 66 of file AC_AttitudeControl_Multi.h.

◆ set_throttle_mix_value()

void AC_AttitudeControl_Multi::set_throttle_mix_value ( float  value)
inlineoverridevirtual

Reimplemented from AC_AttitudeControl.

Definition at line 69 of file AC_AttitudeControl_Multi.h.

◆ set_throttle_out()

void AC_AttitudeControl_Multi::set_throttle_out ( float  throttle_in,
bool  apply_angle_boost,
float  filt_cutoff 
)
overridevirtual

Implements AC_AttitudeControl.

Definition at line 195 of file AC_AttitudeControl_Multi.cpp.

Referenced by get_rate_yaw_pid().

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

◆ update_althold_lean_angle_max()

void AC_AttitudeControl_Multi::update_althold_lean_angle_max ( float  throttle_in)
overridevirtual

Implements AC_AttitudeControl.

Definition at line 180 of file AC_AttitudeControl_Multi.cpp.

Referenced by get_rate_yaw_pid(), and set_throttle_out().

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

◆ update_throttle_rpy_mix()

void AC_AttitudeControl_Multi::update_throttle_rpy_mix ( )
protected

Definition at line 240 of file AC_AttitudeControl_Multi.cpp.

Referenced by rate_controller_run().

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

Member Data Documentation

◆ _motors_multi

AP_MotorsMulticopter& AC_AttitudeControl_Multi::_motors_multi
protected

Definition at line 92 of file AC_AttitudeControl_Multi.h.

Referenced by update_althold_lean_angle_max().

◆ _pid_rate_pitch

AC_PID AC_AttitudeControl_Multi::_pid_rate_pitch
protected

Definition at line 94 of file AC_AttitudeControl_Multi.h.

Referenced by get_rate_pitch_pid().

◆ _pid_rate_roll

AC_PID AC_AttitudeControl_Multi::_pid_rate_roll
protected

Definition at line 93 of file AC_AttitudeControl_Multi.h.

Referenced by get_rate_roll_pid().

◆ _pid_rate_yaw

AC_PID AC_AttitudeControl_Multi::_pid_rate_yaw
protected

Definition at line 95 of file AC_AttitudeControl_Multi.h.

Referenced by get_rate_yaw_pid().

◆ _thr_mix_man

AP_Float AC_AttitudeControl_Multi::_thr_mix_man
protected

Definition at line 97 of file AC_AttitudeControl_Multi.h.

Referenced by parameter_sanity_check(), and set_throttle_mix_man().

◆ _thr_mix_max

AP_Float AC_AttitudeControl_Multi::_thr_mix_max
protected

Definition at line 99 of file AC_AttitudeControl_Multi.h.

Referenced by parameter_sanity_check(), and set_throttle_mix_max().

◆ _thr_mix_min

AP_Float AC_AttitudeControl_Multi::_thr_mix_min
protected

◆ var_info

const AP_Param::GroupInfo AC_AttitudeControl_Multi::var_info
static

Definition at line 82 of file AC_AttitudeControl_Multi.h.

Referenced by AC_AttitudeControl_Multi().


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