CYBUTEK / KerbalEngineer

Kerbal Engineer v1.0 (current in-development build).
227 stars 101 forks source link

Mass of disabled fuel tanks not being used in DeltaV calculations leading to values much higher then reality #103

Open Dark-Matter-001 opened 8 years ago

Dark-Matter-001 commented 8 years ago

Title sums it up pretty much. If you have a disabled fuel tank on your vessel, (perhaps mono prop on a later stage you don't want used at launch?), its mass will be completely ignored by the DeltaV calculations resulting in a number much higher then reality and failed missions due to the surprise shortfall.

Found this out when a vessel that said it had 2700m/s dV fell 200m/s short of a 1600m/s insertion burn into Duna. Had monoprop powered satellites with disabled tanks.

Simple Test Setup: http://imgur.com/a/xL99Z

Gerry1135 commented 8 years ago

This is a consequence of how the simulation decides when to fire stages. It only goes wrong when the disabled tank contains a resource that the current stage is burning. When it is disabled, the simulation assumes there is no point lugging about all that weight because the fuel can't be used so it fires the next stage immediately. When it isn't disabled, it avoids decoupling any tank that contains a currently burning type of fuel, regardless of whether there is a path for it to be used. So, it doesn't decouple until the first stage runs out of fuel.

You need to pay attention to what stage it shows the deltaV in. Click the "All Stages" button and it should become a lot more obvious what's going on.

Dark-Matter-001 commented 8 years ago

Even with All Stages clicked it still shows everything wrong: http://imgur.com/a/X6W6p

Last pic is an example of what I do for launching remote tech networks. Main probe Core on the final main rocket stage (so it can de-orbit) and then 3/4 satellites clustered around it like that. Didn't seem to notice it when launching networks for the Kerbin system, but once going to Duna and needing to do 1700m/s burns is when it showed up hard.

Why does it not count the mass of disabled fuel tanks as just dead/structure weight? It shouldn't ignore them until it is actually staged. The Decouple is on Stage 0 yet the engine is on Stage 1 so Stage 1 total vessel mass should be higher until stage 0 is reached to remove that mass. Yet in those examples with All Stages enabled it reports nothing for Stage 1 and Incorrect DeltaV on stage 0. As well, the Editor stage numbers are not matching the DeltaV prediction stage numbers?

Also enabled or disabled it wouldn't count the mass of that monoprop stages; a basic mock up of how I do all my communication satellites.

Gerry1135 commented 8 years ago

Actually, it is not showing anything wrong, you just aren't reading it right. When the deltaV shows up in stage 0 it means it is assuming you drop the weight immediately. When it shows in stage 1 it is assuming you let stage 1 burn completely before dropping the weight. The figures are actually correct given these assumptions.

There is (currently) no way for KER to know definitely when you activate each stage, especially when the stage in question is effectively just dropping dead weight. The "bug" here is that, in either case, the fuel wasn't able to be taken from the tank so it should have made the same assumption in both cases. This is somewhat awkward to program so that it works sensibly in all cases so the preferable solution will be to allow the user to tell KER when to fire each stage (and this is also somewhat awkward).

Gerry1135 commented 8 years ago

Also, the most important thing to remember is that KER only simulates what happens to the root part of the vessel. The engines on the satellite only ignite at the point where the satellite is decoupled so they don't provide any deltaV to the root part.

If you change the root part of the vessel to be the probe core of the last satellite that gets decoupled you should get more useful results.

Dark-Matter-001 commented 8 years ago

Extreme example and possible work around: http://imgur.com/a/Pz11y

Basic SSTO, possibly reusable rocket. Payload attached via decoupler doesn't adjust DeltaV for the mass of the payload. However attaching via docking port does adjust correctly?

So to make a rocket that's delivering a payload or multiple payloads, an extra 0.05t overall (per payload) and 0.05t to the payload must be added to use the docking port method?

Seems like for decouplers for payloads its doing mass stage 0 1 2 3... instead of ...3 2 1 0?

Gerry1135 commented 8 years ago

See my previous comment. Just change the root part to be the payload probe core and it will give more useful results.

Dark-Matter-001 commented 8 years ago

In setups like this tho (http://i.imgur.com/9bgm6zo.png) the root part has to be part of the main rocket as the payload satellites are clone dropped in 2,3, or even 4, via sub assembly. So the only work around for that will be docking ports instead of decouplers?

2786m/s displayed, actual around 1650m/s

arekbulski commented 6 years ago

You can reroot your vessel before and after attaching payload. From your last post, I infer you are not aware of that functionality. I played KSP for years and found it only recently.