Fuel Calculator V_1.1

The same website as FSPAX on the left navigation panel click on “MORE DOWNLOADS” and change the search method from “All” to “pay load” and write in the next box “737” it’ll come up.

It a great mod but seriously its too much to try and find all the stats for all the aircraft

I used your old 1.0 version, so I udated to the 1.1 version now, but when I go to the Fuel Calculator Parameters in the admin section and try to add parameters, it can’t because there are NO aircraft listed in the dropdown list?! What am I missing here?

You can get the fuel flow from your own PIREPS. Once you have 20-30 pireps per aircraft type it should be reliable enough. Obviously the more pireps the more reliable the calculations will be.

I use the following code to update a field “fuelflow” in my aircraft table:

function CalcFuelFlows ()
{
 $sql="select icao, count(icao) amount, sum(fuelused) totalfuelused, sum(duration) totalduration, sum(fuelused)/sum(duration) average from (";
 $sql=$sql." SELECT aircraft, icao, fuelused, flighttime_stamp, hour(flighttime_stamp)+ (minute(flighttime_stamp)/60) duration";
 $sql=$sql." FROM `ACS_pireps`, ACS_aircraft";
 $sql=$sql." WHERE ACS_pireps.aircraft=ACS_aircraft.id and ACS_aircraft.fuelflow<>0) pireps group by icao";
 $averages = DB::get_results($sql);

 foreach($averages as $aircraft)
  {
   $sql="update `ACS_aircraft` set fuelflow=".$aircraft->average." WHERE icao='".$aircraft->icao."'";
   DB::query($sql);
   echo "<br>".$sql;
  }
 return "success";
}

That will set the average fuel flow for each aircraft type. You can then calculate the amount of fuel you need depending on the trip length plus an hour reserve and some hold/taxi fuel.

Note that if your phpvms counts fuel in Lb than these values will be in Lb, if you set it in KG it’ll be in KG.

Note also if you want to use this for your system you must change the tablename prefix from ACS_ to whatever you have.

I used your old 1.0 version, so I udated to the 1.1 version now, but when I go to the Fuel Calculator Parameters in the admin section and try to add parameters, it can’t because there are NO aircraft listed in the dropdown list?! What am I missing here?

I think you have install problem. Try reinstalling that would fix your problem.

Thanks Parko. I will attempt a re-install when I get home later tonight and let you know

Re-installed it. Same thing happenned

Okay. I’ll need your cpanel log in access to fix it for you. Send in PM if you’d like.

At work right now, will let you know later tonight When I install it, I am just copying the folders as is into my site and running the SQL script into my database. Is there another step I am missing or doing wrong?!

Or does it matter that my databases do NOT have4 the phpvms_ prefix?!

That’s it. The prefix!!!

Open fcalculator.class.php and in the first function remove “phpvms” leave it as “aircraft”.

1 Like

Ah, ok…I will do that when I get home

Works good now, thanks Parkho!

Mischka, could you explain where you out that code to show your results, please?! I wasn’t quite sure where that would be placed. I was trying it in my fleet_main.tpl file, but clearly I am wrong

It a great mod but seriously its too much to try and find all the stats for all the aircraft

It really isn’t THAT bad. But maybe we could start a community table info file as people find accurate tested data on various aircraft types?!

1 Like

Parkho, I was just playing around with the mod and I realized, that when you enter the NM and FEET, it doesn’t change the fuel needed no matter what altitude you choose. So, if you choose 2000 feet or 40000 feet, it will still give you the same fuel needed. Or am I missing something?!

1 Like

Looking at the stored data i dont think the module is supposed to output different fuel amounts for different altitudes.

You would need to store the average fuel flow for each altitude with each aircraft. Or get the exact graphs from the aircraft operating manuals to take the data from.

To actually calculate the correct amount of fuel you would need to consider a lot of stuff like step climbs, different cost indexes,… and besides that you would also need to get real high altitude wind data.

That would make the module very very complex and i think it would go way beyond what a free module can offer. Even a paid module with all that would be pretty expensive.

I’m using the fuel calculation in our Briefings merely as eye-candy but i have everywhere stated that the pilots need to recalculate the fuel before departure…especially on long range flights and shall not rely on the fuel Data in the Briefing.

Anyway on 99% of our flights the fuel amount calculated in our briefing Matches the fuel i get from Airbus X Fuel Calculator and PFPX pretty good. However on our website we are using a Self written module for fuel calculation.

Yes, I see that now too. Don’t really need the altitude box at all, really. And yeah, I am just using it as a reference as well. But it can come fairly close in most cases, like you said

Okay. I created this module to only give my pilots an estimated fuel required for a trip and that doesn’t mean they shouldn’t consider their own calculations. About the altitude, I know that has nothing to do with the calculations but It needed to be there, so the user feel confident they had entered the correct amount as their altitude. It’s kind of a mental matter that when you use the module you know you’ve done everything correctly if you know what I mean.

It’s kind of a mental matter that when you use the module you know you’ve done everything correctly if you know what I mean

Yes…I do know what you mean