Class SunPositionCalculator
java.lang.Object
zext.plantuml.com.ctreber.acearth.util.SunPositionCalculator
Calculates the position of the point on Earth which is directly below the sun or the moon.
© 2002 Christian Treber, ct@ctreber.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Coordinate
getMoonPositionOnEarth
(long pMillis) Given a particular time (expressed in milliseconds since the unix epoch), compute position on the earth (lat, lon) such that the moon is directly overhead.static Coordinate
getSunPositionOnEarth
(long pMillis) Given a particular time (expressed in milliseconds since the unix epoch), compute position on the earth (lat, lon) such that sun is directly overhead.
-
Constructor Details
-
SunPositionCalculator
public SunPositionCalculator()
-
-
Method Details
-
getSunPositionOnEarth
Given a particular time (expressed in milliseconds since the unix epoch), compute position on the earth (lat, lon) such that sun is directly overhead.
Verified.
- Parameters:
pMillis
- seconds since unix epoch
-
getMoonPositionOnEarth
Given a particular time (expressed in milliseconds since the unix epoch), compute position on the earth (lat, lon) such that the moon is directly overhead. Based on duffett-smith **2nd ed** section 61; combines some steps into single expressions to reduce the number of extra variables.
Verified.
-