Skip to main content

spacelab_astro/
lib.rs

1//! Two-body and conic mission design — the transfer layer for cislunar and interplanetary flight.
2//!
3//! This is the first slice of the deep-space pillar: the *conic* primitives that need no ephemeris
4//! and are verifiable against textbook cases. The high-fidelity propagation they seed lives in
5//! `spacelab_propagation`; the planetary ephemerides
6//! that turn a transfer into a dated launch window are Stage A (`anise`/DE440).
7//!
8//! * [`kepler`] — universal-variable two-body propagation (Stumpff formulation), the workhorse that
9//!   advances a state by `Δt` for any conic (ellipse, parabola, hyperbola) through one branchless path.
10//! * [`lambert`](mod@lambert) — the transfer arc between two positions in a given time, the core
11//!   of injection and porkchop design.
12//! * [`cr3bp`] — the circular restricted three-body problem: pseudo-potential, Jacobi constant, the
13//!   five libration points, and the synodic equations of motion (Earth–Moon and Sun–Earth).
14//!
15//! Units are the caller's, consistent: state in (length, length/time), `mu` in length³/time². The
16//! two-body functions are unit-agnostic; the CR3BP is nondimensional (separation and mean motion 1).
17
18#![cfg_attr(not(test), no_std)]
19#![forbid(unsafe_code)]
20
21pub mod cr3bp;
22pub mod cw;
23pub mod edl;
24pub mod iod;
25pub mod kepler;
26pub mod lambert;
27pub mod lowthrust;
28pub mod optimal;
29pub mod patched;
30pub mod periodic;
31pub mod powered;
32pub mod richardson;
33pub mod synodic;
34pub mod targeting;
35pub mod transfer;
36
37pub use cr3bp::Cr3bp;
38pub use cw::{
39    curvilinear_from_lvlh, cw_propagate, cw_propagate_curvilinear, lvlh_basis,
40    lvlh_from_curvilinear, relative_lvlh_state,
41};
42pub use edl::{
43    Atmosphere, EntryOutcome, EntryVehicle, GuidedEntry, fnpeg_bank_command, guided_entry,
44    predicted_range, propagate_entry,
45};
46pub use iod::{
47    IodError, Sighting, gauss, gibbs, gooding, herrick_gibbs, laplace, orbit_from_angles,
48};
49pub use kepler::propagate;
50pub use lambert::{lambert, lambert_multirev};
51pub use lowthrust::{Steering, propagate_lowthrust};
52pub use optimal::{MinEnergyTransfer, min_energy_transfer, optimal_control_at};
53pub use patched::{BPlane, HyperbolicArc, b_plane, hyperbolic_arc, sphere_of_influence};
54pub use periodic::{
55    ManifoldSeed, PeriodicOrbit, halo_family, halo_orbit, lyapunov_orbit, monodromy,
56    richardson_halo, stable_manifold_seed, unstable_manifold_seed,
57};
58pub use powered::{Landing, powered_descent, zem_zev};
59pub use richardson::richardson_halo_guess;
60pub use synodic::{inertial_to_synodic, synodic_to_inertial};
61pub use targeting::{Control, DifferentialCorrector, Goal, TargeterError, TargeterReport, target};
62pub use transfer::{Transfer, transfer};