[Posting] Re: Does this apply to PHost too?
From:streu
Thread:Does this apply to PHost too?
Forum:Planets
In reply to:Does this apply to PHost too?
Date:Wed, 2013-04-03 17:51 GMT

Guess that's a more or less general question for many things. So this thread may become something like a running gag. :D

For starters I am interested in this neat little article about fuel consumption.

Is this Host only, or PHost too? I am particularly interested in the "Side step: Running out of Fuel" part. Which is shaking cracy.

This does not apply to PHost.

For the standard fuel consumption model (which Just a Second uses), PHost computes uses an estimate and a little brute force to find the largest distance which, when plugged into the fuel formula, yields a value not exceeding your fuel consumption. It does not try to "invert" the fuel formula like HOST does.

For the nonstandard accurate fuel model, PHost does invert the fuel formula, which is possible because that formula is computed in exact values. It's not in the docs, but here it is:

  Distance = log((Total_ship_mass + 0.5) / Mass_of_ship_without_fuel
                 * (100000 * Max_distance) / Engine_fuel_usage)

--Stefan

This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.