brahe is an open-source astrodynamics project that aims to solve this problem: to empower engineers and researchers to use the highest‑fidelity models, with the speed of simpler ones, without adding complexity.
Fast
-- core, -- bindings
Cross-platform
Linux, macOS and Windows
Free
-- licensed
pip install brahe
The modules in brahe
I have rewritten this project five times since 2014
Design choices in brahe
SI units everywhere
Meters, seconds and kilograms in and out of every function. Angles state degrees or radians.
Composable pieces
Propagators, force models, access constraints and event detectors are separate objects you combine.
Make users explicitly invoke magic
You state each model choice precisely. Once invoked, brahe handles the complexity of using it.
Performance optimization abstracted
Compiled Rust, threading and whole-array calls sit behind ordinary Python functions.
Every documentation example runs
Each example in the documentation is compiled and run on every commit, so the docs match the code.
The documentation has worked examples and a full API reference
Examples: worked problems, start to finish
API reference: every class and function, with examples
100,000 states between frames in one call, and by frame name
snippets/mod_frames.py · output and run time (imports excluded) from scripts/snippet_outputs.py · brahe 1.8.1 documentation, brahe.space
Orbits
Supports
Elements
Keplerian and equinoctial elements, anomalies
Period, apsides, sun-synchronous inclination
Osculating to mean: Brouwer-Lyddane (first-order J2) or numerical averaging
Element sets
TLE and 3LE parsing; TLE generation
Alpha-5 catalog numbers
GP records (OMM) to SGP4 or numerical propagators
Constellations
Walker Delta and Walker Star generators
A Keplerian, SGP4 or numerical propagator per satellite
A GPS-like Walker constellation from one builder call
snippets/mod_orbits.py · output and run time (imports excluded) from scripts/snippet_outputs.py · brahe 1.8.1 documentation, brahe.space
Propagation
Supports
Propagators
Keplerian, SGP4, numerical orbit, general ODE
Many propagators in parallel in one call
Events: eclipse, nodes, altitude, any function
Force models
Gravity: EGM2008 to 120, GGM05S to 180, JGM3, ICGEM
Drag: NRLMSISE-00, Harris-Priester, exponential
Cannonball SRP, cylindrical or conical eclipse
Sun, Moon, planets (DE440); relativity; tides
Integrators and variational equations
RK4, RKF45, DP54, RKF78, RKN1210
State transition matrix, sensitivity, covariance
One day at GPS altitude with 80×80 gravity, Sun, Moon, relativity and the STM
snippets/mod_propagation.py · output and run time (imports excluded) from scripts/snippet_outputs.py · brahe 1.8.1 documentation, brahe.space
Access
Supports
Locations and satellites
Point and polygon ground locations, GeoJSON
Any propagator or trajectory
Many locations and satellites in parallel
Constraints
Elevation, elevation mask, off-nadir, azimuth, range
Local time, look direction, ascending or descending
All, Any, Not, and custom Python constraints
Window properties
Open, close, duration, azimuth, elevation
Doppler, range and range rate, or your own
Every KSAT ground station against one satellite for a day
snippets/mod_access.py · output and run time (imports excluded) from scripts/snippet_outputs.py · brahe 1.8.1 documentation, brahe.space
Data clients
Supports
GNSS orbit products
IGS products from CDDIS, Garner (SIO) and BKG
SP3 versions a to d read, version d write
Orbit catalogs
CelesTrak GP and SATCAT
Space-Track GP, GP history, SATCAT, CDM
Starlink public ephemerides
Reference data
NAIF SPICE kernels, DE440 and others
Ground station networks: KSAT, AWS, NASA NEN and more
IERS EOP, CSSI space weather, ICGEM gravity
Message formats
CCSDS OEM, OMM, OPM, CDM, APM, AEM
List and read an IGS rapid orbit from the BKG mirror
snippets/mod_data.py · output and run time (imports excluded, product already in the local cache) from scripts/snippet_outputs.py · brahe 1.8.1 documentation, brahe.space
Estimation
Supports
Estimators
Extended Kalman filter, Joseph-form update
Unscented Kalman filter
Batch least squares with consider parameters
Measurement models
Inertial and ECEF position, velocity and state
Azimuth, elevation and range from a ground sensor
Custom models in Python
Dynamics and noise
Any force model, with the state transition matrix
Process noise from a user Q matrix, scaled with time
An extended Kalman filter fed thirty position observations
snippets/mod_estimation.py · output and run time (imports excluded) from scripts/snippet_outputs.py · brahe 1.8.1 documentation, brahe.space
Download public GPS orbit elements and plot ground tracks
Ground tracks of -- of the -- GPS satellites in the public GP catalog, one per orbital plane, starting at the talk time
Public GP element sets, propagated with SGP4 · snippets/ground_tracks.py · full analysis in scripts/quick_hits.py
Propagate an orbit with two-body and full force-model dynamics
--: the two predictions are -- km apart after -- days, and drag alone moves it -- km
brahe default force model · snippets/force_model.py · full analysis in scripts/quick_hits.py
How far is the public TLE from the precise orbit for the same GPS satellite?
RMS difference over -- hours
--km
Largest difference
--km
-- (NORAD --): GP elements from -- (epoch --) with SGP4, against the IGS ultra-rapid orbit -- · snippets/tle_vs_sp3.py · full analysis in scripts/tle_vs_sp3.py
Move the receiver from Stanford to the ISS by changing one argument
The -- at the talk time, about -- km up, with lines of sight to the -- GPS satellites it sees above a --° mask
ISS GP elements from -- with SGP4 · IGS ultra-rapid orbit -- · drawn to scale · snippets/leo_receiver.py · full analysis in scripts/leo_receiver.py
GPS satellites in view of the ground station and the ISS over the next -- minutes
With the same --° mask and a zenith antenna, the ISS sees slightly fewer GPS satellites than the ground station: -- against -- on average.
ISS GP elements from -- with SGP4, station on the Stanford campus, one sample every -- s · scripts/leo_receiver.py
Can you use GPS from above the GPS constellation?
Distance from Earth's center
--Earth radii
GPS satellites in the main lobe
--
In the main or side lobes
--
Geometric visibility, no link budget
-- over one orbit, --, to scale with the Earth and the GPS orbit radius
-- GP elements from -- with SGP4; GPS from IGS rapid orbits; transmit pattern after Donaldson et al. (NAVIGATION, 2020; ION GNSS+ 2018) · scripts/mms_visibility.py
GPS satellites usable by -- against distance from Earth's center
Share of orbit with -- or more in the main lobe
--%
Share of orbit with -- or more in main or side lobes
--%
Geometric visibility, no link budget
-- over one orbit, --, one sample every -- minutes · scripts/mms_visibility.py
Generate a Walker constellation and propagate every satellite in parallel
-- satellites in -- planes at -- km and --°, propagated for one orbit (-- minutes) with --
Serial loop
--s
Parallel
--s
Threads
--
Speedup
--×
Integrator -- · wall-clock times on the build machine · snippets/walker.py · full analysis in scripts/walker_pnt.py
Mean satellites in view by latitude, one Walker shell against GPS
The --° shell has more satellites in view than GPS between about --° and --° latitude and fewer elsewhere: -- against -- at the equator and -- against -- at --°.
--
Time per gravity evaluation against degree and order, serial and parallel
Degree --, serial
--µs
Degree --, parallel
--µs
Degree --, serial
--µs
Degree --, parallel
--µs
From degree -- up, brahe splits the per-order sums across threads automatically.
Measured through brahe's numerical propagator with a gravity-only force model (--), -- to degree --, -- kernel, parallel mode forced off and on. Each value includes about -- µs of integrator and frame-rotation overhead. Lines are medians of -- passes of -- runs per degree; bands span the middle half.
--, brahe thread pool of -- · scripts/gravity_crossover.py
Median run time of common tasks in other libraries, relative to brahe
brahe from Python takes -- times its Rust time on the -- tasks above -- µs and -- times on the -- microsecond-scale tasks. Another library is faster than brahe (Rust) on -- of the -- tasks in the run, listed in the backup.
brahe comparative benchmark suite, run -- · -- · -- · median of -- iterations · -- · -- (open circle) starts one process per call, about -- s, and is shown where its time is at least -- times that · scripts/benchmarks.py
The modules in brahe, after these examples
Organizations that use brahe
Planned work in brahe, and how you can get involved
On the roadmap
GNSS orbit determination support, reading RINEX observation and navigation files
Estimation with a choice of process noise models
GPU acceleration: Astrojax, an experimental GPU-accelerated framework in JAX. SGP4 at -- billion propagations per second on -- GPUs, about -- times the Rust sgp4 crate on -- CPU threads
How you can get involved
Share data: sources of orbital observations that can be shared for development and testing