Jump to content

phpVMS CentralDATA updates


simpilot

Recommended Posts

  • Administrators

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.

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • 5 weeks later...
  • Administrators

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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

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,
 ));
}

  • Like 1
Link to comment
Share on other sites

  • Administrators

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));

  • Like 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • Administrators

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).

Link to comment
Share on other sites

  • 3 years later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...