Aha, apparently the fuel price for LFPG is available. So that price you saw is the live price
I’ve added an option int he latest build to turn on/off the live fuel price
Aha, apparently the fuel price for LFPG is available. So that price you saw is the live price
I’ve added an option int he latest build to turn on/off the live fuel price
Hello
Thanks.
Which file do I have to dowload the update and to have the latest build ?
phpvms.update.zip ?
phpvms.beta.zip ?
I think I have to delete my actual phpVMS and install the beta version, haven’t I?
Thanks
Stéphane
phpvms.beta.zip
And no, it’s just like a update. Just overwrite the files, then run the install/update.php file
Thanks for your help. I will do this update tomorrow morning (in French).
Stéphane
Hello
I’ve done the update.
Here are the lines of my local config files about the fuel :
/* Default fuel price, for airports that don’t have
And the surcharge percentage. View the docs
for more details about these
*/
Config::Set(‘FUEL_DEFAULT_PRICE’, 0.45);
Config::Set(‘FUEL_GET_LIVE_PRICE’, false);
Config::Set(‘FUEL_SURCHARGE’, ‘5’);
I want the fuel price to be 0.45 per kg.
In phpVMS, i have done a new flight. The fuel used is 2431 kg.
In the finances, the fuel costs are - 122.00 €.
2431 X 0.45 = 1093.95 €
When I use the test.php file to have the fuel price on LFPG, it shows me “0”.
What must I do to set the fuel price to 0.45 € / kg ?
Thanks
Stéphane
EDIT :
I have the same problem with the PIREPS from the pilot center.
–> The fuel price is about 0.05 € per kg.
Stéphane
On LFPG in the airport dialog, set it to .45
The problem is that the fuel price is set in the airport data to 0.45 for all the airports of my scheduled flights.
Stéphane
Okay, try the latest beta once it posts, fixed up a couple of bugs
I am currently using the latest beta and the build is 708.
What version do I have to install ?
Thanks
Stéphane
It would be 709, it’s up on downloads.phpvms.net, the build log hasn’t updated yet
Ok thanks, I dowload the latest phpvms.beta.zip file and I will install it.
Thanks for your help !
Stéphane
Hello
I’ve done the update.
Now, when I go to the test.php file, it shows me 0.45 !!!
In the finances, for 1000 kg of fuel, the price is -500 euros. The real price is -450 euros, but I think phpVMS rounds the price, doesn’t it ?
Thanks for all.
Stéphane
Yeah, I found some rounding issues when I typecast, that’s probably the issue. I’ll find and fix those.
Thanks!
I calculate the fuel price. The price is 0.5 euros / kg but in test.php it is 0.45 (also good). So 0.5 can be the rounded number of 0.45
The rounded price is not really a big problem for me, but it will be great if you can fix it.
Thanks !
Stéphane
Interesting, I will check it out. The rounding would be to a whole number (.45 would round to 0).
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
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)
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
Yeah, the default value in app.config.php is 5, but when you put the setting in local.config.php, it will take that value instead