@hebcal/noaa 0.8.4 → 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.
- package/README.md +623 -5
- package/dist/cjs/index.js +123 -101
- package/dist/esm/index.js +123 -101
- package/dist/index.d.ts +109 -104
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,28 +10,53 @@ import { Temporal } from 'temporal-polyfill';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class GeoLocation {
|
|
12
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
|
|
13
34
|
* @see #getLatitude()
|
|
14
35
|
* @see #setLatitude(double)
|
|
15
36
|
* @see #setLatitude(int, int, double, String)
|
|
16
37
|
*/
|
|
17
38
|
private latitude;
|
|
18
39
|
/**
|
|
40
|
+
* @private
|
|
19
41
|
* @see #getLongitude()
|
|
20
42
|
* @see #setLongitude(double)
|
|
21
43
|
* @see #setLongitude(int, int, double, String)
|
|
22
44
|
*/
|
|
23
45
|
private longitude;
|
|
24
46
|
/**
|
|
47
|
+
* @private
|
|
25
48
|
* @see #getLocationName()
|
|
26
49
|
* @see #setLocationName(String)
|
|
27
50
|
*/
|
|
28
51
|
private locationName;
|
|
29
52
|
/**
|
|
53
|
+
* @private
|
|
30
54
|
* @see #getTimeZone()
|
|
31
55
|
* @see #setTimeZone(TimeZone)
|
|
32
56
|
*/
|
|
33
57
|
private timeZoneId;
|
|
34
58
|
/**
|
|
59
|
+
* @private
|
|
35
60
|
* @see #getElevation()
|
|
36
61
|
* @see #setElevation(double)
|
|
37
62
|
*/
|
|
@@ -39,58 +64,37 @@ export declare class GeoLocation {
|
|
|
39
64
|
/**
|
|
40
65
|
* Method to get the elevation in Meters.
|
|
41
66
|
*
|
|
42
|
-
* @return Returns the elevation in Meters.
|
|
67
|
+
* @return {number} Returns the elevation in Meters.
|
|
43
68
|
*/
|
|
44
69
|
getElevation(): number;
|
|
45
70
|
/**
|
|
46
71
|
* Method to set the elevation in Meters <b>above </b> sea level.
|
|
47
72
|
*
|
|
48
|
-
* @param elevation
|
|
73
|
+
* @param {number} elevation
|
|
49
74
|
* The elevation to set in Meters. An IllegalArgumentException will be thrown if the value is a negative.
|
|
50
75
|
*/
|
|
51
76
|
setElevation(elevation: number): void;
|
|
52
|
-
/**
|
|
53
|
-
* GeoLocation constructor with parameters for all required fields.
|
|
54
|
-
*
|
|
55
|
-
* @param name
|
|
56
|
-
* The location name for display use such as "Lakewood, NJ"
|
|
57
|
-
* @param latitude
|
|
58
|
-
* the latitude in a double format such as 40.095965 for Lakewood, NJ.
|
|
59
|
-
* <b>Note: </b> For latitudes south of the equator, a negative value should be used.
|
|
60
|
-
* @param longitude
|
|
61
|
-
* double the longitude in a double format such as -74.222130 for Lakewood, NJ.
|
|
62
|
-
* <b>Note: </b> For longitudes east of the <a href="http://en.wikipedia.org/wiki/Prime_Meridian">Prime
|
|
63
|
-
* Meridian </a> (Greenwich), a negative value should be used.
|
|
64
|
-
* @param elevation
|
|
65
|
-
* the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating
|
|
66
|
-
* sunrise and set.
|
|
67
|
-
* @param timeZoneId
|
|
68
|
-
* the <code>TimeZone</code> for the location.
|
|
69
|
-
*/
|
|
70
|
-
constructor(name: string | null, latitude: number, longitude: number, elevation: number, timeZoneId?: string);
|
|
71
|
-
constructor(name: string | null, latitude: number, longitude: number, timeZoneId: string);
|
|
72
|
-
constructor();
|
|
73
77
|
setLatitude(latitude: number): void;
|
|
74
78
|
/**
|
|
75
|
-
* @return Returns the latitude.
|
|
79
|
+
* @return {number} Returns the latitude.
|
|
76
80
|
*/
|
|
77
81
|
getLatitude(): number;
|
|
78
82
|
setLongitude(longitude: number): void;
|
|
79
83
|
/**
|
|
80
|
-
* @return Returns the longitude.
|
|
84
|
+
* @return {number} Returns the longitude.
|
|
81
85
|
*/
|
|
82
86
|
getLongitude(): number;
|
|
83
87
|
/**
|
|
84
|
-
* @return Returns the location name.
|
|
88
|
+
* @return {string|null} Returns the location name.
|
|
85
89
|
*/
|
|
86
90
|
getLocationName(): string | null;
|
|
87
91
|
/**
|
|
88
|
-
* @param name
|
|
92
|
+
* @param {string|null} name
|
|
89
93
|
* The setter method for the display name.
|
|
90
94
|
*/
|
|
91
95
|
setLocationName(name: string | null): void;
|
|
92
96
|
/**
|
|
93
|
-
* @return Returns the timeZone.
|
|
97
|
+
* @return {string} Returns the timeZone.
|
|
94
98
|
*/
|
|
95
99
|
getTimeZone(): string;
|
|
96
100
|
/**
|
|
@@ -101,7 +105,7 @@ export declare class GeoLocation {
|
|
|
101
105
|
* AstronomicalCalendar to output times in the expected offset. This situation will arise if the
|
|
102
106
|
* AstronomicalCalendar is ever {@link AstronomicalCalendar#clone() cloned}.
|
|
103
107
|
*
|
|
104
|
-
* @param timeZone
|
|
108
|
+
* @param {string} timeZone
|
|
105
109
|
* The timeZone to set.
|
|
106
110
|
*/
|
|
107
111
|
setTimeZone(timeZoneId: string): void;
|
|
@@ -120,6 +124,18 @@ export declare class GeoLocation {
|
|
|
120
124
|
* @author © Eliyahu Hershfeld 2011 - 2019
|
|
121
125
|
*/
|
|
122
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);
|
|
123
139
|
/**
|
|
124
140
|
* The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°
|
|
125
141
|
* @private
|
|
@@ -153,7 +169,7 @@ export declare class NOAACalculator {
|
|
|
153
169
|
*/
|
|
154
170
|
private geoLocation;
|
|
155
171
|
/**
|
|
156
|
-
* The getSunrise method Returns a
|
|
172
|
+
* The getSunrise method Returns a `Date` representing the
|
|
157
173
|
* {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used
|
|
158
174
|
* for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus
|
|
159
175
|
* {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the
|
|
@@ -161,7 +177,7 @@ export declare class NOAACalculator {
|
|
|
161
177
|
* and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.
|
|
162
178
|
* See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.
|
|
163
179
|
*
|
|
164
|
-
* @return the
|
|
180
|
+
* @return {Temporal.ZonedDateTime | null} the `Date` representing the exact sunrise time. If the calculation can't be computed such as
|
|
165
181
|
* in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
|
|
166
182
|
* does not set, a null will be returned. See detailed explanation on top of the page.
|
|
167
183
|
* @see AstronomicalCalculator#adjustZenith
|
|
@@ -175,7 +191,7 @@ export declare class NOAACalculator {
|
|
|
175
191
|
* something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the
|
|
176
192
|
* base for dawn calculations that are calculated as a dip below the horizon before sunrise.
|
|
177
193
|
*
|
|
178
|
-
* @return the
|
|
194
|
+
* @return {Temporal.ZonedDateTime | null} the `Date` representing the exact sea-level sunrise time. If the calculation can't be computed
|
|
179
195
|
* such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
|
|
180
196
|
* where it does not set, a null will be returned. See detailed explanation on top of the page.
|
|
181
197
|
* @see AstronomicalCalendar#getSunrise
|
|
@@ -186,7 +202,7 @@ export declare class NOAACalculator {
|
|
|
186
202
|
/**
|
|
187
203
|
* A method that returns the beginning of civil twilight (dawn) using a zenith of {@link #CIVIL_ZENITH 96°}.
|
|
188
204
|
*
|
|
189
|
-
* @return The
|
|
205
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` of the beginning of civil twilight using a zenith of 96°. If the calculation
|
|
190
206
|
* can't be computed, null will be returned. See detailed explanation on top of the page.
|
|
191
207
|
* @see #CIVIL_ZENITH
|
|
192
208
|
*/
|
|
@@ -194,7 +210,7 @@ export declare class NOAACalculator {
|
|
|
194
210
|
/**
|
|
195
211
|
* A method that returns the beginning of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}.
|
|
196
212
|
*
|
|
197
|
-
* @return The
|
|
213
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` of the beginning of nautical twilight using a zenith of 102°. If the
|
|
198
214
|
* calculation can't be computed null will be returned. See detailed explanation on top of the page.
|
|
199
215
|
* @see #NAUTICAL_ZENITH
|
|
200
216
|
*/
|
|
@@ -203,13 +219,13 @@ export declare class NOAACalculator {
|
|
|
203
219
|
* A method that returns the beginning of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH
|
|
204
220
|
* 108°}.
|
|
205
221
|
*
|
|
206
|
-
* @return The
|
|
222
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` of the beginning of astronomical twilight using a zenith of 108°. If the
|
|
207
223
|
* calculation can't be computed, null will be returned. See detailed explanation on top of the page.
|
|
208
224
|
* @see #ASTRONOMICAL_ZENITH
|
|
209
225
|
*/
|
|
210
226
|
getBeginAstronomicalTwilight(): Temporal.ZonedDateTime | null;
|
|
211
227
|
/**
|
|
212
|
-
* The getSunset method Returns a
|
|
228
|
+
* The getSunset method Returns a `Date` representing the
|
|
213
229
|
* {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for
|
|
214
230
|
* the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus
|
|
215
231
|
* {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the
|
|
@@ -220,7 +236,7 @@ export declare class NOAACalculator {
|
|
|
220
236
|
* other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this
|
|
221
237
|
* case the sunset date will be incremented to the following date.
|
|
222
238
|
*
|
|
223
|
-
* @return
|
|
239
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` representing the exact sunset time. If the calculation can't be computed such as in
|
|
224
240
|
* the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
|
|
225
241
|
* does not set, a null will be returned. See detailed explanation on top of the page.
|
|
226
242
|
* @see AstronomicalCalculator#adjustZenith
|
|
@@ -234,7 +250,7 @@ export declare class NOAACalculator {
|
|
|
234
250
|
* something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the
|
|
235
251
|
* base for dusk calculations that are calculated as a dip below the horizon after sunset.
|
|
236
252
|
*
|
|
237
|
-
* @return
|
|
253
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` representing the exact sea-level sunset time. If the calculation can't be computed
|
|
238
254
|
* such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
|
|
239
255
|
* where it does not set, a null will be returned. See detailed explanation on top of the page.
|
|
240
256
|
* @see AstronomicalCalendar#getSunset
|
|
@@ -244,7 +260,7 @@ export declare class NOAACalculator {
|
|
|
244
260
|
/**
|
|
245
261
|
* A method that returns the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}.
|
|
246
262
|
*
|
|
247
|
-
* @return The
|
|
263
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If
|
|
248
264
|
* the calculation can't be computed, null will be returned. See detailed explanation on top of the page.
|
|
249
265
|
* @see #CIVIL_ZENITH
|
|
250
266
|
*/
|
|
@@ -252,7 +268,7 @@ export declare class NOAACalculator {
|
|
|
252
268
|
/**
|
|
253
269
|
* A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}.
|
|
254
270
|
*
|
|
255
|
-
* @return The
|
|
271
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}
|
|
256
272
|
* . If the calculation can't be computed, null will be returned. See detailed explanation on top of the
|
|
257
273
|
* page.
|
|
258
274
|
* @see #NAUTICAL_ZENITH
|
|
@@ -261,7 +277,7 @@ export declare class NOAACalculator {
|
|
|
261
277
|
/**
|
|
262
278
|
* A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108°}.
|
|
263
279
|
*
|
|
264
|
-
* @return
|
|
280
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH
|
|
265
281
|
* 108°}. If the calculation can't be computed, null will be returned. See detailed explanation on top
|
|
266
282
|
* of the page.
|
|
267
283
|
* @see #ASTRONOMICAL_ZENITH
|
|
@@ -273,11 +289,11 @@ export declare class NOAACalculator {
|
|
|
273
289
|
* after sunset with the intent of getting a rough "level of light" calculation, the sunrise or sunset time passed
|
|
274
290
|
* to this method should be sea level sunrise and sunset.
|
|
275
291
|
*
|
|
276
|
-
* @param time
|
|
292
|
+
* @param {Temporal.ZonedDateTime | null} time
|
|
277
293
|
* the start time
|
|
278
|
-
* @param offset
|
|
294
|
+
* @param {number} offset
|
|
279
295
|
* the offset in milliseconds to add to the time.
|
|
280
|
-
* @return
|
|
296
|
+
* @return {Temporal.ZonedDateTime | null} the `Date` with the offset in milliseconds added to it
|
|
281
297
|
*/
|
|
282
298
|
static getTimeOffset(time: Temporal.ZonedDateTime | null, offset: number): Temporal.ZonedDateTime | null;
|
|
283
299
|
/**
|
|
@@ -285,12 +301,12 @@ export declare class NOAACalculator {
|
|
|
285
301
|
* {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14°
|
|
286
302
|
* before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
|
|
287
303
|
*
|
|
288
|
-
* @param offsetZenith
|
|
304
|
+
* @param {number} offsetZenith
|
|
289
305
|
* the degrees before {@link #getSunrise()} to use in the calculation. For time after sunrise use
|
|
290
306
|
* negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14°
|
|
291
307
|
* before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a
|
|
292
308
|
* parameter.
|
|
293
|
-
* @return
|
|
309
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` of the offset after (or before) {@link #getSunrise()}. If the calculation
|
|
294
310
|
* can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does
|
|
295
311
|
* not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
|
|
296
312
|
* page.
|
|
@@ -301,34 +317,23 @@ export declare class NOAACalculator {
|
|
|
301
317
|
* sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an
|
|
302
318
|
* offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
|
|
303
319
|
*
|
|
304
|
-
* @param offsetZenith
|
|
320
|
+
* @param {number} offsetZenith
|
|
305
321
|
* the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative
|
|
306
322
|
* numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after
|
|
307
323
|
* sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.
|
|
308
|
-
* @return The
|
|
324
|
+
* @return {Temporal.ZonedDateTime | null} The `Date`of the offset after (or before) {@link #getSunset()}. If the calculation can't
|
|
309
325
|
* be computed such as in the Arctic Circle where there is at least one day a year where the sun does not
|
|
310
326
|
* rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
|
|
311
327
|
* page.
|
|
312
328
|
*/
|
|
313
329
|
getSunsetOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null;
|
|
314
|
-
/**
|
|
315
|
-
* A constructor that takes in <a href="http://en.wikipedia.org/wiki/Geolocation">geolocation</a> information as a
|
|
316
|
-
* parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar
|
|
317
|
-
* calculations is the the {@link NOAACalculator}.
|
|
318
|
-
*
|
|
319
|
-
* @param geoLocation
|
|
320
|
-
* The location information used for calculating astronomical sun times.
|
|
321
|
-
*
|
|
322
|
-
* @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.
|
|
323
|
-
*/
|
|
324
|
-
constructor(geoLocation: GeoLocation, date: Temporal.PlainDate);
|
|
325
330
|
/**
|
|
326
331
|
* A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using
|
|
327
332
|
* daylight savings time.
|
|
328
333
|
*
|
|
329
|
-
* @param zenith
|
|
334
|
+
* @param {number} zenith
|
|
330
335
|
* the degrees below the horizon. For time after sunrise use negative numbers.
|
|
331
|
-
* @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
|
|
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
|
|
332
337
|
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
|
|
333
338
|
* not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
|
|
334
339
|
*/
|
|
@@ -339,9 +344,9 @@ export declare class NOAACalculator {
|
|
|
339
344
|
* light, something that is not affected by elevation. This method returns UTC sunrise calculated at sea level. This
|
|
340
345
|
* forms the base for dawn calculations that are calculated as a dip below the horizon before sunrise.
|
|
341
346
|
*
|
|
342
|
-
* @param zenith
|
|
347
|
+
* @param {number} zenith
|
|
343
348
|
* the degrees below the horizon. For time after sunrise use negative numbers.
|
|
344
|
-
* @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
|
|
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
|
|
345
350
|
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
|
|
346
351
|
* not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
|
|
347
352
|
* @see AstronomicalCalendar#getUTCSunrise
|
|
@@ -352,9 +357,9 @@ export declare class NOAACalculator {
|
|
|
352
357
|
* A method that returns the sunset in UTC time without correction for time zone offset from GMT and without using
|
|
353
358
|
* daylight savings time.
|
|
354
359
|
*
|
|
355
|
-
* @param zenith
|
|
360
|
+
* @param {number} zenith
|
|
356
361
|
* the degrees below the horizon. For time after sunset use negative numbers.
|
|
357
|
-
* @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
|
|
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
|
|
358
363
|
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
|
|
359
364
|
* not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
|
|
360
365
|
* @see AstronomicalCalendar#getUTCSeaLevelSunset
|
|
@@ -367,9 +372,9 @@ export declare class NOAACalculator {
|
|
|
367
372
|
* at sea level. This forms the base for dusk calculations that are calculated as a dip below the horizon after
|
|
368
373
|
* sunset.
|
|
369
374
|
*
|
|
370
|
-
* @param zenith
|
|
375
|
+
* @param {number} zenith
|
|
371
376
|
* the degrees below the horizon. For time before sunset use negative numbers.
|
|
372
|
-
* @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
|
|
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
|
|
373
378
|
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
|
|
374
379
|
* not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.
|
|
375
380
|
* @see AstronomicalCalendar#getUTCSunset
|
|
@@ -404,9 +409,9 @@ export declare class NOAACalculator {
|
|
|
404
409
|
* elevationAdjustment = 0.0347 * Math.sqrt(elevationMeters);
|
|
405
410
|
* </pre>
|
|
406
411
|
*
|
|
407
|
-
* @param elevation
|
|
412
|
+
* @param {number} elevation
|
|
408
413
|
* elevation in Meters.
|
|
409
|
-
* @return the adjusted zenith
|
|
414
|
+
* @return {number} the adjusted zenith
|
|
410
415
|
*/
|
|
411
416
|
getElevationAdjustment(elevation: number): number;
|
|
412
417
|
/**
|
|
@@ -429,15 +434,15 @@ export declare class NOAACalculator {
|
|
|
429
434
|
* {@link ZmanimCalendar#ZENITH_16_POINT_1 16.1°} dip used in
|
|
430
435
|
* {@link ComplexZmanimCalendar#getAlos16Point1Degrees()}.
|
|
431
436
|
*
|
|
432
|
-
* @param zenith
|
|
437
|
+
* @param {number} zenith
|
|
433
438
|
* the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith
|
|
434
439
|
* zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}
|
|
435
440
|
* this slightly to account for solar refraction and the sun's radius. Another example would be
|
|
436
441
|
* {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes
|
|
437
442
|
* {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.
|
|
438
|
-
* @param elevation
|
|
443
|
+
* @param {number} elevation
|
|
439
444
|
* elevation in Meters.
|
|
440
|
-
* @return The zenith adjusted to include the {@link #getSolarRadius sun's radius}, {@link #getRefraction
|
|
445
|
+
* @return {number} The zenith adjusted to include the {@link #getSolarRadius sun's radius}, {@link #getRefraction
|
|
441
446
|
* refraction} and {@link #getElevationAdjustment elevation} adjustment. This will only be adjusted for
|
|
442
447
|
* sunrise and sunset (if the zenith == 90°)
|
|
443
448
|
* @see #getElevationAdjustment(double)
|
|
@@ -467,17 +472,17 @@ export declare class NOAACalculator {
|
|
|
467
472
|
* non-elevation adjusted temporal hour by passing in {@link #getSeaLevelSunrise() sea level sunrise} and
|
|
468
473
|
* {@link #getSeaLevelSunset() sea level sunset} as parameters.
|
|
469
474
|
*
|
|
470
|
-
* @param
|
|
475
|
+
* @param {Temporal.ZonedDateTime | null} startOfDay
|
|
471
476
|
* The start of the day.
|
|
472
|
-
* @param endOfDay
|
|
477
|
+
* @param {Temporal.ZonedDateTime | null} endOfDay
|
|
473
478
|
* The end of the day.
|
|
474
479
|
*
|
|
475
|
-
* @return the <code>long</code> millisecond length of the temporal hour. If the calculation can't be computed a
|
|
480
|
+
* @return {number} the <code>long</code> millisecond length of the temporal hour. If the calculation can't be computed a
|
|
476
481
|
* {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.
|
|
477
482
|
*
|
|
478
483
|
* @see #getTemporalHour()
|
|
479
484
|
*/
|
|
480
|
-
getTemporalHour(
|
|
485
|
+
getTemporalHour(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): number;
|
|
481
486
|
/**
|
|
482
487
|
* A method that returns sundial or solar noon. It occurs when the Sun is <a href
|
|
483
488
|
* ="http://en.wikipedia.org/wiki/Transit_%28astronomy%29">transiting</a> the <a
|
|
@@ -485,32 +490,32 @@ export declare class NOAACalculator {
|
|
|
485
490
|
* calculated as halfway between the sunrise and sunset passed to this method. This time can be slightly off the
|
|
486
491
|
* real transit time due to changes in declination (the lengthening or shortening day).
|
|
487
492
|
*
|
|
488
|
-
* @param startOfDay
|
|
493
|
+
* @param {Temporal.ZonedDateTime | null} startOfDay
|
|
489
494
|
* the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or
|
|
490
495
|
* any arbitrary start of day) passed to this method.
|
|
491
|
-
* @param endOfDay
|
|
496
|
+
* @param {Temporal.ZonedDateTime | null} endOfDay
|
|
492
497
|
* the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any
|
|
493
498
|
* arbitrary end of day) passed to this method.
|
|
494
499
|
*
|
|
495
|
-
* @return
|
|
500
|
+
* @return {Temporal.ZonedDateTime | null} The `Date` representing Sun's transit. If the calculation can't be computed such as in the
|
|
496
501
|
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
|
|
497
502
|
* not set, null will be returned. See detailed explanation on top of the page.
|
|
498
503
|
*/
|
|
499
504
|
getSunTransit(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
|
|
500
505
|
/**
|
|
501
|
-
* A method that returns a
|
|
506
|
+
* A method that returns a `Date` from the time passed in as a parameter.
|
|
502
507
|
* @protected
|
|
503
|
-
* @param time
|
|
504
|
-
* The time to be set as the time for the
|
|
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
|
|
505
510
|
* for 6:45:00 PM.
|
|
506
|
-
* @param isSunrise true if the time is sunrise, and false if it is sunset
|
|
507
|
-
* @return The Date.
|
|
511
|
+
* @param {boolean} isSunrise true if the time is sunrise, and false if it is sunset
|
|
512
|
+
* @return {Temporal.ZonedDateTime | null} The Date.
|
|
508
513
|
*/
|
|
509
514
|
protected getDateFromTime(time: number, isSunrise: boolean): Temporal.ZonedDateTime | null;
|
|
510
515
|
/**
|
|
511
516
|
* Return the <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> from a Java Calendar
|
|
512
517
|
* @private
|
|
513
|
-
* @param
|
|
518
|
+
* @param {Temporal.ZonedDateTime} date
|
|
514
519
|
* The Java Calendar
|
|
515
520
|
* @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days
|
|
516
521
|
* should be added later.
|
|
@@ -619,11 +624,11 @@ export declare class NOAACalculator {
|
|
|
619
624
|
* Return the <a href="http://en.wikipedia.org/wiki/Hour_angle">hour angle</a> of the sun at sunrise for the
|
|
620
625
|
* latitude.
|
|
621
626
|
* @private
|
|
622
|
-
* @param lat
|
|
627
|
+
* @param {number} lat
|
|
623
628
|
* , the latitude of observer in degrees
|
|
624
629
|
* @param solarDec
|
|
625
630
|
* the declination angle of sun in degrees
|
|
626
|
-
* @param zenith
|
|
631
|
+
* @param {number} zenith
|
|
627
632
|
* the zenith
|
|
628
633
|
* @return hour angle of sunrise in radians
|
|
629
634
|
*/
|
|
@@ -633,11 +638,11 @@ export declare class NOAACalculator {
|
|
|
633
638
|
* latitude. TODO: use - {@link #getSunHourAngleAtSunrise(double, double, double)} implementation to avoid
|
|
634
639
|
* duplication of code.
|
|
635
640
|
* @private
|
|
636
|
-
* @param lat
|
|
641
|
+
* @param {number} lat
|
|
637
642
|
* the latitude of observer in degrees
|
|
638
643
|
* @param solarDec
|
|
639
644
|
* the declination angle of sun in degrees
|
|
640
|
-
* @param zenith
|
|
645
|
+
* @param {number} zenith
|
|
641
646
|
* the zenith
|
|
642
647
|
* @return the hour angle of sunset in radians
|
|
643
648
|
*/
|
|
@@ -647,13 +652,13 @@ export declare class NOAACalculator {
|
|
|
647
652
|
* horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the
|
|
648
653
|
* horizon. Not corrected for altitude.
|
|
649
654
|
*
|
|
650
|
-
* @param
|
|
655
|
+
* @param {Temporal.ZonedDateTime} date
|
|
651
656
|
* time of calculation
|
|
652
|
-
* @param lat
|
|
657
|
+
* @param {number} lat
|
|
653
658
|
* latitude of location for calculation
|
|
654
|
-
* @param lon
|
|
659
|
+
* @param {number} lon
|
|
655
660
|
* longitude of location for calculation
|
|
656
|
-
* @return solar elevation in degrees - horizon is 0 degrees, civil twilight is -6 degrees
|
|
661
|
+
* @return {number} solar elevation in degrees - horizon is 0 degrees, civil twilight is -6 degrees
|
|
657
662
|
*/
|
|
658
663
|
static getSolarElevation(date: Temporal.ZonedDateTime, lat: number, lon: number): number;
|
|
659
664
|
/**
|
|
@@ -661,13 +666,13 @@ export declare class NOAACalculator {
|
|
|
661
666
|
* horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 0
|
|
662
667
|
* degrees.
|
|
663
668
|
*
|
|
664
|
-
* @param
|
|
669
|
+
* @param {Temporal.ZonedDateTime} date
|
|
665
670
|
* time of calculation
|
|
666
|
-
* @param latitude
|
|
671
|
+
* @param {number} latitude
|
|
667
672
|
* latitude of location for calculation
|
|
668
|
-
* @param lon
|
|
673
|
+
* @param {number} lon
|
|
669
674
|
* longitude of location for calculation
|
|
670
|
-
* @return
|
|
675
|
+
* @return {number}
|
|
671
676
|
*/
|
|
672
677
|
static getSolarAzimuth(date: Temporal.ZonedDateTime, latitude: number, lon: number): number;
|
|
673
678
|
/**
|
|
@@ -676,11 +681,11 @@ export declare class NOAACalculator {
|
|
|
676
681
|
* @private
|
|
677
682
|
* @param julianDay
|
|
678
683
|
* the Julian day
|
|
679
|
-
* @param latitude
|
|
684
|
+
* @param {number} latitude
|
|
680
685
|
* the latitude of observer in degrees
|
|
681
|
-
* @param longitude
|
|
686
|
+
* @param {number} longitude
|
|
682
687
|
* the longitude of observer in degrees
|
|
683
|
-
* @param zenith
|
|
688
|
+
* @param {number} zenith
|
|
684
689
|
* the zenith
|
|
685
690
|
* @return the time in minutes from zero UTC
|
|
686
691
|
*/
|
|
@@ -692,7 +697,7 @@ export declare class NOAACalculator {
|
|
|
692
697
|
* @private
|
|
693
698
|
* @param julianCenturies
|
|
694
699
|
* the number of Julian centuries since J2000.0
|
|
695
|
-
* @param longitude
|
|
700
|
+
* @param {number} longitude
|
|
696
701
|
* the longitude of observer in degrees
|
|
697
702
|
* @return the time in minutes from zero UTC
|
|
698
703
|
*/
|
|
@@ -703,11 +708,11 @@ export declare class NOAACalculator {
|
|
|
703
708
|
* @private
|
|
704
709
|
* @param julianDay
|
|
705
710
|
* the Julian day
|
|
706
|
-
* @param latitude
|
|
711
|
+
* @param {number} latitude
|
|
707
712
|
* the latitude of observer in degrees
|
|
708
|
-
* @param longitude
|
|
713
|
+
* @param {number} longitude
|
|
709
714
|
* : longitude of observer in degrees
|
|
710
|
-
* @param zenith
|
|
715
|
+
* @param {number} zenith
|
|
711
716
|
* the zenith
|
|
712
717
|
* @return the time in minutes from zero Universal Coordinated Time (UTC)
|
|
713
718
|
*/
|
package/package.json
CHANGED