-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Wiki Link to Feature - https://github.com/iNavFlight/inav/wiki/PID-Attenuation-and-scaling#Fixedwing-APA
Current Behavior
The new attenuation for Inav 9 based on airspeed is working well for attenuating the PIFF gains on a fixed wing during acceleration above the cruise/PID tune speed, fiddle with apa_pow based on the speed your bird can get in a dive (or the max speed you wish to take airframe),up and down till you get rid of the overdriven surfaces sweet spot. The settings reduce the PIFF Gains by 70%, with the apa_pow enabling you to scale the top speed the the 70% reduction is applied by
Unfortunately it does the opposite to speeds below the cruise speed/PID tuned speed. This means when your airspeed slows down your PIFF gains increase which quickly becomes and issue on a well tune bird that is not only fast but also can fly really slow, or when there is significant tail winds. There is up to a 70% reduction on PIFF gains above cruise speed, but there us up to a 200% increase in the PIFF gains below cruise speed and it's scale is set/linked to the same apa_pow setting. I would argue there is simply no need to increase the PIFF gains below cruise speed, and if you did it would only be by small amount, maybe 30% if at all.
The issue really becomes a big problem if the airspeed sensor fails, gets blocked or you forget to remove the pitot sock, suddenly you have 200% PIFF gain increase at cruise speed and have to try to land.
Steps to Reproduce
- Use the new Fixedwing APA for TPA (default TPA control in 9.00)
- Aircraft traveling around cruise speed (in my case around 85km/hr)
- Failure of pitot tube sensor on fixedwing (mechanical failure) with airspeed now reading under 25km/h
- Can also be replicated by leaving airspeed sensor unplugged or by leaving pitot tube sock on and taking off
- With an airspeed reading suddenly below 20-25km/h PIFF gains are increased to 200% (takes place around 50km/hr with my apa_pow setting)
- Aircraft becomes almost unflyable due to tremendous increase in PIFF gains at cruise speed, which requires landing now with the 200% increased PIFF gains (windy conditions makes that a joy).
Expected behavior
I don't expect there is ever a case where I would really want the PIFF gains to increase, at the very least I think there would need to be some sanity tests on the airspeed data before applying any sort of increase to the gains. If the airspeed is below the min aircraft set speed then the changes to the gains should not be applied.
Suggested solution(s)
I think the simplest fix for this is not to increase the gains at all below cruise speed, I don't think there is a need for it. The other option would be to have a command to set the maximum value on each of the increase/decrease PIFF gain percentage. This way you could set it to zero % if you want to turn it off for either above or below the cruise speed, and then apa_pow can remain as the expo end point for the speed at which the maximum percentage change is applied to the PIFF gain).
So you would end up with say 2 extra set points
apa_pow for expo curve endpoint (stays the same)
apa_increase for percentage of max gain increase (add)
apa_reduce for percentage of max gain decrease (add)
- FC Board name and vendor: TBS Lucid AIO 2-6S
#INAV version string: INAV/TBS_LUCID_H7_WING_MINI 9.0.0 Dec 22 2025 / 04:12:39 (2747993)