Expand description
§Siderust
Precision astronomy & satellite mechanics in Rust.
The siderust crate provides high-accuracy celestial and orbital
calculations with zero-allocation performance and strong type safety.
§Features
- Coordinate Systems: Strongly-typed
Vectorand sphericalPosition/Directiontypes, parameterized by phantomReferenceCenter(e.g., Sun, Earth) andReferenceFrame(e.g., ICRS, Ecliptic, EquatorialMeanJ2000, Horizontal), andKind(Position, Direction), enabling compile-time protection against mismatched frames and origins. Seamless conversions between coordinate systems are supported viaFrom/Intoand theTransformtrait. - Target Tracking:
Target<T>couples any coordinate type with an observationJulianDateand optionalProperMotionfor extrapolation and movement analysis. - Units & Quantities: Strongly-typed
Mass,Length,Angle,Velocity,Duration, etc., with operator overloading for natural arithmetic while preventing unit mistakes. - Astronomical Utilities: Aberration, nutation, precession, sidereal time, apparent Sun/Moon positions, and rise/culmination search routines for celestial bodies and satellites.
- Celestial Bodies & Catalogs: Built-in data for Sun through Neptune, major moons, a starter star catalog, and helpers to load Gaia/Hipparcos datasets or custom star catalogs.
- Numerical Kernels: Kepler equation solvers, VSOP87 & ELP2000 theories for planetary & lunar coordinates, and light-time corrections, validated against JPL Horizons & IMCCE to <1 mas.
- Performance: Zero heap allocations in core routines, SIMD
optimizations, optional
f128quad precision, and#![no_std]support withlibmfallback.
§Crate Modules
coordinates: Cartesian & Spherical coordinate types and transformations between reference centers & framestargets:Target<T>tracking with time and proper motiontime: Time types (JulianDate, ModifiedJulianDate) and genericPeriod<T>astro: Utilities for aberration, nutation, precession, sidereal time, and event searchescalculus: Numerical kernels (Kepler, VSOP87, ELP2000, etc.)bodies: Data structures for planets, comets, stars, satellites, and built-in catalogsobservatories: Predefined observatory locations and helpers
§Minimal Example
use siderust::{
bodies::Mars,
astro::JulianDate,
};
use chrono::prelude::*;
// 1. Select an epoch (UTC now to JD)
let jd = JulianDate::from_utc(Utc::now());
// 2. Compute barycentric ecliptic coordinates via VSOP87
let mars = Mars::vsop87e(jd);
// 3. Print Mars's barycentric ecliptic position (AstronomicalUnits)
println!("{}", mars.position);Note: This documentation is generated and reviewed under @vpramon supervision. For detailed usage and API, see the module-level docs and examples.
Modules§
- astro
- Astro Module
- bodies
- Astronomical Bodies
- calculus
- Celestial Mechanics Calculus Module
- coordinates
- Coordinates Module
- observatories
- Observatory Catalog Module
- targets
- Astronomical target representation
- time
- Time Module