Skip to content

EarthOrientation

Defined in: transform.rs:166

pub struct EarthOrientation\<'a, F: [EarthFixedTransform](../../traits/earthfixedtransform/)\>

Everything an EarthFixedTransform needs to orient frame F relative to Earth: the instant, plus that frame’s Earth Orientation Parameters.

No ECI↔ECEF transform needs one without the other, so they travel as one named argument. The EOP side is a borrow (only the Copy Epoch is owned), which makes this a cheap per-call view over storage that lives elsewhere — typically a long-lived field of a force model, which evaluates at a new instant on every step from &self.

Because F::EopStorage is an associated type, one frame cannot be oriented with another frame’s EOP data — that is a compile error rather than a silent wrong-frame result. For a frame that needs no EOP data at all, simple(Self::simple) says so by name.

# use arika::earth::{EarthFixedTransform, EarthOrientation};
# use arika::epoch::Epoch;
# use arika::frame::{SimpleEci, Vec3};
let utc = Epoch::from_gregorian(2024, 3, 20, 12, 0, 0.0);
// `SimpleEci` needs no EOP data, and does not mention it:
let orientation = EarthOrientation::<SimpleEci>::simple(utc);
let pos = Vec3::<SimpleEci>::new(6778.0, 0.0, 0.0);
let geodetic = SimpleEci::to_geodetic(&pos, &orientation);
# assert!(geodetic.altitude > 0.0);

fn new(utc: [Epoch<Utc>](../epoch/), eop: &‘a ::EopStorage) -> Self

Orient F at utc using eop.

For a frame that needs no EOP data, prefer simple(Self::simple) — it says so by name.


fn utc(&self) -> &[Epoch<Utc>](../epoch/)

The instant the frame is oriented at.

By reference, even though Epoch is Copy, because every consumer (EarthRotationPole::earth_pole, the IAU 2006 constructors) takes &Epoch<Utc>.


fn eop(&self) -> &‘a ::EopStorage

The frame’s Earth Orientation Parameters.


fn simple(utc: [Epoch<Utc>](../epoch/)) -> Self

Orient a frame that needs no EOP data (the simple, approximate path) at utc.

Constrained to EopStorage = (), so it does not exist for a frame whose transform genuinely needs Earth Orientation Parameters — that frame has to go through new(Self::new) with real data.