FlightInfoEx inconsistent with website

Hi,

I’m using FlightInfoEx to try to retrieve flights for specific tail numbers for up to the last two weeks (as indicated it can go up to by the documentation for the method), but not all of the flights are returning correctly. For example, I just made a request for tail number “N853GT” (with a current timestamp of 1468432193) and got the results as follows:

Current tailnum: N853GT
(FlightInfoExStruct){
next_offset = -1
flights] =
(FlightExStruct){
faFlightID = “N853GT-1468396827-adhoc-0”
ident = “N853GT”
aircrafttype = “B748”
filed_ete = None
filed_time = 1468396827
filed_departuretime = 1468396827
filed_airspeed_kts = 0
filed_airspeed_mach = “0”
filed_altitude = 0
route = None
actualdeparturetime = 1468396827
estimatedarrivaltime = 1468401350
actualarrivaltime = 1468401350
diverted = None
origin = “L 43.96893 87.47027”
destination = “UAAA”
originName = “Urumqi, Xinjiang”
originCity = “Urumqi, Xinjiang”
destinationName = “Almaty”
destinationCity = “Almaty”
},
(FlightExStruct){
faFlightID = “PAC997-1468215949-0-2-5”
ident = “PAC997”
aircrafttype = “B748”
filed_ete = “11:15:00”
filed_time = 1468215939
filed_departuretime = 1468303740
filed_airspeed_kts = 511
filed_airspeed_mach = None
filed_altitude = 280
route = “VTU6 RZS LIBBO BRINY BOARS BOXER B453 KYLLE B453 KANUA B453 KURTT B453 KATCH B757 CJAYY B757 ONEOX R580 OFORD R341 NATES R220 NIKLL R220 NIPPI R220 NOGAL R220 NANNO ALICE Y111 MQE V22 SDE Y106 RUBIS Y10 DAIGO Y88 CHINO Y16 SAPRA Y685 GUKDO GUKDO1P”
actualdeparturetime = 1468306800
estimatedarrivaltime = 1468349036
actualarrivaltime = 1468348980
diverted = None
origin = “KLAX”
destination = “RKSI”
originName = “Los Angeles Intl”
originCity = “Los Angeles, CA”
destinationName = “Incheon Int’l”
destinationCity = “Seoul (Incheon)”
},
(FlightExStruct){
faFlightID = “PAC916-1468104600-schedule-0000”
ident = “PAC916”
aircrafttype = “B748”
filed_ete = “04:34:00”
filed_time = 1468104600
filed_departuretime = 1468277400
filed_airspeed_kts = 489
filed_airspeed_mach = None
filed_altitude = 350
route = “ANC8 MDO B453 KATCH B453 KURTT B453 KYLLE B453 BOXER ENI OAK FLW LEENA5”
actualdeparturetime = 1468281120
estimatedarrivaltime = 1468298275
actualarrivaltime = 1468298400
diverted = None
origin = “PANC”
destination = “KLAX”
originName = “Anchorage Intl”
originCity = “Anchorage, AK”
destinationName = “Los Angeles Intl”
destinationCity = “Los Angeles, CA”
},
(FlightExStruct){
faFlightID = “PAC916-1468069800-schedule-0000”
ident = “PAC916”
aircrafttype = “B748”
filed_ete = “06:59:00”
filed_time = 1468069800
filed_departuretime = 1468242600
filed_airspeed_kts = 488
filed_airspeed_mach = None
filed_altitude = 330
route = “TK B240 ERNIK B240 ENM ANI SLIIM SQA J179 AKGAS NEELL4”
actualdeparturetime = 1468245384
estimatedarrivaltime = 1468270728
actualarrivaltime = 1468270728
diverted = None
origin = “RKSI”
destination = “PANC”
originName = “Incheon Int’l”
originCity = “Seoul (Incheon)”
destinationName = “Anchorage Intl”
destinationCity = “Anchorage, AK”
},
(FlightExStruct){
faFlightID = “PAC966-1467697500-schedule-0000”
ident = “PAC966”
aircrafttype = “B744”
filed_ete = “06:10:00”
filed_time = 1467697500
filed_departuretime = 1467870300
filed_airspeed_kts = 361
filed_airspeed_mach = None
filed_altitude = 0
route = None
actualdeparturetime = 1467873541
estimatedarrivaltime = 1467895741
actualarrivaltime = 1467873541
diverted = None
origin = “VHHH”
destination = “UAAA”
originName = “Hong Kong Int’l”
originCity = “Hong Kong”
destinationName = “Almaty”
destinationCity = “Almaty”
},
(FlightExStruct){
faFlightID = “PAC966-1467522600-schedule-0001”
ident = “PAC966”
aircrafttype = “B744”
filed_ete = “06:10:00”
filed_time = 1467522600
filed_departuretime = 1467695400
filed_airspeed_kts = 361
filed_airspeed_mach = None
filed_altitude = 0
route = None
actualdeparturetime = 1467701741
estimatedarrivaltime = 1467723941
actualarrivaltime = 1467701741
diverted = None
origin = “VHHH”
destination = “UAAA”
originName = “Hong Kong Int’l”
originCity = “Hong Kong”
destinationName = “Almaty”
destinationCity = “Almaty”
},
(FlightExStruct){
faFlightID = “PAC956-1467499844-6-0-77:0”
ident = “PAC956”
aircrafttype = “B744”
filed_ete = “05:50:00”
filed_time = 1467499838
filed_departuretime = 1467586800
filed_airspeed_kts = 493
filed_airspeed_mach = None
filed_altitude = 330
route = None
actualdeparturetime = 1467608437
estimatedarrivaltime = 1467607810
actualarrivaltime = 1467608437
diverted = None
origin = “KCVG”
destination = “ETLS”
originName = “N Kentucky Intl”
originCity = “Covington, KY”
destinationName = None
destinationCity = None
},
(FlightExStruct){
faFlightID = “PAC956-1467413400-schedule-0000”
ident = “PAC956”
aircrafttype = “B748”
filed_ete = “07:34:00”
filed_time = 1467413400
filed_departuretime = 1467586200
filed_airspeed_kts = 491
filed_airspeed_mach = None
filed_altitude = 350
route = “BNGLE4 RIKLE APE CTW EWC CFB J190 ALB EBONY N325A ELSIR NATP NETKI NIBOG REMSI UL603 BASNO UL620 ARNEM UP147 RKN UL980 ROBEG T236 UPDAT T236 ADMOS T437 TAVSO TAVSO1V”
actualdeparturetime = -1
estimatedarrivaltime = -1
actualarrivaltime = -1
diverted = None
origin = “KCVG”
destination = “EDDP”
originName = “N Kentucky Intl”
originCity = “Covington, KY”
destinationName = “Leipzig/Halle”
destinationCity = “Leipzig/Halle”
},
(FlightExStruct){
faFlightID = “PAC946-1467367200-schedule-0001”
ident = “PAC946”
aircrafttype = “B748”
filed_ete = “05:51:00”
filed_time = 1467367200
filed_departuretime = 1467540000
filed_airspeed_kts = 486
filed_airspeed_mach = None
filed_altitude = 330
route = “ANC8 JOH J133 SIT ANN NAAPP J569 DORSE CTB HILGR J204 DPR MCW J90 OBK FWA DEBAR4”
actualdeparturetime = 1467543120
estimatedarrivaltime = 1467563536
actualarrivaltime = 1467563536
diverted = None
origin = “PANC”
destination = “KCVG”
originName = “Anchorage Intl”
originCity = “Anchorage, AK”
destinationName = “N Kentucky Intl”
destinationCity = “Covington, KY”
},
(FlightExStruct){
faFlightID = “PAC946-1467412248-2-0-5”
ident = “PAC946”
aircrafttype = “B748”
filed_ete = “09:10:00”
filed_time = 1467412237
filed_departuretime = 1467499200
filed_airspeed_kts = 517
filed_airspeed_mach = None
filed_altitude = 350
route = “OCEAN V3 ENVAR M750 TONGA M750 KUDOS M750 BUNGU Y81 SYOYU Y809 KAGIS A590 PUTER A590 PASRO A590 PLADO A590 PUGGY A590 HAMND NEELL4”
actualdeparturetime = 1467500234
estimatedarrivaltime = 1467534600
actualarrivaltime = 1467534600
diverted = None
origin = “VHHH”
destination = “PANC”
originName = “Hong Kong Int’l”
originCity = “Hong Kong”
destinationName = “Anchorage Intl”
destinationCity = “Anchorage, AK”
},
}

