Class CalendarAstronomer.Horizon

java.lang.Object
com.ibm.icu.impl.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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    The object's altitude above the horizon, in radians.
    final double
    The object's direction, in radians clockwise from north.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Horizon(double alt, double azim)
    Constructs a Horizon coordinate object.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return a string representation of this object, with the angles measured in degrees.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • 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 Details

    • 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 Details

    • toString

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