From 5b2ca25b041acbe3d8e7bbf19549df534b77c2a8 Mon Sep 17 00:00:00 2001 From: Enrico Spinielli Date: Wed, 12 Jun 2024 22:39:47 +0200 Subject: [PATCH] added example where origin/destination columns are selected when airport is passed in history() call (#449) --- docs/data_sources/opensky_db.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/data_sources/opensky_db.rst b/docs/data_sources/opensky_db.rst index c16acbc8..28b11c48 100644 --- a/docs/data_sources/opensky_db.rst +++ b/docs/data_sources/opensky_db.rst @@ -93,6 +93,27 @@ Then you may send requests: callsign="AIB%", ) +- based on airport (with origin/destination ICAO id): + + .. code:: python + + # flights from and to Zurich airport + t_lszh = opensky.history( + start="2024-03-15 09:00", + stop="2024-03-15 11:00", + airport="LSZH", + selected_columns=( + # colums from StateVector4 (quoted or not) + StateVectorsData4.time, + 'icao24', 'lat', 'lon', 'velocity', 'heading', 'vertrate', + 'callsign', 'onground', 'alert', 'spi', 'squawk', 'baroaltitude', + 'geoaltitude', 'lastposupdate', 'lastcontact', 'serials', 'hour', + # (some) columns from FlightsData4: always quoted! + # returned as columns 'estdepartureairport' and 'estarrivalairport' + 'FlightsData4.estdepartureairport', 'FlightsData4.estarrivalairport'), + ) + + - based on (own?) receiver's identifier: .. code:: python