How to determine a flight has arrived?


Is there a good way to know a flight has arrived at destination airport? I noticed from APIs, InflightInfo and Search (with Inair=0) returns a record with arrival time set and no longer updating GPS. That indicates arrival at destination. However, some of flights are still far away from destination airport because from GetLastTrack there are still a few more GPS point after. Is there an api or combination of api calls that can be called to determine that a flight has landed in airport and no more GPS updates will occur after? i’d like to track all the way to the airport.




You can check if the actualarrivaltime != 0 to see if it has arrived, and actualdeparturetime != 0 to see if it has departed. If it has departed but not arrived, then it is in flight.


Thanks. Actualarrivaltime is returned with FlightInfoEx or FlightInfo calls. This field is same as “arrivaltime” returned from inflightinfo call, right. I have noticed that the GPS data can still be updated after “arrivaltime” or “actualarrivaltime” becomes != 0. In my test case, I am polling InflightInfo, FlightInfoEx, and GetLastTrack every 30 secs for comparison.

What I found is, arrivaltime and actualarrivaltime changes in both InflightInfo and flightinfoex when the flight has gotten close to destination airport. However, sometimes I can still get more GPS data from GetLastTrack that are different from last GPS data from InflightInfo because last GPS data is still not at airport as I can see from map. In this case, next calls to FlightInfoEx will always return a non zero actualarrivaltime from this point on. However, Next calls to InflightInfo can return 0 again for arrivaltime with more GPS update and this matches behavior of GetLastTrack as its location array still grows. So actualarrivaltime seems not as reliable in these cases.

It seems to me that the best way to determine the flight has arrived is to keep calling InflightInfo until it returns consistent non zero arrival time or call getlasttrack until no more data in location array or some sort of distance calculation to destination airport. But either of these methods seem a little non deterministic as I would have to set arbitrary time to keep calling apis once I see arrivaltime changes.

This doesn’t happen to all flights just a handful of them. Is this behavior expected and that’s how we need to handle arrival in some cases? or Is there better way to do this?