FlightAware Discussions

Best way to find inbound flight data XML3.0

I have an App that shows flight information to crew members and I want to find the inbound flight info for flights. I am using FlightXML 3.0

The data I have is:
airline name
aircraft tail number
city pair, date and times, flight number

I’m currently sending a request to without ‘howmany’:
https://flightxml.flightaware.com/json/FlightXML3/FlightInfoStatus?ident=TAILNUMBER

Which returns an array of flights

I find the OUTBOUND FLIGHT by city pair, flight number and date, then I get it’s inbound flight id, then I look for the outbound flight via flightID in the same array.

Sometimes this does not work because flight aware doesn’t seem to have the inbound flight id, or didn’t supply the inbound flight in the response.

So, I’m asking what’s the best way to get inbound flight info when I have all the data for the outbound flight?

Thanks

Chad

In cases where the the inbound flightID is not stated it usually involves a case where the is an unresolved schedule conflict from advanced filing data that makes FlightAware unable to provide a reasonable inbound faFlightID until more information is received.

An example is currently visible for tail N7722B. It’s unlikely that the aircraft could operate two routes at the nearly same time.

Ident    Reg       Orig   Dest    Dep            Arr
SWA217   N7722B    MNUN   KMDW    Nov 10 18:05   Nov 10 21:30
SWA3324  N7722B    KLAS   KHOU    Nov 10 17:55   Nov 10 20:35
SWA828   N7722B    KFLL   MMUN    Nov 10 15:10   Nov 10 16:50

Thanks for the response. My users will be looking for the inbound flight within a couple hours of the outbound flights departure time … the inbound flight is most likely airborne so the data should be there.

I have changed the algorithm to this:

  1. Find the outbound flight in the array of flights returned
  2. If it has an inbound flightID then return that flight
  3. If not find the inbound flight by matching:
    a) tail numbers
    b) inbound destination == outbound departure airport -> Add that flight to list of possibilities
    c) For each possibility select the one with the smallest difference between the possible’s arrival and outbound departure time, make sure the difference is less than 10 hours

This should work provided that PAST FLIGHTS are present. However, on some requests there are NO PAST FLIGHTS present … which doesn’t make sense because that inbound airplane is AIRBORNE …

If FlightAware cannot provide the inbound flight in these situations then I will be looking for a different data provider.

Any help is GREATLY appreciated.

Thanks in advance