Hello,
Admin center when i want to add aircraft, the list is empty. I can not see any aircraft. How can i fix this please?
Hello,
Admin center when i want to add aircraft, the list is empty. I can not see any aircraft. How can i fix this please?
Hello,
Admin center when i want to add aircraft, the list is empty. I can not see any aircraft. How can i fix this please?
Any idea?
1ST SEARCH in this post 3rd page its this:
So … we have in CORE/COMMON/FSCalculator/FCalculator.class.php :
<?php
class FCalculator extends CodonData
{
public function findaircraft()
{
$sql = “SELECT DISTINCT name FROM”.TABLE_PREFIX.“aircraft”;
return DB::get_results($sql);
}
You must edit /replace the RED line with : $sql = “SELECT * FROM phpvms_aircraft”;
And thats all !! Hope to be a solution for all and not only for my ..PC/phpvms sistem
1ST SEARCH in this post 3rd page its this:
So … we have in CORE/COMMON/FSCalculator/FCalculator.class.php :
<?php
class FCalculator extends CodonData
{
public function findaircraft()
{
$sql = “SELECT DISTINCT name FROM”.TABLE_PREFIX.“aircraft”;
return DB::get_results($sql);
}
You must edit /replace the RED line with : $sql = “SELECT * FROM phpvms_aircraft”;
And thats all !! Hope to be a solution for all and not only for my ..PC/phpvms sistem
working now. thanks.
is there a way to short the airplanes?? for example our va has 4 A318, 4 A320 etc..in the dropdown menu is it possible to saw only one A318???
is there a way to short the airplanes?? for example our va has 4 A318, 4 A320 etc..in the dropdown menu is it possible to saw only one A318???
It’s already there. There must be a slight difference between the aircraft names that causes that.
i uploaded all files. - O.K.
made database import. - O.K.
but:
Make a link to access it by <?php echo url(‘fuelcalculator’);?> for your pilots.
Where should i make a link…in which file?
i uploaded all files. - O.K.
made database import. - O.K.
but:
Make a link to access it by <?php echo url(‘fuelcalculator’);?> for your pilots.
Where should i make a link…in which file?
layout.php in your top nav menu
On 19/11/2013 at 10:42 PM, maaneken_pis said:
Hello guys …
I had the same problem … no aircrafts listed at “SET PARAMETERS”.
I solved in my way … and at lest for me ..works !
So … we have in CORE/COMMON/FSCalculator/FCalculator.class.php :
<?php
class FCalculator extends CodonData
{
public function findaircraft()
{
$sql = “SELECT DISTINCT name FROM”.TABLE_PREFIX.“aircraft”;
return DB::get_results($sql);
}
You must edit /replace the RED line with : $sql = “SELECT * FROM phpvms_aircraft”;
And thats all !! Hope to be a solution for all and not only for my ..PC/phpvms sistem
Thanks now ready there worked
what would be the right multiplicator for a 1hour 15 fuelreserve?
11 hours ago, Txmmy83 said:
what would be the right multiplicator for a 1hour 15 fuelreserve?
Open fuelcalculator.php in module folder and look for the following:
$flndg = $fuelhr \* 3/4;
1 hr 15 minutes would be 75 minutes which is "$fuelhr * 1.25 ", so change “fuelhr * 3/4” to that every where you see the code line
thank you very much
On 13.9.2013 at 4:03 PM, mischka said:
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." FROMACS_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=“updateACS_aircraftset fuelflow=”.$aircraft->average." WHERE icao=‘“.$aircraft->icao.”’";
DB::query($sql);
echo “
”.$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.
where to put this function?
8 hours ago, Txmmy83 said:
where to put this function?
I would put this in “FCalculator.class.php” and then call the function in “FuelCalculator.php” in module folder inside index() function like the following:
FCalculator::CalcFuelFlows();
This way every time anyone opens the module the table gets updated.
Cheers
Could you explain in english for me please lol where do i put this “FCalculator::CalcFuelFlows();” in the Fuelcalculator.php in module inside index()
do i just paste this in or do i add it as a $param = FCalculator::CalcFuelFlows();
thank you
On 12/21/2017 at 5:00 AM, Booagce said:
Could you explain in english for me please lol where do i put this “FCalculator::CalcFuelFlows();” in the Fuelcalculator.php in module inside index()
do i just paste this in or do i add it as a $param = FCalculator::CalcFuelFlows();
thank you
No! just paste it as is. Just so you know, if you assign it to a parameter then it will not be executed on page load. Basically, you would assign a value to a parameter to use it somewhere else