Function lupnt::ScalePhysicalConstantsForCoordinateScale

Function Documentation

inline PhysicalConstants lupnt::ScalePhysicalConstantsForCoordinateScale(PhysicalConstants constants, CoordinateScale from, CoordinateScale to)

Rescale a PhysicalConstants bundle from one relativistic CoordinateScale to 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 by GetPhysicalConstants(units, scale) to produce constants in a non-default coordinate scale.

Parameters:
  • constants – Physical constants currently expressed in from’s scale (with constants.coordinate_scale == from)

  • from – Source coordinate scale

  • to – Target coordinate scale

Throws:

std::invalid_argument – if from and to are not related by a constant scale factor

Returns:

Rescaled constants with coordinate_scale == to