Note the flight IDs that I marked in blue, and specifically the elements I marked in red. These flights were displayed on the FlightAware website as follows:
04-Jul-2016 B744 N Kentucky Intl (KCVG) (ETLS) 01:00AM EDT 04:50AM UTC (?) n/a
03-Jul-2016 B748 N Kentucky Intl (KCVG) Leipzig/Halle (LEJ / EDDP) 07:15PM EDT 08:45AM CEST (+1) (?) 2:08

How is the duration of the July 4th flight n/a when the flight has an actual departure time and estimated arrival time? (It seems you use these two to calculate duration when there is no actual arrival time reported.) Additionally, how was the July 3rd flight calculated when none of the info returned in FlightInfoEx corresponds to the info displayed on the website? Especially the filed_ete, which was reported as 7:34 but marked as 2:08 on the site.

Any information that clears up your data collection process will be helpful. Thanks.

EDIT: I also wanted to ask about the 2 week historical query limit on FlightInfoEx. Is the 2 weeks calculated from the current time to the actualdeparturetime of the flight, the actualarrivaltime? How is this calculated?

That particular flight (PAC956-1467413400-schedule-0000) behaved abnormally because the flight was originally filed to depart at 2016-07-03 22:50:00, but we subsequently received a cancellation message about it at 2016-07-04 01:23:07. However, we later received a very delayed message indicating that it had actually departed at 2016-07-03 23:15:00, so the flight was uncancelled and we continued tracking it.

FlightXML sees the fact that there was a cancellation for the flight and indicates “-1” for those values, even though the website has slightly different handling of this ambiguous condition. We’ll look further into the causes of the cancellation/uncancellation and additionally I will file a bug to alter the behavior of FlightXML in this condition as well.

The 2 week limit is based upon which flights are still available in our OLTP database and which haven’t been archived to our longer-term warehouse database. That migration process runs periodically and uses a 2 week threshold, but the running frequency is periodic so that results in an approximate and fuzzy cutoff.

Thanks.

Would it be safe then to have a program that runs every 1 week 6 days to capture flight information about tail numbers of interest? I’m particularly concerned with not losing any available data.

I would recommend once per week, since that will give you time to notice if your application breaks and still have time to repair/restart it.

You might also be interested in looking to Pushed Alerts so that you can be advised of when new flights for your aircraft occur. However, that mechanism should only be used to replace explicit lookup requests.