Class CalendarAstronomer.Horizon

  • Enclosing class:
    CalendarAstronomer

    public static final class CalendarAstronomer.Horizon
    extends Object
    Represents the position of an object in the sky relative to the local horizon. The Altitude represents the object's elevation above the horizon, with objects below the horizon having a negative altitude. The Azimuth is the geographic direction of the object from the observer's position, with 0 representing north. The azimuth increases clockwise from north.

    Note that Horizon objects are immutable and cannot be modified once they are constructed. This allows them to be passed and returned by value without worrying about whether other code will modify them.

    See Also:
    CalendarAstronomer.Ecliptic, CalendarAstronomer.Equatorial
    • Field Detail

      • altitude

        public final double altitude
        The object's altitude above the horizon, in radians.
      • azimuth

        public final double azimuth
        The object's direction, in radians clockwise from north.
    • Constructor Detail

      • Horizon

        public Horizon​(double alt,
                       double azim)
        Constructs a Horizon coordinate object.

        Parameters:
        alt - The altitude, measured in radians above the horizon.
        azim - The azimuth, measured in radians clockwise from north.
    • Method Detail

      • toString

        public String toString()
        Return a string representation of this object, with the angles measured in degrees.
        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.