All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Retrieve international enroute flights into specific airport
PostPosted: Mon Jan 16, 2017 7:05 pm 
Offline
pjones75 - FlightAware user avatar

Joined: Mon Apr 21, 2014 7:00 pm
Posts: 6
Hi. I have been trying to get all current international enroute flights in Melbourne Airport (YMML).

I have tried the Enroute API which I thought was for all current flights in the air with their ETA. However, the data being retrieved has times that are over a week old.

Can anyone advise if there is a way to do this? I really want international flights with ETA not STA.

$params = array(
"airport" => "YMML",
"howMany" => 15,
"offset" => 0,
"filter" => "");
$result = $client->Enroute($params);

Thanks Paul


Top
 Profile  
 
 Post subject: Re: Retrieve international enroute flights into specific air
PostPosted: Tue Jan 17, 2017 5:42 pm 
Offline
FlightAware Staff
bovineone - FlightAware user avatar

Joined: Wed Jul 27, 2005 3:00 am
Posts: 1423
Location: FlightAware WHQ
The "Enroute" function returns flights already in the air heading towards the specified airport and also flights scheduled to arrive at the specified airport. Enroute flights are returned from soonest estimated arrival to least soon estimated arrival. Some of the flights will be current ones, and some will be past ones (up to 2 weeks old at most).

Generally speaking, the returned flights will be similar but not strictly identical to the flights listed on the "enroute" tab of our website: https://flightaware.com/live/airport/YMML/enroute


Top
 Profile  
 
 Post subject: Re: Retrieve international enroute flights into specific air
PostPosted: Tue Jan 17, 2017 7:01 pm 
Offline
pjones75 - FlightAware user avatar

Joined: Mon Apr 21, 2014 7:00 pm
Posts: 6
Thank you for the quick response. I have matched my data retrieved for the last 15 flights and they match the sample you linked me to.

However, in my data the EPOCH time retrieved in the XML response places the date 7 days old. Would that be correct? Melbourne is busy enough to have 15 flights on the same day the query is run. If I take a sample from the XML response -

[8] => Array
(
[ident] => QFA30
[aircrafttype] => A333
[actualdeparturetime] => 0
[estimatedarrivaltime] => 1484083260 (This was run today Wed 18th Jan)
[filed_departuretime] => 1484049000
[origin] => VHHH
[destination] => YMML
[originName] => Hong Kong Int'l
[originCity] => Hong Kong
[destinationName] => Melbourne Tullamarine
[destinationCity] => Melbourne, Victoria
)

If I convert the EPOCH time it comes back with -

GMT: Tue, 10 Jan 2017 21:21:00 GMT
Your time zone: 1/11/2017, 8:21:00 AM GMT+11:00 DST

I just want to understand if I am doing something wrong. Or if I just add a week to the date stamp.

Cheers Paul


Top
 Profile  
 
 Post subject: Re: Retrieve international enroute flights into specific air
PostPosted: Tue Jan 17, 2017 7:13 pm 
Offline
FlightAware Staff
bovineone - FlightAware user avatar

Joined: Wed Jul 27, 2005 3:00 am
Posts: 1423
Location: FlightAware WHQ
That's interesting. I'll have to investigate the specific problem with the Enroute function.

However, if you're actually just interested in flights that are currently flying, it may be easier for you to use the "Search" function with a query of something like "-destination YMML -inAir 1". For example:

https://flightxml.flightaware.com/json/ ... -inAir%201


Top
 Profile  
 
 Post subject: Re: Retrieve international enroute flights into specific air
PostPosted: Fri Jan 20, 2017 12:35 am 
Offline
pjones75 - FlightAware user avatar

Joined: Mon Apr 21, 2014 7:00 pm
Posts: 6
Interestingly, we were doing some more testing of the Enroute function and when we change the Offset to 23, it gave us he result we were hoping for.

Still more testing to do to be sure. But just thought I would let you know. Cheers Paul


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: