Class MoonPosition
- All Implemented Interfaces:
Serializable
,EquatorialCoordinates
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 Summary
Modifier and TypeMethodDescriptionstatic MoonPosition
at(Moment moment, GeoLocation location)
Calculates the position of moon at given moment and geographical location.boolean
double
Obtains the azimuth of moon in degrees (compass orientation).double
Obtains the declination in degrees.double
Obtains the distance between the centers of earth and moon in kilometers.double
Obtains the elevation of moon relative to the horizon in degrees.double
Obtains the right ascension in degrees.int
hashCode()
static Zodiac.Event
inConstellationOf(Zodiac zodiac)
Determines the event when the moon enters or exits given zodiac constellation.static Moment
inNextApogeeAfter(Moment moment)
Obtains the time of next apogee after given moment.static Moment
inNextPerigeeAfter(Moment moment)
Obtains the time of next perigee after given moment.static Zodiac.Event
Determines the event when the moon enters or exits given zodiac sign (for horoscope purpose).toString()
Methods inherited from interface net.time4j.calendar.astro.EquatorialCoordinates
getRightAscensionHMS
-
Method Details
-
at
Calculates the position of moon at given moment and geographical location.
- Parameters:
moment
- the time when the position of moon is to be determinedlocation
- geographical location of observer- Returns:
- moon position
-
inConstellationOf
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
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 isZodiac.OPHIUCHUS
- Since:
- 4.37
-
inNextApogeeAfter
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
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 interfaceEquatorialCoordinates
- Returns:
- double in range 0-360
-
getDeclination
public double getDeclination()Description copied from interface:EquatorialCoordinates
Obtains the declination in degrees.
- Specified by:
getDeclination
in interfaceEquatorialCoordinates
- 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
-
hashCode
public int hashCode() -
toString
-