|
APM:Libraries
|
#include <AC_Loiter.h>
Public Member Functions | |
| AC_Loiter (const AP_InertialNav &inav, const AP_AHRS_View &ahrs, AC_PosControl &pos_control, const AC_AttitudeControl &attitude_control) | |
| Constructor. More... | |
| void | set_avoidance (AC_Avoid *avoid_ptr) |
| provide pointer to avoidance library More... | |
| void | init_target (const Vector3f &position) |
| init_target to a position in cm from ekf origin More... | |
| void | init_target () |
| initialize's position and feed-forward velocity from current pos and velocity More... | |
| void | soften_for_landing () |
| reduce response for landing More... | |
| void | set_pilot_desired_acceleration (float euler_roll_angle_cd, float euler_pitch_angle_cd, float dt) |
| set pilot desired acceleration in centi-degrees More... | |
| Vector2f | get_pilot_desired_acceleration () const |
| gets pilot desired acceleration, body frame, [forward,right] More... | |
| void | clear_pilot_desired_acceleration () |
| clear pilot desired acceleration More... | |
| void | get_stopping_point_xy (Vector3f &stopping_point) const |
| get vector to stopping point based on a horizontal position and velocity More... | |
| float | get_distance_to_target () const |
| get horizontal distance to loiter target in cm More... | |
| int32_t | get_bearing_to_target () const |
| get bearing to target in centi-degrees More... | |
| float | get_angle_max_cd () const |
| get maximum lean angle when using loiter More... | |
| void | update (float ekfGndSpdLimit, float ekfNavVelGainScaler) |
| run the loiter controller More... | |
| int32_t | get_roll () const |
| get desired roll, pitch which should be fed into stabilize controllers More... | |
| int32_t | get_pitch () const |
Static Public Attributes | |
| static const struct AP_Param::GroupInfo | var_info [] |
Protected Member Functions | |
| void | sanity_check_params () |
| void | calc_desired_velocity (float nav_dt, float ekfGndSpdLimit) |
Protected Attributes | |
| const AP_InertialNav & | _inav |
| const AP_AHRS_View & | _ahrs |
| AC_PosControl & | _pos_control |
| const AC_AttitudeControl & | _attitude_control |
| AC_Avoid * | _avoid = nullptr |
| AP_Float | _angle_max |
| AP_Float | _speed_cms |
| AP_Float | _accel_cmss |
| AP_Float | _brake_accel_cmss |
| AP_Float | _brake_jerk_max_cmsss |
| AP_Float | _brake_delay |
| Vector2f | _desired_accel |
| Vector2f | _predicted_accel |
| Vector2f | _predicted_euler_angle |
| Vector2f | _predicted_euler_rate |
| float | _brake_timer |
| float | _brake_accel |
Definition at line 12 of file AC_Loiter.h.
| AC_Loiter::AC_Loiter | ( | const AP_InertialNav & | inav, |
| const AP_AHRS_View & | ahrs, | ||
| AC_PosControl & | pos_control, | ||
| const AC_AttitudeControl & | attitude_control | ||
| ) |
|
protected |
updates desired velocity (i.e. feed forward) with pilot requested acceleration and fake wind resistance updated velocity sent directly to position controller
calc_desired_velocity - updates desired velocity (i.e. feed forward) with pilot requested acceleration and fake wind resistance updated velocity sent directly to position controller
Definition at line 230 of file AC_Loiter.cpp.
Referenced by update().
|
inline |
clear pilot desired acceleration
Definition at line 39 of file AC_Loiter.h.
| float AC_Loiter::get_angle_max_cd | ( | ) | const |
get maximum lean angle when using loiter
Definition at line 196 of file AC_Loiter.cpp.
Referenced by calc_desired_velocity(), get_bearing_to_target(), and init_target().
|
inline |
get bearing to target in centi-degrees
Definition at line 48 of file AC_Loiter.h.
|
inline |
get horizontal distance to loiter target in cm
Definition at line 45 of file AC_Loiter.h.
|
inline |
gets pilot desired acceleration, body frame, [forward,right]
Definition at line 36 of file AC_Loiter.h.
|
inline |
|
inline |
get desired roll, pitch which should be fed into stabilize controllers
Definition at line 57 of file AC_Loiter.h.
| void AC_Loiter::get_stopping_point_xy | ( | Vector3f & | stopping_point | ) | const |
get vector to stopping point based on a horizontal position and velocity
Definition at line 190 of file AC_Loiter.cpp.
Referenced by clear_pilot_desired_acceleration().
| void AC_Loiter::init_target | ( | const Vector3f & | position | ) |
init_target to a position in cm from ekf origin
Definition at line 89 of file AC_Loiter.cpp.
| void AC_Loiter::init_target | ( | ) |
initialize's position and feed-forward velocity from current pos and velocity
Definition at line 114 of file AC_Loiter.cpp.
Referenced by set_avoidance().
|
protected |
Definition at line 222 of file AC_Loiter.cpp.
Referenced by init_target().
|
inline |
provide pointer to avoidance library
Definition at line 20 of file AC_Loiter.h.
| void AC_Loiter::set_pilot_desired_acceleration | ( | float | euler_roll_angle_cd, |
| float | euler_pitch_angle_cd, | ||
| float | dt | ||
| ) |
set pilot desired acceleration in centi-degrees
Definition at line 157 of file AC_Loiter.cpp.
Referenced by set_avoidance().
| void AC_Loiter::soften_for_landing | ( | ) |
reduce response for landing
Definition at line 147 of file AC_Loiter.cpp.
Referenced by set_avoidance().
| void AC_Loiter::update | ( | float | ekfGndSpdLimit, |
| float | ekfNavVelGainScaler | ||
| ) |
run the loiter controller
Definition at line 205 of file AC_Loiter.cpp.
Referenced by get_bearing_to_target().
|
protected |
Definition at line 81 of file AC_Loiter.h.
Referenced by calc_desired_velocity(), init_target(), sanity_check_params(), and update().
|
protected |
Definition at line 73 of file AC_Loiter.h.
Referenced by set_pilot_desired_acceleration().
|
protected |
Definition at line 79 of file AC_Loiter.h.
Referenced by get_angle_max_cd().
|
protected |
Definition at line 75 of file AC_Loiter.h.
Referenced by get_angle_max_cd(), init_target(), sanity_check_params(), and set_pilot_desired_acceleration().
|
protected |
Definition at line 76 of file AC_Loiter.h.
Referenced by calc_desired_velocity(), and set_avoidance().
|
protected |
Definition at line 92 of file AC_Loiter.h.
Referenced by calc_desired_velocity().
|
protected |
Definition at line 82 of file AC_Loiter.h.
Referenced by calc_desired_velocity().
|
protected |
Definition at line 84 of file AC_Loiter.h.
Referenced by calc_desired_velocity().
|
protected |
Definition at line 83 of file AC_Loiter.h.
Referenced by calc_desired_velocity().
|
protected |
Definition at line 91 of file AC_Loiter.h.
Referenced by calc_desired_velocity().
|
protected |
Definition at line 87 of file AC_Loiter.h.
Referenced by calc_desired_velocity(), clear_pilot_desired_acceleration(), get_pilot_desired_acceleration(), init_target(), and set_pilot_desired_acceleration().
|
protected |
Definition at line 72 of file AC_Loiter.h.
Referenced by init_target(), and soften_for_landing().
|
protected |
Definition at line 74 of file AC_Loiter.h.
Referenced by calc_desired_velocity(), get_angle_max_cd(), get_bearing_to_target(), get_distance_to_target(), get_pitch(), get_roll(), get_stopping_point_xy(), init_target(), soften_for_landing(), and update().
|
protected |
Definition at line 88 of file AC_Loiter.h.
Referenced by calc_desired_velocity(), init_target(), and set_pilot_desired_acceleration().
|
protected |
Definition at line 89 of file AC_Loiter.h.
Referenced by init_target(), and set_pilot_desired_acceleration().
|
protected |
Definition at line 90 of file AC_Loiter.h.
Referenced by set_pilot_desired_acceleration().
|
protected |
Definition at line 80 of file AC_Loiter.h.
Referenced by calc_desired_velocity(), init_target(), sanity_check_params(), and update().
|
static |
Definition at line 60 of file AC_Loiter.h.
Referenced by AC_Loiter().
1.8.13