Satellite Toolkit (satkit)
A comprehensive, high-performance satellite astrodynamics library combining the speed of Rust with the convenience of Python.
Satkit provides robust, high-performance satellite orbital mechanics calculations with a clean, intuitive API. Built from the ground up in Rust for maximum performance and memory safety, it offers complete Python bindings for all functionality, making advanced orbital mechanics accessible to both systems programmers and data scientists.
Language Bindings
- Native Rust: Available as a crate on crates.io
- Python: Comprehensive Python bindings via PyO3, combining Rust performance with Python convenience
- Install with
pip install satkit - Binary packages available for Windows, macOS (Intel & ARM), and Linux (x86_64 & ARM64)
- Python versions 3.8 through 3.14 supported
- Full documentation at https://satellite-toolkit.readthedocs.io/latest/
- Install with
Key Capabilities
Coordinate Frame Transformations
High-precision conversions between multiple reference frames with full support for time-varying Earth orientation:
- ITRF - International Terrestrial Reference Frame (Earth-fixed)
- GCRF - Geocentric Celestial Reference Frame using IAU-2000/2006 reduction (inertial)
- TEME - True Equinox Mean Equator frame used in SGP4 propagation
- CIRF - Celestial Intermediate Reference Frame (IAU-2006 intermediate)
- TIRF - Terrestrial Intermediate Reference Frame (Earth-rotation intermediate)
- Geodetic - Latitude, longitude, altitude with WGS-84 ellipsoid
Orbit Propagation
Multiple propagation methods optimized for different accuracy and performance requirements:
- Numerical Integration: High-precision propagation using adaptive Runge-Kutta 9(8) methods with dense output
- Supports state transition matrix computation for covariance propagation
- Configurable force models and integration tolerances
- Efficient interpolation for arbitrary epoch queries
- SGP4: Industry-standard propagator for Two-Line Element (TLE) sets
- Full AFSPC and improved mode support
- TLE fitting from high-precision states with drag estimation
- Batch processing for multiple satellites
- Keplerian: Fast analytical two-body propagation for preliminary analysis
Force Models
Comprehensive perturbation modeling for high-fidelity orbit propagation:
- Earth Gravity: Spherical harmonic models up to degree/order 360
- Multiple models: JGM2, JGM3, EGM96, ITU GRACE16
- Efficient computation with configurable truncation order
- Gravity gradient support for state transition matrix
- Third-Body Gravity: Solar and lunar perturbations using JPL ephemerides
- Atmospheric Drag: NRLMSISE-00 density model with space weather integration
- Automatic space weather data updates (F10.7, Ap index)
- Configurable ballistic coefficients
- Solar Radiation Pressure: Cannon-ball model with shadow function
Ephemerides
Access to high-precision solar system body positions:
- JPL DE440/DE441: State-of-the-art planetary ephemerides
- Chebyshev polynomial interpolation for accuracy
- Support for all major planets, sun, moon, and solar system barycenter
- Low-Precision Models: Fast analytical models for sun and moon when high precision isn't required
Time Systems
Comprehensive support for all standard astronomical time scales:
- UTC - Coordinated Universal Time with leap second handling
- TAI - International Atomic Time
- TT - Terrestrial Time
- TDB - Barycentric Dynamical Time
- UT1 - Universal Time with Earth orientation corrections
- GPS - GPS Time
- Automatic conversion between all time scales with microsecond precision
Geodetic Utilities
- Geodesic Calculations: Accurate distance and azimuth between ground locations using Vincenty's formulae
- Coordinate Conversions: ITRF ↔ Geodetic ↔ East-North-Up ↔ North-East-Down
- Elevation/Azimuth: Topocentric coordinate transformations for ground station analysis
Sun / Moon Calculations
- Sun rise / set: Compute sun rise / set times as function of day & location
- Moon Phase: Phase of moon and fraction illuminated
- Ephemeris: Fast low-precision ephemeris for sun & moon
Technical Details
ODE Solvers
The numerical orbit propagation engine employs adaptive Runge-Kutta methods for integration of ordinary differential equations. The pure-Rust ODE solver features:
- Adaptive Step Size Control: Automatically adjusts step size based on error tolerance
- Dense Output: Efficient interpolation for state queries at arbitrary times without re-integration
- High-Order Methods: Runge-Kutta 9(8) pairs for optimal accuracy and stability
- State Transition Matrix: Optional computation for covariance propagation and sensitivity analysis
Integration coefficients are based on the work of Jim Verner: https://www.sfu.ca/~jverner/
Performance Characteristics
- Zero-Cost Abstractions: Rust's ownership model enables safe code without runtime overhead
- SIMD-Friendly: Designed to take advantage of modern CPU vector instructions
- Memory Efficient: Static typing and stack allocation minimize heap pressure
- Parallel Processing: Thread-safe APIs enable concurrent propagation of multiple satellites
- Python Integration: Near-native performance in Python via PyO3 bindings with minimal overhead
References, Models, and External Data
Theoretical Foundation
The equations and many unit tests are based on the following authoritative sources:
- "Fundamentals of Astrodynamics and Applications, Fourth Edition", D. Vallado, Microcosm Press and Springer, 2013. https://celestrak.org/software/vallado-sw.php
- "Satellite Orbits: Models, Methods, Applications", O. Montenbruck and E. Gill, Springer, 2000. https://doi.org/10.1007/978-3-642-58351-3
Data Dependencies
The library requires external data files for various calculations. These are automatically downloaded by the update_datafiles() function:
Core Data Files (One-Time Download)
-
JPL Ephemerides (JPL Solar System Dynamics)
- DE440/DE441 planetary ephemerides (~100 MB)
- Provides positions of sun, moon, planets, and solar system barycenter
- Valid for years 1550-2650 CE
-
Gravity Models (ICGEM)
- JGM2, JGM3, EGM96, ITU GRACE16 spherical harmonic coefficients
- International Centre for Global Earth Models standardized format
- Up to degree/order 360 for high-fidelity propagation
-
IERS Nutation Tables (IERS Conventions)
- IAU-2006 nutation series coefficients
- Required for GCRF ↔ ITRF transformations
- Technical Note 36 reference tables
Regularly Updated Data Files (Daily Updates Recommended)
-
Space Weather Indices (Celestrak)
- F10.7 solar flux (past and predicted)
- Ap geomagnetic index
- Critical for atmospheric density modeling and drag calculations
- Updated daily by NOAA Space Weather Prediction Center
-
Earth Orientation Parameters (Celestrak)
- Polar motion (x, y)
- UT1-UTC time difference
- Length of day variations
- Essential for high-precision GCRF ↔ ITRF conversions
- Updated daily by IERS
The update_datafiles() function intelligently manages these files:
- Downloads missing files
- Always refreshes space weather and EOP data
- Skips existing files to save bandwidth
- Stores files in a platform-specific data directory
Verification and Testing
The library includes comprehensive test suites ensuring correctness of calculations:
Test Coverage
-
JPL Ephemerides: Validated against JPL-provided test vectors for Chebyshev polynomial interpolation
- Over 10,000 test cases covering all planets and time ranges
- Accuracy verified to within JPL's published tolerances (sub-meter precision)
-
SGP4: Verified using official test vectors from the original C++ distribution
- All test cases from Vallado's SGP4 implementation
- Includes edge cases and error conditions
-
Coordinate Transformations: Cross-validated against multiple reference implementations
- SOFA library comparisons for IAU-2006 transformations
- Vallado test cases for GCRF ↔ ITRF conversions
-
Numerical Propagation: Validated against high-precision commercial tools
- Orbit fits to GPS SP3 ephemerides
- Multi-day propagations with sub-meter accuracy
Continuous Integration
- Automated testing on multiple platforms (Linux, macOS, Windows)
- Python versions 3.8-3.14 tested on each platform
- Clippy linting for code quality
- Documentation build verification
Getting Started
Installation
Rust
Add satkit to your Cargo.toml:
[]
= "0.8"
Or use cargo add:
Python
Install from PyPI using pip:
Pre-built binary wheels are available for:
- Windows: AMD64
- macOS: Intel (x86_64) and Apple Silicon (ARM64)
- Linux: x86_64 and ARM64 (aarch64)
- Python versions: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14
Initial Setup
After installation, download the required data files needed for calculations. This is a one-time operation, though space weather and Earth orientation parameters should be updated periodically (daily updates available).
Rust:
use utils;
Python:
# Download data files to default location
Quick Start Examples
Coordinate Transformations (Python)
# Create a time instant
=
# Define position in ITRF (Earth-fixed) frame
=
# Get the ITRF to GCRF (inertial) rotation quaternion
=
# Transform to GCRF
= *
Orbit Propagation (Python)
# Initial state vector [x, y, z, vx, vy, vz] in GCRF frame
= 6378e3 + 500e3 # 500 km altitude
=
=
# Start time
=
# Propagation settings
=
=
= 8
# Propagate for 1 day
=
# Query state at any time
= +
=
SGP4 Propagation (Python)
# Load TLE
=
=
# Propagate TLE
=
, =
Planetary Ephemerides (Rust)
use ;
Documentation
- Rust API Documentation: Available on docs.rs
- Python Documentation: Comprehensive guide at satellite-toolkit.readthedocs.io
- Getting started tutorials
- API reference with examples
- Theory and implementation notes
- Data file management guide
Use Cases
Satkit is suitable for a wide range of applications:
- Satellite Operations: Real-time tracking and orbit determination
- Mission Planning: Trajectory design and optimization
- Space Situational Awareness: Conjunction assessment and collision avoidance
- Ground Station Management: Visibility predictions and pass planning
- Research and Education: Orbital mechanics analysis and experimentation
- Simulation: High-fidelity orbit propagation for testing and validation
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues for:
- Bug fixes and improvements
- New features and capabilities
- Documentation enhancements
- Additional test cases
- Performance optimizations
See the GitHub repository for contribution guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Steven Michael - ssmichael@gmail.com
For questions, bug reports, or feature requests, please open an issue on GitHub or contact the author directly.
Acknowledgments
This work builds upon the theoretical foundations established by:
- Dr. David Vallado - "Fundamentals of Astrodynamics and Applications"
- Dr. Oliver Montenbruck & Dr. Eberhard Gill - "Satellite Orbits: Models, Methods, Applications"
- Dr. Jim Verner - Runge-Kutta integration coefficients
- The international space community for maintaining critical data products (IERS, JPL, NOAA, ICGEM)