|
|
|
@ -195,8 +195,8 @@ void AC_Loiter::update(bool avoidance_on)
@@ -195,8 +195,8 @@ void AC_Loiter::update(bool avoidance_on)
|
|
|
|
|
// sanity check parameters
|
|
|
|
|
void AC_Loiter::sanity_check_params() |
|
|
|
|
{ |
|
|
|
|
_speed_cms = MAX(_speed_cms, LOITER_SPEED_MIN); |
|
|
|
|
_accel_cmss = MIN(_accel_cmss, GRAVITY_MSS * 100.0f * tanf(ToRad(_attitude_control.lean_angle_max_cd() * 0.01f))); |
|
|
|
|
_speed_cms.set(MAX(_speed_cms, LOITER_SPEED_MIN)); |
|
|
|
|
_accel_cmss.set(MIN(_accel_cmss, GRAVITY_MSS * 100.0f * tanf(ToRad(_attitude_control.lean_angle_max_cd() * 0.01f)))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// calc_desired_velocity - updates desired velocity (i.e. feed forward) with pilot requested acceleration and fake wind resistance
|
|
|
|
|