Searching for air traffic inside a region for a 24h period

Hi all,

I’m hoping someone could help me with using FlightXML. I’m interested in getting all traffic that enters/exits a particular region over a 24-hour period.

I’m interested in a region defined by MIN_LAT, MAX_LAT, MIN_LON, MAX_LON, and I want minute-by-minute position data for all air traffic inside that box. I’m thinking I do this (pseudocode):



for (time =  UNIX_T_START; time < UNIX_T_END; time += 60){
    SearchBirdseyePositions({range lat MIN_LAT MAX_LAT} {range lon MIN_LON MAX_LON} {clock time})
}


Is this doing what I’m thinking? Get all air traffic bounded by the range at the specified snapshot in time.

Thanks!

Close. You would probably want the query expression to specify the time range as well:


"{range lat MIN_LAT MAX_LAT} {range lon MIN_LON MAX_LON} {range clock START_TIME END_TIME}"

Where the START_TIME is time, and END_TIME is time+60.

Great, thanks! Is there a way to tell what the earliest available time is that the data goes back for? The documentation says “about 24 hours” but I’d basically like to scrape as much as I possibly can and not make assumptions about how far back I can or can’t go.

Flights and their positions are guaranteed to be accessible by SearchBirdseyeInFlight only while the flight is still enroute. Once a flight lands, it becomes eligible for being garbage collected as memory consumption increases and more space is needed for other flights. We tentatively size the memory pool to try to accomodate about 24 hours, but sometimes it’s more, sometimes it’s less depending on flight traffic volume that day.

If you need 24 hour data, then it would probably be better to allow your application to run continuously over that 24 hour period and collect the data shortly after it has occurred, rather than just running it once a day and collecting it all at once.

If this is something you expect to need on a long term basis for a very large volume of airspace, then it may make sense to consider our Firehose streaming API service, allowing you to receive each position as we receive them.

OK, that works. In this case, would the call then just be something like



    SearchBirdseyePositions({range lat MIN_LAT MAX_LAT} {range lon MIN_LON MAX_LON} {range clock NOW-60 NOW})


and rinse/repeat?

EDIT: Actually, if this needs to run live for 24 hours to collect the data, we could simplify this call even more:



    Search(-latlong "MIN_LAT MIN_LON MAX_LAT MAX_LON" -inAir 1


right?

Either would work.

However, using Search will only return at most one position per aircraft, while SearchBirdseyePositions would let you receive all positions for the specified time range (which you could potentially make longer than just 60 seconds).