@astronomy-bundle/moon 9.5.0

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 ADDED
@@ -0,0 +1,407 @@
1
+ Part of the [Astronomy Bundle](../../README.md).
2
+
3
+ # Moon
4
+
5
+ The `moon` package provides the `Moon` object for computing the Moon's position as seen from Earth. Geocentric coordinates are derived from the Moon's mean orbital elements with corrections for the principal perturbations, and apparent coordinates apply nutation corrections. Observation quantities such as elongation, phase angle, illuminated fraction, and upcoming lunar phases are also available.
6
+
7
+ ## Install
8
+
9
+ With npm: `npm install @astronomy-bundle/moon @astronomy-bundle/core`\
10
+ With yarn: `yarn add @astronomy-bundle/moon @astronomy-bundle/core`\
11
+ With pnpm: `pnpm add @astronomy-bundle/moon @astronomy-bundle/core`
12
+
13
+ ## High precision
14
+
15
+ By default the `Moon` class uses the standard `Sun` and `Earth` models (VSOP87 reduced series). For maximum accuracy you can import from the `high-precision` entry point instead, which uses the full VSOP87 series for both the Sun and Earth:
16
+
17
+ ```javascript
18
+ import {Moon} from '@astronomy-bundle/moon/high-precision';
19
+ ```
20
+
21
+ > **Warning:** The full VSOP87 series used by the high-precision variant contains significantly more terms than the reduced version. This results in a **~10x larger bundle size** and slower parse time. Only use this variant when the extra accuracy is required.
22
+
23
+ ## API Reference
24
+
25
+ ### Create the Moon object
26
+
27
+ **Description:** The `Moon` object represents the Moon at a specific point in time, given as a `TimeOfInterest`. If no TOI is provided it defaults to the current time.
28
+
29
+ **Example**: Create a Moon object for 12 April 1992 at 00:00 UTC
30
+
31
+ ```javascript
32
+ import {TimeOfInterest} from '@astronomy-bundle/core';
33
+ import {Moon} from '@astronomy-bundle/moon';
34
+ // or for high precision:
35
+ // import {Moon} from '@astronomy-bundle/moon/high-precision';
36
+
37
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
38
+ const moon = Moon.create(toi);
39
+ ```
40
+
41
+ ---
42
+
43
+ ### Geocentric ecliptic spherical coordinates
44
+
45
+ **Description:** These methods return the Moon's position as geocentric ecliptic spherical coordinates `{lon, lat, radiusVector}`. Longitude and latitude are in degrees; the radius vector (distance from Earth) is in astronomical units (AU). Two reference frames are available: J2000.0 (fixed equinox of year 2000) and the ecliptic of the date. For the Moon these two frames return identical values.
46
+
47
+ **Example**: Get geocentric ecliptic spherical coordinates for 12 April 1992 at 00:00 UTC
48
+
49
+ ```javascript
50
+ import {TimeOfInterest} from '@astronomy-bundle/core';
51
+ import {Moon} from '@astronomy-bundle/moon';
52
+
53
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
54
+ const moon = Moon.create(toi);
55
+
56
+ const coordsJ2000 = moon.getGeocentricEclipticSphericalJ2000Coordinates();
57
+ const coordsDate = moon.getGeocentricEclipticSphericalDateCoordinates();
58
+ ```
59
+
60
+ The result of the calculation should be:\
61
+ Longitude: *133.162655°*\
62
+ Latitude: *-3.229126°*\
63
+ Radius vector: *0.002463 AU*
64
+
65
+ ---
66
+
67
+ ### Geocentric ecliptic rectangular coordinates
68
+
69
+ **Description:** These methods return the Moon's position as geocentric ecliptic rectangular coordinates `{x, y, z}` in astronomical units (AU), derived from the spherical coordinates.
70
+
71
+ **Example**: Get geocentric ecliptic rectangular coordinates for 12 April 1992 at 00:00 UTC
72
+
73
+ ```javascript
74
+ import {TimeOfInterest} from '@astronomy-bundle/core';
75
+ import {Moon} from '@astronomy-bundle/moon';
76
+
77
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
78
+ const moon = Moon.create(toi);
79
+
80
+ const coordsJ2000 = moon.getGeocentricEclipticRectangularJ2000Coordinates();
81
+ const coordsDate = moon.getGeocentricEclipticRectangularDateCoordinates();
82
+ ```
83
+
84
+ The result of the calculation should be:\
85
+ x: *-0.001682 AU*\
86
+ y: *0.001793 AU*\
87
+ z: *-0.000139 AU*
88
+
89
+ ---
90
+
91
+ ### Geocentric equatorial spherical coordinates
92
+
93
+ **Description:** These methods return the Moon's position in the equatorial coordinate frame as `{rightAscension, declination, radiusVector}`. Right ascension and declination are in degrees; the radius vector is in AU. Two reference frames are available: J2000.0 and the equator of the date. For the Moon these two frames return identical values.
94
+
95
+ **Example**: Get geocentric equatorial spherical coordinates for 12 April 1992 at 00:00 UTC
96
+
97
+ ```javascript
98
+ import {TimeOfInterest} from '@astronomy-bundle/core';
99
+ import {Moon} from '@astronomy-bundle/moon';
100
+
101
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
102
+ const moon = Moon.create(toi);
103
+
104
+ const coordsJ2000 = moon.getGeocentricEquatorialSphericalJ2000Coordinates();
105
+ const coordsDate = moon.getGeocentricEquatorialSphericalDateCoordinates();
106
+ ```
107
+
108
+ The result of the calculation should be:\
109
+ Right ascension: *134.68392°*\
110
+ Declination: *13.769656°*\
111
+ Radius vector: *0.002463 AU*
112
+
113
+ ---
114
+
115
+ ### Apparent geocentric coordinates
116
+
117
+ **Description:** Apparent coordinates apply a nutation correction to the geometric coordinates, giving the position as it would be observed from Earth's centre. Available in both ecliptic and equatorial spherical forms, as well as ecliptic rectangular.
118
+
119
+ **Example**: Get apparent geocentric coordinates for 12 April 1992 at 00:00 UTC
120
+
121
+ ```javascript
122
+ import {TimeOfInterest} from '@astronomy-bundle/core';
123
+ import {Moon} from '@astronomy-bundle/moon';
124
+
125
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
126
+ const moon = Moon.create(toi);
127
+
128
+ const eclipticSpherical = moon.getApparentGeocentricEclipticSphericalCoordinates();
129
+ const equatorialSpherical = moon.getApparentGeocentricEquatorialSphericalCoordinates();
130
+ ```
131
+
132
+ The result of the calculation should be:\
133
+ Apparent ecliptic longitude: *133.167265°*\
134
+ Apparent ecliptic latitude: *-3.229126°*\
135
+ Apparent ecliptic radius vector: *0.002463 AU*
136
+
137
+ Apparent right ascension: *134.688469°*\
138
+ Apparent declination: *13.768367°*\
139
+ Apparent radius vector: *0.002463 AU*
140
+
141
+ ---
142
+
143
+ ### Topocentric coordinates
144
+
145
+ **Description:** Topocentric coordinates shift the geocentric position to match the perspective of an observer at a specific location on Earth's surface. A `Location` (geographic latitude and longitude in degrees) is required. Available as equatorial spherical and horizontal (azimuth/altitude) coordinates.
146
+
147
+ **Example**: Get topocentric coordinates for 12 April 1992 at 00:00 UTC, observer at 52.519°N, 122.4108°W
148
+
149
+ ```javascript
150
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
151
+ import {Moon} from '@astronomy-bundle/moon';
152
+
153
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
154
+ const location = Location.create(52.519, -122.4108);
155
+ const moon = Moon.create(toi);
156
+
157
+ const equatorial = moon.getTopocentricEquatorialSphericalCoordinates(location);
158
+ const horizontal = moon.getTopocentricHorizontalCoordinates(location);
159
+ const apparentAlt = moon.getApparentTopocentricHorizontalCoordinates(location);
160
+ ```
161
+
162
+ The result of the calculation should be:\
163
+ Topocentric right ascension: *135.211802°*\
164
+ Topocentric declination: *13.079873°*
165
+
166
+ Azimuth: *108.968405°*\
167
+ Geometric altitude: *30.91398°*\
168
+ Apparent altitude (with refraction): *30.94205°*
169
+
170
+ ---
171
+
172
+ ### Distance to Earth
173
+
174
+ **Description:** These methods return the distance between the Moon and Earth in kilometres. `getDistanceToEarth` and `getApparentDistanceToEarth` return the geocentric distance; the topocentric variant corrects for the observer's position on the surface.
175
+
176
+ **Example**: Get the distance to Earth for 12 April 1992 at 00:00 UTC
177
+
178
+ ```javascript
179
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
180
+ import {Moon} from '@astronomy-bundle/moon';
181
+
182
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
183
+ const location = Location.create(52.519, -122.4108);
184
+ const moon = Moon.create(toi);
185
+
186
+ const distance = moon.getDistanceToEarth();
187
+ const topocentricDistance = moon.getTopocentricDistanceToEarth(location);
188
+ ```
189
+
190
+ The result of the calculation should be:\
191
+ Geocentric distance: *368,409.684816 km*\
192
+ Topocentric distance: *365,174.894770 km*
193
+
194
+ ---
195
+
196
+ ### Light time
197
+
198
+ **Description:** Returns the time in seconds that light takes to travel from the Moon to Earth at the given moment.
199
+
200
+ **Example**: Get light time for 12 April 1992 at 00:00 UTC
201
+
202
+ ```javascript
203
+ import {TimeOfInterest} from '@astronomy-bundle/core';
204
+ import {Moon} from '@astronomy-bundle/moon';
205
+
206
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
207
+ const moon = Moon.create(toi);
208
+
209
+ const lightTime = moon.getLightTime();
210
+ ```
211
+
212
+ The result of the calculation should be:\
213
+ Light time: *0h 0m 1.23s*
214
+
215
+ ---
216
+
217
+ ### Angular diameter
218
+
219
+ **Description:** Returns the Moon's angular diameter in degrees as seen from Earth (or from a surface observer for the topocentric variant).
220
+
221
+ **Example**: Get the angular diameter for 12 April 1992 at 00:00 UTC
222
+
223
+ ```javascript
224
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
225
+ import {Moon} from '@astronomy-bundle/moon';
226
+
227
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
228
+ const location = Location.create(52.519, -122.4108);
229
+ const moon = Moon.create(toi);
230
+
231
+ const diameter = moon.getAngularDiameter();
232
+ const topocentricDiameter = moon.getTopocentricAngularDiameter(location);
233
+ ```
234
+
235
+ The result of the calculation should be:\
236
+ Geocentric angular diameter: *0° 32' 25.453"*\
237
+ Topocentric angular diameter: *0° 32' 42.686"*
238
+
239
+ ---
240
+
241
+ ### Elongation
242
+
243
+ **Description:** Returns the angular separation between the Moon and the Sun in degrees. Values range from 0° (new moon) to 180° (full moon).
244
+
245
+ **Example**: Get elongation for 12 April 1992 at 00:00 UTC
246
+
247
+ ```javascript
248
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
249
+ import {Moon} from '@astronomy-bundle/moon';
250
+
251
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
252
+ const location = Location.create(52.519, -122.4108);
253
+ const moon = Moon.create(toi);
254
+
255
+ const elongation = moon.getElongation();
256
+ const topocentricElongation = moon.getTopocentricElongation(location);
257
+ ```
258
+
259
+ The result of the calculation should be:\
260
+ Elongation: *110.792882°*\
261
+ Topocentric elongation: *111.462793°*
262
+
263
+ ---
264
+
265
+ ### Phase angle
266
+
267
+ **Description:** Returns the phase angle of the Moon in degrees — the angle Sun–Moon–Earth. A phase angle of 0° corresponds to full moon and 180° to new moon.
268
+
269
+ **Example**: Get phase angle for 12 April 1992 at 00:00 UTC
270
+
271
+ ```javascript
272
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
273
+ import {Moon} from '@astronomy-bundle/moon';
274
+
275
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
276
+ const location = Location.create(52.519, -122.4108);
277
+ const moon = Moon.create(toi);
278
+
279
+ const phaseAngle = moon.getPhaseAngle();
280
+ const topocentricPhaseAngle = moon.getTopocentricPhaseAngle(location);
281
+ ```
282
+
283
+ The result of the calculation should be:\
284
+ Phase angle: *69.075651°*\
285
+ Topocentric phase angle: *68.407484°*
286
+
287
+ ---
288
+
289
+ ### Illuminated fraction
290
+
291
+ **Description:** Returns the fraction of the Moon's disk that is illuminated, as a value between 0 (new moon) and 1 (full moon).
292
+
293
+ **Example**: Get illuminated fraction for 12 April 1992 at 00:00 UTC
294
+
295
+ ```javascript
296
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
297
+ import {Moon} from '@astronomy-bundle/moon';
298
+
299
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
300
+ const location = Location.create(52.519, -122.4108);
301
+ const moon = Moon.create(toi);
302
+
303
+ const fraction = moon.getIlluminatedFraction();
304
+ const topocentricFraction = moon.getTopocentricIlluminatedFraction(location);
305
+ ```
306
+
307
+ The result of the calculation should be:\
308
+ Illuminated fraction: *0.679*\
309
+ Topocentric illuminated fraction: *0.684*
310
+
311
+ ---
312
+
313
+ ### Position angle of bright limb
314
+
315
+ **Description:** Returns the position angle of the Moon's bright limb in degrees, measured eastward from the north point of the disk. This indicates the direction from which the Moon is illuminated.
316
+
317
+ **Example**: Get position angle of bright limb for 12 April 1992 at 00:00 UTC
318
+
319
+ ```javascript
320
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
321
+ import {Moon} from '@astronomy-bundle/moon';
322
+
323
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
324
+ const location = Location.create(52.519, -122.4108);
325
+ const moon = Moon.create(toi);
326
+
327
+ const chi = moon.getPositionAngleOfBrightLimb();
328
+ const topocentricChi = moon.getTopocentricPositionAngleOfBrightLimb(location);
329
+ ```
330
+
331
+ The result of the calculation should be:\
332
+ Position angle: *285.044°*\
333
+ Topocentric position angle: *284.960°*
334
+
335
+ ---
336
+
337
+ ### Waxing / waning
338
+
339
+ **Description:** Returns `true` if the Moon is currently waxing (moving from new moon toward full moon), `false` if it is waning.
340
+
341
+ **Example**: Check waxing/waning for 12 April 1992 at 00:00 UTC
342
+
343
+ ```javascript
344
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
345
+ import {Moon} from '@astronomy-bundle/moon';
346
+
347
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
348
+ const location = Location.create(52.519, -122.4108);
349
+ const moon = Moon.create(toi);
350
+
351
+ const waxing = moon.isWaxing();
352
+ const topocentricWaxing = moon.isTopocentricWaxing(location);
353
+ ```
354
+
355
+ The result of the calculation should be:\
356
+ Waxing: *true*
357
+
358
+ ---
359
+
360
+ ### Apparent magnitude
361
+
362
+ **Description:** Returns the apparent visual magnitude of the Moon. The value depends on the phase angle, the Moon's distance from Earth, and whether it is waxing or waning.
363
+
364
+ **Example**: Get apparent magnitude for 12 April 1992 at 00:00 UTC
365
+
366
+ ```javascript
367
+ import {TimeOfInterest, Location} from '@astronomy-bundle/core';
368
+ import {Moon} from '@astronomy-bundle/moon';
369
+
370
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
371
+ const location = Location.create(52.519, -122.4108);
372
+ const moon = Moon.create(toi);
373
+
374
+ const magnitude = moon.getApparentMagnitude();
375
+ const topocentricMagnitude = moon.getTopocentricApparentMagnitude(location);
376
+ ```
377
+
378
+ The result of the calculation should be:\
379
+ Apparent magnitude: *-11.04*\
380
+ Topocentric apparent magnitude: *-11.08*
381
+
382
+ ---
383
+
384
+ ### Upcoming lunar phases
385
+
386
+ **Description:** These methods return the `TimeOfInterest` of the next occurrence of each lunar phase after the Moon's current date. The four phases are new moon, first quarter, full moon, and last quarter.
387
+
388
+ **Example**: Get upcoming lunar phases for 12 April 1992 at 00:00 UTC
389
+
390
+ ```javascript
391
+ import {TimeOfInterest} from '@astronomy-bundle/core';
392
+ import {Moon} from '@astronomy-bundle/moon';
393
+
394
+ const toi = TimeOfInterest.fromTime(1992, 4, 12, 0, 0, 0);
395
+ const moon = Moon.create(toi);
396
+
397
+ const newMoon = moon.getUpcomingNewMoon();
398
+ const firstQuarter = moon.getUpcomingFirstQuarter();
399
+ const fullMoon = moon.getUpcomingFullMoon();
400
+ const lastQuarter = moon.getUpcomingLastQuarter();
401
+ ```
402
+
403
+ The result of the calculation should be:\
404
+ Next new moon: *1992-04-03 05:02:03 UTC*\
405
+ Next first quarter: *1992-04-10 10:06:42 UTC*\
406
+ Next full moon: *1992-04-17 04:43:22 UTC*\
407
+ Next last quarter: *1992-04-24 21:40:37 UTC*
@@ -0,0 +1,2 @@
1
+ var tn=Object.defineProperty;var An=(t,n)=>{for(var e in n)tn(t,e,{get:n[e],enumerable:!0})};var et=[[0,0,1,0,6288774,-20905355],[2,0,-1,0,1274027,-3699111],[2,0,0,0,658314,-2955968],[0,0,2,0,213618,-569925],[0,1,0,0,-185116,48888],[0,0,0,2,-114332,-3149],[2,0,-2,0,58793,246158],[2,-1,-1,0,57066,-152138],[2,0,1,0,53322,-170733],[2,-1,0,0,45758,-204586],[0,1,-1,0,-40923,-129620],[1,0,0,0,-34720,108743],[0,1,1,0,-30383,104755],[2,0,0,-2,15327,10321],[0,0,1,2,-12528,0],[0,0,1,-2,10980,79661],[4,0,-1,0,10675,-34782],[0,0,3,0,10034,-23210],[4,0,-2,0,8548,-21636],[2,1,-1,0,-7888,24208],[2,1,0,0,-6766,30824],[1,0,-1,0,-5163,-8379],[1,1,0,0,4987,-16675],[2,-1,1,0,4036,-12831],[2,0,2,0,3994,-10445],[4,0,0,0,3861,-11650],[2,0,-3,0,3665,14403],[0,1,-2,0,-2689,-7003],[2,0,-1,2,-2602,0],[2,-1,-2,0,2390,10056],[1,0,1,0,-2348,6322],[2,-2,0,0,2236,-9884],[0,1,2,0,-2120,5751],[0,2,0,0,-2069,0],[2,-2,-1,0,2048,-4950],[2,0,1,-2,-1773,4130],[2,0,0,2,-1595,0],[4,-1,-1,0,1215,-3958],[0,0,2,2,-1110,0],[3,0,-1,0,-892,3258],[2,1,1,0,-810,2616],[4,-1,-2,0,759,-1897],[0,2,-1,0,-713,-2117],[2,2,-1,0,-700,2354],[2,1,-2,0,691,0],[2,-1,0,-2,596,0],[4,0,1,0,549,-1423],[0,0,4,0,537,-1117],[4,-1,0,0,520,-1571],[1,0,-2,0,-487,-1739],[2,1,0,-2,-399,0],[0,0,2,-2,-381,-4421],[1,1,1,0,351,0],[3,0,-2,0,-340,0],[4,0,-3,0,330,0],[2,-1,2,0,327,0],[0,2,1,0,-323,1165],[1,1,-1,0,299,0],[2,0,3,0,294,0],[2,0,-1,-2,0,8752]],xt=[[0,0,0,1,5128122],[0,0,1,1,280602],[0,0,1,-1,277693],[2,0,0,-1,173237],[2,0,-1,1,55413],[2,0,-1,-1,46271],[2,0,0,1,32573],[0,0,2,1,17198],[2,0,1,-1,9266],[0,0,2,-1,8822],[2,-1,0,-1,8216],[2,0,-2,-1,4324],[2,0,1,1,4200],[2,1,0,-1,-3359],[2,-1,-1,1,2463],[2,-1,0,1,2211],[2,-1,-1,-1,2065],[0,1,-1,-1,-1870],[4,0,-1,-1,1828],[0,1,0,1,-1794],[0,0,0,3,-1749],[0,1,-1,1,-1565],[1,0,0,1,-1491],[0,1,1,1,-1475],[0,1,1,-1,-1410],[0,1,0,-1,-1344],[1,0,0,-1,-1335],[0,0,3,1,1107],[4,0,0,-1,1021],[4,0,-1,1,833],[0,0,1,-3,777],[4,0,-2,1,671],[2,0,0,-3,607],[2,0,2,-1,596],[2,-1,1,-1,491],[2,0,-2,1,-451],[0,0,3,-1,439],[2,0,2,1,422],[2,0,-3,-1,421],[2,1,-1,1,-366],[2,1,0,1,-351],[4,0,0,1,331],[2,-1,1,1,315],[2,-2,0,-1,302],[0,0,1,3,-283],[2,1,1,-1,-229],[1,1,0,-1,223],[1,1,0,1,223],[0,1,-2,-1,-220],[2,1,-1,-1,-220],[1,0,1,1,-185],[2,-1,-2,-1,181],[0,1,2,1,-177],[4,0,-2,-1,176],[4,-1,-1,-1,166],[1,0,1,-1,-164],[4,0,1,-1,132],[1,0,-1,-1,-119],[4,-1,0,-1,115],[2,-2,0,1,107]];var c=Math.PI/180,M=180/Math.PI;function G(t,n=0){let e=10**n;return Math.round(t*e)/e}function R(t,n){let e=t.toString();for(;e.length<n;)e=`0${e}`;return e}function m(t,n=360){let e=t%n;return e<0&&(e=e+n),e}function H(t){return t/3600}var P=.996647189335,nn=1-P,Ln=1.002738*15,ot=[[0,0,0,0,1,-171996,-174.2,92025,8.9],[0,0,2,-2,2,-13187,-1.6,5736,-3.1],[0,0,2,0,2,-2274,-.2,977,-.5],[0,0,0,0,2,2062,.2,-895,.5],[0,1,0,0,0,1426,-3.4,54,-.1],[1,0,0,0,0,712,.1,-7,0],[0,1,2,-2,2,-517,1.2,224,-.6],[0,0,2,0,1,-386,-.4,200,0],[1,0,2,0,2,-301,0,129,-.1],[0,-1,2,-2,2,217,-.5,-95,.3],[1,0,0,-2,0,-158,0,-1,0],[0,0,2,-2,1,129,.1,-70,0],[-1,0,2,0,2,123,0,-53,0],[0,0,0,2,0,63,0,-2,0],[1,0,0,0,1,63,.1,-33,0],[-1,0,2,2,2,-59,0,26,0],[-1,0,0,0,1,-58,-.1,32,0],[1,0,2,0,1,-51,0,27,0],[2,0,0,-2,0,48,0,1,0],[-2,0,2,0,1,46,0,-24,0],[0,0,2,2,2,-38,0,16,0],[2,0,2,0,2,-31,0,13,0],[2,0,0,0,0,29,0,-1,0],[1,0,2,-2,2,29,0,-12,0],[0,0,2,0,0,26,0,-1,0],[0,0,2,-2,0,-22,0,0,0],[-1,0,2,0,1,21,0,-10,0],[0,2,0,0,0,17,-.1,0,0],[0,2,2,-2,2,-16,.1,7,0],[-1,0,0,2,1,16,0,-8,0],[0,1,0,0,1,-15,0,9,0],[1,0,0,-2,1,-13,0,7,0],[0,-1,0,0,1,-12,0,6,0],[2,0,-2,0,0,11,0,0,0],[-1,0,2,2,1,-10,0,5,0],[1,0,2,2,2,-8,0,3,0],[1,1,0,-2,0,-7,0,0,0],[0,1,2,0,2,7,0,-3,0],[0,-1,2,0,2,-7,0,3,0],[0,0,2,2,1,-7,0,3,0],[-2,0,0,2,1,-6,0,3,0],[1,0,0,2,0,6,0,0,0],[2,0,2,-2,2,6,0,-3,0],[0,0,0,2,1,-6,0,3,0],[1,0,2,-2,1,6,0,-3,0],[0,-1,2,-2,1,-5,0,3,0],[0,0,0,-2,1,-5,0,3,0],[1,-1,0,0,0,5,0,0,0],[2,0,2,0,1,-5,0,3,0],[2,0,0,-2,1,4,0,-2,0],[0,1,2,-2,1,4,0,-2,0],[1,0,0,-1,0,-4,0,0,0],[0,1,0,-2,0,-4,0,0,0],[1,0,-2,0,0,4,0,0,0],[0,0,0,1,0,-4,0,0,0],[-2,0,2,0,2,-3,0,1,0],[1,-1,0,-1,0,-3,0,0,0],[1,1,0,0,0,-3,0,0,0],[1,0,2,0,0,3,0,0,0],[1,-1,2,0,2,-3,0,1,0],[-1,-1,2,2,2,-3,0,1,0],[3,0,2,0,2,-3,0,1,0],[0,-1,2,2,2,-3,0,1,0],[0,-2,2,-2,1,-2,0,1,0],[-2,0,0,0,1,-2,0,1,0],[1,1,2,0,2,2,0,-1,0],[-1,0,2,-2,1,-2,0,1,0],[2,0,0,0,1,2,0,-1,0],[1,0,0,0,2,-2,0,1,0],[3,0,0,0,0,2,0,0,0],[0,0,2,1,2,2,0,-1,0],[-1,0,2,4,2,-2,0,1,0],[2,0,-2,0,1,1,0,0,0],[2,1,0,-2,0,1,0,0,0],[0,0,-2,2,1,1,0,0,0],[0,1,-2,2,0,-1,0,0,0],[0,1,0,0,2,1,0,0,0],[-1,0,0,1,1,1,0,0,0],[0,1,2,-2,0,-1,0,0,0],[-1,0,0,0,2,1,0,-1,0],[1,0,0,-4,0,-1,0,0,0],[-2,0,2,2,2,1,0,-1,0],[2,0,0,-4,0,-1,0,0,0],[1,1,2,-2,2,1,0,-1,0],[1,0,2,2,1,-1,0,1,0],[-2,0,2,4,2,-1,0,1,0],[-1,0,4,0,2,1,0,0,0],[1,-1,0,-2,0,1,0,0,0],[2,0,2,-2,1,1,0,-1,0],[2,0,2,2,2,-1,0,0,0],[1,0,0,2,1,-1,0,0,0],[0,0,4,-2,2,1,0,0,0],[3,0,2,-2,2,1,0,0,0],[1,0,2,-2,0,-1,0,0,0],[0,1,2,0,1,1,0,0,0],[-1,-1,0,2,1,1,0,0,0],[0,0,-2,0,1,-1,0,0,0],[0,0,2,-1,2,-1,0,0,0],[0,1,0,2,0,-1,0,0,0],[1,0,-2,-2,0,-1,0,0,0],[0,-1,2,0,1,-1,0,0,0],[1,1,0,-2,1,-1,0,0,0],[1,0,-2,2,0,-1,0,0,0],[2,0,0,2,0,1,0,0,0],[0,0,2,4,2,-1,0,0,0],[0,1,0,1,0,1,0,0,0]];var Tt=299792.458;function O(t){return t*(149597870700/1e3)}function _t(t){return t/(149597870700/1e3)}function A(t){let n=357.5291092+35999.0502909*t-1536e-7*t**2+t**3/2449e3;return m(n)}function en(t){let n=t/10,e=280.4664567+360007.6982779*n+.03042028*n**2+n**3/49931-n**4/15300+n**5/2e6;return m(e)}function It(t){let n=en(t),e=on(t);return n+e}function on(t){let n=A(t),e=(1.914602-.004817*t-14e-6*t**2)*Math.sin(n*c);return e+=(.019993-101e-6*t)*Math.sin(2*n*c),e+=289e-6*Math.sin(3*n*c),e}function x(t){let n=297.8501921+445267.1114034*t-.0018819*t**2+t**3/545868-t**4/113065e3;return m(n)}function T(t){let n=134.9633964+477198.8675055*t+.0087414*t**2+t**3/69699-t**4/1471200;return m(n)}function L(t){let n=93.272095+483202.0175233*t-.0036539*t**2-t**3/352600+t**4/86331e3;return m(n)}function at(t){let n=218.3164477+481267.88123421*t-.0015786*t**2+t**3/538841-t**4/65194e3;return m(n)}function Gt(t){let n=at(t),e=cn(t);return n+e/1e6}function Ht(t){return sn(t)/1e6}function Pt(t){return _t(rn(t))}function rn(t){return 385000.56+an(t)/1e3}function an(t){let n=x(t),e=A(t),o=T(t),i=L(t),s=1-.002516*t-74e-7*t**2,l=0;return et.forEach(r=>{let a=r[0],u=r[1],p=r[2],d=r[3],g=r[5],h=Math.cos((a*n+u*e+p*o+d*i)*c);switch(u){case 1:case-1:h=h*g*s;break;case 2:case-2:h=h*g*s*s;break;default:h=h*g;break}l+=h}),l}function cn(t){let n=at(t),e=x(t),o=A(t),i=T(t),s=L(t),l=119.75+131.849*t,r=53.09+479264.29*t,a=1-.002516*t-74e-7*t**2,u=3958*Math.sin(l*c)+1962*Math.sin((n-s)*c)+318*Math.sin(r*c);return et.forEach(p=>{let d=p[0],g=p[1],h=p[2],E=p[3],f=p[4],b=Math.sin((d*e+g*o+h*i+E*s)*c);switch(g){case 1:case-1:b=b*f*a;break;case 2:case-2:b=b*f*a*a;break;default:b=b*f;break}u+=b}),u}function sn(t){let n=at(t),e=x(t),o=A(t),i=T(t),s=L(t),l=119.75+131.849*t,r=313.45+481266.484*t,a=1-.002516*t-74e-7*t**2,u=-2235*Math.sin(n*c)+382*Math.sin(r*c)+175*Math.sin((l-s)*c)+175*Math.sin((l+s)*c)+127*Math.sin((n-i)*c)-115*Math.sin((n+i)*c);return xt.forEach(p=>{let d=p[0],g=p[1],h=p[2],E=p[3],f=p[4],b=Math.sin((d*e+g*o+h*i+E*s)*c);switch(g){case 1:case-1:b=b*f*a;break;case 2:case-2:b=b*f*a**2;break;default:b=b*f;break}u+=b}),u}function qt(t){return .016708634-42037e-9*t-1267e-10*t**2}function Jt(t){return 102.93735+1.71946*t+46e-5*t**2}function ct(t){let n=t/100;return(84381.448-4680.93*n-1.55*n**2+1999.25*n**3-51.38*n**4-249.67*n**5-39.05*n**6+7.12*n**7+27.87*n**8+5.79*n**9+2.45*n**10)/3600}function _(t){let n=ct(t),e=st(t);return n+e}function D(t){let n=x(t),e=A(t),o=T(t),i=L(t),s=125.04452-1934.136261*t+.0020708*t**2+t**3/45e4,l=0;return ot.forEach(r=>{let a=r[0],u=r[1],p=r[2],d=r[3],g=r[4],h=r[5],E=r[6],f=d*n+u*e+a*o+p*i+g*s;l+=Math.sin(f*c)*(h+E*t)}),l*1e-4/3600}function st(t){let n=x(t),e=A(t),o=T(t),i=L(t),s=125.04452-1934.136261*t+.0020708*t**2+t**3/45e4,l=0;return ot.forEach(r=>{let a=r[0],u=r[1],p=r[2],d=r[3],g=r[4],h=r[7],E=r[8],f=d*n+u*e+a*o+p*i+g*s;l+=Math.cos(f*c)*(h+E*t)}),l*1e-4/3600}function j(t,n){let e=D(n);return{lon:t.lon+e,lat:t.lat,radiusVector:t.radiusVector}}function Ft(t,n){let e=It(n),o=qt(n),i=Jt(n),s=H(20.49552),l=t.lon*c,r=t.lat*c,a=e*c,u=i*c,p=(-1*s*Math.cos(a-l)+o*s*Math.cos(u-l))/Math.cos(r),d=-1*s*Math.sin(r)*(Math.sin(a-l)-o*Math.sin(u-l));return{lon:t.lon+p,lat:t.lat+d,radiusVector:t.radiusVector}}function Ut(t){if(t<-5)return t;let n=1.02/Math.tan((t+10.3/(t+5.11))*c);return t+n/60}function ut(t){let n=parseFloat(`${t.year}.${z(t)}`),e,o;t.month>2?(e=t.year,o=t.month):(e=t.year-1,o=t.month+12);let i=t.day,s=t.hour/24+t.min/1440+t.sec/86400,l,r;if(n>=1582.288)l=Math.floor(e/100),r=2-l+Math.floor(l/4);else if(n<=1582.277)r=0;else throw new Error("Date between 1582-10-04 and 1582-10-15 is not defined.");return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(o+1))+i+s+r-1524.5}function lt(t){t=t+.5;let n=Math.floor(t),e=t-n,o=n;if(n>=2299161){let E=Math.floor((n-186721625e-2)/36524.25);o=n+1+E-Math.floor(E/4)}let i=o+1524,s=Math.floor((i-122.1)/365.25),l=Math.floor(365.25*s),r=Math.floor((i-l)/30.6001),a=i-l-Math.floor(30.6001*r)+e,u=r<14?r-1:r-13,p=u>2?s-4716:s-4715,d=(a-Math.floor(a))*24,g=(d-Math.floor(d))*60,h=(g-Math.floor(g))*60;return{year:Math.floor(p),month:Math.floor(u),day:Math.floor(a),hour:Math.floor(d),min:Math.floor(g),sec:Math.floor(h)}}function Vt(t){return Math.floor(t+.5)-.5}function pt(t){return(t-2451545)/36525}function q(t){return t*36525+2451545}function jt(t){return pt(t)/10}function zt(t,n){let e=J(t)?1:2,o=n<32?1:Math.floor(9*(e+n)/275+.98),i=Math.floor(n-Math.floor(275*o/9)+e*Math.floor((o+9)/12)+30),s=24*(n-Math.floor(n)),l=Math.floor(s),r=60*(s-l),a=Math.floor(r),u=G(60*(r-a));return{year:t,month:o,day:i,hour:l,min:a,sec:u}}function wt(t){let n=J(t.year)?366:365,e=z(t)-1+t.hour/24+t.min/1440+t.sec/86400;return t.year+e/n}function z(t){let n=J(t.year)?1:2,e=t.month,o=t.day;return Math.floor(275*e/9)-n*Math.floor((e+9)/12)+o-30}function Yt(t){let n=ut(t);return Math.floor((n+1.5)%7)}function J(t){return t/4!==Math.floor(t/4)?!1:t/100!==Math.floor(t/100)?!0:t/400===Math.floor(t/400)}function w(t){let e=280.46061837+360.98564736629*(q(t)-2451545)+387933e-9*t**2+t**3/3871e4;return m(e)}function mt(t){let n=w(t),e=D(t),i=_(t)*c;return n+e*Math.cos(i)}function $t(t,n){let o=w(t)+n;return m(o)}function F(t,n){return mt(t)+n}function ht(t,n,e){let o=F(t,n);return m(o-e)}function Bt(t){let{x:n,y:e,z:o}=t,i=Math.atan2(e,n),s=m(i*M),r=Math.atan(o/Math.sqrt(n**2+e**2))*M,a=Math.sqrt(n**2+e**2+o**2);return{lon:s,lat:r,radiusVector:a}}function S(t){let{lon:n,lat:e,radiusVector:o}=t,i=n*c,s=e*c,l=o*Math.cos(s)*Math.cos(i),r=o*Math.cos(s)*Math.sin(i),a=o*Math.sin(s);return{x:l,y:r,z:a}}function gt(t,n,e){let{rightAscension:o,declination:i,radiusVector:s}=t,{lat:l,lon:r,elevation:a}=n,u=i*c;a=a||0;let p=mn(l,a),d=hn(l,a),h=pn(s)*c,E=F(e,r),b=ht(e,r,o)*c,k=Math.cos(u)*Math.sin(b),tt=Math.cos(u)*Math.cos(b)-d*Math.sin(h),nt=Math.sin(u)-p*Math.sin(h),yt=Math.sqrt(k*k+tt*tt+nt*nt),Zt=Math.atan2(k,tt)*M,kt=Math.asin(nt/yt);return{rightAscension:m(E-Zt),declination:kt*M,radiusVector:yt*s}}function vt(t,n,e){let{rightAscension:o,declination:i}=t,{lat:s,lon:l}=n,r=gt(t,n,e),a=ht(e,l,o);return ln(a,i,s,r.radiusVector)}function ln(t,n,e,o=0){let i=t*c,s=n*c,l=e*c,r=Math.atan2(Math.sin(i),Math.cos(i)*Math.sin(l)-Math.tan(s)*Math.cos(l)),a=Math.asin(Math.sin(l)*Math.sin(s)+Math.cos(l)*Math.cos(s)*Math.cos(i));return{azimuth:m(r*M+180),altitude:a*M,radiusVector:o}}function Y(t,n,e=!0){let{lon:o,lat:i,radiusVector:s}=t,r=_(n)*c,a=o*c,u=i*c,p=Math.sin(a)*Math.cos(r)-Math.sin(u)/Math.cos(u)*Math.sin(r),d=Math.cos(a),g=Math.atan2(p,d),h=e?m(g*M):g*M,f=Math.asin(Math.sin(u)*Math.cos(r)+Math.cos(u)*Math.sin(r)*Math.sin(a))*M;return{rightAscension:h,declination:f,radiusVector:s}}function Wt(t,n){return{x:t.x+n.x,y:t.y+n.y,z:t.z+n.z}}function dt(t){let{lon:n,lat:e,radiusVector:o}=t;return{lon:m(n+180),lat:-1*e,radiusVector:o}}function pn(t){let n=H(8.794)*c;return Math.asin(Math.sin(n)/t)*M}function mn(t,n){let e=t*c,o=Math.atan(P*Math.tan(e));return P*Math.sin(o)+n/6378137*Math.sin(e)}function hn(t,n){let e=t*c,o=Math.atan(P*Math.tan(e));return Math.cos(o)+n/6378137*Math.cos(e)}function $(t,n){let e=t.rightAscension*c,o=t.declination*c,i=n.rightAscension*c,s=n.declination*c;return Math.acos(Math.sin(s)*Math.sin(o)+Math.cos(s)*Math.cos(o)*Math.cos(i-e))*M}function Mt(t,n){let e=t.radiusVector,o=n.radiusVector,s=$(t,n)*c;return Math.atan2(o*Math.sin(s),e-o*Math.cos(s))*M}function bt(t){let n=t*c;return(1+Math.cos(n))/2}function ft(t,n){let e=t.rightAscension*c,o=t.declination*c,i=n.rightAscension*c,s=n.declination*c,l=Math.cos(s)*Math.sin(i-e),r=Math.sin(s)*Math.cos(o)-Math.cos(s)*Math.sin(o)*Math.cos(i-e),a=Math.atan2(l,r);return m(a*M)}function Et(t){return t>=180}function I(t,n){return 2*Math.atan2(n,2*t)*M}function Qt(t,n=0){let e=t+(n-.5)/12,o,i=0;return t<-500&&(o=(e-1820)/100,i=-20+32*o**2),t>=-500&&t<500&&(o=e/100,i=10583.6-1014.41*o+33.78311*o**2-5.952053*o**3-.1798452*o**4+.022174192*o**5+.0090316521*o**6),t>=500&&t<1600&&(o=(e-1e3)/100,i=1574.2-556.01*o+71.23472*o**2+.319781*o**3-.8503463*o**4-.005050998*o**5+.0083572073*o**6),t>=1600&&t<1700&&(o=e-1600,i=120-.9808*o-.01532*o**2+o**3/7129),t>=1700&&t<1800&&(o=e-1700,i=8.83+.1603*o-.0059285*o**2+13336e-8*o**3-o**4/1174e3),t>=1800&&t<1860&&(o=e-1800,i=13.72-.332447*o+.0068612*o**2+.0041116*o**3-37436e-8*o**4+121272e-10*o**5-1699e-10*o**6+875e-12*o**7),t>=1860&&t<1900&&(o=e-1860,i=7.62+.5737*o-.251754*o**2+.01680668*o**3-.0004473624*o**4+o**5/233174),t>=1900&&t<1920&&(o=e-1900,i=-2.79+1.494119*o-.0598939*o**2+.0061966*o**3-197e-6*o**4),t>=1920&&t<1941&&(o=e-1920,i=21.2+.84493*o-.0761*o**2+.0020936*o**3),t>=1941&&t<1961&&(o=e-1950,i=29.07+.407*o-o**2/233+o**3/2547),t>=1961&&t<1986&&(o=e-1975,i=45.45+1.067*o-o**2/260-o**3/718),t>=1986&&t<2005&&(o=e-2e3,i=63.86+.3345*o-.060374*o**2+.0017275*o**3+651814e-9*o**4+2373599e-11*o**5),t>=2005&&t<2050&&(o=e-2e3,i=62.92+.32217*o+.005589*o**2),t>=2050&&(o=(e-1820)/100,i=-20+32*o**2),i}var y=class t{constructor(n){this.time=n;this.jd=0;this.T=0;this.jd=ut(n),this.T=pt(this.jd)}static fromCurrentTime(){let n=new Date(Date.now());return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromTime(n,e,o,i=0,s=0,l=0){return new t({year:n,month:e,day:o,hour:i,min:s,sec:l})}static fromDate(n){return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromYearOfDay(n,e){let o=zt(n,e);return new t(o)}static fromJulianDay(n){let e=lt(n);return new t(e)}static fromJulianCenturiesJ2000(n){let e=q(n),o=lt(e);return new t(o)}getTime(){return this.time}getString(){let{year:n,month:e,day:o,hour:i,min:s,sec:l}=this.time;return`${n}-${R(e,2)}-${R(o,2)} ${R(i,2)}:${R(s,2)}:${R(l,2)}`}getDate(){let{year:n,month:e,day:o,hour:i,min:s,sec:l}=this.time;return new Date(Date.UTC(n,e-1,o,i,s,l))}getDecimalYear(){return wt(this.time)}getDayOfYear(){return z(this.time)}getDayOfWeek(){return Yt(this.time)}isLeapYear(){return J(this.time.year)}getJulianDay(){return this.jd}getJulianDay0(){return Vt(this.jd)}getJulianCenturiesJ2000(){return this.T}getJulianMillenniaJ2000(){return jt(this.jd)}getGreenwichMeanSiderealTime(){return w(this.T)}getGreenwichApparentSiderealTime(){return mt(this.T)}getLocalMeanSiderealTime(n){return $t(this.T,n.lon)}getLocalApparentSiderealTime(n){return F(this.T,n.lon)}getDeltaT(){let{year:n,month:e}=this.time;return Qt(n,e)}};var C=class{constructor(n=y.fromCurrentTime(),e="astronomical object"){this.toi=n;this.name=e;this.jd=0;this.jd0=0;this.T=0;this.t=0;this.jd=n.getJulianDay(),this.jd0=n.getJulianDay0(),this.T=n.getJulianCenturiesJ2000(),this.t=n.getJulianMillenniaJ2000()}getTimeOfInterest(){return this.toi}getGeocentricEquatorialSphericalJ2000Coordinates(){let n=this.getGeocentricEclipticSphericalJ2000Coordinates();return Y(n,this.T)}getGeocentricEquatorialSphericalDateCoordinates(){let n=this.getGeocentricEclipticSphericalDateCoordinates();return Y(n,this.T)}getApparentGeocentricEclipticRectangularCoordinates(){let n=this.getApparentGeocentricEclipticSphericalCoordinates();return S(n)}getApparentGeocentricEquatorialSphericalCoordinates(){let n=this.getApparentGeocentricEclipticSphericalCoordinates();return Y(n,this.T)}getTopocentricEquatorialSphericalCoordinates(n){let e=this.getApparentGeocentricEquatorialSphericalCoordinates();return gt(e,n,this.T)}getTopocentricHorizontalCoordinates(n){let e=this.getApparentGeocentricEquatorialSphericalCoordinates();return vt(e,n,this.T)}getApparentTopocentricHorizontalCoordinates(n){let{azimuth:e,altitude:o,radiusVector:i}=this.getTopocentricHorizontalCoordinates(n);return{azimuth:e,altitude:Ut(o),radiusVector:i}}getDistanceToEarth(){let n=this.getGeocentricEclipticSphericalDateCoordinates();return O(n.radiusVector)}getApparentDistanceToEarth(){let n=this.getApparentGeocentricEclipticSphericalCoordinates();return O(n.radiusVector)}getTopocentricDistanceToEarth(n){let e=this.getTopocentricEquatorialSphericalCoordinates(n);return O(e.radiusVector)}getLightTime(){let{radiusVector:n}=this.getGeocentricEclipticSphericalDateCoordinates();return O(n)/Tt}};function St(t,n,e,o){let i=o?-1*e:e,s=5*(Math.log10(t)+Math.log10(O(n)/384400));return e>=160&&(s+=-449.88+7.1112*e-.037714*e**2+66667e-9*e**3),e>=40&&e<160&&(s+=-12.07857+.002175199*i+.0002859289*i**2-2495124e-13*i**3-8699235e-15*i**4+7606291e-18*i**5+3403311e-19*i**6),i>=0&&i<40&&(s+=-12.861+.037*e-12e-5*e**2),i>-40&&i<0&&(s+=-12.85-.037*i-235e-6*i**2),s}function U(t,n){let e=G((t-2e3)*12.3685)+n,o=e/1236.85,i=Sn(e,o),s=gn(e,o,n),l=fn(e,o,n),r=En(e,o),a=i+s+l+r;return y.fromJulianDay(a)}function gn(t,n,e){switch(e){case 0:return dn(t,n);case .5:return Mn(t,n);case .25:case .75:return bn(t,n);default:throw new Error(`Invalid moon phase: ${e}`)}}function dn(t,n){let e=1-.002516*n-74e-7*n**2,o=Q(t,n),i=K(t,n),s=X(t,n),l=At(t,n),r=o*c,a=i*c,u=s*c,p=l*c;return-.4072*Math.sin(a)+.17241*e*Math.sin(r)+.01608*Math.sin(2*a)+.01039*Math.sin(2*u)+.00739*e*Math.sin(a-r)-.00514*e*Math.sin(a+r)+.00208*e*e*Math.sin(2*r)-.00111*Math.sin(a-2*u)-57e-5*Math.sin(a+2*u)+56e-5*e*Math.sin(2*a+r)-42e-5*Math.sin(3*a)+42e-5*e*Math.sin(r+2*u)+38e-5*e*Math.sin(r-2*u)-24e-5*e*Math.sin(2*a-r)-17e-5*Math.sin(p)-7e-5*Math.sin(a+2*r)+4e-5*Math.sin(2*a-2*u)+4e-5*Math.sin(3*r)+3e-5*Math.sin(a+r-2*u)+3e-5*Math.sin(2*a+2*u)-3e-5*Math.sin(a+r+2*u)+3e-5*Math.sin(a-r+2*u)-2e-5*Math.sin(a-r-2*u)-2e-5*Math.sin(3*a+r)+2e-5*Math.sin(4*a)}function Mn(t,n){let e=1-.002516*n-74e-7*n**2,o=Q(t,n),i=K(t,n),s=X(t,n),l=At(t,n),r=o*c,a=i*c,u=s*c,p=l*c;return-.40614*Math.sin(a)+.17302*e*Math.sin(r)+.01614*Math.sin(2*a)+.01043*Math.sin(2*u)+.00734*e*Math.sin(a-r)-.00515*e*Math.sin(a+r)+.00209*e*e*Math.sin(2*r)-.00111*Math.sin(a-2*u)-57e-5*Math.sin(a+2*u)+56e-5*e*Math.sin(2*a+r)-42e-5*Math.sin(3*a)+42e-5*e*Math.sin(r+2*u)+38e-5*e*Math.sin(r-2*u)-24e-5*e*Math.sin(2*a-r)-17e-5*Math.sin(p)-7e-5*Math.sin(a+2*r)+4e-5*Math.sin(2*a-2*u)+4e-5*Math.sin(3*r)+3e-5*Math.sin(a+r-2*u)+3e-5*Math.sin(2*a+2*u)-3e-5*Math.sin(a+r+2*u)+3e-5*Math.sin(a-r+2*u)-2e-5*Math.sin(a-r-2*u)-2e-5*Math.sin(3*a+r)+2e-5*Math.sin(4*a)}function bn(t,n){let e=1-.002516*n-74e-7*n**2,o=Q(t,n),i=K(t,n),s=X(t,n),l=At(t,n),r=o*c,a=i*c,u=s*c,p=l*c;return-.62801*Math.sin(a)+.17172*e*Math.sin(r)-.01183*e*Math.sin(a+r)+.00862*Math.sin(2*a)+.00804*Math.sin(2*u)+.00454*e*Math.sin(a-r)+.00204*e*e*Math.sin(2*r)-.0018*Math.sin(a-2*u)-7e-4*Math.sin(a+2*u)-4e-4*Math.sin(3*a)-34e-5*e*Math.sin(2*a-r)+32e-5*e*Math.sin(r+2*u)+32e-5*e*Math.sin(r-2*u)-28e-5*e*e*Math.sin(a+2*r)+27e-5*e*Math.sin(2*a+r)-17e-5*Math.sin(p)-5e-5*Math.sin(a-r-2*u)+4e-5*Math.sin(2*a+2*u)-4e-5*Math.sin(a+r+2*u)+4e-5*Math.sin(a-2*r)+3e-5*Math.sin(a+r-2*u)+3e-5*Math.sin(3*r)+2e-5*Math.sin(2*a-2*u)+2e-5*Math.sin(a-r+2*u)-2e-5*Math.sin(3*a+r)}function fn(t,n,e){if(e===.5||e===0)return 0;let o=1-.002516*n-74e-7*n**2,i=Q(t,n),s=K(t,n),l=X(t,n),r=i*c,a=s*c,u=l*c,p=.00306-38e-5*o*Math.cos(r)+26e-5*Math.cos(a)-2e-5*Math.cos(a-r)+2e-5*Math.cos(a+r)+2e-5*Math.cos(2*u);return e===.25?p:-1*p}function En(t,n){let e=(299.77+.107408*t-.009173*n**2)*c,o=(251.88+.016321*t)*c,i=(251.83+26.651776*t)*c,s=(349.42+36.412478*t)*c,l=(84.66+18.206239*t)*c,r=(141.74+53.303771*t)*c,a=(207.84+2.453732*t)*c,u=(154.84+7.30686*t)*c,p=(34.52+27.261239*t)*c,d=(207.19+.121824*t)*c,g=(291.34+1.844379*t)*c,h=(161.72+24.198154*t)*c,E=(239.56+25.513099*t)*c,f=(331.55+3.592518*t)*c;return 325e-6*Math.sin(e)+165e-6*Math.sin(o)+164e-6*Math.sin(i)+126e-6*Math.sin(s)+11e-5*Math.sin(l)+62e-6*Math.sin(r)+6e-5*Math.sin(a)+56e-6*Math.sin(u)+47e-6*Math.sin(p)+42e-6*Math.sin(d)+4e-5*Math.sin(g)+37e-6*Math.sin(h)+35e-6*Math.sin(E)+23e-6*Math.sin(f)}function Sn(t,n){return 245155009766e-5+29.530588861*t+15437e-8*n**2+15e-8*n**3+73e-11*n**4}function Q(t,n){return 2.5534+29.1053567*t-14e-7*n**2-11e-8*n**3}function K(t,n){return 201.5643+385.81693528*t+.0107582*n**2+1238e-8*n**3+58e-9*n**4}function X(t,n){return 160.7108+390.67050284*t+.0016118*n**2+227e-8*n**3+11e-9*n**4}function At(t,n){return 124.7746+390.67050284*t+.0020672*n**2+215e-8*n**3}var Rt=class extends C{constructor(e,o,i){super(e,"moon");this.sun=o;this.earth=i}getHeliocentricEclipticRectangularJ2000Coordinates(){return this.getHeliocentricEclipticRectangularDateCoordinates()}getHeliocentricEclipticRectangularDateCoordinates(){let e=this.getGeocentricEclipticRectangularDateCoordinates(),o=this.earth.getHeliocentricEclipticRectangularDateCoordinates();return Wt(e,o)}getHeliocentricEclipticSphericalJ2000Coordinates(){return this.getHeliocentricEclipticSphericalDateCoordinates()}getHeliocentricEclipticSphericalDateCoordinates(){let e=this.getHeliocentricEclipticRectangularDateCoordinates();return Bt(e)}getGeocentricEclipticRectangularJ2000Coordinates(){return this.getGeocentricEclipticRectangularDateCoordinates()}getGeocentricEclipticRectangularDateCoordinates(){let e=this.getGeocentricEclipticSphericalDateCoordinates();return S(e)}getGeocentricEclipticSphericalJ2000Coordinates(){return this.getGeocentricEclipticSphericalDateCoordinates()}getGeocentricEclipticSphericalDateCoordinates(){let e=Gt(this.T),o=Ht(this.T),i=Pt(this.T);return{lon:e,lat:o,radiusVector:i}}getApparentGeocentricEclipticSphericalCoordinates(){let e=this.getGeocentricEclipticSphericalDateCoordinates();return j(e,this.T)}getAngularDiameter(){let e=this.getApparentDistanceToEarth();return I(e,3474.8)}getTopocentricAngularDiameter(e){let o=this.getTopocentricDistanceToEarth(e);return I(o,3474.8)}getElongation(){let e=this.getApparentGeocentricEquatorialSphericalCoordinates(),o=this.sun.getApparentGeocentricEquatorialSphericalCoordinates();return $(e,o)}getTopocentricElongation(e){let o=this.getTopocentricEquatorialSphericalCoordinates(e),i=this.sun.getApparentGeocentricEquatorialSphericalCoordinates();return $(o,i)}getPhaseAngle(){let e=this.getApparentGeocentricEquatorialSphericalCoordinates(),o=this.sun.getApparentGeocentricEquatorialSphericalCoordinates();return Mt(e,o)}getTopocentricPhaseAngle(e){let o=this.getTopocentricEquatorialSphericalCoordinates(e),i=this.sun.getApparentGeocentricEquatorialSphericalCoordinates();return Mt(o,i)}getIlluminatedFraction(){let e=this.getPhaseAngle();return bt(e)}getTopocentricIlluminatedFraction(e){let o=this.getTopocentricPhaseAngle(e);return bt(o)}getPositionAngleOfBrightLimb(){let e=this.getApparentGeocentricEquatorialSphericalCoordinates(),o=this.sun.getApparentGeocentricEquatorialSphericalCoordinates();return ft(e,o)}getTopocentricPositionAngleOfBrightLimb(e){let o=this.getTopocentricEquatorialSphericalCoordinates(e),i=this.sun.getApparentGeocentricEquatorialSphericalCoordinates();return ft(o,i)}isWaxing(){let e=this.getPositionAngleOfBrightLimb();return Et(e)}isTopocentricWaxing(e){let o=this.getTopocentricPositionAngleOfBrightLimb(e);return Et(o)}getApparentMagnitude(){let e=this.getHeliocentricEclipticSphericalDateCoordinates(),o=this.getGeocentricEclipticSphericalDateCoordinates(),i=this.getPhaseAngle(),s=this.isWaxing();return St(e.radiusVector,o.radiusVector,i,s)}getTopocentricApparentMagnitude(e){let o=this.getHeliocentricEclipticSphericalDateCoordinates(),i=this.getTopocentricEquatorialSphericalCoordinates(e),s=this.getTopocentricPhaseAngle(e),l=this.isTopocentricWaxing(e);return St(o.radiusVector,i.radiusVector,s,l)}getUpcomingNewMoon(){let e=this.toi.getDecimalYear();return U(e,0)}getUpcomingFirstQuarter(){let e=this.toi.getDecimalYear();return U(e,.25)}getUpcomingFullMoon(){let e=this.toi.getDecimalYear();return U(e,.5)}getUpcomingLastQuarter(){let e=this.toi.getDecimalYear();return U(e,.75)}};function V(t,n){return Z(t,n)*M}function Z(t,n){let e=0;return t.forEach((o,i)=>{e+=Cn(o,n)*n**i}),e}function Cn(t,n){let e=0;return t.forEach(o=>{let i=o[0]||0,s=o[1]||0,l=o[2]||0;e+=i*Math.cos(s+l*n)}),e}var Ot=class extends C{constructor(e,o,i){super(e,"earth");this.vsop87Date=o;this.vsop87J2000=i}getHeliocentricEclipticRectangularJ2000Coordinates(){return S(this.getHeliocentricEclipticSphericalJ2000Coordinates())}getHeliocentricEclipticRectangularDateCoordinates(){return S(this.getHeliocentricEclipticSphericalDateCoordinates())}getHeliocentricEclipticSphericalJ2000Coordinates(){return{lon:m(V(this.vsop87J2000.VSOP87_X,this.t)),lat:V(this.vsop87J2000.VSOP87_Y,this.t),radiusVector:Z(this.vsop87J2000.VSOP87_Z,this.t)}}getHeliocentricEclipticSphericalDateCoordinates(){return{lon:m(V(this.vsop87Date.VSOP87_X,this.t)),lat:V(this.vsop87Date.VSOP87_Y,this.t),radiusVector:Z(this.vsop87Date.VSOP87_Z,this.t)}}getGeocentricEclipticRectangularJ2000Coordinates(){return{x:0,y:0,z:0}}getGeocentricEclipticRectangularDateCoordinates(){return{x:0,y:0,z:0}}getGeocentricEclipticSphericalJ2000Coordinates(){return{lon:0,lat:0,radiusVector:0}}getGeocentricEclipticSphericalDateCoordinates(){return{lon:0,lat:0,radiusVector:0}}getApparentGeocentricEclipticSphericalCoordinates(){return{lon:0,lat:0,radiusVector:0}}getNutationInLongitude(){return D(this.T)}getNutationInObliquity(){return st(this.T)}getMeanObliquityOfEcliptic(){return ct(this.T)}getTrueObliquityOfEcliptic(){return _(this.T)}};var Dt=class extends C{constructor(e,o){super(e,"sun");this.earth=o}getHeliocentricEclipticRectangularJ2000Coordinates(){return{x:0,y:0,z:0}}getHeliocentricEclipticRectangularDateCoordinates(){return{x:0,y:0,z:0}}getHeliocentricEclipticSphericalJ2000Coordinates(){return{lon:0,lat:0,radiusVector:0}}getHeliocentricEclipticSphericalDateCoordinates(){return{lon:0,lat:0,radiusVector:0}}getGeocentricEclipticRectangularJ2000Coordinates(){return S(this.getGeocentricEclipticSphericalJ2000Coordinates())}getGeocentricEclipticRectangularDateCoordinates(){return S(this.getGeocentricEclipticSphericalDateCoordinates())}getGeocentricEclipticSphericalJ2000Coordinates(){return dt(this.earth.getHeliocentricEclipticSphericalJ2000Coordinates())}getGeocentricEclipticSphericalDateCoordinates(){return dt(this.earth.getHeliocentricEclipticSphericalDateCoordinates())}getApparentGeocentricEclipticSphericalCoordinates(){let e=this.getGeocentricEclipticSphericalDateCoordinates();return e=Ft(e,this.T),e=j(e,this.T),e}getAngularDiameter(){return I(this.getApparentDistanceToEarth(),1392684)}getTopocentricAngularDiameter(e){return I(this.getTopocentricDistanceToEarth(e),1392684)}getApparentMagnitude(){return-26.74}getTopocentricApparentMagnitude(){return-26.74}};export{An as a,Ot as b,Dt as c,Rt as d};
2
+ //# sourceMappingURL=chunk-NYCHVUKJ.mjs.map