Administrators simpilot Posted September 26, 2015 Administrators Report Share Posted September 26, 2015 The source field for all pireps sent to vaCentral has been missing in all versions of phpVMS. If you are using version <= 936 you will need to add the following line to CentralData.class.php find (appx line 387) $pirep_xml->addChild('revenue', $pirep->revenue); and add $pirep_xml->addChild('source', $pirep->source); Final config should look like $pirep_xml->addChild('revenue', $pirep->revenue); $pirep_xml->addChild('source', $pirep->source); } If you are using one of my 5.x versions you will have to make a slightly different change which you can find here -> https://github.com/D...a1e0f72f10e517d This will allow vaCentral to track how the PIREP is being submitted. I am most likely going to reduce the value of manually submitted PIREPs. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted September 29, 2015 Author Administrators Report Share Posted September 29, 2015 I am looking for airlines running my version of phpVMS (5.x) to update their central data files to allow for updates to vaCentral and the scoring system. NOTE: If you are running a different version you can try the new code but I do not guarantee compatibility. Quote Link to comment Share on other sites More sharing options...
ercio Posted October 29, 2015 Report Share Posted October 29, 2015 well I did add the code but my VA still not sending updates ! I m using Smartcars 2 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted October 29, 2015 Author Administrators Report Share Posted October 29, 2015 well I did add the code but my VA still not sending updates ! I m using Smartcars 2 Do you have the config setup with the correct key and everything? SmartCars does not report live map information if that is what you are looking for, only pirep's. You can find more about it here -> http://www.vacentral.net/faq Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted October 30, 2015 Author Administrators Report Share Posted October 30, 2015 The landingrate field for all pireps sent to vaCentral has been missing in all versions of phpVMS. If you are using version <= 936 you will need to add the following line to CentralData.class.php find (appx line 387) $pirep_xml->addChild('revenue', $pirep->revenue); $pirep_xml->addChild('source', $pirep->source); and add $pirep_xml->addChild('landingrate', $pirep->landingrate); Final config should look like $pirep_xml->addChild('revenue', $pirep->revenue); $pirep_xml->addChild('source', $pirep->source); $pirep_xml->addChild('landingrate', $pirep->landingrate); } If you are using one of my 5.x versions you will have to make a slightly different change which you can find here -> https://github.com/D...a34aa0bee89bc97 This will allow vaCentral to track landing rates.This is going to be part of the new scoring system. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 1, 2015 Author Administrators Report Share Posted November 1, 2015 The log, route, and rawdata field for all pireps sent to vaCentral has also been missing in all versions of phpVMS. If you are using version <= 936 you will need to add the following line to CentralData.class.php find (appx line 387) $pirep_xml->addChild('revenue', $pirep->revenue); $pirep_xml->addChild('source', $pirep->source); $pirep_xml->addChild('landingrate', $pirep->landingrate); and add $pirep_xml->addChild('log', $pirep->log); $pirep_xml->addChild('route', $pirep->route); $pirep_xml->addChild('rawdata', $pirep->rawdata); Final config should look like $pirep_xml->addChild('revenue', $pirep->revenue); $pirep_xml->addChild('source', $pirep->source); $pirep_xml->addChild('landingrate', $pirep->landingrate); $pirep_xml->addChild('log', $pirep->log); $pirep_xml->addChild('route', $pirep->route); $pirep_xml->addChild('rawdata', $pirep->rawdata); } If you are using one of my 5.x versions you will have to make a slightly different change to the CentralData.class.php file which you can find here -> https://github.com/D...36627cd84661994 and here -> https://github.com/D...1d30bf0c602d5a1 EDIT: You must also make a change to PIREPData.class.php Find this following around line 320 for versions <= 936 public static function getReportDetails($pirepid) { $sql = 'SELECT p.*, s.*, s.id AS scheduleid, p.route, p.route_details, u.pilotid, u.firstname, u.lastname, u.email, u.rank, and change to public static function getReportDetails($pirepid) { $sql = 'SELECT p.*, s.*, s.id AS scheduleid, p.route, p.route_details, p.rawdata, u.pilotid, u.firstname, u.lastname, u.email, u.rank, If you are running a 5.5.x version the change can be found here -> https://github.com/DavidJClark/phpvms_5.5.x/commit/b746267be2988f7bfdc3017dabd215c2bc20e83d Quote Link to comment Share on other sites More sharing options...
pikitanga Posted November 2, 2015 Report Share Posted November 2, 2015 Hi simpilot, As ZonExecutive uses 'xacars' we cannot return a landing rate. Should we return blank/empty for the landing rate ? Cheers, Duncan VP of Operations, ZonExecutive Quote Link to comment Share on other sites More sharing options...
pikitanga Posted November 2, 2015 Report Share Posted November 2, 2015 Do you have the SQL in post #6 reversed ie shouldn't you be adding 'p.rawdata' not removing ? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 2, 2015 Author Administrators Report Share Posted November 2, 2015 Do you have the SQL in post #6 reversed ie shouldn't you be adding 'p.rawdata' not removing ? Corrected Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 2, 2015 Author Administrators Report Share Posted November 2, 2015 Hi simpilot, As ZonExecutive uses 'xacars' we cannot return a landing rate. Should we return blank/empty for the landing rate ? Cheers, Duncan VP of Operations, ZonExecutive vaCentral will automatically set the field to zero if it is not present in the data transmission. Quote Link to comment Share on other sites More sharing options...
ercio Posted November 2, 2015 Report Share Posted November 2, 2015 awesome , it works VA Rank 124 !! www.varigvirtual.com Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted November 3, 2015 Report Share Posted November 3, 2015 David, I did not find the line $pirep_xml->addChild('revenue', $pirep->revenue); in my CentralData.Class.php any ideas my phpVMS version number reads v2.1.934-170-g5ca803a I have reviewed my file and it looks a bit like a 5x Version? I have that in my protected static function get_pirep_xml($pirep) { $pilotid = PilotData::getPilotCode($pirep->code, $pirep->pilotid); $pirep_xml = self::addElement(null, 'pirep', null, array( 'uniqueid' => $pirep->pirepid, 'pilotid' => $pilotid, 'pilotname' => $pirep->firstname . ' ' . $pirep->lastname, 'flightnum' => $pirep->code . $pirep->flightnum, 'depicao' => $pirep->depicao, 'arricao' => $pirep->arricao, 'aircraft' => $pirep->aircraft, 'registration' => $pirep->registration, 'flighttime' => $pirep->flighttime_stamp, 'submitdate' => $pirep->submitdate, 'modifieddate' => $pirep->modifieddate, 'flighttype' => $pirep->flighttype, 'load' => $pirep->load, 'fuelused' => $pirep->fuelused, 'fuelprice' => $pirep->fuelprice, 'pilotpay' => $pirep->pilotpay, 'price' => $pirep->price, 'source' => $pirep->source, 'revenue' => $pirep->revenue, )); } 1 Quote Link to comment Share on other sites More sharing options...
mattia Posted November 3, 2015 Report Share Posted November 3, 2015 Hi David, I made your updates but when i try to send the pirep on vacentral i receive this error Warning: SimpleXMLElement::addChild() expects parameter 2 to be string, array given in when send the rawdata Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 4, 2015 Author Administrators Report Share Posted November 4, 2015 Hi David, I made your updates but when i try to send the pirep on vacentral i receive this error Warning: SimpleXMLElement::addChild() expects parameter 2 to be string, array given in when send the rawdata If you are getting that error try changing that line to; $pirep_xml->addChild('rawdata', serialize($pirep->rawdata)); 1 Quote Link to comment Share on other sites More sharing options...
HighFlyerPL185 Posted November 4, 2015 Report Share Posted November 4, 2015 Is the change effective immediately after changing the code? My airline still shows 165 PIREPs while in reality we have close to 5,000 reports. Quote Link to comment Share on other sites More sharing options...
mattia Posted November 4, 2015 Report Share Posted November 4, 2015 If you are getting that error try changing that line to; $pirep_xml->addChild('rawdata', serialize($pirep->rawdata)); Now it seems to work, thank you very much David! last question When your updates are finished ranking back to normal? for example the Phoenix Virtual Airways will return the first? Quote Link to comment Share on other sites More sharing options...
algaeholics Posted November 4, 2015 Report Share Posted November 4, 2015 Hi David RE: "This will allow vaCentral to track how the PIREP is being submitted. I am most likely going to reduce the value of manually submitted PIREPs. " Having written my own tracking software - can I confirm that this reduced 'value' will be based upon 'manual' being recorded in the PIREP 'source' field, or do you have a database of 'acceptable' trackers? Much appreciated. Tim Walters MaldAir.com Quote Link to comment Share on other sites More sharing options...
pikitanga Posted November 5, 2015 Report Share Posted November 5, 2015 Hi David, With the new ranking system, do you know why some of the top airlines never seem to appear on the live map ? Regards, Duncan Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted November 6, 2015 Report Share Posted November 6, 2015 Hi Duncan, the answer is quite simple some of these VA's using other Systems then phpVMS and other Pirep Clients and manually Upload their statistics when approved Smartcars flights for example never show up on live map but that is written in vacentral FAQ page So not being on live map does NOT necessarily mean they are not flying! Best regards, Thomas Schedl Quote Link to comment Share on other sites More sharing options...
Virtualei Posted November 15, 2015 Report Share Posted November 15, 2015 David, I did not find the line $pirep_xml->addChild('revenue', $pirep->revenue); in my CentralData.Class.php any ideas my phpVMS version number reads v2.1.934-170-g5ca803a I have reviewed my file and it looks a bit like a 5x Version? I have that in my protected static function get_pirep_xml($pirep) { $pilotid = PilotData::getPilotCode($pirep->code, $pirep->pilotid); $pirep_xml = self::addElement(null, 'pirep', null, array( 'uniqueid' => $pirep->pirepid, 'pilotid' => $pilotid, 'pilotname' => $pirep->firstname . ' ' . $pirep->lastname, 'flightnum' => $pirep->code . $pirep->flightnum, 'depicao' => $pirep->depicao, 'arricao' => $pirep->arricao, 'aircraft' => $pirep->aircraft, 'registration' => $pirep->registration, 'flighttime' => $pirep->flighttime_stamp, 'submitdate' => $pirep->submitdate, 'modifieddate' => $pirep->modifieddate, 'flighttype' => $pirep->flighttype, 'load' => $pirep->load, 'fuelused' => $pirep->fuelused, 'fuelprice' => $pirep->fuelprice, 'pilotpay' => $pirep->pilotpay, 'price' => $pirep->price, 'source' => $pirep->source, 'revenue' => $pirep->revenue, )); } I am exactly the same. Can you advise what I need to do. My VA Rank has dropped fro 72 to 101 Thanks in advance Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted November 15, 2015 Report Share Posted November 15, 2015 I did carry out exactly the instructions for the 5x Version seems to work for me Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted November 15, 2015 Report Share Posted November 15, 2015 My VA is currently matching with other VA's around Rank 120-123 PS: since yesterday my VA (VolaItalia Airways) all of a sudden stops from showing up on live flights not changed a thing in phpVMS configs compared to day before where all flights showing up live flights and map how the should I tried with all known free ACARS systems no luck! but the day before I tested APVacars the next day I discovered that my VA stops showing up on Live Flights doesn't know if that is connected with the problem David, I already sent you an email about that problem best regards and thanks, Thomas Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 15, 2015 Author Administrators Report Share Posted November 15, 2015 Hi David RE: "This will allow vaCentral to track how the PIREP is being submitted. I am most likely going to reduce the value of manually submitted PIREPs. " Having written my own tracking software - can I confirm that this reduced 'value' will be based upon 'manual' being recorded in the PIREP 'source' field, or do you have a database of 'acceptable' trackers? Much appreciated. Tim Walters MaldAir.com If you are submitting via an acars client, even one you have written just make sure that the source field is populated with something other than manual. I am working on the code to also try to eliminate the 2000nm pireps that only have 1 hour of flight time or no fuel used etc... Hi David, With the new ranking system, do you know why some of the top airlines never seem to appear on the live map ? Regards, Duncan It is possible that the new updates have not been made to your system/files. What client are you using for ACARS? Are PIREPS showing up? Is the change effective immediately after changing the code? My airline still shows 165 PIREPs while in reality we have close to 5,000 reports. I am hoping to have the new code written and completed by Dec 1st, anything till then is most likely not valid. Quote Link to comment Share on other sites More sharing options...
Patrick1246 Posted November 15, 2015 Report Share Posted November 15, 2015 I made all changes, and it works great, but now it takes 1min to sent the Pirep from smartcars. I'm the only one with this issue? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 16, 2015 Author Administrators Report Share Posted November 16, 2015 I made all changes, and it works great, but now it takes 1min to sent the Pirep from smartcars. I'm the only one with this issue? See if it speeds up later today. I have a script running on the site cleaning up all the priep history (over 2.5 million pireps in database). Quote Link to comment Share on other sites More sharing options...
Patrick1246 Posted November 18, 2015 Report Share Posted November 18, 2015 its much faster, but now I receive sometimes double pireps and reports from smartcars, there was a pirep filling error. Quote Link to comment Share on other sites More sharing options...
Mickey Posted February 17, 2019 Report Share Posted February 17, 2019 Hi, seeing that this thread might be dead, any chance anyone can see whats wrong with the errors i have? [17-Feb-2019 16:39:54 UTC] PHP Warning: SimpleXMLElement::addChild() expects parameter 2 to be string, array given in /home/*****/public_html/crew/core/common/CentralData.class.php on line 198 [17-Feb-2019 16:39:55 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/crew/core/common/CentralData.class.php:198) in /home/*****/public_html/crew/core/modules/kACARSII/kACARSII.php on line 644 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.