FlightXML3 GetFlightTrack inconsistency


#1

GetFlightTrack sometimes returns an error NO_DATA No data found for AAL2455-1505971539-airline-0583 . Sometimes it actually provides the flight track data.

Has anyone else encountered such an inconsistency? Is there something I need to do to always get the proper results?

In both cases, I’ve used Python code that looks like:

payload={'ident':'AAL2455-1505971539-airline-0583'}
response = requests.get(fxmlUrl + "GetFlightTrack", params=payload,
			auth=(username, apiKey))

#2

Confirmed that there is an issue there. I’ve worked up a patch and will release it next week.


#3

That’s great news – thanks for the update!


#4

Hi,
trying to use that method and gives no data
{“error”:“NO_DATA No data found for CCA940-1509949537-airline-0315”}


#5

That flight is still in the future, so there is no positional data for it yet.


#6

Something strange happened, I was sured that I had picked a random flight from your site http://flightaware.com/live/ and then queried the FlightInfoStatus, and with the result ident queried GetFlightTrack… so it wasn’t in the future.

Just to have sure, I have repeated now the test with another random flight ocurring at this exact moment (UAE31), and it returned this ident UAE31-1510035986-airline-0234 wich I used in GetFlightTrack. Again, no data found.

Is there a bug, or I’am missing something?
Thanks.


#7

EDIT:
I was firstly quering FlightInfoStatus with the param howMany=1, and I didn’t realized that I was really obtaining a flight that was planned to ocurr days later. So, my bad, my appologies. The GetFlightTrack method is working as expected.

My question now is if there is any way to obtain the current flight (that is really flying right now) given the ident UAE186, for example.
This way it gives me a list of flights with that ICAO code and flight number, but I have to filter in my side by departure date time like today to obtain that unique record. For that, howMany must be superior than 1, since the method returns the list of flight ordered from newest to oldest. If there is not possible to obtain the current flight from one query, I am assured that the param howMany=15 (1query) is sufficient to give me the current flight in the list?

Thanks again.


#8

You should probably make a new thread if you have additional questions because they’re focused on using the API and not on the bug I identified – which is now resolved.

if there is any way to obtain the current flight (that is really flying right now) given the ident UAE186
I have to filter in my side by departure date time like today to obtain that unique record
If there is not possible to obtain the current flight from one query, I am assured that the param howMany=15 (1query) is sufficient to give me the current flight in the list?

Seems like you have it mostly figured out. Just use FlightInfoStatus with, say, howMany=15, and loop through the results looking for status that contains “En Route”


#9

Yes, that the recommended strategy, though checking the timestamp fields for (actualdeparturetime != 0 and actualarrivaltime == 0) is probably safer than relying on the status string.


#10

Thanks for your help @bovineone and @phumflyer


#11

Hi Again,

Regarding the stategy to check if a plane is at the skies, Can I also check if is “en route” checking progress_percent? If the value is >0 and <=100, then is flying.


#12

The progress_percent will not be a meaningful value for “position-only” flights that lack a flight plan and we are unable to determine what the destination of the flight is.


#13

Yeah a better way to check if it’s in flight is to verify that actual_departure_time is not 0 or -1 and actual_arrival_time is 0 or -1 and cancelled and diverted are false.


#14

Thanks. I’m clarified on this.