Function lupnt::ScalePhysicalConstantsForCoordinateScale¶
Defined in File constants.h
Function Documentation¶
-
inline PhysicalConstants lupnt::ScalePhysicalConstantsForCoordinateScale(PhysicalConstants constants, CoordinateScale from, CoordinateScale to)¶
Rescale a
PhysicalConstantsbundle from one relativisticCoordinateScaleto another.The stored DE-derived constants are treated as TDB-compatible. Constant coordinate scaling is therefore supported for the barycentric TDB/TCB pair. Requests for geocentric or lunicentric scales throw because those require a reference-system transformation, not a single scalar applied to this bundle.
Length-like quantities and gravitational parameters scale by the IAU scale ratio (
CheckedCoordinateScaleRatio). Angular rates scale by the inverse ratio because coordinate time and coordinate length share the same scale factor. Light speed is invariant. Called byGetPhysicalConstants(units, scale)to produce constants in a non-default coordinate scale.- Parameters:
constants – Physical constants currently expressed in
from’s scale (withconstants.coordinate_scale == from)from – Source coordinate scale
to – Target coordinate scale
- Throws:
std::invalid_argument – if
fromandtoare not related by a constant scale factor- Returns:
Rescaled constants with
coordinate_scale == to