satkit
Satellite astrodynamics in Rust, with full Python bindings.
Satkit is a high-performance orbital mechanics library written in Rust with complete Python bindings via PyO3. It handles coordinate transforms, orbit propagation, time systems, gravity models, atmospheric density, and JPL ephemerides -- everything needed for satellite astrodynamics work.
Documentation and tutorials (Python examples, but the concepts and API apply equally to Rust) | Rust API reference
[!NOTE] Version 0.14.1 replaces
nalgebrawithnumerisfor all linear algebra (matrices, quaternions, ODE solvers).numerisis a standalone library that unifies these in a single crate, making them available to projects beyond satkit. Performance is equivalent, and all tests pass with matching residuals. If your code usesnalgebratypes, enable thenalgebrafeature onnumerisfor zero-cost conversions. Please open an issue if you hit any problems.
Installation
Rust:
Python:
Pre-built wheels are available for Linux, macOS, and Windows on Python 3.10--3.14.
After installing, download the required data files (gravity models, ephemerides, Earth orientation parameters):
# one-time download; re-run periodically for fresh EOP/space weather
Quick Examples
SGP4 propagation (Python)
=
, =
High-precision propagation (Python)
= 6378e3 + 500e3 # 500 km altitude
=
=
=
=
Coordinate transforms (Python)
=
=
=
= *
Planetary ephemerides (Rust)
use ;
let time = from_datetime?;
let = geocentric_state?;
Features
Coordinate Frames
Full IAU-2006/2000 reduction with Earth orientation parameters:
| Frame | Description |
|---|---|
| ITRF | International Terrestrial Reference Frame (Earth-fixed) |
| GCRF | Geocentric Celestial Reference Frame (inertial) |
| TEME | True Equator Mean Equinox (SGP4 output frame) |
| CIRS | Celestial Intermediate Reference System |
| TIRS | Terrestrial Intermediate Reference System |
| Geodetic | Latitude / longitude / altitude (WGS-84) |
Plus ENU, NED, and geodesic distance (Vincenty) utilities.
Orbit Propagation
- Numerical -- Selectable adaptive Runge-Kutta integrators (9(8), 8(7), 6(5), 5(4)) with dense output, state transition matrix, and configurable force models
- SGP4 -- Standard TLE/OMM propagator with TLE fitting from precision states
- Keplerian -- Analytical two-body propagation
Force Models
- Earth gravity: JGM2, JGM3, EGM96, ITU GRACE16 (spherical harmonics up to degree/order 360)
- Third-body gravity: Sun and Moon via JPL DE440/441 ephemerides
- Atmospheric drag: NRLMSISE-00 with automatic space weather data
- Solar radiation pressure: Cannonball model with shadow function
Time Systems
Seamless conversion between UTC, TAI, TT, TDB, UT1, and GPS time scales with full leap-second handling.
Solar System
- JPL DE440/DE441 ephemerides for all planets, Sun, Moon, and barycenters
- Fast analytical Sun/Moon models for lower-precision work
- Sunrise/sunset and Moon phase calculations
Linear Algebra
SatKit uses numeris for all linear algebra (vectors, matrices, quaternions, ODE integration). If you also use nalgebra in your project, enable the nalgebra feature on numeris for zero-cost From/Into conversions between types:
= { = "0.5.5", = ["nalgebra"] }
Cargo Features
| Feature | Default | Description |
|---|---|---|
omm-xml |
yes | XML OMM deserialization via quick-xml |
chrono |
no | TimeLike impl for chrono::DateTime |
Data Files
Satkit needs external data for gravity models, ephemerides, and Earth orientation. Call update_datafiles() to download them automatically.
Downloaded once: JPL DE440/441 (~100 MB), gravity model coefficients, IERS nutation tables
Update periodically: Space weather indices (F10.7, Ap) and Earth orientation parameters (polar motion, UT1-UTC) -- both sourced from Celestrak.
Testing and Validation
The library is validated against:
- Vallado test cases for SGP4, coordinate transforms, and Keplerian elements
- JPL test vectors for DE440/441 ephemeris interpolation (10,000+ cases)
- ICGEM reference values for gravity field calculations
- GPS SP3 precise ephemerides for multi-day numerical propagation
142 tests (106 unit + 36 doc-tests) run on every commit across Linux, macOS, and Windows.
Running Tests Locally
Tests require two sets of external data: the astro-data files (gravity models, ephemerides, etc.) and the test vectors (reference outputs for validation). Download both before running:
# Install the download helper
# Download test vectors
Then run tests with the environment variables pointing to the downloaded directories:
# Rust tests
SATKIT_DATA=astro-data SATKIT_TESTVEC_ROOT=satkit-testvecs
# Python tests
SATKIT_DATA=astro-data SATKIT_TESTVEC_ROOT=satkit-testvecs
Documentation
- Rust: docs.rs/satkit
- Python: satkit.dev -- tutorials, Jupyter notebooks, and API reference
References
- D. Vallado, Fundamentals of Astrodynamics and Applications, 4th ed., 2013
- O. Montenbruck & E. Gill, Satellite Orbits: Models, Methods, Applications, 2000
- J. Verner, Runge-Kutta integration coefficients
License
MIT