Skip to content

Inconsistency in ASTRONOMICAL_UNIT definition (JavaDoc vs Implementation) #100

@yososs

Description

@yososs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions