pub struct Transform<From: Frame, To: Frame> {
pub rotation: Rotation<From, To>,
pub omega: Vec3,
}Expand description
A rotation between frames that turn relative to one another.
Carries the angular velocity of To with respect to From, expressed in
From. A Rotation alone is enough for a Position; only this is enough
for a StateVector.
Fields§
§rotation: Rotation<From, To>The rotation part.
omega: Vec3Angular velocity of To relative to From, expressed in From, rad/s.
Implementations§
Source§impl<A: Frame, B: Frame> Transform<A, B>
impl<A: Frame, B: Frame> Transform<A, B>
Sourcepub const fn new(rotation: Rotation<A, B>, omega: Vec3) -> Self
pub const fn new(rotation: Rotation<A, B>, omega: Vec3) -> Self
Assemble from a rotation and the angular velocity between the frames.
Sourcepub fn position(self, p: Position<A>) -> Position<B>
pub fn position(self, p: Position<A>) -> Position<B>
Apply to a position. The angular velocity plays no part.
Sourcepub fn state(self, s: StateVector<A>) -> StateVector<B>
pub fn state(self, s: StateVector<A>) -> StateVector<B>
Apply to a full state.
r_B = R · r_A
v_B = R · (v_A − ω × r_A)The second term is the one everyone forgets. For GCRF→ITRF at the equator it is 465 m/s: a satellite at rest on the ground would appear to be moving at Mach 1.4, and a satellite in orbit would have its velocity wrong by six percent. The result still looks like a plausible orbit.
Trait Implementations§
impl<From: Copy + Frame, To: Copy + Frame> Copy for Transform<From, To>
impl<From: PartialEq + Frame, To: PartialEq + Frame> StructuralPartialEq for Transform<From, To>
Auto Trait Implementations§
impl<From, To> Freeze for Transform<From, To>
impl<From, To> RefUnwindSafe for Transform<From, To>where
Rotation<From, To>: RefUnwindSafe,
impl<From, To> Send for Transform<From, To>
impl<From, To> Sync for Transform<From, To>
impl<From, To> Unpin for Transform<From, To>
impl<From, To> UnsafeUnpin for Transform<From, To>where
Rotation<From, To>: UnsafeUnpin,
impl<From, To> UnwindSafe for Transform<From, To>where
Rotation<From, To>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more