Propeller thrust efficiency miscalculation

I have been trying to fix a longstanding problem with the Kodiak, where the plane flies forward if you put it in reverse while in-flight. I have been able to replicate the issue in the air and on the ground by putting a headwind.

The plane uses legacy tables and we use a negative efficiency value for reverse thrust. The screenshot shows that negative efficiency is indeed found (red arrow on the chart) but the plane will still fly forward.

It seems that the propeller thrust is not the actual thrust produced by the propeller, but the algebraic sum of prop thrust and prop drag but there seems to be an error in the formulation.

If you have a strong headwind (50kts for example), the plane is already being pushed backwards by the wind. As the prop is already trying to push you back, the wind helps it.

Relative to the propeller thrust vector this is a “tailwind” and itsefficiency increases, crossing over from negative to “positive”. At this point, the aircraft starts producing forward thrust and can fly forward faster when in reverse, than when in forward thrust!

You can use the Kodiak package from the Marketplace to replicate the problem. If I have a typo in there, please let me know, but if it is a bug with the engine simulation, it is quite serious.

An added observation, it seems that if I remove values of 0 effectiveness from my table, the problem is mitigated to an extent and appears at higher advance ratios. This also seems to be connected to another issue I reported, where the sim refuses to take efficiency values that are between -0.1 and 0.1.