stephanepa38 Posted June 12, 2009 Report Posted June 12, 2009 Hello Today, I've done my first flight. I have an problem with the finances in phpVMS. phpVMS is set up in lbs for fuel. The price is 0.45 euro / lb and the fuel surcharge is set to 5. I've done this flight. I used 7813 lbs of fuel ==> 7813 X 0.45 = 3515.18 euros. In phpVMS, when I see the finances reports, the fuel costs are -23 630 euros. It is the first flight done and there are not any other flight. What do I have to do to reduce the fuel costs (and to use the good price for the next flights)? Thanks Stéphane Quote
Moderators joeri Posted June 13, 2009 Moderators Report Posted June 13, 2009 if you ad an airport there you can olsow ad fuel prices. if you have don this go to maint page in admin and recalculate finances and it is changed gr joeri Quote
Administrators Nabeel Posted June 13, 2009 Administrators Report Posted June 13, 2009 Are you using FSACARS or FSPax? Did you set those up to return proper formats as well? The finances shows for the whole month, but you have only one pirep? Quote
stephanepa38 Posted June 13, 2009 Author Report Posted June 13, 2009 Hello FSACARS is set up in lbs and phpvms in lbs too. I have only done one flight --> 1 pirep only (the others pilots use the old pirep system before phpVMS is correctly set up). I didn't find where i can recalculate the finances. Where is it ? "Reset PIREP finances" ? Stéphane Quote
stephanepa38 Posted June 13, 2009 Author Report Posted June 13, 2009 We've done 2 others flight and we have the same problems. The fuel expenses are about 23000 euros per flight whereas we only used about 7000 lbs of fuel per flight (the 2 flights are the same). The fuel cost is set up in 0.45 euro per lbs in the local_config.php file and all the fuel costs are set yo 0.45 euro per lbs for each airport. How can I do to resolve this error ? Thanks Stéphane ----------------------------------------------------------------------- EDIT : I found these line in the core/modules/ACARS/fsacars.php file # Get the fuel used # Using $_GET['fuel'] instead /*$pos = find_in_fsacars_log('Spent Fuel', $log); preg_match('/^.*Spent Fuel: (d*)/', $log[$pos], $matches); $fuelused = $_GET['fuel'];*/ When I open this file (fsacars.php) in a php editor, these lines appear as comments. I think it is the base of the problems. I will try to change this error. Stéphane Quote
Administrators Nabeel Posted June 13, 2009 Administrators Report Posted June 13, 2009 Don't uncomment that, look at the second line. If you uncomment it, it'll be ignored anyway. # Using $_GET['fuel'] instead The ACARS log shows the correct amount of fuel? Quote
stephanepa38 Posted June 13, 2009 Author Report Posted June 13, 2009 The ACARS log shows the correct amount of fuel. Moreover, this amount is correct in the pireps of phpvms, but the fuel expenses are not correct. When I send a PIREP from my pilot center, the fuel expenses are ok (number of lbs X 0.45). But when I use FSACARS, the fuel expenses are always wrong (about 23000 euros for 6000 lbs (price per lbs is 0.45 euro)) whereas the fuel amount (value from FSACARS) is correct in the PENDING PIREPS. Thanks Stéphane Quote
Administrators Nabeel Posted June 14, 2009 Administrators Report Posted June 14, 2009 I will check that out then, thanks! Can you post the log (just copy/paste) from FSACARS (the log that's posted on) It might be mismatching what's being returned. Question - maybe it's using the amount of fuel left in the tank, not the amount used? Would that make sense? The FSACARS docs aren't clear on that value. I'll probably have to read it from the log... if you can post that, that would be great Thanks Quote
stephanepa38 Posted June 14, 2009 Author Report Posted June 14, 2009 Hello This is the FSACARS log : [2009/06/15 19:28:00] Flight IATA:FSW1000 Pilot Number:FSW001 Company ICAO:FSW Aircraft Type:B737 PAX:149 Aircraft Registration:FSW-BOA Departing Airport: LFPG Destination Airport: LFST Alternate Airport:LFSB Online: No Route:LANVI UL851 EPL Flight Level:240 19:28 Zero fuel Weight: 106000 Lbs, Fuel Weight: 45917 Lbs 19:28 Parking Brakes off 19:28 Com1 Freq=121.15 19:44 VR= 151 Knots 19:44 V2= 157 Knots 19:44 Take-off 19:44 Take off Weight: 150449 Lbs 19:44 Wind: 337? @ 008 Knots Heading: 267? 19:44 POS N48? 59? 47?? E002? 34? 01?? 19:44 N11 94 N12 94 19:44 TOC 19:44 Fuel Weight: 44433 Lb 19:44 Flaps:4 at 160 Knots 19:44 Gear Up: 161 Knots 19:45 Flaps:3 at 174 Knots 19:46 Flaps:0 at 209 Knots 19:49 Com1 Freq=128.10 19:59 Wind:268?@050 Knots Heading: 094? Ground Speed: 518 Knots Altitude 24117 ft 20:06 Com1 Freq=122.80 20:14 Wind:277?@037 Knots Heading: 059? Ground Speed: 396 Knots Altitude 17260 ft 20:19 Flaps:1 at 250 Knots 20:19 Flaps:2 at 249 Knots 20:19 Flaps:3 at 249 Knots 20:21 Com1 Freq=119.25 20:22 Flaps:4 at 221 Knots 20:22 Flaps:3 at 221 Knots 20:23 Flaps:4 at 199 Knots 20:23 Flaps:5 at 188 Knots 20:26 Gear Down: 176 Knots 20:26 Flaps:6 at 161 Knots 20:27 Flaps:7 at 153 Knots 20:27 Flaps:8 at 154 Knots 20:28 TouchDown:Rate -487 ft/min Speed: 129 Knots 20:28 Land 20:28 Wind:149?@005 Knots 20:28 Heading: 229? 20:28 Flight Duration: 00:44 20:28 Landing Weight: 145400 Lbs 20:28 POS N48? 32? 04?? E007? 37? 18?? 20:32 Parking brakes on 20:32 Block to Block Duration: 01:04 20:32 Final Fuel: 39034 Lbls 20:32 Spent Fuel: 6882 Lbls 20:32 Flight Length: 272 NM 20:32 TOD Land Length: 272 NM 20:32 Com1 Freq=120.70 I added Passengers for the pireps from the pilot center, so it is normal that there is not any value for an FSACARS log. However, the passengers number from FSACARS is correct in phpVMS and the passengers revenue is OK in the finances. As you can see, all is OK except the fuel. This my local config file about fuel : # Fuel info /* 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_SURCHARGE', '5'); # FSPassengers Settings # Units settings Config::Set('WeightUnit', '0'); # 0=Kg 1=lbs Config::Set('DistanceUnit', '2'); # 0=KM 1= Miles 2=NMiles Config::Set('SpeedUnit', '1'); # 0=Km/H 1=Kts Config::Set('AltUnit', '1'); # 0=Meter 1=Feet Config::Set('LiquidUnit', '3'); # 0=liter 1=gal 2=kg 3=lbs Config::Set('WelcomeMessage', 'phpVMS/FSPAX ACARS'); # Welcome Message Thanks Stéphane Quote
stephanepa38 Posted June 16, 2009 Author Report Posted June 16, 2009 Hello Nabeel Do you find something to resolve this problem ? Thanks Stéphane Sky Away Virtual Airline Quote
Administrators Nabeel Posted June 16, 2009 Administrators Report Posted June 16, 2009 Check this read, and post the result: http://forum.phpvms.net/index.php?topic=892.0 Quote
stephanepa38 Posted June 16, 2009 Author Report Posted June 16, 2009 Hello The result is 3.9 Here are the values of my airports : Stéphane Quote
Administrators Nabeel Posted June 16, 2009 Administrators Report Posted June 16, 2009 Which airport did you test/what's the code you put in? I'm trying to duplicate this, seems to be returning the proper value If your default fuel value 3.9 in your config file? Quote
stephanepa38 Posted June 16, 2009 Author Report Posted June 16, 2009 Hello I tried with LFPG (departure airport of the log above). This is the part about the fuel in my local config file : # Fuel info /* 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_SURCHARGE', '5'); # FSPassengers Settings # Units settings Config::Set('WeightUnit', '0'); # 0=Kg 1=lbs Config::Set('DistanceUnit', '2'); # 0=KM 1= Miles 2=NMiles Config::Set('SpeedUnit', '1'); # 0=Km/H 1=Kts Config::Set('AltUnit', '1'); # 0=Meter 1=Feet Config::Set('LiquidUnit', '3'); # 0=liter 1=gal 2=kg 3=lbs Config::Set('WelcomeMessage', 'phpVMS/FSPAX ACARS'); # Welcome Message As you can see, fuel price is 0.45 euro per lbs. I would like the fuel price to be 0.45 euros per lbs. Stéphane Quote
Administrators Nabeel Posted June 16, 2009 Administrators Report Posted June 16, 2009 Don't put it in quotes, eg: Config::Set('FUEL_DEFAULT_PRICE', 0.45); Quote
stephanepa38 Posted June 16, 2009 Author Report Posted June 16, 2009 Hello I modified my local config file. # Fuel info /* 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_SURCHARGE', '5'); # FSPassengers Settings # Units settings Config::Set('WeightUnit', '0'); # 0=Kg 1=lbs Config::Set('DistanceUnit', '2'); # 0=KM 1= Miles 2=NMiles Config::Set('SpeedUnit', '1'); # 0=Km/H 1=Kts Config::Set('AltUnit', '1'); # 0=Meter 1=Feet Config::Set('LiquidUnit', '3'); # 0=liter 1=gal 2=kg 3=lbs Config::Set('WelcomeMessage', 'phpVMS/FSPAX ACARS'); # Welcome Message I deleted the log and I've done the same flight. I have the same problem before and after I modified the local config file. Fuel used : 6413 lbs Fuel (in the financial report) : - 25331 euros EDIT : Look at the log on the first page of this topic. I found this : 20:32 Final Fuel: 39034 Lbls 20:32 Spent Fuel: 6882 Lbls Is it normal that the unit used is "Lbls" ? Stéphane Quote
Administrators Nabeel Posted June 16, 2009 Administrators Report Posted June 16, 2009 In FSACARS set the unit to Kg also, it's in the config file IIRC. If it's not, I'll upload a patch which will do the conversions. Did the fuel report correctly? Quote
stephanepa38 Posted June 17, 2009 Author Report Posted June 17, 2009 I set the unit to Kg in phpVMS and in FSACARS. This is the local config file in kg : # Fuel info /* 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_SURCHARGE', '5'); # FSPassengers Settings # Units settings Config::Set('WeightUnit', '0'); # 0=Kg 1=lbs Config::Set('DistanceUnit', '2'); # 0=KM 1= Miles 2=NMiles Config::Set('SpeedUnit', '1'); # 0=Km/H 1=Kts Config::Set('AltUnit', '1'); # 0=Meter 1=Feet Config::Set('LiquidUnit', '2'); # 0=liter 1=gal 2=kg 3=lbs Config::Set('WelcomeMessage', 'phpVMS/FSPAX ACARS'); # Welcome Message I deleted all the logs and i've done a new flight with fsacars in kg. This is the log : [2009/06/17 11:06:00] Flight IATA:FSW1000 Pilot Number:FSW001 Company ICAO:FSW Aircraft Type:B737 PAX:149 Aircraft Registration:FSW-BOA Departing Airport: LFPG Destination Airport: LFST Alternate Airport:LFSB Online: IVAO Route:RANUX EPL Flight Level:240 11:06 Zero fuel Weight: 48082 Kg, Fuel Weight: 20862 Kg 11:09 Parking Brakes off 11:09 Com1 Freq=122.80 11:15 VR= 156 Knots 11:15 V2= 165 Knots 11:15 Take-off 11:15 Take off Weight: 68517 Kg 11:15 Wind: 162? @ 008 Knots Heading: 087? 11:15 POS N48? 59? 51?? E002? 35? 20?? 11:15 N11 94 N12 94 11:15 TOC 11:15 Fuel Weight: 20433 Kg 11:15 Flaps:4 at 167 Knots 11:15 Gear Up: 169 Knots 11:16 Flaps:3 at 210 Knots 11:17 Flaps:0 at 242 Knots 11:30 Wind:315?@026 Knots Heading: 124? Ground Speed: 493 Knots Altitude 24229 ft 11:45 Wind:247?@010 Knots Heading: 062? Ground Speed: 343 Knots Altitude 13359 ft 11:47 Flaps:1 at 250 Knots 11:47 Flaps:2 at 250 Knots 11:47 Flaps:3 at 250 Knots 11:52 Flaps:4 at 220 Knots 11:52 Flaps:3 at 219 Knots 11:53 Flaps:4 at 211 Knots 11:54 Gear Down: 186 Knots 11:54 Flaps:5 at 172 Knots 11:54 Flaps:6 at 170 Knots 11:54 Flaps:7 at 154 Knots 11:54 Flaps:8 at 150 Knots 11:55 TouchDown:Rate -304 ft/min Speed: 133 Knots 11:56 Land 11:56 Wind:355?@002 Knots 11:56 Heading: 228? 11:56 Flight Duration: 00:41 11:56 Landing Weight: 66385 Kg 11:56 POS N48? 32? 12?? E007? 37? 32?? 11:59 Parking brakes on 11:59 Block to Block Duration: 00:50 11:59 Final Fuel: 18185 Kg 11:59 Spent Fuel: 2677 Kg 11:59 Flight Length: 244 NM 11:59 TOD Land Length: 244 NM Fuel price is set to 0.45 euro per kg. Same problem with the finances, fuel cost is incorrect. I found these lines in the "phpvms_fuelprices" table : May be the error is in the MySQL database. Thanks Stéphane Quote
Administrators Nabeel Posted June 17, 2009 Administrators Report Posted June 17, 2009 Did you enter the prices into that table? Empty that table, those are only cached prices Quote
stephanepa38 Posted June 17, 2009 Author Report Posted June 17, 2009 Hello I did not enter any value in the My SQL database. phpVMS entered it itself. I will delete all the content of this table. Stéphane Quote
Administrators Nabeel Posted June 17, 2009 Administrators Report Posted June 17, 2009 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 Quote
stephanepa38 Posted June 17, 2009 Author Report Posted June 17, 2009 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 Quote
Administrators Nabeel Posted June 17, 2009 Administrators Report Posted June 17, 2009 phpvms.beta.zip And no, it's just like a update. Just overwrite the files, then run the install/update.php file Quote
stephanepa38 Posted June 17, 2009 Author Report Posted June 17, 2009 Thanks for your help. I will do this update tomorrow morning (in French). Stéphane Quote
stephanepa38 Posted June 18, 2009 Author Report Posted June 18, 2009 Hello I've done the update. Here are the lines of my local config files about the fuel : # Fuel info /* 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 Quote
Administrators Nabeel Posted June 19, 2009 Administrators Report Posted June 19, 2009 On LFPG in the airport dialog, set it to .45 Quote
stephanepa38 Posted June 19, 2009 Author Report Posted June 19, 2009 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 Quote
Administrators Nabeel Posted June 19, 2009 Administrators Report Posted June 19, 2009 Okay, try the latest beta once it posts, fixed up a couple of bugs Quote
stephanepa38 Posted June 19, 2009 Author Report Posted June 19, 2009 I am currently using the latest beta and the build is 708. What version do I have to install ? Thanks Stéphane Quote
Administrators Nabeel Posted June 19, 2009 Administrators Report Posted June 19, 2009 It would be 709, it's up on downloads.phpvms.net, the build log hasn't updated yet Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.