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?