Class MoonPosition

java.lang.Object
net.time4j.calendar.astro.MoonPosition
All Implemented Interfaces:
Serializable, EquatorialCoordinates

public class MoonPosition extends Object implements EquatorialCoordinates, Serializable

Contains methods for calculating the position of the moon.

The position refers to the gemometric center of the moon.

Since:
3.38/4.33
Author:
Meno Hochschild
See Also:
Serialized Form
  • Method Details

    • at

      public static MoonPosition at(Moment moment, GeoLocation location)

      Calculates the position of moon at given moment and geographical location.

      Parameters:
      moment - the time when the position of moon is to be determined
      location - geographical location of observer
      Returns:
      moon position
    • inConstellationOf

      public static Zodiac.Event inConstellationOf(Zodiac zodiac)

      Determines the event when the moon enters or exits given zodiac constellation.

      Parameters:
      zodiac - the astronomical zodiac constellation defined by IAU
      Returns:
      event when the moon enters or leaves the zodiac constellation
      Since:
      4.37
    • inSignOf

      public static Zodiac.Event inSignOf(Zodiac zodiac)

      Determines the event when the moon enters or exits given zodiac sign (for horoscope purpose).

      Parameters:
      zodiac - the astronomical zodiac sign
      Returns:
      event when the moon enters or leaves the zodiac sign
      Throws:
      IllegalArgumentException - if the zodiac is Zodiac.OPHIUCHUS
      Since:
      4.37
    • inNextApogeeAfter

      public static Moment inNextApogeeAfter(Moment moment)

      Obtains the time of next apogee after given moment.

      Parameters:
      moment - the moment after which the time of next apogee is to be determined
      Returns:
      time of next apogee as Moment in minute precision
      Throws:
      IllegalArgumentException - if the Julian day of result is not in supported range
      Since:
      5.4
    • inNextPerigeeAfter

      public static Moment inNextPerigeeAfter(Moment moment)

      Obtains the time of next perigee after given moment.

      Note: The perigee time might deviate from exact astronomical calculations by several minutes in some cases so this method represents a compromise between speed and accuracy.

      Parameters:
      moment - the moment after which the time of next perigee is to be determined
      Returns:
      time of next perigee as Moment in minute precision
      Throws:
      IllegalArgumentException - if the Julian day of result is not in supported range
      Since:
      5.4
    • getRightAscension

      public double getRightAscension()
      Description copied from interface: EquatorialCoordinates

      Obtains the right ascension in degrees.

      Specified by:
      getRightAscension in interface EquatorialCoordinates
      Returns:
      double in range 0-360
    • getDeclination

      public double getDeclination()
      Description copied from interface: EquatorialCoordinates

      Obtains the declination in degrees.

      Specified by:
      getDeclination in interface EquatorialCoordinates
      Returns:
      double
    • getAzimuth

      public double getAzimuth()

      Obtains the azimuth of moon in degrees (compass orientation).

      The azimuth is the result of a coordinate transformation of right ascension and declination to the horizon system.

      Returns:
      azimuth in degrees measured from the north (compass orientation)
    • getElevation

      public double getElevation()

      Obtains the elevation of moon relative to the horizon in degrees.

      The elevation is the result of a coordinate transformation of right ascension and declination to the horizon system.

      Returns:
      elevation in degrees (positive if above the horizon and negative if below the horizon)
    • getDistance

      public double getDistance()

      Obtains the distance between the centers of earth and moon in kilometers.

      Returns:
      double
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object