15 unstable releases (3 breaking)

0.5.4 Dec 15, 2024
0.4.1 Nov 9, 2024
0.2.9 Jun 4, 2024
0.2.5 Mar 23, 2024

#258 in Algorithms

Download history 338/week @ 2024-09-14 371/week @ 2024-09-21 260/week @ 2024-09-28 206/week @ 2024-10-05 368/week @ 2024-10-12 437/week @ 2024-10-19 235/week @ 2024-10-26 267/week @ 2024-11-02 387/week @ 2024-11-09 376/week @ 2024-11-16 220/week @ 2024-11-23 749/week @ 2024-11-30 336/week @ 2024-12-07 401/week @ 2024-12-14 5/week @ 2024-12-21 5/week @ 2024-12-28

854 downloads per month

Custom license

1MB
19K SLoC

Rust 15K SLoC // 0.1% comments C 1.5K SLoC // 0.2% comments Python 1.5K SLoC // 0.6% comments Jupyter Notebooks 548 SLoC // 0.2% comments Batch 227 SLoC // 0.0% comments JavaScript 12 SLoC // 0.1% comments

Satellite Toolkit with Rust

An accurate, high-performance satellite orbital kinematics toolkit, written in Rust with a sensible interface.
Also includes python bindings for all functions via via pyo3

Github

Build Passing? Wheel Passing? GitHub License

Crates.io

Crates.io Version Crates.io Downloads (recent)

PyPi

PyPI - Version PyPI - Python Version PyPI - Implementation PyPI - Status

Read the Docs

Language Bindings

  • Native Rust bindings
  • Python bindings for compiled rust code ... speed of Rust with convenience of Python
    Install with pip install satkit
    PyPi includes binary packages for windows, macos (Intel & ARM), and linux. Python documentation is at: https://satellite-toolkit.readthedocs.io/latest/

Features

  • High-precision coordinate transforms between:
    • International Terrestrial Reference Frame (ITRF)
    • Geocentric Celestial Reference Frame (GCRF) using IAU-2000 reduction
    • True-Equinox Mean Equator (TEME) frame used in SGP4 propagation of TLEs
    • Celestial Intermediate Reference Frame (CIRF)
    • Terrestrial Intermediate Reference Frame (TIRF)
    • Terrestrial Geodetic frame (latitude, longitude)
  • Geodesic distances
  • SGP4, and Keplerian orbit propagation
  • JPL high-precision planetary ephemerides
  • High-order gravity models
  • High-precision, high-speed numerical satellite orbit propagation with high-order efficient Runga-Kutta solvers, ability to solve for state transition matrix, and inclusion following forces:
    • High-order Earth gravity with multiple models
    • Solar gravity
    • Lunar gravity
    • Drag (NRL MISE-00 density model)
    • Radiation pressure

ODE Solvers

The high-precision numerical satellite orbit propagation makes use of adaptive Runga-Kutta methods for integration of ordinary differential equations. The pure-Rust ODE solver is included as part of the library.

The methods use Runga-Kutta pairs for ODE integration and error estimation generated by Jim Verner: https://www.sfu.ca/~jverner/

References, Models, and External Software.

The equations and many of the unit tests underlying this work are drawn from the following sources:

Data Dependencies

This code makes reference to and relies on models generated by the following:

Verification

The package includes rust test modules and python test modules for verification of nearly all calculations, including but not limited to:

  • JPL Ephemeris - Via JPL-provided test vectors for Chebychev polynomial calculation
  • SGP4 - Via SGP4 test vectors provided with original C++ distribution

Getting Started

Rust

Simply include the code in your Cargo.toml file to use. Once installed, make sure you run utils.update_datafiles to download the most-recent data files necessary for many calculations. This only needs to be done once, unless more-recent space weather and Earth orientation parameter data is required (these are updated at least daily).

satkit.utils.update_datafiles()?;

Python

Satkit is available via pypi.org, and can be installed via the pip command:

python -m pip install satkit

Binaries are available for Windows (AMD64), Mac (Intel, Apple Silicon) and Linux (x86_64) for python versions 3.8 through 3.13.

Once installed, make sure you download the most-recent data files necessary for many calculations. This only needs to be done once, unless more-recent space weather and Earth orientation parameter data is required (these are updated at least daily).

import satkit as sk
sk.utils.update_datafiles()

Author

Steven Michael (ssmichael@gmail.com)

Please reach out of you find errors in code or calculations, are interested in contributing to this repository, or have suggestions for improvements to the API.

Dependencies

~8–11MB
~211K SLoC