Package org.shredzone.commons.suncalc
Class MoonIllumination
java.lang.Object
org.shredzone.commons.suncalc.MoonIllumination
Calculates the illumination of the moon.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MoonIllumination.Parameters
compute()
Starts the computation ofMoonIllumination
.double
getAngle()
The angle of the moon illumination relative to earth.The closestMoonPhase.Phase
that is matching the moon's angle.double
Illuminated fraction.double
getPhase()
Moon phase.toString()
-
Method Details
-
compute
Starts the computation ofMoonIllumination
.- Returns:
MoonIllumination.Parameters
to set.
-
getFraction
Illuminated fraction.0.0
indicates new moon,1.0
indicates full moon. -
getPhase
Moon phase. Starts at-180.0
(new moon, waxing), passes0.0
(full moon) and moves toward180.0
(waning, new moon).Note that for historical reasons, the range of this phase is different to the moon phase angle used in
MoonPhase
. -
getAngle
The angle of the moon illumination relative to earth. The moon is waxing if the angle is negative, and waning if positive.By subtracting
MoonPosition.getParallacticAngle()
fromgetAngle()
, one can get the zenith angle of the moons bright limb (anticlockwise). The zenith angle can be used do draw the moon shape from the observer's perspective (e.g. the moon lying on its back). -
getClosestPhase
The closestMoonPhase.Phase
that is matching the moon's angle.- Returns:
- Closest
MoonPhase.Phase
- Since:
- 2.12
-
toString
-