Closed mjn33 closed 9 years ago
Alright, one possible issue is that the AoAmax can vary based on what order parts are calculated in due to using a single variable for the AoAmax after all the interactions and for before. So I added a rawAoAmax to handle the pre-interaction value that the interactions will work with. Another was a similar possibility with liftslope, so same change there.
That should fix it, I think.
Doesn't seem to have fixed it. I think what's happening is FARWingInteraction is handling wing pieces with isShielded == true
, for those wing modules garbage values are being used (e.g. default rawAoAmax = 15, which is ~859°). Shouldn't the wing interaction code ignore wing modules with isShielded == true
?
Version of the "FAR Hypersonic Demon" tested on: FAR Hypersonic Demon2.craft
Well, I added code to handle that, but I don't see how only handling positive numbers and being limited to linearly changing between two positive numbers could ever lead to the behavior shown.
If I were to guess how AoAmax became negative, probably around FARWingAerodynamicModel.cs#L761 with effectiveUpstreamInfluence > 1
. Regardless, the isShielded check fixes the stalling issue.
Reproduction steps for demonstrating the wing shielding issues:
An example of the asymmetric shielding issue: screenshot3.png screenshot4.png Retracting and then redeploying the landing gear resulted in a different outcome (now both wings are shielded somehow): screenshot5.png screenshot6.png
Alright, I believe I have fixed it.
Also good to see that the Hypersonic Demon is still a terrible beast. Nice sideslip and destruction at Mach 3 at 2 km.
Tested, works brilliantly! Closing as fixed.
Aerostructural failures is one of those things I love in a weird way...
While testing some very old FAR craft I found some wings seemed almost permanently stalled. Adding some extra information to the right click menu, it seems that often there was asymmetric shielding, and that AoAmax for the stalling wing pieces could range from anything between ±40000 as a lower bound.
To verify this wasn't something weird lurking in the old craft files I based two new test craft of off the old "FAR Hypersonic Demon".
FARtest12.craft (no shielded wings, needs infinite fuel enabled) FARtest13.craft (shielded wings)
Also, I found that actions such as deploying and retracting landing gear somehow affect the shielding of a wing piece completely separate from it.
I'd guess the odd stalling behaviour is related to the wing interaction code, as I couldn't see anything in there that differentiates between part of an actual wing, or a wing piece used as a structural piece.
Reproduction steps:
https://gist.github.com/mjn33/43d9f7bf048be8746533 (also contains a few experiments relating to shielding) screenshot0.png screenshot1.png screenshot2.png Player.log (don't think there's anything useful in there)