Function lupnt::AreCoordinateScalesConvertible

Function Documentation

bool lupnt::AreCoordinateScalesConvertible(CoordinateScale from, CoordinateScale to)

Check whether two CoordinateScales are related by a single constant IAU scale factor (i.e. belong to the same barycentric/geocentric/lunicentric pair, or are identical).

Used as a guard by CoordinateScaleRatio (returns NaN if not convertible) and by CheckedCoordinateScaleRatio (throws if not convertible) before any of the Scale*ForCoordinateScale* helpers below rescale a position, state, or gravitational parameter between two CoordinateScales.

Parameters:
  • from – Source coordinate scale

  • to – Target coordinate scale

Returns:

True if from and to are related by a constant scale factor