OSTK - Nifty OpenSky tools with good vibes
OSTK (OpenSky ToolKit) provides advanced trajectory reconstruction tools for OpenSky Network ADS-B data, through CLI or Python. It offers enhanced trajectory accuracy through improved CPR decoding.It also includes an LLM-powered agent for natural language queries.
Features
- Accurate trajectory reconstruction from raw ADS-B messages with enhanced CPR decoding
- Outlier filtering for cleaner trajectories
- LLM-powered agent for natural language OpenSky queries
- Command-line interface for trajectory queries and configuration management
- Built on pyopensky's Trino interface with caching support
All can be accessed though your terminal console:
# get trajectory rebuild from raw ADS-B messages
ostk trajectory rebuild ...
# get historical trajectory data with various filters
ostk trajectory history ...
# download historical data via natural language
ostk agent console
or python API:
from ostk import rebuild
flight = rebuild(icao24, start, stop)
from ostk import Agent
agent = Agent()
params = agent.parse_query("...")
flight = agent.execute_query(params)
Installation and configure
Install via pip:
pip install ostk
Configure OpenSky credentials (for pyopensky):
# set credentials
ostk pyopensky config set
# show config
ostk pyopensky config show
Quick Start
Rebuild Trajectory
from ostk import rebuild
# Rebuild trajectory from raw ADS-B messages
df = rebuild(
icao24="485A32",
start="2025-11-08 12:00:00",
stop="2025-11-08 15:00:00"
)
Returns a pandas DataFrame with columns: time, icao24, lat, lon, baroaltitude, velocity, heading, vertrate
LLM Agent
from ostk import Agent
# Initialize agent
agent = Agent()
# Parse natural language query
params = agent.parse_query(
"Download flights from Amsterdam Schiphol to London Heatharow on Nov 8, 2025 between 13:00 and 15:00"
)
# Execute and get results
df = agent.execute_query(params)
Command Line
Rebuild Trajectory
# Rebuild trajectory from raw ADS-B messages
ostk trajectory rebuild --icao24 485A32 --start "2025-11-08 12:00:00" --stop "2025-11-08 15:00:00" -o trajectory_rebuild.csv
Download History Trajectory
# Download historical data with icao24 filter
ostk trajectory history --start "2025-11-08 12:00:00" --stop "2025-11-08 15:00:00" --icao24 485A32 -o trajectory_history.csv
# Download historical data with airport filters
ostk trajectory history --start "2025-11-08 13:00:00" --stop "2025-11-08 15:00:00" --departure-airport EHAM --arrival-airport EGLL -o trajectory_history.csv
LLM Agent
# set OpenAI API key for LLM agent
ostk agent config set-key
# launch OSTK LLM agent
ostk agent console
Setup LLM Agent
To use the LLM-powered agent, config your OpenAI API key:
ostk agent config set-key
The follow the instruction to input your OpenAI API key. The config file locations are:
- Linux/macOS:
~/.config/ostk/settings.conf - Windows:
%LOCALAPPDATA%\ostk\settings.conf
Documentation
- CLI Reference - Detailed command-line usage
- Python API - Complete API documentation
- Examples - Usage examples and comparisons
- Agent Guide - LLM agent usage
How Does Trajectory Rebuild Work?
The rebuild() function reconstructs trajectories by:
- Querying raw position and velocity messages from OpenSky's database
- Pairing odd and even CPR frames for accurate global position decoding
- Validating positions with reference points to filter outliers
- Merging position and velocity data with temporal alignment
When to use rebuild() vs pyopensky.trino.history():
| Feature | rebuild() | history() |
|---|---|---|
| Accuracy | Higher (raw CPR decoding) | Standard (pre-computed) |
| Outliers | Fewer (with validation) | More common |
| Speed | Slower (decoding overhead) | Faster (direct query) |
| Filtering | icao24 + time only | Full filtering support |
Use history() for faster queries with complex filtering, however with many outliers. Use rebuild() for maximum accuracy and fewer outliers.
Authors
- Junzi Sun (j.sun-1@tudelft.nl)
Related Projects
License
MIT License
Metadata
Release files for ostk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ostk-0.1.0.tar.gz | 19.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ostk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.0 kB
Release files / ostk-0.1.0.tar.gz
| Download URL | ostk-0.1.0.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1da39133c4b1234a13ffd8fba1d438656b51e3f67b3baed332c107cf5eac9a66
|
|
BLAKE2b-256 checksum How to use checksums |
2a94c6b95748eb943d019ccd76dbb3608495abf48e958967a6500ddd9ae2481b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.9
|
Release files / ostk-0.1.0-py3-none-any.whl
| Download URL | ostk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75eb1be66181ca07eac412061e3d9c78beb567e6eefbd0748d00f9172953402e
|
|
BLAKE2b-256 checksum How to use checksums |
d79bfe0e03aa9f4f9f52947e7fc730ec27a143d8ef0bb90c93ce05a3a4448754
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.9
|
Security for ostk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.