Browse Source

AC_AttitudeControl:TradHeli - fix for alt_hold angle limiter active at hover collective in Traditional Helicopters

add definition for max collective/throttle for helicopters that compensates for negative collective pitch range
and sets proper collective overhead before alt_hold angle limiter becomes effective
mission-4.1.18
ChristopherOlson 7 years ago committed by Randy Mackay
parent
commit
569f55f5c6
  1. 2
      libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp
  2. 1
      libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.h

2
libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp

@ -268,7 +268,7 @@ void AC_AttitudeControl_Heli::rate_controller_run() @@ -268,7 +268,7 @@ void AC_AttitudeControl_Heli::rate_controller_run()
// Update Alt_Hold angle maximum
void AC_AttitudeControl_Heli::update_althold_lean_angle_max(float throttle_in)
{
float althold_lean_angle_max = acos(constrain_float(_throttle_in/AC_ATTITUDE_CONTROL_ANGLE_LIMIT_THROTTLE_MAX, 0.0f, 1.0f));
float althold_lean_angle_max = acos(constrain_float(_throttle_in/AC_ATTITUDE_HELI_ANGLE_LIMIT_THROTTLE_MAX, 0.0f, 1.0f));
_althold_lean_angle_max = _althold_lean_angle_max + (_dt/(_dt+_angle_limit_tc))*(althold_lean_angle_max-_althold_lean_angle_max);
}

1
libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.h

@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
#define AC_ATC_HELI_RATE_YAW_FF 0.024f
#define AC_ATC_HELI_RATE_YAW_FILT_HZ 20.0f
#define AC_ATTITUDE_HELI_ANGLE_LIMIT_THROTTLE_MAX 0.95f // Heli's use 95% of max collective before limiting frame angle
#define AC_ATTITUDE_HELI_RATE_INTEGRATOR_LEAK_RATE 0.02f
#define AC_ATTITUDE_HELI_RATE_RP_FF_FILTER 10.0f
#define AC_ATTITUDE_HELI_RATE_Y_VFF_FILTER 10.0f

Loading…
Cancel
Save