OpenSky Network is a non profit project which
[...] consists of a multitude of sensors connected to the Internet by volunteers, industrial supporters, and academic/governmental organizations. All collected raw data is archived in a large historical database. The database is primarily used by researchers from different areas to analyze and improve air traffic control technologies and processes.
-- Description from https://opensky-network.org/about/about-us
Essentially, each airplane uses a transponder to transmit data regarding their status (squawk) as well as their callsign and current position. All this information is collected by OpenSky Network and made available though their APIs.
The underlying idea of this example is that each flight (i.e., an airplane callsign) represents the instance of a flight process. The different squawks a plane goes through indicate the activities involved in the process.
To achieve this goal, it is necessary to write a new source which periodically queries the OpenSky Network APIs to retrieve the live status of airplanes in a certain area. First it's necessary to create the actual source and initialize the
openskyCredentials.propertiescontaining username and password for accessing the APIs.
Once the system is properly connected to the APIs, then in the
run method it is possible to define a separate thread in charge of querying the APIs every 15 seconds and put the events into a buffer which is then used for dispatching them. In the case highlighted the APIs are queried to retrieve flights over the central Europe (lines 19-20). In addition the squawks are parsed to provide some more understandable interpretation (according to the interpretation reported here https://www.flightradars.eu/squawkcodes.html, the actual code of method
squawkToString is omitted in this page but is available on the GitHub repository).
A simple consumer, in this case the Trivial discovery miner, can then be attached to the source with:
After running the system for about a few minutes, the following map was produced, where essentially only transit squawks were observed:
The complete code of this example is available in the GitHub repository https://github.com/beamline/examples/tree/master/src/main/java/beamline/examples/opensky.
- Bringing Up OpenSky: A Large-scale ADS-B Sensor Network for Research.
Matthias Schäfer, Martin Strohmeier, Vincent Lenders, Ivan Martinovic and Matthias Wilhelm.
In Proceedings of the 13th IEEE/ACM International Symposium on Information Processing in Sensor Networks (IPSN), pages 83-94, April 2014.