use-orbit
Orbital mechanics helpers for RustUse.
Install
[]
= "0.0.1"
Foundation
use-orbit provides small f64-first helpers for circular and elliptical two-body orbital mechanics.
It focuses on scalar orbital relations such as gravitational parameter, orbital speed, orbital period, semi-major axis, apoapsis and periapsis relations, vis-viva speed, escape relations, and simple orbital state summaries.
Inputs are expected to be SI-style numeric values:
- kilograms for mass
- meters for radius, altitude, apsides, and semi-major axis
- cubic meters per second squared for gravitational parameter
- meters per second for speed and delta-v
- seconds for orbital period and transfer time
- joules per kilogram for specific orbital energy
The crate does not define a full unit system.
General gravity helpers belong in use-gravity.
General constants belong in the top-level use-constants set.
Unit abstractions belong in the top-level use-units set.
Simulation and numerical propagation belong in the top-level use-simulation set or a
future specialized crate.
Example
use ;
let earth = with_radius;
let low_orbit_radius = earth.and_then;
let low_orbit_speed = earth.and_then;
let transfer = hohmann_total_delta_v;
assert_eq!;
assert!;
assert!;
assert!;
When to use directly
Choose use-orbit when you need small reusable orbit formulas without a larger astrodynamics stack.
Scope
- APIs stay
f64-first and dependency-free. - The crate focuses on two-body scalar orbital helpers, not n-body simulation or ephemeris modeling.
- The crate keeps only a couple of convenience constants locally.
- Broader constants and units belong in the top-level
use-constantsanduse-unitssets.
Status
use-orbit is a pre-1.0 crate with a deliberately small API.