Skip to content

Commit 0d1e8b3

Browse files
authored
MeeusCalculator JavaDoc private code
1 parent 0551867 commit 0d1e8b3

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

‎src/main/java/com/kosherjava/zmanim/util/MeeusCalculator.java‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,25 @@ private double getSolarNoonMidnightUTC(double julianDay, double longitude, Solar
244244
* shared between threads and clones.
245245
*/
246246
private static final class NoonSolution {
247+
/** The Julian day (0h UT) of the date. */
247248
final double julianDay;
249+
/** The longitude in degrees, positive west. */
248250
final double longitude;
251+
/** The {@link MeeusCalculator#isApplyDeltaT()} setting the values were calculated with. */
249252
final boolean applyDeltaT;
253+
/** The equation of time at noon, in minutes. */
250254
final double equationOfTime;
255+
/** The solar declination at noon, in degrees. */
251256
final double solarDeclination;
252257

258+
/**
259+
* Creates a noon solution.
260+
* @param julianDay the Julian day (0h UT) of the date
261+
* @param longitude the longitude in degrees, positive west
262+
* @param applyDeltaT whether ΔT was applied
263+
* @param equationOfTime the equation of time at noon, in minutes
264+
* @param solarDeclination the solar declination at noon, in degrees
265+
*/
253266
NoonSolution(double julianDay, double longitude, boolean applyDeltaT, double equationOfTime, double solarDeclination) {
254267
this.julianDay = julianDay;
255268
this.longitude = longitude;
@@ -288,6 +301,16 @@ private NoonSolution getNoonSolution(double julianDay, double longitude) {
288301
return solution;
289302
}
290303

304+
/**
305+
* Calculates sunrise or sunset in minutes after 0h UTC, starting from the cached noon solution and refining it with two
306+
* further passes at the event time.
307+
* @param localDate the date
308+
* @param latitude the latitude in degrees
309+
* @param longitude the longitude in degrees, positive west
310+
* @param zenith the zenith in degrees
311+
* @param solarEvent sunrise or sunset
312+
* @return minutes after 0h UTC, or {@link Double#NaN} if the sun does not reach the zenith that day
313+
*/
291314
private double getSunRiseSetUTC(LocalDate localDate, double latitude, double longitude, double zenith,
292315
SolarEvent solarEvent) {
293316
double julianDay = getJulianDay(localDate);
@@ -552,7 +575,7 @@ private static double getSunDeclination(double julianCenturies, double[] sun) {
552575
}
553576

554577
/**
555-
* {@link #getSunRightAscension(double)} from already calculated apparent ecliptic coordinates.
578+
* Calculates the sun's right ascension from already calculated apparent ecliptic coordinates.
556579
* @param julianCenturies the Julian centuries (TT)
557580
* @param sun {@link #getSunApparentEclipticCoordinates(double)} for the same time
558581
* @return the right ascension in degrees

0 commit comments

Comments
 (0)