Sunday, 19 April 2015

The Air Traffic

From my experience, basically any talk about High Altitude Ballooning with someone uninitiated eventually wanders to a question about airplanes and the possibility of a collision. To understand an issue, I myself always like to see an illustration or a visualization of some kind to help me understand a problem, rather then just listen to or read a list of facts. For such reason, I decided to use the data I had from my last year's HAB, Google Earth and FlightRadar24's flights database, and make a visualization that would illustrate the situation with high altitude balloons.
Plotting the TT7's trajectory wasn't really a problem, because the Habitat database outputs telemetry data right in a KML file used by Google Earth. On the other hand, getting airplane data seemed a bigger issue. The first think to come to my mind was FlightRadar24, an awesome site with real-time air traffic coverage from all around the world. But how to get the raw data? After some time of googling, I found a blog article describing the inner workings of FlightRadar24's iPhone app and the way the app communicates with the main database. The article presented the structure of  URLs that the app uses and as a result receives raw air traffic data from a specific quadrant above the Earth. I personally used this one to get the current data in my area. Now, since this way I could access only current data and the FlightRadar24's playback feature, as far as I know, provides only 2 weeks of history, I decided I'd get at least something. So the illustration uses air traffic data from Thursday April 16, 2015 and overlays it with TT7's trajectory from Tuesday September 16, 2014. Lacking a script or the ability to write one at that moment, I got the data the hard way. Every 5 minutes I would refresh the URL and save the data, then parse it into the proper KML format manually. In the end, I had the times and positions of more than 200 planes that over the duration of 3.5 hours entered a defined area.
The data is used in an animation that one can play, stop or replay while flying around and examining the scene from different angles and distances. I also made a tour KML file that when played with the animation at the same time takes care of the flying around and showing the scene from different perspectives.
A flat picture doesn't do the justice to the actual dynamics of the 3D space and the time factor involved, but at least to show something here, TT7 closing on the 10-12km altitude where most of the traffic takes place. A side view of the trajectory also nicely illustrates how small an area it is vertically where one might see some closer (still in the range of kilometers) approach.

For those who don't have, or don't want to bother with Google Earth, here is a video illustration from a few different angles. But I recommend downloading the KML files and playing with it yourselves.

TT7 High Altitude Balloon.kml
TT7 Air Traffic Tour.kml

The first file includes the animations. The second file makes the user's point of view fly a specific trajectory around the scene. Simply start the tour file and a couple of seconds later the animations.

Some thoughts for the future. I should explore the means of getting the FlightRadar24 data automatically. And I should also look into pulling the historical data from the database to have the actual air traffic data that will have taken place when I launch my next HAB. Grabbing data every 5 minutes manually while launching and tracking a balloon might be a little inconvenient :-).

No comments:

Post a Comment