Function lupnt::spice::GetFrameConversionMat¶
Defined in File spice.cc
Function Documentation¶
-
Mat6d lupnt::spice::GetFrameConversionMat(Real t_tdb, const std::string &from_frame, const std::string &to_frame)¶
Get the Frame Conversion Mat object.
Get the 6x6 state (position+velocity) rotation matrix from
from_frametoto_frameat epocht_tdb, via SPICE’ssxform_c.This is the core building block of
spice::ConvertFrameSpice(frame_converter_spice.cc), used e.g. to rotate ECEF <-> GCRF ("ITRF93"<->"J2000") and Moon-body-fixed <-> Moon-inertial ("IAU_MOON"<->"J2000") state vectors using SPICE’s high-accuracy orientation kernels (seeLoadSpiceKernel). Applying the returned matrix to aVec6position+velocity state transforms it between frames, including the frame’s angular-velocity (Coriolis) contribution to velocity.- Parameters:
t_tdb –
from_frame –
to_frame –
t_tdb – Epoch [s, TDB seconds since J2000]
from_frame – SPICE name of the source frame (e.g.
"ITRF93")to_frame – SPICE name of the target frame (e.g.
"J2000")
- Returns:
- Returns:
6x6 state-transformation matrix
Msuch thatrv_to = M * rv_from