You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
According to this controller document, all three of the attitude controllers should apply quadratic IAS scaling to the P gain, and linear TAS scaling to the FF gain.
This is reflected in both ecl_roll_controller.cpp and ecl_pitch_controller.cpp:
/* Apply PI rate controller and store non-limited output */
_last_output = _bodyrate_setpoint * _k_ff * ctl_data.scaler +
_rate_error * _k_p * ctl_data.scaler * ctl_data.scaler
+ _integrator; //scaler is proportional to 1/airspeed
But not in ecl_yaw_controller.cpp:
/* Apply PI rate controller and store non-limited output */
_last_output = (_bodyrate_setpoint * _k_ff + _rate_error * _k_p + _integrator) * ctl_data.scaler *
ctl_data.scaler; //scaler is proportional to 1/airspeed
Is this a bug?
The text was updated successfully, but these errors were encountered:
@supergra Yes, it is a mistake, I remember fixing that about a year ago on a private fork but I forgot to upstream it :|
And the second mistake is that we scale both feedforward and the controller with IAS (ctl_data.scaler = 1/IAS). That is tracked in PX4/PX4-Autopilot#11975 but I'm waiting for the new "airspeed module" to make the change.
@bresch Is there any obstacle to upstreaming your fix for the first bug (the yaw being different)? We were considering making the change locally, but I'm curious if you are holding off because it might introduce unexpected behavior.
The second bug is likely a minor impact for most low altitude work we do, so not as concerned about that one.
@supergra No, I'm just not currently focusing on fixedwings so this wasn't a priority for me. Please if you do change it locally, upstream it as well. This could also be changed at the same time: PX4/PX4-Autopilot#15041
FYI @sfuhrer
Thanks @bresch, I will make a pull request. Suggest transferring this issue to Firmware, since fw_att_control was moved there. (I don't think I can do that myself.)
According to this controller document, all three of the attitude controllers should apply quadratic IAS scaling to the P gain, and linear TAS scaling to the FF gain.
This is reflected in both
ecl_roll_controller.cpp
andecl_pitch_controller.cpp
:But not in
ecl_yaw_controller.cpp
:Is this a bug?
The text was updated successfully, but these errors were encountered: