Jump to content

Fuel


stephanepa38

Recommended Posts

a whole number (.45 would round to 0).

I think it is very interesting to round the fuel price to a whole number.

I have done some tests. I set up the fuel price to 1.00 euro / kg.

I filed a manual pirep and the fuel costs are - 1050 euros for 1000 kg of fuel (so fuel price is 1.05 euros / kg). In the test.php file, the fuel price is correct.

Thanks

Stéphane

Link to comment
Share on other sites

  • Administrators

In the unit_test.php file, just add:

echo FinanceData::GetFuelPrice(1000, 'LFPG');

I think you're using LFPG. See what that says.

OH! I just realized why - it adds a 'surcharge' to the fuel price (for taxes, costs). This is the FUEL_SURCHARGE option (it's default is 5, which is 5%). You can set that to 0 if you'd like, but 5% is the default (some 'extra' realism)

Link to comment
Share on other sites

Hello

The result is 1050.

For information, I deleted the line about the fuel surcharge, so i don't think the problem comes from the fuel surcharge.

I will add this line with "0". I will post the result.

Thanks

Stéphane

EDIT :

If you delete the line about the fuel surcharge in the local config file, it takes the default value : 5.

If you put this line and set the value to 0, it works very good.

Now, all is OK.

Thanks for your help !

Stéphane

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...