mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Plane: added turn corrdination to autotune yaw rate tuning
this makes it much easier to do a yaw rate autotune, and also means you don't need to use the rudder stick at all, as the yaw controller is already exercised nicely with roll movements, so overall the tune is faster and more accurate as less cross-axis coupling
This commit is contained in:
parent
fc1a70264d
commit
49d0a4906a
@ -721,7 +721,9 @@ void Plane::calc_nav_yaw_coordinated(float speed_scaler)
|
||||
// user is doing an AUTOTUNE with yaw rate control
|
||||
const float rudd_expo = rudder_in_expo(true);
|
||||
const float yaw_rate = (rudd_expo/SERVO_MAX) * g.acro_yaw_rate;
|
||||
commanded_rudder = yawController.get_rate_out(yaw_rate, speed_scaler, false);
|
||||
// add in the corrdinated turn yaw rate to make it easier to fly while tuning the yaw rate controller
|
||||
const float coordination_yaw_rate = degrees(GRAVITY_MSS * tanf(radians(nav_roll_cd*0.01f))/MAX(aparm.airspeed_min,smoothed_airspeed));
|
||||
commanded_rudder = yawController.get_rate_out(yaw_rate+coordination_yaw_rate, speed_scaler, false);
|
||||
using_rate_controller = true;
|
||||
} else {
|
||||
if (control_mode == &mode_stabilize && rudder_in != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user