APM:Libraries
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
AR_AttitudeControl Class Reference

#include <AR_AttitudeControl.h>

Collaboration diagram for AR_AttitudeControl:
[legend]

Public Member Functions

 AR_AttitudeControl (AP_AHRS &ahrs)
 
float get_steering_out_lat_accel (float desired_accel, bool motor_limit_left, bool motor_limit_right, float dt)
 
float get_steering_out_heading (float heading_rad, float rate_max, bool motor_limit_left, bool motor_limit_right, float dt)
 
float get_steering_out_rate (float desired_rate, bool motor_limit_left, bool motor_limit_right, float dt)
 
float get_desired_turn_rate () const
 
float get_desired_lat_accel () const
 
bool get_lat_accel (float &lat_accel) const
 
void set_throttle_limits (float throttle_accel_max, float throttle_decel_max)
 
float get_throttle_out_speed (float desired_speed, bool motor_limit_low, bool motor_limit_high, float cruise_speed, float cruise_throttle, float dt)
 
float get_throttle_out_stop (bool motor_limit_low, bool motor_limit_high, float cruise_speed, float cruise_throttle, float dt, bool &stopped)
 
AC_Pget_steering_angle_p ()
 
AC_PIDget_steering_rate_pid ()
 
AC_PIDget_throttle_speed_pid ()
 
bool get_forward_speed (float &speed) const
 
float get_accel_max () const
 
float get_decel_max () const
 
bool speed_control_active () const
 
float get_desired_speed () const
 
float get_desired_speed_accel_limited (float desired_speed, float dt) const
 
float get_stopping_distance (float speed) const
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Private Attributes

const AP_AHRS_ahrs
 
AC_P _steer_angle_p
 
AC_PID _steer_rate_pid
 
AC_PID _throttle_speed_pid
 
AP_Float _throttle_accel_max
 
AP_Float _throttle_decel_max
 
AP_Int8 _brake_enable
 
AP_Float _stop_speed
 
AP_Float _steer_accel_max
 
AP_Float _steer_rate_max
 
uint32_t _steer_lat_accel_last_ms
 
uint32_t _steer_turn_last_ms
 
float _desired_lat_accel
 
float _desired_turn_rate
 
uint32_t _speed_last_ms
 
float _desired_speed
 
uint32_t _stop_last_ms
 
bool _throttle_limit_low
 
bool _throttle_limit_high
 

Detailed Description

Definition at line 36 of file AR_AttitudeControl.h.

Constructor & Destructor Documentation

◆ AR_AttitudeControl()

AR_AttitudeControl::AR_AttitudeControl ( AP_AHRS ahrs)

Definition at line 174 of file AR_AttitudeControl.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ get_accel_max()

float AR_AttitudeControl::get_accel_max ( ) const
inline

Definition at line 93 of file AR_AttitudeControl.h.

Referenced by get_stopping_distance().

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

◆ get_decel_max()

float AR_AttitudeControl::get_decel_max ( ) const

Definition at line 465 of file AR_AttitudeControl.cpp.

Referenced by get_accel_max().

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

◆ get_desired_lat_accel()

float AR_AttitudeControl::get_desired_lat_accel ( ) const

Definition at line 301 of file AR_AttitudeControl.cpp.

Here is the call graph for this function:

◆ get_desired_speed()

float AR_AttitudeControl::get_desired_speed ( ) const

Definition at line 485 of file AR_AttitudeControl.cpp.

Referenced by get_accel_max().

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

◆ get_desired_speed_accel_limited()

float AR_AttitudeControl::get_desired_speed_accel_limited ( float  desired_speed,
float  dt 
) const

Definition at line 495 of file AR_AttitudeControl.cpp.

Referenced by get_accel_max(), get_throttle_out_speed(), and get_throttle_out_stop().

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

◆ get_desired_turn_rate()

float AR_AttitudeControl::get_desired_turn_rate ( ) const

Definition at line 291 of file AR_AttitudeControl.cpp.

Here is the call graph for this function:

◆ get_forward_speed()

bool AR_AttitudeControl::get_forward_speed ( float &  speed) const

Definition at line 444 of file AR_AttitudeControl.cpp.

Referenced by get_desired_speed_accel_limited(), get_lat_accel(), get_steering_out_lat_accel(), get_throttle_out_speed(), get_throttle_out_stop(), and get_throttle_speed_pid().

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

◆ get_lat_accel()

bool AR_AttitudeControl::get_lat_accel ( float &  lat_accel) const

Definition at line 311 of file AR_AttitudeControl.cpp.

Here is the call graph for this function:

◆ get_steering_angle_p()

AC_P& AR_AttitudeControl::get_steering_angle_p ( )
inline

Definition at line 85 of file AR_AttitudeControl.h.

◆ get_steering_out_heading()

float AR_AttitudeControl::get_steering_out_heading ( float  heading_rad,
float  rate_max,
bool  motor_limit_left,
bool  motor_limit_right,
float  dt 
)

Definition at line 215 of file AR_AttitudeControl.cpp.

Here is the call graph for this function:

◆ get_steering_out_lat_accel()

float AR_AttitudeControl::get_steering_out_lat_accel ( float  desired_accel,
bool  motor_limit_left,
bool  motor_limit_right,
float  dt 
)

Definition at line 185 of file AR_AttitudeControl.cpp.

Here is the call graph for this function:

◆ get_steering_out_rate()

float AR_AttitudeControl::get_steering_out_rate ( float  desired_rate,
bool  motor_limit_left,
bool  motor_limit_right,
float  dt 
)

Definition at line 232 of file AR_AttitudeControl.cpp.

Referenced by get_steering_out_heading(), and get_steering_out_lat_accel().

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

◆ get_steering_rate_pid()

AC_PID& AR_AttitudeControl::get_steering_rate_pid ( )
inline

Definition at line 86 of file AR_AttitudeControl.h.

◆ get_stopping_distance()

float AR_AttitudeControl::get_stopping_distance ( float  speed) const

Definition at line 519 of file AR_AttitudeControl.cpp.

Referenced by get_accel_max().

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

◆ get_throttle_out_speed()

float AR_AttitudeControl::get_throttle_out_speed ( float  desired_speed,
bool  motor_limit_low,
bool  motor_limit_high,
float  cruise_speed,
float  cruise_throttle,
float  dt 
)

Definition at line 324 of file AR_AttitudeControl.cpp.

Referenced by get_throttle_out_stop().

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

◆ get_throttle_out_stop()

float AR_AttitudeControl::get_throttle_out_stop ( bool  motor_limit_low,
bool  motor_limit_high,
float  cruise_speed,
float  cruise_throttle,
float  dt,
bool &  stopped 
)

Definition at line 404 of file AR_AttitudeControl.cpp.

Here is the call graph for this function:

◆ get_throttle_speed_pid()

AC_PID& AR_AttitudeControl::get_throttle_speed_pid ( )
inline

Definition at line 87 of file AR_AttitudeControl.h.

Here is the call graph for this function:

◆ set_throttle_limits()

void AR_AttitudeControl::set_throttle_limits ( float  throttle_accel_max,
float  throttle_decel_max 
)

◆ speed_control_active()

bool AR_AttitudeControl::speed_control_active ( ) const

Definition at line 475 of file AR_AttitudeControl.cpp.

Referenced by get_accel_max(), get_desired_speed(), get_desired_speed_accel_limited(), and get_throttle_out_speed().

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

Member Data Documentation

◆ _ahrs

const AP_AHRS& AR_AttitudeControl::_ahrs
private

◆ _brake_enable

AP_Int8 AR_AttitudeControl::_brake_enable
private

Definition at line 124 of file AR_AttitudeControl.h.

Referenced by get_throttle_out_speed().

◆ _desired_lat_accel

float AR_AttitudeControl::_desired_lat_accel
private

Definition at line 132 of file AR_AttitudeControl.h.

Referenced by get_desired_lat_accel(), and get_steering_out_lat_accel().

◆ _desired_speed

float AR_AttitudeControl::_desired_speed
private

◆ _desired_turn_rate

float AR_AttitudeControl::_desired_turn_rate
private

Definition at line 133 of file AR_AttitudeControl.h.

Referenced by get_desired_turn_rate(), and get_steering_out_rate().

◆ _speed_last_ms

uint32_t AR_AttitudeControl::_speed_last_ms
private

Definition at line 136 of file AR_AttitudeControl.h.

Referenced by get_throttle_out_speed(), and speed_control_active().

◆ _steer_accel_max

AP_Float AR_AttitudeControl::_steer_accel_max
private

Definition at line 126 of file AR_AttitudeControl.h.

Referenced by get_steering_out_rate().

◆ _steer_angle_p

AC_P AR_AttitudeControl::_steer_angle_p
private

Definition at line 119 of file AR_AttitudeControl.h.

Referenced by get_steering_angle_p(), and get_steering_out_heading().

◆ _steer_lat_accel_last_ms

uint32_t AR_AttitudeControl::_steer_lat_accel_last_ms
private

Definition at line 130 of file AR_AttitudeControl.h.

Referenced by get_desired_lat_accel(), and get_steering_out_lat_accel().

◆ _steer_rate_max

AP_Float AR_AttitudeControl::_steer_rate_max
private

Definition at line 127 of file AR_AttitudeControl.h.

Referenced by get_steering_out_rate().

◆ _steer_rate_pid

AC_PID AR_AttitudeControl::_steer_rate_pid
private

Definition at line 120 of file AR_AttitudeControl.h.

Referenced by get_steering_out_rate(), and get_steering_rate_pid().

◆ _steer_turn_last_ms

uint32_t AR_AttitudeControl::_steer_turn_last_ms
private

Definition at line 131 of file AR_AttitudeControl.h.

Referenced by get_desired_turn_rate(), and get_steering_out_rate().

◆ _stop_last_ms

uint32_t AR_AttitudeControl::_stop_last_ms
private

Definition at line 138 of file AR_AttitudeControl.h.

Referenced by get_throttle_out_stop().

◆ _stop_speed

AP_Float AR_AttitudeControl::_stop_speed
private

Definition at line 125 of file AR_AttitudeControl.h.

Referenced by get_throttle_out_stop().

◆ _throttle_accel_max

AP_Float AR_AttitudeControl::_throttle_accel_max
private

◆ _throttle_decel_max

AP_Float AR_AttitudeControl::_throttle_decel_max
private

Definition at line 123 of file AR_AttitudeControl.h.

Referenced by get_decel_max(), and get_desired_speed_accel_limited().

◆ _throttle_limit_high

bool AR_AttitudeControl::_throttle_limit_high
private

Definition at line 140 of file AR_AttitudeControl.h.

Referenced by get_throttle_out_speed().

◆ _throttle_limit_low

bool AR_AttitudeControl::_throttle_limit_low
private

Definition at line 139 of file AR_AttitudeControl.h.

Referenced by get_throttle_out_speed().

◆ _throttle_speed_pid

AC_PID AR_AttitudeControl::_throttle_speed_pid
private

Definition at line 121 of file AR_AttitudeControl.h.

Referenced by get_throttle_out_speed(), and get_throttle_speed_pid().

◆ var_info

const AP_Param::GroupInfo AR_AttitudeControl::var_info
static

Definition at line 111 of file AR_AttitudeControl.h.

Referenced by AR_AttitudeControl().


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