Class SunPosition

java.lang.Object
org.shredzone.commons.suncalc.SunPosition

public class SunPosition extends Object
Calculates the position of the sun.
  • Method Details

    • compute

      Starts the computation of SunPosition.
      Returns:
      SunPosition.Parameters to set.
    • getAltitude

      public double getAltitude()
      The visible sun altitude above the horizon, in degrees.

      0.0 means the sun's center is at the horizon, 90.0 at the zenith (straight over your head). Atmospheric refraction is taken into account.

      See Also:
    • getTrueAltitude

      public double getTrueAltitude()
      The true sun altitude above the horizon, in degrees.

      0.0 means the sun's center is at the horizon, 90.0 at the zenith (straight over your head).

      See Also:
    • getAzimuth

      public double getAzimuth()
      Sun azimuth, in degrees, north-based.

      This is the direction along the horizon, measured from north to east. For example, 0.0 means north, 135.0 means southeast, 270.0 means west.

    • getDistance

      public double getDistance()
      Sun's distance, in kilometers.
    • toString

      public String toString()
      Overrides:
      toString in class Object