Ballistic Python Bindings
High-fidelity orbital trajectory prediction with sub-meter accuracy over one hour (C++23 core, nanobind bindings).
Installation
pip install ballistic-orbit # imported as `ballistic`
Wheels exist for CPython 3.12 on Linux x86_64, Windows x86_64 and macOS (arm64, x86_64). Elsewhere, build from source:
From Source
# Prerequisites: CMake 3.20+, a C++23 compiler (GCC 13+, Clang 16+ or
# MSVC 2022; CI covers Linux today), and uv
# (Eigen 3.4 is fetched automatically if not installed system-wide.)
# Option 1: editable install via uv (recommended)
uv venv --python 3.12
uv pip install -e ./python
# Option 2: build the extension via CMake directly
cmake -S . -B build -DBALLISTIC_BUILD_PYTHON=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
# Option 3: build a wheel
uv build ./python --wheel
The package contains no NRL code. Model-based drag needs the NRLMSIS 2.1 atmosphere and the HWM14 wind, a separate plugin licensed for research, academic and non-profit use only (NRLMSIS 2.1, NRL-SOF-014-1; commercial use is not permitted). Install it once, after reading the terms:
ballistic.install_nrl_models() # prints the terms, installs nothing
ballistic.install_nrl_models(accept_license=True) # downloads it from the GitHub release
ballistic.install_nrl_models(accept_license=True, source="ballistic_nrl-linux-x86_64.so") # offline
Without it, make_drag_environment and the from_models_* generators raise
ConfigError saying how to install it, recommended_config leaves drag off
with one warning, and everything else works, including drag from measured
density (from_accelerometer_density). ballistic.nrl_models() and
ballistic.doctor() say whether it is installed.
Quick Start
import ballistic
ballistic.load() # Earth orientation, leap seconds, space weather, ocean tides (cached)
# The start state names its frame. Here: Sentinel-1A from an ESA precise orbit,
# Earth-fixed (ITRF) position [m] and velocity relative to the Earth [m/s].
epoch = ballistic.Epoch.from_utc(2026, 1, 5, 11, 59, 42.0)
state = ballistic.State.from_itrf(epoch,
[-858245.729566, 3986052.969605, -5790116.906923],
[851.699434, 6256.268159, 4183.014931])
# The best measured configuration for this satellite (radiation pressure and
# drag from its registered properties). Your own satellite: mass_kg=,
# srp_area_m2=, drag_area_m2=.
config = ballistic.recommended_config(state, "S1A")
traj = ballistic.Trajectory(state, config)
traj.propagate_for(3600.0)
print(traj(1800.0).position) # Earth-fixed position 30 minutes after the start [m]
State also has from_gcrs, from_j2000, from_keplerian, from_sp3 and
from_tle. Each constructor checks its input (kilometers for meters, a point
below the ground, an inertial velocity passed as Earth-fixed).
ballistic.doctor() (or python -m ballistic doctor) reports which data
files are loaded and runs a short self-test.
Batch Processing
import ballistic
ballistic.load()
epoch = ballistic.Epoch.from_utc(2024, 1, 15, 12, 0, 0)
states = [
ballistic.State.from_itrf(epoch, [6778137.0, 0.0, 0.0], [0.0, 7175.0, 0.0]),
ballistic.State.from_itrf(epoch, [6878137.0, 0.0, 0.0], [0.0, 7120.0, 0.0]),
]
batch = ballistic.Trajectory(states)
batch.propagate_for(3600.0) # each member from its own epoch
f = batch() # vectorized queries
r = f(1800.0) # r.position, r.velocity: (N, 3) numpy arrays
Accuracy
1-hour prediction error against precise orbits (details and reproduction
commands: docs/validation_claims.md):
| Regime | Satellites | 1-Hour RMSE |
|---|---|---|
| LEO | Sentinel-1/2/3/6, recommended configuration [SENTINEL-YEAR-2025] [SENTINEL-YEAR-JAN26] [SENTINEL-YEAR-SEP26] |
0.22-0.24 m |
| MEO | LAGEOS-1/2, Etalon-1/2 [SLR-1H] |
0.15 m |
| MEO | GPS (no radiation pressure model) [GNSS-1H] |
0.67 m |
| IGSO | QZSS (no radiation pressure model) [GNSS-1H] |
0.74 m |
| GEO | BeiDou (no radiation pressure model) [GNSS-1H] |
0.81 m |
API Reference
Core Classes
Epoch- Time representation with named scales (UTC, TT, TAI, GPS, TDB, UT1)State- A start state with its frame named and checkedTrajectoryConfig- Propagator configuration (frozen; change a copy withreplace)Trajectory- Single or batch propagation with history and interpolationrecommended_config- The best measured configuration for a satellite
Enums
TimeScale- UTC, TT, TAI, TDB, UT1, GPSPropagationFrame- GCRSIntegratorType- RK45, YOSHIDA6, YOSHIDA8ITRFRealization- ITRF2000, ITRF2005, ITRF2008, ITRF2014, ITRF2020InterpolationFrame- ECEF, GCRSAltitudeCondition- Above, BelowPropagationDirection- Forward, Backward
Modules
The top-level ballistic holds what a first session needs. Specialized
tools are one import away:
from ballistic.estimation import estimate_ea_bspline, PositionSamples # fit an empirical acceleration
from ballistic.estimation import estimate_ea_smoother, RadarObs # sensor fusion
from ballistic.drag import from_accelerometer_density, parse_density_table # measured density
from ballistic.aero import AeroBeta, AeroShape, FlowRegimeCd # reentry drag coefficient
from ballistic.readers import parse_eof_auto, check_velocity_records # orbit products
from ballistic.tle import parse, Sgp4, tle_grade_preset # TLEs and SGP4
import ballistic.sp3 # SP3 orbit files
A name that used to be top level raises RemovedApiError naming its new
import (docs/MIGRATION.md). The full reference is docs/API_REFERENCE.md.
License
The package is MIT and contains no NRL code. Model-based drag
(make_drag_environment, from_models_*, and recommended_config when it
turns drag on) runs NRLMSIS 2.1 from the separately installed plugin, so
using it is subject to NRL's license NRL-SOF-014-1 (research, academic and
non-profit use only); propagation without drag and drag from measured density
(from_accelerometer_density) do not use it. HWM14, in the same plugin, is
included on the project's reading that it is a U.S. Government work.
install_nrl_models shows the terms before installing; THIRD_PARTY_NOTICES.md
has the details.
Metadata
Release files for ballistic-orbit 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| ballistic_orbit-0.1.2-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for ballistic_orbit-0.1.2-cp312-cp312-win_amd64.whl |
| ballistic_orbit-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details for ballistic_orbit-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl |
| ballistic_orbit-0.1.2-cp312-cp312-macosx_11_0_x86_64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ x86-64 | Details for ballistic_orbit-0.1.2-cp312-cp312-macosx_11_0_x86_64.whl |
| ballistic_orbit-0.1.2-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details for ballistic_orbit-0.1.2-cp312-cp312-macosx_11_0_arm64.whl |
Total release size: 43.0 MB
Release files / ballistic_orbit-0.1.2-cp312-cp312-win_amd64.whl
| Download URL | ballistic_orbit-0.1.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ce4aa1f1bcf1e7e5782d63b526a9fe6003f1ffc8f003322e9859ef30d44cda2a
|
|
BLAKE2b-256 checksum How to use checksums |
7d0ede36c1735b9231f6163a6705803bc826c0c4940e37dd66a3641d1ce289f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / ballistic_orbit-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | ballistic_orbit-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 10.9 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4be2fc64c067848873122775e45f2a5ec9015127998dc92aeab37e8d947be2a8
|
|
BLAKE2b-256 checksum How to use checksums |
df692c44e52d5d7490cdd37d3bb06b034aa6f2c20b375112b34ca2b2b2a0214a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / ballistic_orbit-0.1.2-cp312-cp312-macosx_11_0_x86_64.whl
| Download URL | ballistic_orbit-0.1.2-cp312-cp312-macosx_11_0_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.12 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
2f2c19c78415d710fd69b4b8b54930999f9ca692178e41cdc37d31bb7c47335a
|
|
BLAKE2b-256 checksum How to use checksums |
f94a22a2b1920653cc3bc72e9f5e25012963d047c5e5ef1527bf2196e59a4033
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / ballistic_orbit-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | ballistic_orbit-0.1.2-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4f98e19cdc1d571e83b8fb5a042860b4811edf790efbb8b64909e9c3c90f84c8
|
|
BLAKE2b-256 checksum How to use checksums |
9667e893767a83b53edc0e003d4961c017f2395861e34d8b3b7462bad5a19656
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for ballistic-orbit 0.1.2
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.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for ballistic_orbit-0.1.2-cp312-cp312-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.