Control pid parameters by rc or airspeed

If there are higher tilt rates/airspeed it would be great to be able to reduce temporarily various pid gains I could only find TPA. But how can I apply it only to e.g. yaw or use an aux channel to control pid parameters?
Generally it would be good to have a way to reduce PID´s according to airspeed.
That could be done by airspeed sensor or by a combination of throttle value and acc x (pitch) value if the vehicle points nose down the pids get decreased, nose up increased pids if the vehicle has no airspeed sensor.

Let me ping @MaEtUgR for this question.

Am I reading correctly from your question that you’re flying a fixed wing type vehicle and not a multicopter?

For a multicopter you would need to explain to me why such gain scheduling based on airspeed could make sense. For fixed wing aircrafts it’s a well known requirement and PX4 also supports that.

Please have a look at the parameters FW_AIRSPD_MIN, FW_AIRSPD_TRIM, FW_AIRSPD_MAX in the PX4 parameter reference https://dev.px4.io/v1.9.0/en/advanced/parameter_reference.html#fw-tecs and the tuning guide https://docs.px4.io/master/en/config_fw/advanced_tuning_guide_fixedwing.html

In the code the scaling for fixed wing is calculated here:


Gets passed to the control library here:

And used in the control library for example here: