1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Reference frames, in the type system.
//!
//! Every existing implementation of this — SOFA, ERFA, `sofars`, and the rest —
//! hands you a bare 3×3 matrix and trusts you to remember what it connects. The
//! two most expensive bug classes in the field follow directly: composing a chain
//! in the wrong order, and applying a transform to the wrong frame's vector.
//!
//! Both are compile-time preventable, and here they are prevented:
//!
//! ```compile_fail
//! # use spacelab_frames::{Rotation, Gcrf, Itrf, Teme};
//! # fn get<A: spacelab_frames::Frame, B: spacelab_frames::Frame>() -> Rotation<A, B> { unimplemented!() }
//! let a: Rotation<Teme, Itrf> = get();
//! let b: Rotation<Gcrf, Itrf> = get();
//! let _ = a * b; // the chain does not join: Itrf is not Gcrf
//! ```
//!
//! All of it erases at monomorphization. A [`Rotation`] is a `Mat3` and nothing
//! more.
//!
//! # Velocity is not a vector you rotate
//!
//! A [`Rotation`] applies to a [`Position`]. Only a [`Transform`] applies to a
//! [`StateVector`], because moving a velocity between rotating frames requires the
//! `ω × r` term. Forgetting it costs 465 m/s at the equator, looks plausible, and
//! is among the most repeated mistakes in the field. Here the type system will not
//! let you forget: there is no `Mul<StateVector<A>> for Rotation<A, B>`.
//!
//! # Batch shape
//!
//! Precession, nutation, Earth rotation and polar motion are functions of the epoch
//! alone — not of the satellite. Over 10⁴ satellites and 10⁵ epochs the frame chain
//! is evaluated 10⁵ times, not 10⁹, provided it is hoisted. [`teme_to_itrf_into`]
//! writes into a caller-provided slice for exactly that reason: the four orders of
//! magnitude are won by a `Vec`, before any thread or lane is considered.
pub use ;
pub use CioInterpolator;
pub use ;
pub use ;
pub use ;