Past Flight Schedules with TailNumber

Hi,

Trying to get the schedule of a particular airline (VOZ) for a 1 week period in the past (within the last weeks or two).

Have been investigating a couple of ways using FlightXML but nothing seems to jump out at me.

The data I need are (for a specific startDate->endDate of 7 days):

  • FlightNo
  • Aircraft Rego
  • Dep Date/Time (preferably Scheduled)
  • Arr Date/Time (preferably Scheduled)
  • Origin
  • Dest

The problem I face is that there seems to be several functions that I can use to get some of this data but there isn’t a single one that has the schedule info and the aircraft rego in one result set.

What I have been thinking about is using AirlineFlightSchedule to get the FlightNo (ident), origin, dest and times and then using the flight number as ident to get the tailnumber from AirlineFlightInfo.

I have two problems with this.

  1. The ident is sometimes a VOZ flight number and at other times a codeshare (which I don’t want to retrieve).
  2. The second query looks up one flight at a time to get the tail number. Which for a full week of schedules will be over 3000 separate queries each returning 1 row.

What would be easier is if I could send FlightXML the aircraft rego and retrieve the flight history for that aircraft like you can do on the live site here flightaware.com/live/flight/VHYFE/history but with the flight number as part of the result. That way I could run a query for each aircraft (rather than each flight) which would only be about 50 queries for the whole airline for the whole week. This would also mean I can filter out the codeshare flights as I have a list of regos I would be searching.

Unless there’s another way that I can do this??

Thanks in advance
Greg

Have you tried using FlightInfoEx with each tail number that you are interested in? The ident that is returned with each of those rows represent the flight numbers that were operated by the reg.

Ok, that gives me this if I just pull the first record for VHYFE. Which matches what appears here flightaware.com/live/flight/VHYFE/history


stdClass Object
(
    [FlightInfoExResult] => stdClass Object
        (
            [next_offset] => 1
            [flights] => stdClass Object
                (
                    [faFlightID] => VOZ886-1462339851-airline-0093
                    [ident] => VOZ886
                    [aircrafttype] => B738
                    [filed_ete] => 01:15:00
                    [filed_time] => 1462339851
                    [filed_departuretime] => 1462527000
                    [filed_airspeed_kts] => 306
                    [filed_airspeed_mach] => 
                    [filed_altitude] => 0
                    [route] => 
                    [actualdeparturetime] => 0
                    [estimatedarrivaltime] => 1462532100
                    [actualarrivaltime] => 0
                    [diverted] => 
                    [origin] => YSSY
                    [destination] => YMML
                    [originName] => Sydney
                    [originCity] => Sydney, NSW
                    [destinationName] => Melbourne Tullamarine
                    [destinationCity] => Melbourne, Victoria
                )
        )
)

To search a date range, how do I give function max and min values for filed_departuretime?

Thanks for your help.

Specify a large value for howMany (do not supply 1, as you seem to be). You should allow the full results to be returned and then your application look at the dates returned.

Hi,

Thanks that might work. One last question.

I’ve reference to invoking setMaximumResultSize to opt-in to larger result sets. How is that actually done in PHP?

I can’t ind reference to it in the examples so I tried this…



$options = array(
    'setMaximumResultSize' => 105,
    'trace' => true,
    'exceptions' => 0,
    'login' => 'myusername',
    'password' => 'mysecretkey',
);
$client = new SoapClient('http://flightxml.flightaware.com/soap/FlightXML2/wsdl', $options);


…but it still returns only 15 results.

Nevermind, found another post on it and worked it out.


$client = new SoapClient('http://flightxml.flightaware.com/soap/FlightXML2/wsdl', $options);
$client->SetMaximumResultSize(array("max_size" => 100))