mirror of https://github.com/ArduPilot/ardupilot
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:
parent
f72e125ab5
commit
569f55f5c6
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue