@hebcal/noaa 0.8.3 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,720 @@
1
+ import { Temporal } from 'temporal-polyfill';
2
+ /**
3
+ * A class that contains location information such as latitude and longitude required for astronomical calculations. The
4
+ * elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for
5
+ * specific implementations of the {@link AstronomicalCalculator} to see if elevation is calculated as part of the
6
+ * algorithm.
7
+ *
8
+ * @author © Eliyahu Hershfeld 2004 - 2016
9
+ * @version 1.1
10
+ */
11
+ export declare class GeoLocation {
12
+ /**
13
+ * GeoLocation constructor with parameters for all required fields.
14
+ *
15
+ * @param {string} name
16
+ * The location name for display use such as "Lakewood, NJ"
17
+ * @param {number} latitude
18
+ * the latitude in a double format such as 40.095965 for Lakewood, NJ.
19
+ * <b>Note: </b> For latitudes south of the equator, a negative value should be used.
20
+ * @param {number} longitude
21
+ * double the longitude in a double format such as -74.222130 for Lakewood, NJ.
22
+ * <b>Note: </b> For longitudes east of the <a href="http://en.wikipedia.org/wiki/Prime_Meridian">Prime
23
+ * Meridian </a> (Greenwich), a negative value should be used.
24
+ * @param {number} elevation
25
+ * the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating
26
+ * sunrise and set.
27
+ * @param {string} timeZoneId
28
+ * the <code>TimeZone</code> for the location.
29
+ */
30
+ constructor(name: string | null, latitude: number, longitude: number, elevation: number, timeZoneId?: string);
31
+ constructor(name: string | null, latitude: number, longitude: number, timeZoneId: string);
32
+ /**
33
+ * @private
34
+ * @see #getLatitude()
35
+ * @see #setLatitude(double)
36
+ * @see #setLatitude(int, int, double, String)
37
+ */
38
+ private latitude;
39
+ /**
40
+ * @private
41
+ * @see #getLongitude()
42
+ * @see #setLongitude(double)
43
+ * @see #setLongitude(int, int, double, String)
44
+ */
45
+ private longitude;
46
+ /**
47
+ * @private
48
+ * @see #getLocationName()
49
+ * @see #setLocationName(String)
50
+ */
51
+ private locationName;
52
+ /**
53
+ * @private
54
+ * @see #getTimeZone()
55
+ * @see #setTimeZone(TimeZone)
56
+ */
57
+ private timeZoneId;
58
+ /**
59
+ * @private
60
+ * @see #getElevation()
61
+ * @see #setElevation(double)
62
+ */
63
+ private elevation;
64
+ /**
65
+ * Method to get the elevation in Meters.
66
+ *
67
+ * @return {number} Returns the elevation in Meters.
68
+ */
69
+ getElevation(): number;
70
+ /**
71
+ * Method to set the elevation in Meters <b>above </b> sea level.
72
+ *
73
+ * @param {number} elevation
74
+ * The elevation to set in Meters. An IllegalArgumentException will be thrown if the value is a negative.
75
+ */
76
+ setElevation(elevation: number): void;
77
+ setLatitude(latitude: number): void;
78
+ /**
79
+ * @return {number} Returns the latitude.
80
+ */
81
+ getLatitude(): number;
82
+ setLongitude(longitude: number): void;
83
+ /**
84
+ * @return {number} Returns the longitude.
85
+ */
86
+ getLongitude(): number;
87
+ /**
88
+ * @return {string|null} Returns the location name.
89
+ */
90
+ getLocationName(): string | null;
91
+ /**
92
+ * @param {string|null} name
93
+ * The setter method for the display name.
94
+ */
95
+ setLocationName(name: string | null): void;
96
+ /**
97
+ * @return {string} Returns the timeZone.
98
+ */
99
+ getTimeZone(): string;
100
+ /**
101
+ * Method to set the TimeZone. If this is ever set after the GeoLocation is set in the
102
+ * {@link AstronomicalCalendar}, it is critical that
103
+ * {@link AstronomicalCalendar#getCalendar()}.
104
+ * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the
105
+ * AstronomicalCalendar to output times in the expected offset. This situation will arise if the
106
+ * AstronomicalCalendar is ever {@link AstronomicalCalendar#clone() cloned}.
107
+ *
108
+ * @param {string} timeZone
109
+ * The timeZone to set.
110
+ */
111
+ setTimeZone(timeZoneId: string): void;
112
+ }
113
+ /**
114
+ * Implementation of sunrise and sunset methods to calculate astronomical times based on the <a
115
+ * href="http://noaa.gov">NOAA</a> algorithm. This calculator uses the Java algorithm based on the implementation by <a
116
+ * href="http://noaa.gov">NOAA - National Oceanic and Atmospheric Administration</a>'s <a href =
117
+ * "http://www.srrb.noaa.gov/highlights/sunrise/sunrise.html">Surface Radiation Research Branch</a>. NOAA's <a
118
+ * href="http://www.srrb.noaa.gov/highlights/sunrise/solareqns.PDF">implementation</a> is based on equations from <a
119
+ * href="http://www.willbell.com/math/mc1.htm">Astronomical Algorithms</a> by <a
120
+ * href="http://en.wikipedia.org/wiki/Jean_Meeus">Jean Meeus</a>. Added to the algorithm is an adjustment of the zenith
121
+ * to account for elevation. The algorithm can be found in the <a
122
+ * href="http://en.wikipedia.org/wiki/Sunrise_equation">Wikipedia Sunrise Equation</a> article.
123
+ *
124
+ * @author &copy; Eliyahu Hershfeld 2011 - 2019
125
+ */
126
+ export declare class NOAACalculator {
127
+ /**
128
+ * A constructor that takes in <a href="http://en.wikipedia.org/wiki/Geolocation">geolocation</a> information as a
129
+ * parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar
130
+ * calculations is the the {@link NOAACalculator}.
131
+ *
132
+ * @param {GeoLocation} geoLocation
133
+ * The location information used for calculating astronomical sun times.
134
+ * @param {Temporal.PlainDate} date
135
+ *
136
+ * @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.
137
+ */
138
+ constructor(geoLocation: GeoLocation, date: Temporal.PlainDate);
139
+ /**
140
+ * The zenith of astronomical sunrise and sunset. The sun is 90&deg; from the vertical 0&deg;
141
+ * @private
142
+ */
143
+ private static readonly GEOMETRIC_ZENITH;
144
+ /**
145
+ * Default value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle that the
146
+ * center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the Earth
147
+ * were without an atmosphere, true sunset and sunrise would correspond to a 90&deg; zenith. Because the Sun is not
148
+ * a point, and because the atmosphere refracts light, this 90&deg; zenith does not, in fact, correspond to true
149
+ * sunset or sunrise, instead the center of the Sun's disk must lie just below the horizon for the upper edge to be
150
+ * obscured. This means that a zenith of just above 90&deg; must be used. The Sun subtends an angle of 16 minutes of
151
+ * arc (this can be changed via the {@link #setSunRadius(double)} method , and atmospheric refraction accounts for
152
+ * 34 minutes or so (this can be changed via the {@link #setRefraction(double)} method), giving a total of 50
153
+ * arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333&deg; for true sunrise/sunset.
154
+ */
155
+ /** Sun's zenith at civil twilight (96&deg;). */
156
+ static readonly CIVIL_ZENITH: number;
157
+ /** Sun's zenith at nautical twilight (102&deg;). */
158
+ static readonly NAUTICAL_ZENITH: number;
159
+ /** Sun's zenith at astronomical twilight (108&deg;). */
160
+ static readonly ASTRONOMICAL_ZENITH: number;
161
+ /**
162
+ * The Java Calendar encapsulated by this class to track the current date used by the class
163
+ * @private
164
+ */
165
+ private date;
166
+ /**
167
+ * the {@link GeoLocation} used for calculations.
168
+ * @private
169
+ */
170
+ private geoLocation;
171
+ /**
172
+ * The getSunrise method Returns a `Date` representing the
173
+ * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used
174
+ * for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90&deg; plus
175
+ * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the
176
+ * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction
177
+ * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333&deg;}.
178
+ * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.
179
+ *
180
+ * @return {Temporal.ZonedDateTime | null} the `Date` representing the exact sunrise time. If the calculation can't be computed such as
181
+ * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
182
+ * does not set, a null will be returned. See detailed explanation on top of the page.
183
+ * @see AstronomicalCalculator#adjustZenith
184
+ * @see #getSeaLevelSunrise()
185
+ * @see AstronomicalCalendar#getUTCSunrise
186
+ */
187
+ getSunrise(): Temporal.ZonedDateTime | null;
188
+ /**
189
+ * A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation
190
+ * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,
191
+ * something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the
192
+ * base for dawn calculations that are calculated as a dip below the horizon before sunrise.
193
+ *
194
+ * @return {Temporal.ZonedDateTime | null} the `Date` representing the exact sea-level sunrise time. If the calculation can't be computed
195
+ * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
196
+ * where it does not set, a null will be returned. See detailed explanation on top of the page.
197
+ * @see AstronomicalCalendar#getSunrise
198
+ * @see AstronomicalCalendar#getUTCSeaLevelSunrise
199
+ * @see #getSeaLevelSunset()
200
+ */
201
+ getSeaLevelSunrise(): Temporal.ZonedDateTime | null;
202
+ /**
203
+ * A method that returns the beginning of civil twilight (dawn) using a zenith of {@link #CIVIL_ZENITH 96&deg;}.
204
+ *
205
+ * @return {Temporal.ZonedDateTime | null} The `Date` of the beginning of civil twilight using a zenith of 96&deg;. If the calculation
206
+ * can't be computed, null will be returned. See detailed explanation on top of the page.
207
+ * @see #CIVIL_ZENITH
208
+ */
209
+ getBeginCivilTwilight(): Temporal.ZonedDateTime | null;
210
+ /**
211
+ * A method that returns the beginning of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102&deg;}.
212
+ *
213
+ * @return {Temporal.ZonedDateTime | null} The `Date` of the beginning of nautical twilight using a zenith of 102&deg;. If the
214
+ * calculation can't be computed null will be returned. See detailed explanation on top of the page.
215
+ * @see #NAUTICAL_ZENITH
216
+ */
217
+ getBeginNauticalTwilight(): Temporal.ZonedDateTime | null;
218
+ /**
219
+ * A method that returns the beginning of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH
220
+ * 108&deg;}.
221
+ *
222
+ * @return {Temporal.ZonedDateTime | null} The `Date` of the beginning of astronomical twilight using a zenith of 108&deg;. If the
223
+ * calculation can't be computed, null will be returned. See detailed explanation on top of the page.
224
+ * @see #ASTRONOMICAL_ZENITH
225
+ */
226
+ getBeginAstronomicalTwilight(): Temporal.ZonedDateTime | null;
227
+ /**
228
+ * The getSunset method Returns a `Date` representing the
229
+ * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for
230
+ * the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90&deg; plus
231
+ * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the
232
+ * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction
233
+ * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333&deg;}.
234
+ * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note:
235
+ * In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone
236
+ * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this
237
+ * case the sunset date will be incremented to the following date.
238
+ *
239
+ * @return {Temporal.ZonedDateTime | null} The `Date` representing the exact sunset time. If the calculation can't be computed such as in
240
+ * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
241
+ * does not set, a null will be returned. See detailed explanation on top of the page.
242
+ * @see AstronomicalCalculator#adjustZenith
243
+ * @see #getSeaLevelSunset()
244
+ * @see AstronomicalCalendar#getUTCSunset
245
+ */
246
+ getSunset(): Temporal.ZonedDateTime | null;
247
+ /**
248
+ * A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation
249
+ * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,
250
+ * something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the
251
+ * base for dusk calculations that are calculated as a dip below the horizon after sunset.
252
+ *
253
+ * @return {Temporal.ZonedDateTime | null} The `Date` representing the exact sea-level sunset time. If the calculation can't be computed
254
+ * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
255
+ * where it does not set, a null will be returned. See detailed explanation on top of the page.
256
+ * @see AstronomicalCalendar#getSunset
257
+ * @see AstronomicalCalendar#getUTCSeaLevelSunset 2see {@link #getSunset()}
258
+ */
259
+ getSeaLevelSunset(): Temporal.ZonedDateTime | null;
260
+ /**
261
+ * A method that returns the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96&deg;}.
262
+ *
263
+ * @return {Temporal.ZonedDateTime | null} The `Date` of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96&deg;}. If
264
+ * the calculation can't be computed, null will be returned. See detailed explanation on top of the page.
265
+ * @see #CIVIL_ZENITH
266
+ */
267
+ getEndCivilTwilight(): Temporal.ZonedDateTime | null;
268
+ /**
269
+ * A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102&deg;}.
270
+ *
271
+ * @return {Temporal.ZonedDateTime | null} The `Date` of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102&deg;}
272
+ * . If the calculation can't be computed, null will be returned. See detailed explanation on top of the
273
+ * page.
274
+ * @see #NAUTICAL_ZENITH
275
+ */
276
+ getEndNauticalTwilight(): Temporal.ZonedDateTime | null;
277
+ /**
278
+ * A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108&deg;}.
279
+ *
280
+ * @return {Temporal.ZonedDateTime | null} The `Date` of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH
281
+ * 108&deg;}. If the calculation can't be computed, null will be returned. See detailed explanation on top
282
+ * of the page.
283
+ * @see #ASTRONOMICAL_ZENITH
284
+ */
285
+ getEndAstronomicalTwilight(): Temporal.ZonedDateTime | null;
286
+ /**
287
+ * A utility method that returns a date offset by the offset time passed in. Please note that the level of light
288
+ * during twilight is not affected by elevation, so if this is being used to calculate an offset before sunrise or
289
+ * after sunset with the intent of getting a rough "level of light" calculation, the sunrise or sunset time passed
290
+ * to this method should be sea level sunrise and sunset.
291
+ *
292
+ * @param {Temporal.ZonedDateTime | null} time
293
+ * the start time
294
+ * @param {number} offset
295
+ * the offset in milliseconds to add to the time.
296
+ * @return {Temporal.ZonedDateTime | null} the `Date` with the offset in milliseconds added to it
297
+ */
298
+ static getTimeOffset(time: Temporal.ZonedDateTime | null, offset: number): Temporal.ZonedDateTime | null;
299
+ /**
300
+ * A utility method that returns the time of an offset by degrees below or above the horizon of
301
+ * {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14&deg;
302
+ * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
303
+ *
304
+ * @param {number} offsetZenith
305
+ * the degrees before {@link #getSunrise()} to use in the calculation. For time after sunrise use
306
+ * negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14&deg;
307
+ * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a
308
+ * parameter.
309
+ * @return {Temporal.ZonedDateTime | null} The `Date` of the offset after (or before) {@link #getSunrise()}. If the calculation
310
+ * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does
311
+ * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
312
+ * page.
313
+ */
314
+ getSunriseOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null;
315
+ /**
316
+ * A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunset()
317
+ * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14&deg; after sunset, an
318
+ * offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
319
+ *
320
+ * @param {number} offsetZenith
321
+ * the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative
322
+ * numbers. Note that the degree offset is from the vertical, so for a calculation of 14&deg; after
323
+ * sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
324
+ * @return {Temporal.ZonedDateTime | null} The `Date`of the offset after (or before) {@link #getSunset()}. If the calculation can't
325
+ * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not
326
+ * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
327
+ * page.
328
+ */
329
+ getSunsetOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null;
330
+ /**
331
+ * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using
332
+ * daylight savings time.
333
+ *
334
+ * @param {number} zenith
335
+ * the degrees below the horizon. For time after sunrise use negative numbers.
336
+ * @return {number} The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
337
+ * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
338
+ * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
339
+ */
340
+ getUTCSunrise0(zenith: number): number;
341
+ /**
342
+ * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using
343
+ * daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible
344
+ * light, something that is not affected by elevation. This method returns UTC sunrise calculated at sea level. This
345
+ * forms the base for dawn calculations that are calculated as a dip below the horizon before sunrise.
346
+ *
347
+ * @param {number} zenith
348
+ * the degrees below the horizon. For time after sunrise use negative numbers.
349
+ * @return {number} The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
350
+ * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
351
+ * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
352
+ * @see AstronomicalCalendar#getUTCSunrise
353
+ * @see AstronomicalCalendar#getUTCSeaLevelSunset
354
+ */
355
+ getUTCSeaLevelSunrise(zenith: number): number;
356
+ /**
357
+ * A method that returns the sunset in UTC time without correction for time zone offset from GMT and without using
358
+ * daylight savings time.
359
+ *
360
+ * @param {number} zenith
361
+ * the degrees below the horizon. For time after sunset use negative numbers.
362
+ * @return {number} The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
363
+ * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
364
+ * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
365
+ * @see AstronomicalCalendar#getUTCSeaLevelSunset
366
+ */
367
+ getUTCSunset0(zenith: number): number;
368
+ /**
369
+ * A method that returns the sunset in UTC time without correction for elevation, time zone offset from GMT and
370
+ * without using daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the
371
+ * amount of visible light, something that is not affected by elevation. This method returns UTC sunset calculated
372
+ * at sea level. This forms the base for dusk calculations that are calculated as a dip below the horizon after
373
+ * sunset.
374
+ *
375
+ * @param {number} zenith
376
+ * the degrees below the horizon. For time before sunset use negative numbers.
377
+ * @return {number} The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
378
+ * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
379
+ * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
380
+ * @see AstronomicalCalendar#getUTCSunset
381
+ * @see AstronomicalCalendar#getUTCSeaLevelSunrise
382
+ */
383
+ getUTCSeaLevelSunset(zenith: number): number;
384
+ /**
385
+ * Adjusts the <code>Calendar</code> to deal with edge cases where the location crosses the antimeridian.
386
+ * @private
387
+ * @see GeoLocation#getAntimeridianAdjustment()
388
+ * @return the adjusted Calendar
389
+ */
390
+ private getAdjustedDate;
391
+ /**
392
+ * Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher
393
+ * elevation can see farther below the horizon, the calculation for sunrise / sunset is calculated below the horizon
394
+ * used at sea level. This is only used for sunrise and sunset and not times before or after it such as
395
+ * {@link AstronomicalCalendar#getBeginNauticalTwilight() nautical twilight} since those
396
+ * calculations are based on the level of available light at the given dip below the horizon, something that is not
397
+ * affected by elevation, the adjustment should only made if the zenith == 90&deg; {@link #adjustZenith adjusted}
398
+ * for refraction and solar radius. The algorithm used is
399
+ *
400
+ * <pre>
401
+ * elevationAdjustment = Math.toDegrees(Math.acos(earthRadiusInMeters / (earthRadiusInMeters + elevationMeters)));
402
+ * </pre>
403
+ *
404
+ * The source of this algorithm is <a href="http://www.calendarists.com">Calendrical Calculations</a> by Edward M.
405
+ * Reingold and Nachum Dershowitz. An alternate algorithm that produces an almost identical (but not accurate)
406
+ * result found in Ma'aglay Tzedek by Moishe Kosower and other sources is:
407
+ *
408
+ * <pre>
409
+ * elevationAdjustment = 0.0347 * Math.sqrt(elevationMeters);
410
+ * </pre>
411
+ *
412
+ * @param {number} elevation
413
+ * elevation in Meters.
414
+ * @return {number} the adjusted zenith
415
+ */
416
+ getElevationAdjustment(elevation: number): number;
417
+ /**
418
+ * Adjusts the zenith of astronomical sunrise and sunset to account for solar refraction, solar radius and
419
+ * elevation. The value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle
420
+ * that the center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the
421
+ * Earth were without an atmosphere, true sunset and sunrise would correspond to a 90&deg; zenith. Because the Sun
422
+ * is not a point, and because the atmosphere refracts light, this 90&deg; zenith does not, in fact, correspond to
423
+ * true sunset or sunrise, instead the centre of the Sun's disk must lie just below the horizon for the upper edge
424
+ * to be obscured. This means that a zenith of just above 90&deg; must be used. The Sun subtends an angle of 16
425
+ * minutes of arc (this can be changed via the {@link #setSolarRadius(double)} method , and atmospheric refraction
426
+ * accounts for 34 minutes or so (this can be changed via the {@link #setRefraction(double)} method), giving a total
427
+ * of 50 arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333&deg; for true sunrise/sunset. Since a
428
+ * person at an elevation can see blow the horizon of a person at sea level, this will also adjust the zenith to
429
+ * account for elevation if available. Note that this will only adjust the value if the zenith is exactly 90 degrees.
430
+ * For values below and above this no correction is done. As an example, astronomical twilight is when the sun is
431
+ * 18&deg; below the horizon or {@link AstronomicalCalendar#ASTRONOMICAL_ZENITH 108&deg;
432
+ * below the zenith}. This is traditionally calculated with none of the above mentioned adjustments. The same goes
433
+ * for various <em>tzais</em> and <em>alos</em> times such as the
434
+ * {@link ZmanimCalendar#ZENITH_16_POINT_1 16.1&deg;} dip used in
435
+ * {@link ComplexZmanimCalendar#getAlos16Point1Degrees()}.
436
+ *
437
+ * @param {number} zenith
438
+ * the azimuth below the vertical zenith of 90&deg;. For sunset typically the {@link #adjustZenith
439
+ * zenith} used for the calculation uses geometric zenith of 90&deg; and {@link #adjustZenith adjusts}
440
+ * this slightly to account for solar refraction and the sun's radius. Another example would be
441
+ * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes
442
+ * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.
443
+ * @param {number} elevation
444
+ * elevation in Meters.
445
+ * @return {number} The zenith adjusted to include the {@link #getSolarRadius sun's radius}, {@link #getRefraction
446
+ * refraction} and {@link #getElevationAdjustment elevation} adjustment. This will only be adjusted for
447
+ * sunrise and sunset (if the zenith == 90&deg;)
448
+ * @see #getElevationAdjustment(double)
449
+ */
450
+ adjustZenith(zenith: number, elevation: number): number;
451
+ /**
452
+ * The <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> of January 1, 2000
453
+ * @private
454
+ */
455
+ private static readonly JULIAN_DAY_JAN_1_2000;
456
+ /**
457
+ * Julian days per century
458
+ * @private
459
+ */
460
+ private static readonly JULIAN_DAYS_PER_CENTURY;
461
+ /**
462
+ * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)
463
+ */
464
+ getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number;
465
+ /**
466
+ * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)
467
+ */
468
+ getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number;
469
+ /**
470
+ * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset
471
+ * passed as parameters to this method. An example of the use of this method would be the calculation of a
472
+ * non-elevation adjusted temporal hour by passing in {@link #getSeaLevelSunrise() sea level sunrise} and
473
+ * {@link #getSeaLevelSunset() sea level sunset} as parameters.
474
+ *
475
+ * @param {Temporal.ZonedDateTime | null} startOfDay
476
+ * The start of the day.
477
+ * @param {Temporal.ZonedDateTime | null} endOfDay
478
+ * The end of the day.
479
+ *
480
+ * @return {number} the <code>long</code> millisecond length of the temporal hour. If the calculation can't be computed a
481
+ * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.
482
+ *
483
+ * @see #getTemporalHour()
484
+ */
485
+ getTemporalHour(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): number;
486
+ /**
487
+ * A method that returns sundial or solar noon. It occurs when the Sun is <a href
488
+ * ="http://en.wikipedia.org/wiki/Transit_%28astronomy%29">transiting</a> the <a
489
+ * href="http://en.wikipedia.org/wiki/Meridian_%28astronomy%29">celestial meridian</a>. In this class it is
490
+ * calculated as halfway between the sunrise and sunset passed to this method. This time can be slightly off the
491
+ * real transit time due to changes in declination (the lengthening or shortening day).
492
+ *
493
+ * @param {Temporal.ZonedDateTime | null} startOfDay
494
+ * the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or
495
+ * any arbitrary start of day) passed to this method.
496
+ * @param {Temporal.ZonedDateTime | null} endOfDay
497
+ * the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any
498
+ * arbitrary end of day) passed to this method.
499
+ *
500
+ * @return {Temporal.ZonedDateTime | null} The `Date` representing Sun's transit. If the calculation can't be computed such as in the
501
+ * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
502
+ * not set, null will be returned. See detailed explanation on top of the page.
503
+ */
504
+ getSunTransit(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
505
+ /**
506
+ * A method that returns a `Date` from the time passed in as a parameter.
507
+ * @protected
508
+ * @param {number} time
509
+ * The time to be set as the time for the `Date`. The time expected is in the format: 18.75
510
+ * for 6:45:00 PM.
511
+ * @param {boolean} isSunrise true if the time is sunrise, and false if it is sunset
512
+ * @return {Temporal.ZonedDateTime | null} The Date.
513
+ */
514
+ protected getDateFromTime(time: number, isSunrise: boolean): Temporal.ZonedDateTime | null;
515
+ /**
516
+ * Return the <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> from a Java Calendar
517
+ * @private
518
+ * @param {Temporal.ZonedDateTime} date
519
+ * The Java Calendar
520
+ * @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days
521
+ * should be added later.
522
+ */
523
+ private static getJulianDay;
524
+ /**
525
+ * Convert <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> to centuries since J2000.0.
526
+ * @private
527
+ * @param julianDay
528
+ * the Julian Day to convert
529
+ * @return the centuries since 2000 Julian corresponding to the Julian Day
530
+ */
531
+ private static getJulianCenturiesFromJulianDay;
532
+ /**
533
+ * Convert centuries since J2000.0 to <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a>.
534
+ * @private
535
+ * @param julianCenturies
536
+ * the number of Julian centuries since J2000.0
537
+ * @return the Julian Day corresponding to the Julian centuries passed in
538
+ */
539
+ private static getJulianDayFromJulianCenturies;
540
+ /**
541
+ * Returns the Geometric <a href="http://en.wikipedia.org/wiki/Mean_longitude">Mean Longitude</a> of the Sun.
542
+ * @private
543
+ * @param julianCenturies
544
+ * the number of Julian centuries since J2000.0
545
+ * @return the Geometric Mean Longitude of the Sun in degrees
546
+ */
547
+ private static getSunGeometricMeanLongitude;
548
+ /**
549
+ * Returns the Geometric <a href="http://en.wikipedia.org/wiki/Mean_anomaly">Mean Anomaly</a> of the Sun.
550
+ * @private
551
+ * @param julianCenturies
552
+ * the number of Julian centuries since J2000.0
553
+ * @return the Geometric Mean Anomaly of the Sun in degrees
554
+ */
555
+ private static getSunGeometricMeanAnomaly;
556
+ /**
557
+ * Return the <a href="http://en.wikipedia.org/wiki/Eccentricity_%28orbit%29">eccentricity of earth's orbit</a>.
558
+ * @private
559
+ * @param julianCenturies
560
+ * the number of Julian centuries since J2000.0
561
+ * @return the unitless eccentricity
562
+ */
563
+ private static getEarthOrbitEccentricity;
564
+ /**
565
+ * Returns the <a href="http://en.wikipedia.org/wiki/Equation_of_the_center">equation of center</a> for the sun.
566
+ * @private
567
+ * @param julianCenturies
568
+ * the number of Julian centuries since J2000.0
569
+ * @return the equation of center for the sun in degrees
570
+ */
571
+ private static getSunEquationOfCenter;
572
+ /**
573
+ * Return the true longitude of the sun
574
+ * @private
575
+ * @param julianCenturies
576
+ * the number of Julian centuries since J2000.0
577
+ * @return the sun's true longitude in degrees
578
+ */
579
+ private static getSunTrueLongitude;
580
+ /**
581
+ * Return the apparent longitude of the sun
582
+ * @private
583
+ * @param julianCenturies
584
+ * the number of Julian centuries since J2000.0
585
+ * @return sun's apparent longitude in degrees
586
+ */
587
+ private static getSunApparentLongitude;
588
+ /**
589
+ * Returns the mean <a href="http://en.wikipedia.org/wiki/Axial_tilt">obliquity of the ecliptic</a> (Axial tilt).
590
+ * @private
591
+ * @param julianCenturies
592
+ * the number of Julian centuries since J2000.0
593
+ * @return the mean obliquity in degrees
594
+ */
595
+ private static getMeanObliquityOfEcliptic;
596
+ /**
597
+ * Returns the corrected <a href="http://en.wikipedia.org/wiki/Axial_tilt">obliquity of the ecliptic</a> (Axial
598
+ * tilt).
599
+ * @private
600
+ * @param julianCenturies
601
+ * the number of Julian centuries since J2000.0
602
+ * @return the corrected obliquity in degrees
603
+ */
604
+ private static getObliquityCorrection;
605
+ /**
606
+ * Return the <a href="http://en.wikipedia.org/wiki/Declination">declination</a> of the sun.
607
+ * @private
608
+ * @param julianCenturies
609
+ * the number of Julian centuries since J2000.0
610
+ * @return
611
+ * the sun's declination in degrees
612
+ */
613
+ private static getSunDeclination;
614
+ /**
615
+ * Return the <a href="http://en.wikipedia.org/wiki/Equation_of_time">Equation of Time</a> - the difference between
616
+ * true solar time and mean solar time
617
+ * @private
618
+ * @param julianCenturies
619
+ * the number of Julian centuries since J2000.0
620
+ * @return equation of time in minutes of time
621
+ */
622
+ private static getEquationOfTime;
623
+ /**
624
+ * Return the <a href="http://en.wikipedia.org/wiki/Hour_angle">hour angle</a> of the sun at sunrise for the
625
+ * latitude.
626
+ * @private
627
+ * @param {number} lat
628
+ * , the latitude of observer in degrees
629
+ * @param solarDec
630
+ * the declination angle of sun in degrees
631
+ * @param {number} zenith
632
+ * the zenith
633
+ * @return hour angle of sunrise in radians
634
+ */
635
+ private static getSunHourAngleAtSunrise;
636
+ /**
637
+ * Returns the <a href="http://en.wikipedia.org/wiki/Hour_angle">hour angle</a> of the sun at sunset for the
638
+ * latitude. TODO: use - {@link #getSunHourAngleAtSunrise(double, double, double)} implementation to avoid
639
+ * duplication of code.
640
+ * @private
641
+ * @param {number} lat
642
+ * the latitude of observer in degrees
643
+ * @param solarDec
644
+ * the declination angle of sun in degrees
645
+ * @param {number} zenith
646
+ * the zenith
647
+ * @return the hour angle of sunset in radians
648
+ */
649
+ private static getSunHourAngleAtSunset;
650
+ /**
651
+ * Return the <a href="http://en.wikipedia.org/wiki/Celestial_coordinate_system">Solar Elevation</a> for the
652
+ * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the
653
+ * horizon. Not corrected for altitude.
654
+ *
655
+ * @param {Temporal.ZonedDateTime} date
656
+ * time of calculation
657
+ * @param {number} lat
658
+ * latitude of location for calculation
659
+ * @param {number} lon
660
+ * longitude of location for calculation
661
+ * @return {number} solar elevation in degrees - horizon is 0 degrees, civil twilight is -6 degrees
662
+ */
663
+ static getSolarElevation(date: Temporal.ZonedDateTime, lat: number, lon: number): number;
664
+ /**
665
+ * Return the <a href="http://en.wikipedia.org/wiki/Celestial_coordinate_system">Solar Azimuth</a> for the
666
+ * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 0
667
+ * degrees.
668
+ *
669
+ * @param {Temporal.ZonedDateTime} date
670
+ * time of calculation
671
+ * @param {number} latitude
672
+ * latitude of location for calculation
673
+ * @param {number} lon
674
+ * longitude of location for calculation
675
+ * @return {number}
676
+ */
677
+ static getSolarAzimuth(date: Temporal.ZonedDateTime, latitude: number, lon: number): number;
678
+ /**
679
+ * Return the <a href="http://en.wikipedia.org/wiki/Universal_Coordinated_Time">Universal Coordinated Time</a> (UTC)
680
+ * of sunrise for the given day at the given location on earth
681
+ * @private
682
+ * @param julianDay
683
+ * the Julian day
684
+ * @param {number} latitude
685
+ * the latitude of observer in degrees
686
+ * @param {number} longitude
687
+ * the longitude of observer in degrees
688
+ * @param {number} zenith
689
+ * the zenith
690
+ * @return the time in minutes from zero UTC
691
+ */
692
+ private static getSunriseUTC;
693
+ /**
694
+ * Return the <a href="http://en.wikipedia.org/wiki/Universal_Coordinated_Time">Universal Coordinated Time</a> (UTC)
695
+ * of <a href="http://en.wikipedia.org/wiki/Noon#Solar_noon">solar noon</a> for the given day at the given location
696
+ * on earth.
697
+ * @private
698
+ * @param julianCenturies
699
+ * the number of Julian centuries since J2000.0
700
+ * @param {number} longitude
701
+ * the longitude of observer in degrees
702
+ * @return the time in minutes from zero UTC
703
+ */
704
+ private static getSolarNoonUTC;
705
+ /**
706
+ * Return the <a href="http://en.wikipedia.org/wiki/Universal_Coordinated_Time">Universal Coordinated Time</a> (UTC)
707
+ * of sunset for the given day at the given location on earth
708
+ * @private
709
+ * @param julianDay
710
+ * the Julian day
711
+ * @param {number} latitude
712
+ * the latitude of observer in degrees
713
+ * @param {number} longitude
714
+ * : longitude of observer in degrees
715
+ * @param {number} zenith
716
+ * the zenith
717
+ * @return the time in minutes from zero Universal Coordinated Time (UTC)
718
+ */
719
+ private static getSunsetUTC;
720
+ }