The opensky.py
data generator pulls live flight information data from the OpenSky REST API 1 every 15 seconds, and uses the Kafka Python client (kafka-python
) to push events into Redpanda.
Example:
{
"icao24": "c00734",
"callsign": "WJA1468",
"origin_country": "Canada",
"time_position": 1644173486,
"last_contact": 1644173487,
"longitude": -112.5983,
"latitude": 41.6014,
"baro_altitude": 10668,
"on_ground": false,
"velocity": 256.33,
"true_track": 178.16,
"vertical_rate": 0,
"sensors": null,
"geo_altitude": 10835.64,
"squawk": "1374",
"spi": false,
"position_source": 0
}
The flight information events can be enriched with the sample aircraft reference data provided in /data
based on the icao24
field.
Example:
{
"icao24":"c00734",
"manufacturericao":"AIRBUS",
"manufacturername":"Airbus",
"model":"ACJ319 115X",
"typecode":"A319",
"icaoaircrafttype":"L2J",
"operator":"Qatar Executive",
"operatorcallsign":"",
"operatoricao":"QQE",
"built":"2009-01-01",
"categorydescription":"Large (75000 to 300000 lbs)"
}
If you make any changes to the data generator, rebuild the container using:
docker-compose build --no-cache
docker-compose up --force-recreate -d
Footnotes
-
The OpenSky Network, http://www.opensky-network.org ↩