dkavolis / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
80 stars 32 forks source link

[1.7.3 + 0.15.11.2] "Revert to Vehicle Assembly" then launch yields different drag/performance than "Revert to Launch" #89

Closed jkenny23 closed 4 years ago

jkenny23 commented 4 years ago

I'm running Realism Overhaul on 1.7.3, and found a bug that causes drastically different craft performance if you revert to launch vs. reverting to assembly and then launch.

This can be seen with the following 2 simple crafts: Castor 120 with 13k fuel, Agena Avionics Package, and reversed LR105 at the top. It gets to an apoapsis of 651km from VAB, or 784km from RTL. Works also with LR87-LH2 and 2 full Mk1 Fuselages, 213.7km/407.7km.

vab-vs-rtl-dragloss-q

The biggest difference in the logged data (using MechJeb flight data recorder) seems to be the aero drag, which I assume to be controlled by FAR.

jkenny23 commented 4 years ago

Looks like this is also reproducible in stock 1.9.1 with 0.15.11.4. Made a quick test craft with an OKTO2, S2-17 with 2400 fuel, and reversed LV-T45 on top. 59.9km (RTL)/57.4km (VAB)

dkavolis commented 4 years ago

So KSP loads vessels with all model transforms enabled and considers FlightGlobals ready even though some of the transforms are disabled a few frames later. One such transform is fairing for LV-T45 which was being voxelized even when there was no fairing visible. Should be fixed in dev branch

DRVeyl commented 4 years ago

I ran into similar experiences with ProcParts trying to fix drag cubes for the root part, and the odd behaviour of FlightGlobals claiming it is ready very early on reverts.

I resorted to GameEvents.onFlightReady to get a callback that seemed the appropriate time. I'm not sure if that was too conservative, but seems to work. I'll keep part.vessel.HoldPhysics in mind also.