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
This commit is contained in:
ChristopherOlson 2017-12-12 22:36:59 -06:00 committed by Randy Mackay
parent f72e125ab5
commit 569f55f5c6
2 changed files with 2 additions and 1 deletions

View File

@ -268,7 +268,7 @@ void AC_AttitudeControl_Heli::rate_controller_run()
// Update Alt_Hold angle maximum // Update Alt_Hold angle maximum
void AC_AttitudeControl_Heli::update_althold_lean_angle_max(float throttle_in) 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); _althold_lean_angle_max = _althold_lean_angle_max + (_dt/(_dt+_angle_limit_tc))*(althold_lean_angle_max-_althold_lean_angle_max);
} }

View File

@ -22,6 +22,7 @@
#define AC_ATC_HELI_RATE_YAW_FF 0.024f #define AC_ATC_HELI_RATE_YAW_FF 0.024f
#define AC_ATC_HELI_RATE_YAW_FILT_HZ 20.0f #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_INTEGRATOR_LEAK_RATE 0.02f
#define AC_ATTITUDE_HELI_RATE_RP_FF_FILTER 10.0f #define AC_ATTITUDE_HELI_RATE_RP_FF_FILTER 10.0f
#define AC_ATTITUDE_HELI_RATE_Y_VFF_FILTER 10.0f #define AC_ATTITUDE_HELI_RATE_Y_VFF_FILTER 10.0f