| Crates.io | astrora_core |
| lib.rs | astrora_core |
| version | 0.1.1 |
| created_at | 2025-10-24 05:59:18.778108+00 |
| updated_at | 2025-10-24 14:13:20.179817+00 |
| description | Astrora - Rust-backed astrodynamics library - core computational components |
| homepage | |
| repository | https://github.com/cachemcclure/astrora |
| max_upload_size | |
| id | 1898048 |
| size | 3,894,857 |
A modern, high-performance orbital mechanics library combining Python's ease of use with Rust's computational performance.
Astrora is a ground-up modernization of astrodynamics computing, delivering 10-100x performance improvements over pure Python implementations while maintaining an intuitive Python API.
The original poliastro library was archived on October 14, 2023. While active forks like hapsira continue development, Astrora represents a new approach that:
High-performance orbit propagators
Perturbation models
Coordinate transformations
Lambert solvers
Orbital mechanics
Maneuvers
Visualization
Satellite operations
Install using uv for the fastest experience:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install Astrora
uv pip install astrora
pip install astrora
For development or latest features:
git clone https://github.com/cachemcclure/astrora.git
cd astrora
uv venv --python 3.12
source .venv/bin/activate
uv pip install -e ".[dev]"
maturin develop --release
Complete Installation Guide - Detailed instructions for all platforms and use cases
import numpy as np
from astrora import Orbit, bodies
from astrora._core import hohmann_transfer
# Create an orbit from state vectors
orbit = Orbit.from_vectors(
bodies.Earth,
r=np.array([7000e3, 0.0, 0.0]), # Position (m)
v=np.array([0.0, 7546.0, 0.0]) # Velocity (m/s)
)
print(f"Semi-major axis: {orbit.a/1e3:.1f} km")
print(f"Period: {orbit.period/3600:.2f} hours")
print(f"Eccentricity: {orbit.ecc:.6f}")
# Propagate the orbit forward in time
orbit_after_1hr = orbit.propagate(3600.0) # 1 hour later
print(f"True anomaly after 1 hour: {orbit_after_1hr.nu:.2f} rad")
# Calculate a Hohmann transfer from LEO to GEO
result = hohmann_transfer(7000e3, 42164e3, bodies.Earth.mu)
print(f"Total Δv: {result['delta_v_total']/1000:.2f} km/s")
print(f"Transfer time: {result['transfer_time']/3600:.2f} hours")
# Visualize (requires matplotlib)
from astrora.plotting import plot_orbit
plot_orbit(orbit)
Real-world benchmarks on Apple M2 Pro:
Scientific Libraries:
Check the examples/ directory for comprehensive usage examples:
Contributions are welcome! This project is in active development.
# Clone the repository
git clone https://github.com/cachemcclure/astrora.git
cd astrora
# Set up development environment
uv venv --python 3.12
source .venv/bin/activate
uv pip install -e ".[dev,docs,test]"
# Build Rust extension
maturin develop --release
# Run tests
pytest tests/ -v
# Check coverage
pytest --cov=astrora --cov-report=html
We maintain high code quality standards:
Current Version: 0.1.0 (Alpha)
Test Status:
Phase Completion:
Measured on Apple M2 Pro (10-core, 16GB RAM):
| Operation | Astrora (Rust) | Pure Python | Speedup |
|---|---|---|---|
| RK4 propagation (1000 steps) | 5.0 μs | 12.6 μs | 2.5x |
| Lambert solver (single) | 8.2 μs | 45 μs | 5.5x |
| Lambert batch (1000) | 2.1 ms | 45 ms | 21x |
| Coordinate transform (single) | 1.8 μs | 8.5 μs | 4.7x |
| Coordinate batch (1000) | 1.2 ms | 8.5 ms | 7.1x |
| Cross product | 2.75 μs | 75.5 μs | 27.5x |
Note: Actual speedups depend on CPU, problem size, and operation type. Batch operations see higher speedups due to Rayon parallelization.
MIT License - See LICENSE for details
If you use Astrora in your research, please cite:
@software{astrora2025,
author = {McClure, Cache},
title = {Astrora: A Rust-Backed Astrodynamics Library for Python},
year = {2025},
url = {https://github.com/cachemcclure/astrora},
version = {0.1.0}
}
Made by the Astrora team. Powered by Rust and Python.