An open API service indexing awesome lists of open source software.

https://github.com/merobi-hub/get-local-flights

Get info about flights in a bounding box using the OpenSky API
https://github.com/merobi-hub/get-local-flights

aviation opensky-api opensky-network

Last synced: 3 months ago
JSON representation

Get info about flights in a bounding box using the OpenSky API

Awesome Lists containing this project

README

        

# Flights

IFOs in your bounding box from the OpenSky API

### Description

A script for streaming IFOs in a country's airspace or other defined area from the
[OpenSky API](https://openskynetwork.github.io/opensky-api/rest.html).

### How to Use

Execute `flights.py` with an OpenSky username and password, passing in either one
of the preconfigured area options ('Barrington', 'Nayatt', 'RI', 'NY'), setting
a custom bounding box using the `--lamin`, `--lomin`, `--lamax`, and `--lomax`
arguments, or passing in an ISO country code (e.g., 'ES'). To turn on terminal
output, set the `-t` flag. By default, the script returns an array of the collected
flights.

Using a custom bounding box:

```
$ python3 flights.py -b --lamin 41.146 --lomin -71.862 --lamax 42.018 --lomax -71.120 --username username --password password
```

Using one of the preconfigured area options:

```
$ python3 flights.py --area RI --username username --password password
```

Using an ISO country code:

```
python3 flights.py --iso ES --username username --password password
```

Turning on terminal output, not requesting an array, and limiting requests to 2:

```
$ python3 flights.py --limit 2 --no-array -t --area RI --username username --password password
```

### Prerequisites

OpenSky account
Python 3.10.7

### License

MIT License