phpVMS CentralDATA updates

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.

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.

well I did add the code but my VA still not sending updates ! I m using Smartcars 2

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

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.

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

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

Do you have the SQL in post #6 reversed ie shouldn’t you be adding ‘p.rawdata’ not removing ?

Do you have the SQL in post #6 reversed ie shouldn’t you be adding ‘p.rawdata’ not removing ?

Corrected

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.

awesome , it works VA Rank 124 !! www.varigvirtual.com

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 Like

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

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 Like

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.

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?

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

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

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

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