Skip to content

Commit

Permalink
added example where origin/destination columns are selected when airp…
Browse files Browse the repository at this point in the history
…ort is passed in history() call (#449)
  • Loading branch information
espinielli authored Jun 12, 2024
1 parent 0943dbe commit 5b2ca25
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/data_sources/opensky_db.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b2ca25

Please sign in to comment.