Automatic Fuel Calculation

Okay, finally the script is running like it should…

Instructions:

  1. Put the fuel.tpl file into your /core/templates/ folder.

  2. Put this line somewhere into your schedules_briefing.tpl: <?php include(‘fuel.tpl’); ?>

  3. Customize the fuel.tpl file. I used the aircraft name which you can see in your adminpanel under “Airline Operations” -> “Add & Edit Fleet” -> “Name/Type”. Just change my existing fleet in the fuel.tpl with your fleet and delete what you dont need. This requires some knowledge of php. (Just watch the code until you notice how it works Also, i included automatic extra fuel for mid/long range flights. You can edit the values in line 165 and 166 in fuel.tpl

If you do not understand it, i will help you.

/ remark : If you are using a beta version or in any way, some version have the timeformat “HH:MM” for the flighttime. I am using “HH.MM”. If you use HH:MM, you have to change line 158 in the fuel.tpl from

        $fltime = explode(“.”, $schedule->flighttime);

to

        $fltime = explode(“:”, $schedule->flighttime);

Here is a screenshot

[fuelscript.zip](< base_url >/applications/core/interface/file/attachment.php?id=90)

And do you can show your " schedules_briefing.tpl:" to see a example to where i can put the <?php include(‘fuel.tpl’); ?> because i put but the system show to me “no aircraft performance data available”.Do you can help me  as fix this please?

Thankyou.

that’s because you may need to edit the fuel.tpl to match your own planes.

that’s because you may need to edit the fuel.tpl to match your own planes.

yes exactly like i said above because i use my fleet in that tpl and i didnt remove it so others know how i did it

and here is how schedules_briefing.tpl looks for me

Where do you get the information on the planes.

read my instructions there it is described

That’s not what I meant. I see what and how to edit. How do I know which plane to set. to the Fuelflow Table and Reservere. Is there a master list somewhere?

no, you can edit those values also. so the code starts like this:

<?php

        /**

*Fuelflow Table

*/

        $fuelflowMD11 = 7500;

        $fuelflowMD11F = 7500;

to add an aircraft, just put the random value like for a b737-800 you can put $fuelflowB738 or something. then = and then how much it burns per hour. then also to reservers so it would look like

        $reservesB738 = 1000;

and later you have to add this “B738” to those lines

        elseif($schedule->aircraft == ‘B737-800’) <- there you see the actual name of the aircraft in your list.. you have to put it in manually as well

        {

        $fuelflow = $fuelflowB738;

            $reserves = $reservesB738;

        }

and then its done. well, its not easy to explain, if you want i can edit it for you. or maybe someone can make some panel for it…

I got that, how do I find out how much fuel it burns, etc. We use bush planes, not any planes on your list.

hehe    bush planes…hehe

oo great well try wikipedia, in my case i had the original documentations of every of my aircraft but you find a lot at google and wikipedia

Thank you! From what I have so far it looks awesome. Just need to change the fuel settings. Thanks for this cool addon.

thank you  8)

there will come some other addons soon also.. stay tuned

How about when anyone finds the stats for odd ball planes like us Alaskan Va’s we post here.

if you do not find any data in the internet, make a normal flight in flightsimulator and just write down how much fuel you burned per hour (but if possible with a lot of thrust so you have reserves,.. i always check my fuelflow with maximum possible mach and thats how i calculate it)

Hi for some reason i have a schedule that it will show up on but all my other routes it gives me the following error, any help would be appreciated.

no aircraft performance data available

(missing flight duration)

because you forgot to put in the total flighttime or its in a wrong format. make it like this if the flight is one hour:

1.00

if it is already like that, make it like this

1:00

and for a flight with exampe 3 hours and 50 minutes it should look like that

3.50 or 3:50

Excellent, ill give that a go now, great addition by the way,

Thanks.

It shouldn’t be :

include('fuel.tpl');

It hsould be:

Template::Show('fuel.tpl');

Got it, works a treat Thanks.