OmerAslan Posted May 26, 2016 Report Share Posted May 26, 2016 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? Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted May 28, 2016 Report Share Posted May 28, 2016 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? Quote Link to comment Share on other sites More sharing options...
pedroportugal Posted June 12, 2016 Report Share Posted June 12, 2016 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 Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted June 13, 2016 Report Share Posted June 13, 2016 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. Quote Link to comment Share on other sites More sharing options...
Iraklis Posted September 16, 2016 Report Share Posted September 16, 2016 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??? Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted September 21, 2016 Author Moderators Report Share Posted September 21, 2016 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. Quote Link to comment Share on other sites More sharing options...
Melli Posted November 12, 2016 Report Share Posted November 12, 2016 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? Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 12, 2016 Author Moderators Report Share Posted November 12, 2016 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 Quote Link to comment Share on other sites More sharing options...
OWA001 Posted April 14, 2017 Report Share Posted April 14, 2017 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 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted September 24, 2017 Report Share Posted September 24, 2017 what would be the right multiplicator for a 1hour 15 fuelreserve? Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted September 25, 2017 Author Moderators Report Share Posted September 25, 2017 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 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted September 25, 2017 Report Share Posted September 25, 2017 thank you very much Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted September 25, 2017 Report Share Posted September 25, 2017 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." 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. where to put this function? Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted September 26, 2017 Author Moderators Report Share Posted September 26, 2017 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 Quote Link to comment Share on other sites More sharing options...
Boogace Posted December 21, 2017 Report Share Posted December 21, 2017 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 Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted December 24, 2017 Author Moderators Report Share Posted December 24, 2017 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 Quote Link to comment Share on other sites More sharing options...
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.