Function lupnt::ScaleStateForCoordinateScale¶
Defined in File constants.h
Function Documentation¶
-
inline Vec6 lupnt::ScaleStateForCoordinateScale(const Vec6 &rv, CoordinateScale from, CoordinateScale to)¶
Rescale a Cartesian position+velocity state from one
CoordinateScaleto another, rescaling the position (viaScalePositionForCoordinateScale) and leaving the velocity unchanged (velocities are invariant under IAU coordinate scale changes because length and coordinate time scale by the same factor).Called by
GetBodyPosVel(..., units, scale)inlupnt/data/kernels.ccto convert a TDB-scale ephemeris state into the requestedCoordinateScalebefore unit conversion.- Parameters:
rv – Position+velocity state in
fromscale [m, m/s]from – Source coordinate scale
to – Target coordinate scale
- Throws:
std::invalid_argument – if the scales are not related by a constant factor
- Returns:
State with position rescaled to
to[m, m/s]