There is a discrepancy between the documentation and the actual implementation of the ASTRONOMICAL_UNIT constant in NonSI.
Current Implementation:
The JavaDoc correctly mentions the IAU 2012 definition, but the code uses an outdated value.
/**
* ...
* since 2012 it has been defined as exactly 149,597,870,700 metres,
* ...
*/
public static final Unit<Length> ASTRONOMICAL_UNIT = addUnit(
new TransformedUnit<Length>(METRE, MultiplyConverter.of(149597871000.0)), "Astronomical Unit", "UA");
- Documented value: m (Correct per IAU 2012)
- Implemented value: m (Outdated/Incorrect)
Expected Behavior
The implementation should align with the IAU 2012 resolution and the provided documentation:
MultiplyConverter.of(149597870700.0)
Actual Behavior
The implementation uses 149597871000.0, resulting in an error of approximately meters compared to the international standard.