Skip to content

Rotation

Defined in: frame.rs:475

pub struct Rotation\<From, To\>

座標系 From から To への回転。

Hamilton クォータニオンベース。transform でベクトルの フレーム変換を型安全に行う。

fn iau2006<P>(tt: &[Epoch<Tt>](../epoch/), utc: &[Epoch<Utc>](../epoch/), eop: &P) -> Self where P: NutationCorrections + ?Sized

Build the GCRS → CIRS rotation from the IAU 2006 / 2000A_R06 CIP model plus optional observed dX, dY corrections from an EOP provider.

  • tt — TT epoch; used to evaluate the CIP polynomial and trigonometric series at t = (JD_TT − 2451545.0) / 36525
  • utc — UTC epoch; used as the IERS EOP lookup index for the dX, dY nutation corrections
  • eop — anything implementing NutationCorrections (in mas). crate::earth::eop::NullEop does not satisfy this bound, so trybuild pins a compile error at arika/tests/trybuild/null_eop_in_iau2006.rs.
(X, Y) = cip_xy(t) // CIP model
dX, dY = eop.dx(utc_mjd), eop.dy(utc_mjd) // observed, mas → rad
X' = X + dX // TN36 Eq. 5.26
Y' = Y + dY
s = cio_locator_s(t, X, Y) // model (not corrected)
Q = gcrs_to_cirs_matrix(X', Y', s)

Note that s is evaluated from the model X, Y, matching SOFA’s iauC2i06a. The correction contribution to s is at sub-nas level for realistic dX, dY (~mas).


fn from_era(ut1: &[Epoch<Ut1>](../epoch/)) -> Self

Build the CIRS → TIRS rotation: R_3(−ERA(ut1)).

The Earth Rotation Angle ERA is a definitional function of UT1 (TN36 Eq. 5.14 / SOFA iauEra00), already implemented by Epoch::<Ut1>::era. The Rotation<Cirs, Tirs> is the pure z-axis rotation by −ERA.

This constructor takes no EOP provider — every quantity is definitional once ut1 is known, and the ut1 epoch was itself derived from utc + dUT1 upstream (via Epoch::<Utc>::to_ut1).


fn polar_motion<P>(tt: &[Epoch<Tt>](../epoch/), utc: &[Epoch<Utc>](../epoch/), eop: &P) -> Self where P: PolarMotion + ?Sized

Build the TIRS → ITRS rotation: the polar-motion matrix W(xp, yp, s').

TN36 Eq. (5.3) / SOFA iauPom00:

W = R_3(−s') · R_2(xp) · R_1(yp)

(active convention, TN36) which SOFA computes as the observationally equivalent

W = R_1(−yp) · R_2(−xp) · R_3(s')

(passive convention, SOFA iauRx / iauRy / iauRz). arika uses the SOFA form directly because our Phase 3A rotation_{x,y,z} helpers are passive.

  • tt — TT epoch; used to evaluate the TIO locator s'(t) via tio_locator_s_prime
  • utc — UTC epoch; used as the IERS EOP lookup index for xp, yp
  • eop — anything implementing PolarMotion (in arcsec). crate::earth::eop::NullEop does not satisfy this bound.

fn iau2006_full<P>(tt: &[Epoch<Tt>](../epoch/), ut1: &[Epoch<Ut1>](../epoch/), utc: &[Epoch<Utc>](../epoch/), eop: &P) -> Self where P: NutationCorrections + PolarMotion + ?Sized

Build the full GCRS → ITRS rotation by composing the three intermediate steps.

[ITRS] = W(utc, tt) · R_3(−ERA(ut1)) · Q(tt, utc) · [GCRS]

Taking three separate epochs is intentional: Epoch<Tt>, Epoch<Ut1>, and Epoch<Utc> are definitionally distinct time scales (TN36 §5.2) and the compiler enforces that the caller thought about each one. See Rotation::<Gcrs, Itrs>::iau2006_full_from_utc for the convenience form that derives all three from a single UTC.


fn iau2006_full_from_utc<P>(utc: &[Epoch<Utc>](../epoch/), eop: &P) -> Self where P: Ut1Offset + NutationCorrections + PolarMotion + ?Sized

Build the full GCRS → ITRS rotation from a single Epoch<Utc>, deriving tt and ut1 internally via Epoch::<Utc>::to_tt and Epoch::<Utc>::to_ut1.

Requires the combined Ut1Offset + NutationCorrections + PolarMotion bound on the EOP provider. Position-only rotation: LOD is not needed here but will be required when Rotation<Gcrs, Itrs>::iau2006_full_with_rates (velocity transform) is added.


fn from_raw(q: UnitQuaternion<f64>) -> Self

生の UnitQuaternion から構築。


fn inner(&self) -> &UnitQuaternion<f64>

内部の UnitQuaternion への参照。


fn into_inner(self) -> UnitQuaternion<f64>

内部の UnitQuaternion を消費して返す。


fn transform(&self, v: &Vec3<From>) -> Vec3<To>

ベクトルを From フレームから To フレームに変換。


fn inverse(&self) -> Rotation<To, From>

逆回転 (ToFrom)。


fn then<C>(&self, other: &Rotation<To, C>) -> Rotation<From, C>

回転の合成: self (A→B) と other (B→C) → A→C。


fn from_ut1(epoch: &[Epoch<Ut1>](../epoch/)) -> Self

Construct from a UT1 epoch using the Earth Rotation Angle (ERA).

SimpleEcef = R_z(−ERA(UT1)) × SimpleEci. Applies only the ERA Z rotation — no precession, nutation, or polar motion. For high-precision work use the IAU 2006 CIO chain (not yet implemented: Phase 3).


fn from_utc_assuming_ut1_eq_utc(epoch: &[Epoch<Utc>](../epoch/)) -> Self

Legacy helper: construct from a UTC epoch assuming UT1 ≈ UTC.

This ignores the dUT1 correction (< 0.9 s). Preserves bit-level compatibility with pre-redesign code that called Epoch::gmst on a UTC epoch.


fn from_era(era: f64) -> Self

Construct from a raw ERA (or GMST) angle [rad].

Low-level entry point used by the from_ut1 / from_utc helpers, exposed for tests and for integration with WASM bindings that expose ERA as a f64 parameter.


fn from_ut1(epoch: &[Epoch<Ut1>](../epoch/)) -> Self

Inverse of Rotation::<SimpleEci, SimpleEcef>::from_ut1.


fn from_utc_assuming_ut1_eq_utc(epoch: &[Epoch<Utc>](../epoch/)) -> Self

Inverse of Rotation::<SimpleEci, SimpleEcef>::from_utc_assuming_ut1_eq_utc.


fn from_era(era: f64) -> Self

Construct from a raw ERA (or GMST) angle [rad].