@johnmorrisdotca/wakusei-planets 0.21.0 → 0.23.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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.23.0] - 2026-11-08
6
+
7
+ - **`/nearest`: what is nearby, and when bodies come close** (MODULES-651). `nearest(target, { count, within, kind, bodies, by, date, observer })` lists the Sun, planets, dwarf planets and moons nearest to a body on a date, by the angle between them in the sky of the Earth's centre, a place on the Earth (the Moon's parallax counts) or another body (`by: "sky"`, exact near 0 and 180 degrees, astrometric as Horizons' RA and DEC are) or by the distance between their centres (`by: "space"`, km and au); `within(target, radius, options)` lists all inside a radius; `closestApproach(a, b, { from, to })` and `conjunctions({ from, to, within, bodies })` scan a span in coarse steps (the fastest body's period over 40, at most 2 days) and narrow each minimum to about a second of time by golden-section search. Every result carries the accuracy to expect from the theories (`uncertaintyArcseconds` or `uncertaintyKm`, and `uncertaintySeconds` for the moment), with the part of the error that two bodies share cancelled. Against JPL Horizons (`test/data/horizons-approach.json`, `scripts/fetch-horizons-approach.py`): the Jupiter-Saturn great conjunction of 2020-12-21 within 270 s and 0.27 arc-second, Venus and Jupiter of 2023-03-02 within 23 s and 0.54, the Moon's nine closest approaches to the planets in December 2026 within 8 s and 1.5 arc-seconds, and the Moon and Venus from Vancouver within 0.9 arc-second; also against a brute-force scan. `distance(a, b, date)` is the straight-line distance of any two bodies in km and au; `distanceRange(a, b, { from, to })` is the least and the greatest distance over a span, each with its moment, found the same way (the greatest on the negated distance): Earth and Mars come to 0.3727 au on 2003-08-27 and go to 2.676 au in 2066, and the guide tabulates every pair of planets for 1900 to 2100 (`scripts/distance-table.ts`); on three pairs against Horizons (`test/data/horizons-distance.json`, `scripts/fetch-horizons-distance.py`) the distances are within 4,000 km, inside the claimed uncertainty. A year's search of the Sun and the planets takes 18 ms (`scripts/bench-nearest.ts`). A separate entry point that nothing else imports. EN/JA guide `docs/guides/nearest.md`.
8
+
9
+ ## [0.22.0] - 2026-11-08
10
+
11
+ - **Moons follow published theories, and every planet is measured on 60 dates from 1800 to 2200** (MODULES-528, 511). Io, Europa, Ganymede and Callisto come from L1.2 (Lainey, Duriez and Vienne, IMCCE) and Mimas to Iapetus from TASS1.7 (Vienne and Duriez, IMCCE; the table as Orbiter keeps it, MIT, with its notice in NOTICE.md), as optional entry points `tables/galilean` and `tables/saturn-moons` that `tables` loads and the web component fetches by dynamic import only when it draws Jupiter's or Saturn's moons (its own chunk stays 68 kB gzipped, 68,286 bytes on 0.21.0; `test/lazy-size.test.ts`); on 60 dates Io is 0.11 degree from Horizons (0.19 before), Europa 0.04 (0.15), Ganymede 0.03 (0.36), Callisto 0.014 (0.14), Mimas 1.7 (9.0), Tethys 0.21 (0.61) and Iapetus 0.03 (0.88). The fitted orbits of the other moons now use Horizons for 1800 to 2199 instead of 1950 to 2050 (Phobos 4.0 degrees to 0.4 in 1800, Ariel 1.4 to 0.2, Nereid 13.5 to 4.6). `tables/vsop` is a finer VSOP87B cut (2,581 terms, 32 kB gzipped, not in `tables`): every planet within 2 arc-seconds of Horizons on 60 dates; the default cut stays 13.8 kB and Jupiter and Neptune have their drift from DE441 taken out (Neptune 5.7 to 2.6 arc-seconds). New `test/accuracy-dense.test.ts`, `test/accuracy-fine.test.ts`, `test/moon-theories.test.ts` (the two ports reproduce IMCCE's published check values), `scripts/fetch-horizons-dense.py`, `scripts/compare/dense.mjs`; the accuracy limits only went down. A bundle of every export and optional table is 76,978 bytes gzipped, 11,318 more. GUST86 and ESAPHO/ESADEI are not used: their notice forbids passing on changed files.
12
+
5
13
  ## [0.21.0] - 2026-11-08
6
14
 
7
15
  - **`/spacecraft`: famous spacecraft, where they are and their whole voyage** (MODULES-622). Ten craft: Voyager 1 and 2, New Horizons, Pioneer 10 and 11, Cassini, Galileo, Juno, Parker Solar Probe and the James Webb Space Telescope. Each path is a Chebyshev table fitted to JPL Horizons over the whole of Horizons' own record of the craft (`scripts/make-spacecraft-data.py`, `src/craft/<craft>.ts`; segments from seconds near a planet to years in cruise, limit 1,000 km near a planet and a millionth of the distance from the Sun elsewhere, measured worst 570 to 840 km for the orbiters, Parker and Webb, 7,000 to 26,000 km in deep cruise), loaded on demand (`loadSpacecraft`; 2 to 5 kB gzipped each, Galileo 25, Parker 27, Juno 77, Cassini 127). `spacecraftPosition` (km from the Sun, J2000 ecliptic), `spacecraftVelocity`, `spacecraftSpeed`, `spacecraftSunDistance`, `spacecraftEarthDistance`, `spacecraftLightTime` and `spacecraftErrorKm`, with `SPACECRAFT`: names in English and Japanese, launch, agency, status, NASA's page, Horizons' record and its `joins` (where Horizons' own record steps, up to 459,000 km for Pioneer 11), and the voyage's events (launch, 33 flybys and orbit insertions, end) from NASA's mission pages. Every flyby is tested against the closest approach of the fitted path to the body. Where a NASA page and the path disagree the path's date is kept (listed in the guide). Pure, no DOM, no three.js. EN/JA guide `docs/guides/spacecraft.md`.
package/NOTICE.md CHANGED
@@ -11,8 +11,11 @@ No picture is used by the line and shaded looks: they are drawn from numbers.
11
11
  - **Time scales**: the leap seconds are IERS Bulletin C; delta T before 1972 is the polynomials of F. Espenak and J. Meeus (NASA, https://eclipse.gsfc.nasa.gov/SEhelp/deltatpoly2004.html), in `src/time.ts`.
12
12
  - **Calendars, sidereal time and Mars time (`/time`)**: written here from J. Meeus, "Astronomical Algorithms" (2nd edition, chapters 7 and 12: the Julian day and the sidereal time), the Richards day-number algorithm for the calendars, M. Allison and M. McEwen, "A post-Pathfinder evaluation of aerocentric solar coordinates with improved timing recipes for Mars seasonal/diurnal climate studies", Planetary and Space Science 48, 215 (2000), and Meeus's two-term formula for TDB minus TT. The names of the Julian-date functions follow the `julian` package (MIT, Stepan Stolyarov), whose code is not used; `julian` 0.2.0 and astronomy-engine are development-time comparisons in `test/calendar.test.ts` only and are not shipped.
13
13
  - **Pluto's position**: a Chebyshev table (`src/data/pluto.ts`, made by `scripts/make-pluto-data.py`) fitted to JPL Horizons (https://ssd.jpl.nasa.gov/api/horizons.api, read 2026-11-07), 1800 to 2200; outside those years, and for its earlier edition, JPL Solar System Dynamics, "Keplerian Elements for Approximate Positions of the Major Planets", Table 1, 1800 AD to 2050 AD (https://ssd.jpl.nasa.gov/planets/approx_pos.html, read 2026-11-02; Pluto from the same page's earlier edition). NASA/JPL content is not subject to copyright in the United States; credit: NASA/JPL-Caltech.
14
- - **Moons' orbits**: fitted to the positions and velocities of JPL Horizons (https://ssd.jpl.nasa.gov/api/horizons.api, read 2026-11-07) for 1950 to 2050, by `scripts/make-moon-data.py`, which writes `src/data/orbits.ts`; the Moon's row, and the pole of each moon's reference plane, are from JPL Solar System Dynamics, "Planetary Satellite Mean Elements" (https://ssd.jpl.nasa.gov/sats/elem/, read 2026-11-02). The positions the accuracy test compares with are in `test/data/horizons.json`, fetched by `scripts/fetch-horizons-reference.py`. Credit: NASA/JPL-Caltech; the satellite ephemerides behind Horizons are R. A. Jacobson and colleagues' (the page names each).
14
+ - **Moons' orbits**: fitted to the positions and velocities of JPL Horizons (https://ssd.jpl.nasa.gov/api/horizons.api, read 2026-11-07) for 1800 to 2199, by `scripts/make-moon-data.py`, which writes `src/data/orbits.ts`; the Moon's row, and the pole of each moon's reference plane, are from JPL Solar System Dynamics, "Planetary Satellite Mean Elements" (https://ssd.jpl.nasa.gov/sats/elem/, read 2026-11-02). The positions the accuracy test compares with are in `test/data/horizons.json`, fetched by `scripts/fetch-horizons-reference.py`. Credit: NASA/JPL-Caltech; the satellite ephemerides behind Horizons are R. A. Jacobson and colleagues' (the page names each).
15
15
  - **The Moon's position**: the lunar solution ELP2000-82B, M. Chapront-Touzé and J. Chapront, "The lunar ephemeris ELP 2000", Astron. Astrophys. 124, 50 (1983) and "ELP 2000-85", Astron. Astrophys. 190, 342 (1988), from IMCCE, Observatoire de Paris (https://ftp.imcce.fr/pub/ephem/moon/elp82b/). Its 37,872 terms are cut to the 540 above 0.05 arc-seconds (`scripts/make-lunar-data.py`, `src/data/lunar.ts`) and written out as numbers, with the constants fitted to JPL's DE200 that the notice gives. IMCCE's files carry no licence text; they are published for use with the credit above (the same footing as VSOP87).
16
+ - **Jupiter's four big moons (`tables/galilean`)**: the theory L1.2, V. Lainey, L. Duriez and A. Vienne (2006), "Synthetic representation of the Galilean satellites' orbital motions from L1 ephemerides", Astron. Astrophys. 456, 783, from the series `BisL1.2.dat` that IMCCE, Observatoire de Paris publishes (https://ftp.imcce.fr/pub/ephem/satel/galilean/L1/L1.2/, read 2026-11-08), cut to 140 terms (`scripts/make-galilean-data.py`, `src/data/galilean.ts`; the arrangement of `src/theories/galilean.ts` follows IMCCE's `L1.2.f` and is checked against its `TestL1.2.res`). The README of that directory states no licence; the numbers are a published scientific table, credited here.
17
+ - **Saturn's seven inner moons (`tables/saturn-moons`)**: the theory TASS1.7, A. Vienne and L. Duriez (1995), "TASS1.6: Ephemerides of the major Saturnian satellites", Astron. Astrophys. 297, 588, from IMCCE (https://ftp.imcce.fr/pub/ephem/satel/tass17/). The terms are read from `Src/Celbody/Satsat/tass17.dat` in Orbiter (https://github.com/orbitersim/orbiter, read 2026-11-08), the same table in one plain file, MIT licence: Copyright (c) 2000-2026 Martin Schweiger. The MIT notice of Orbiter follows. Cut to 316 terms (`scripts/make-tass17-data.py`, `src/data/tass17.ts`); `src/theories/tass17.ts` follows Orbiter's `Tass17.cpp` (a conversion of IMCCE's FORTRAN) and is checked against the values in IMCCE's `tass17.f`.
18
+ - **The Uranus, Mars and Neptune systems' moons** are still fitted to Horizons. IMCCE's GUST86 (Laskar and Jacobson 1987) and ESAPHO/ESADEI (Chapront-Touzé 1990) come with a notice that forbids redistributing changed files, so they are not used; nothing of them is in this package.
16
19
  - **Sun and Moon times (`/suncalc`)**: written here from the standard methods: J. Meeus, "Astronomical Algorithms" (2nd edition, chapters 11, 12, 21, 22, 48), the IAU 1976 precession, the IAU 1980 nutation (its largest terms), Saemundsson's refraction formula, and the Naval Observatory's convention for the rise and set of the Moon and Sun. The names, arguments and results follow the public interface of suncalc (BSD-2-Clause, Copyright (c) Volodymyr Agafonkin; https://github.com/mourner/suncalc), whose code is not used. suncalc 1.9.0 and 2.1.2 and astronomy-engine (MIT) are development-time comparisons in `test/suncalc.test.ts` only and are not shipped.
17
20
  - **Stars (`/stars`)**: the Yale Bright Star Catalogue, D. Hoffleit and W. H. Warren Jr. (1991), "The Bright Star Catalogue, 5th Revised Edition (Preliminary Version)", Astronomical Data Center (NASA Goddard Space Flight Center) and the Centre de Données astronomiques de Strasbourg, catalogue V/50, as NASA's HEASARC serves it (table bsc5p, https://heasarc.gsfc.nasa.gov/W3Browse/star-catalog/bsc5p.html, file heasarc_bsc5p.tdat.gz, read 2026-11-08; a US government source), the 5,080 stars to visual magnitude 6.0, written out as numbers by `scripts/make-star-data.py` into `src/data/stars.ts`. The catalogue's own documentation calls it public domain and the Astronomical Data Center asks that it and the authors be acknowledged, which this line does; there is no formal licence text, so this footing is informal. The common names are our own list after the IAU Working Group on Star Names (https://www.iau.org/science/scientific_bodies/working_groups/280/); the star colour is Ballesteros's B-V to temperature relation (F. J. Ballesteros 2012, EPL 97, 34008) and a piecewise black-body colour fit. Deliberately NOT used: the Hipparcos, Tycho and Gaia catalogues (ESA, CC BY-NC 3.0 IGO, non-commercial), and HYG, AT-HYG and OpenNGC (CC BY-SA, which would put share-alike terms on this package's data).
18
21
  - **Mass and escape speed** (`JOURNEY_STOPS`): JPL "Planetary Satellite Physical Parameters" (https://ssd.jpl.nasa.gov/sats/phys_par/, read 2026-11-04) for the GM of the Earth, Mars through Pluto and the moons on that page; NASA's Sun, Mercury and Venus fact sheets (https://nssdc.gsfc.nasa.gov/planetary/factsheet/, read 2026-11-04) for those three GM values and the Sun's escape speed; JPL "Planetary Physical Parameters" (https://ssd.jpl.nasa.gov/planets/phys_par.html, read 2026-11-04) for the planets' escape speeds and for the masses of Ceres, Eris, Makemake and Haumea, turned into GM with the CODATA 2018 G that page names. A moon's escape speed is computed from its GM and the radius already in this package. Nereid, Orcus, Quaoar, Gonggong, Sedna, Vanth, Hiʻiaka, Namaka and Dysnomia are left blank: those pages do not print a mass.
@@ -78,3 +81,17 @@ Venus, Saturn, Neptune and the Sun were replaced from Solar System Scope's equir
78
81
  | `saturn-ring-2048.webp` | Saturn's rings | [Saturn's rings in visible light and radio.jpg](https://commons.wikimedia.org/wiki/File:Saturn's_rings_in_visible_light_and_radio.jpg) | Public domain | NASA / JPL / Space Science Institute | Cassini's natural-colour mosaic of the lit rings (PIA07874, from PIA06175), read along one radius into a strip of 2048 colours and opacities from 74,794 to 137,035 km. The radii are fitted to five edges the picture shows (the B ring's inner edge, the two edges of the Cassini Division, the Encke gap and the A ring's outer edge), each within 300 km. The opacity is taken from the brightness, and the colour balance is moved to match the Saturn portrait above; the F ring and the D ring are not in the picture |
79
82
 
80
83
  The package does not ship the 2048 pixel widths: `TEXTURE_FAR_BASE` fetches them from this repository by jsDelivr's GitHub address when a view is zoomed in. The 512 and 1024 pixel widths of every picture, and the ring strip, are 1.94 MB in the package (the nine of 0.2.0 were 0.53 MB; Ceres adds 0.13 MB and Tethys, Dione, Iapetus, Triton and Charon 0.45 MB). Where a source does not say where its map is centred, its row says what the picture was matched to.
84
+
85
+ ## Orbiter's MIT notice
86
+
87
+ The TASS1.7 table above was read from Orbiter (https://github.com/orbitersim/orbiter), whose licence is:
88
+
89
+ > MIT License
90
+ >
91
+ > Copyright (c) 2000-2026 Martin Schweiger
92
+ >
93
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
94
+ >
95
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
96
+ >
97
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -15,9 +15,9 @@ A clean line drawing, a shaded realistic drawing, or a painted surface map, with
15
15
 
16
16
  <p align="center"><a href="https://johnmorrisdotca.github.io/wakusei-planets/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/wakusei-planets/embed.html">Embed page</a> · <a href="https://johnmorrisdotca.github.io/wakusei-planets/docs/">Docs</a></p>
17
17
 
18
- <p align="center"><img alt="Jupiter and Saturn drawn in the realistic look, and Saturn as a line drawing" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.21.0/docs/images/hero-desk.png" width="640"></p>
18
+ <p align="center"><img alt="Jupiter and Saturn drawn in the realistic look, and Saturn as a line drawing" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.23.0/docs/images/hero-desk.png" width="640"></p>
19
19
 
20
- <p align="center"><img alt="Every body at one scale, the Earth among them: each small body has a magnified picture joined by a line, and the Sun shows only its edge" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.21.0/docs/images/lineup-desk.png" width="640"></p>
20
+ <p align="center"><img alt="Every body at one scale, the Earth among them: each small body has a magnified picture joined by a line, and the Sun shows only its edge" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.23.0/docs/images/lineup-desk.png" width="640"></p>
21
21
 
22
22
  ## One minute
23
23
 
@@ -182,7 +182,7 @@ The pure side has no DOM: `BODIES`, `apparent(id, time)`, `system(planet, time)`
182
182
 
183
183
  ## The data
184
184
 
185
- Sizes, flattening, poles and rotation are the IAU's and NASA's; Mercury to Neptune are VSOP87B, cut down, and Pluto is a table fitted to Horizons; the Moon's are the lunar solution ELP2000-82B cut down; the other moons are fitted to JPL Horizons' positions, and every body is tested against Horizons ([accuracy](docs/guides/accuracy.md)). Nothing is fetched at run time by the line and shaded looks, which use no pictures. See [NOTICE.md](NOTICE.md).
185
+ Sizes, flattening, poles and rotation are the IAU's and NASA's; Mercury to Neptune are VSOP87B, cut down, and Pluto is a table fitted to Horizons; the Moon's are the lunar solution ELP2000-82B cut down; Jupiter's four big moons are the theory L1.2 and Saturn's seven inner ones TASS1.7, and the others are fitted to JPL Horizons' positions, and every body is tested against Horizons ([accuracy](docs/guides/accuracy.md)). Nothing is fetched at run time by the line and shaded looks, which use no pictures. See [NOTICE.md](NOTICE.md).
186
186
 
187
187
  ## Examples
188
188
 
@@ -279,7 +279,7 @@ A body that turns by itself and a moving sky, in HTML:
279
279
 
280
280
  ## The portrait builder
281
281
 
282
- <p align="center"><img alt="The Sun and the planets in an arc, painted, with their names, in the portrait builder" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.21.0/docs/images/portrait-family.png" width="640"></p>
282
+ <p align="center"><img alt="The Sun and the planets in an arc, painted, with their names, in the portrait builder" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.23.0/docs/images/portrait-family.png" width="640"></p>
283
283
 
284
284
  [The portrait builder](https://johnmorrisdotca.github.io/wakusei-planets/portrait.html) puts any bodies in one picture: drag them, size them, turn them, order them front to back, arrange them in a row, an arc, a grid or at true orbit distance (true or readable sizes, a planet's moons round it in orbit order), light them from one direction, and take the code, a PNG or an SVG. The scene is kept in the address, and every body is drawn in one WebGL scene, so the page holds one WebGL context. [The portrait builder](docs/guides/portrait-builder.md) is its guide.
285
285
 
@@ -290,6 +290,23 @@ A body that turns by itself and a moving sky, in HTML:
290
290
  <wakusei-portrait scene="look:painted~jupiter_0_0_0.3_0~io_0_0_0.1_0"></wakusei-portrait>
291
291
  ```
292
292
 
293
+ ## What is nearby, and when bodies come close
294
+
295
+ `/nearest` answers "what is next to this?" for the Sun, the planets, the dwarf planets and the moons. `nearest` and `within` list the bodies closest to one on a date, by the angle between them in the sky (of the Earth, a place on it or another body) or by the distance between them in space. `closestApproach` and `conjunctions` search a span of time: coarse steps, then each minimum narrowed to about a second. `distance` and `distanceRange` give two bodies' distance on a date and how near and far they get over a span (Earth and Mars: 0.373 to 2.676 au from 1900 to 2100, the guide has every planet pair). Every result carries the accuracy the theories are held to; against JPL Horizons the great conjunction of 2020 is within 270 s and 0.3 arc-seconds, and the Moon's approaches to the planets within 8 s and 1.5 arc-seconds. [The guide](docs/guides/nearest.md) has the options and the numbers.
296
+
297
+ ```ts
298
+ import { closestApproach, distanceRange, nearest } from "@johnmorrisdotca/wakusei-planets/nearest";
299
+
300
+ const planets = nearest("moon", { kind: "planet", count: 2, date: Date.UTC(2026, 11, 27, 16) });
301
+ console.log(planets.map((row) => `${row.id} ${row.angle.toFixed(2)} degrees`).join(", "));
302
+
303
+ const great = closestApproach("jupiter", "saturn", { from: Date.UTC(2020, 11, 1), to: Date.UTC(2021, 0, 1) });
304
+ console.log(great.time.toISOString(), great.angle?.toFixed(2), "degrees");
305
+
306
+ const mars = distanceRange("earth", "mars", { from: Date.UTC(1900, 0, 1), to: Date.UTC(2100, 0, 1) });
307
+ console.log(mars.min.distanceAu.toFixed(2), "to", mars.max.distanceAu.toFixed(2), "au");
308
+ ```
309
+
293
310
  ## The space view
294
311
 
295
312
  [The space view](https://johnmorrisdotca.github.io/wakusei-planets/space.html) puts the Earth, the Moon, the Sun and the planets in their places for any date and time, in one WebGL context: the Moon's phase and the Earth's day side come out of the real Sun's light. Zoom from the Earth out to the whole solar system, in a compressed scale (every direction real, the distances squeezed) or the true one, and run time forwards or backwards. Positions come from this package's own models.
@@ -318,6 +335,7 @@ The reference is a site, made from the source's own doc comments: every export h
318
335
  | `.../portrait` | `<wakusei-portrait>`: many bodies in one scene. The scene model (`addBody`, `layoutPortrait`, `encodeScene`, `decodeScene`) is in the main entry. |
319
336
  | `.../space` | Where the Sun, the Moon and the planets are for a date, in two scales, and where a camera riding along looks: `frameAt`, `createTrack`, `placeSun`, `placeAround`, `ridePose`. No browser. |
320
337
  | `.../space/element` | `<wakusei-space>`: the Earth, the Moon, the Sun and the planets in their places. |
338
+ | `.../nearest` | The bodies nearest to a body on a date (`nearest`, `within`), when two bodies come closest (`closestApproach`, `conjunctions`) and how far apart they are (`distance`, `distanceRange`). No browser. |
321
339
  | `.../look` | What a body needs to be drawn with three.js. |
322
340
  | `.../painter` | The bodies as objects for a scene of your own. |
323
341
  | `.../all` | Every body's shaded look, at once. |
@@ -351,6 +369,7 @@ Each guide has a Japanese twin in [docs/guides/ja](docs/guides/ja/getting-starte
351
369
  | [In your own three.js scene](docs/guides/in-your-own-scene.md) | `painter.make` |
352
370
  | [Time](docs/guides/time.md) | Julian dates, calendars, time scales, sidereal time, Mars time |
353
371
  | [The stars you can see without a telescope](docs/guides/stars.md) | 5,080 stars with names, positions, proper motion, distance and colour |
372
+ | [What is nearby, and when bodies come close](docs/guides/nearest.md) | The nearest bodies to a body on a date, closest approaches and conjunctions, and how close they are to Horizons |
354
373
  | [Famous spacecraft](docs/guides/spacecraft.md) | Voyager, New Horizons, Pioneer, Cassini, Galileo, Juno, Parker and Webb: where they are and their whole voyage |
355
374
  | [The Sun and Moon from a place](docs/guides/suncalc.md) | Position, sunrise and sunset, Moon rise, set and phase; a drop-in for suncalc |
356
375
  | [Coordinate conversions](docs/guides/coordinates.md) | Pure spherical, ecliptic, equatorial and horizontal coordinate conversions |
@@ -368,7 +387,7 @@ import { BODIES } from "@johnmorrisdotca/wakusei-planets";
368
387
  BODIES.pluto.kind; // "dwarf-planet"
369
388
  ```
370
389
 
371
- - A fact with no source is left out, never guessed. The Moon is within 2 arc-seconds of JPL Horizons, and the other moons' positions are fitted to it and are within a degree or two on the orbit for almost every moon, about the size of the moon on screen; [accuracy](docs/guides/accuracy.md) has each body's number.
390
+ - A fact with no source is left out, never guessed. The Moon is within 2 arc-seconds of JPL Horizons, and the planets within a few arc-seconds on 60 dates from 1800 to 2200; the moons are within a degree or two on the orbit for almost every moon, about the size of the moon on screen, and Jupiter's four within a few hundredths of a degree; [accuracy](docs/guides/accuracy.md) has each body's number.
372
391
  - `realistic` and `painted` are the photo maps (`painted` is the same maps, so an older page still works). `illustrated` is the shaded drawing from the numbers, and it is not a default. Venus, Saturn, Neptune and the Sun use Solar System Scope's maps (CC BY 4.0). Mercury uses the natural grey 8K map (Shady Tex and Solar System Scope, CC BY 4.0). Mars stays on the Viking mosaic, graded toward a butterscotch ochre, with the frost in Hellas toned to the basin and the polar ice left. Jupiter and Uranus use Nestaeric's maps (CC BY 4.0), and Saturn's poles use Nestaeric's caps (CC BY 4.0). The Earth and the Moon stay on their NASA maps until those have been compared. The rest are the public-domain maps in `NOTICE.md`.
373
392
  - A shaded look needs WebGL. Without it the line drawing is drawn.
374
393
  - Jupiter, Saturn, Uranus and Neptune have their rings drawn.
@@ -0,0 +1,15 @@
1
+ export interface GalileanMoon {
2
+ name: string;
3
+ l0: number;
4
+ n0: number;
5
+ series: readonly [readonly (readonly number[])[], readonly (readonly number[])[], readonly (readonly number[])[], readonly (readonly number[])[]];
6
+ chebyshev: readonly (readonly number[])[];
7
+ }
8
+ export declare const GALILEAN_CONSTANTS: {
9
+ t0: number;
10
+ mu: number[];
11
+ node: number;
12
+ incline: number;
13
+ years: readonly [-819.727638594856, 812.72180699036];
14
+ };
15
+ export declare const GALILEAN: readonly GalileanMoon[];
@@ -0,0 +1,7 @@
1
+ export const GALILEAN_CONSTANTS = { t0: 2433282.5, mu: [2.82489428433814e-07, 2.82483274392893e-07, 2.82498184184723e-07, 2.82492144889909e-07], node: 6.24950183065715, incline: 0.445094736497665, years: [-819.727638594856, 812.72180699036] };
2
+ export const GALILEAN = [
3
+ { name: "io", l0: 1.446213296021224, n0: 3.5515522861824, series: [[[.00282109602129, .0, .0], [7.6202459e-08, 3.639290232, 3.564459165624]], [[-.000192525834867, 4.936958972, .013584836583], [-9.7080359608e-05, 4.318879648, .013034138432], [-8.988174165e-05, 1.908001643, .003050648672], [-5.5310105026e-05, 1.493615668, .012938928912], [-5.0358442615e-05, 3.641019609, 3.564459104961], [-4.4441277012e-05, 1.819647883, 1.782229577757], [4.1807887049e-05, 2.634633448, .015571117221], [3.7235659739e-05, 2.14024409, .001450097749]], [[.004151084966816, 4.089939636, -.012906864147], [.000626052144411, 1.446188899, 3.55155229498], [3.5274734617e-05, 2.125628703, .000127274166]], [[.000314217246601, 2.796421972, -.002315096098], [9.0416920795e-05, 1.047706188, -.000569206382]]], chebyshev: [[8.2669882033e-05, -1.33581115e-07, -4.4755008e-08, -2.9123493e-07, -3.17117027e-07], [-5.469863185e-06, -7.585797e-09, -5.78177e-10, -1.62905003e-07, -1.26321744e-07], [5.9496563435e-05, -1.738005e-09, -5.351425e-09, -3.68431e-09, 6.517585e-09], [-1.1007600943e-05, -3.023818e-09, 1.02942e-10, 7.77164e-10, 2.620707e-09], [-5.750487185e-06, -7.210474e-09, -8.490406e-09, 1.599323e-09, 2.592384e-09], [5.749940245e-06, -3.92259e-10, -2.528407e-09, -2.284913e-09, -7.26318e-10], [1.785069359e-06, -4.168797e-09, -6.134055e-09, 7.03034e-10, -1.181916e-09], [-2.40677412e-06, -3.290832e-09, -3.438001e-09, -2.8929e-11, 5.90816e-10], [-1.385132091e-06, 2.885373e-09, -3.599842e-09, 4.86452e-10, 1.23054e-09]] },
4
+ { name: "europa", l0: -0.3735263437471362, n0: 1.76932271112347, series: [[[.004487103780431, .0, .0], [4.3243675e-07, 1.819645606, 1.782229577757], [1.60361475e-07, 4.300272653, 2.673344370427], [-1.01914679e-07, 5.458948087, 5.346688718104], [9.2473479e-08, 5.622213905, .891114788878]], [[.000857643317294, 4.318869318, .013034138308], [.000454958287509, 1.493653175, .01293892882], [.000324893982517, 1.819649453, 1.782229577757], [-.000307425007933, 4.937703701, .013584832867], [.000198238614478, 1.907986905, .003051012129], [.00018340635518, 2.140285339, .001450097893], [-.000143438318845, 5.622214037, .891114788878], [-7.7193914094e-05, 4.300272437, 2.673344370427], [-6.322897772e-05, 2.634639282, .015571117085], [4.4676647739e-05, 5.458944856, 5.346688718104], [4.3657473141e-05, 3.639290862, 3.564459165624], [3.491727503e-05, 2.828986716, 2.9885749e-05], [-3.2570909465e-05, 5.372140978, .000124952338], [2.0582647386e-05, 1.525846422, .002900131552], [-1.9270608756e-05, 2.978331153, 4.455573931754], [1.6802831625e-05, 2.487941412, .025119609726]], [[-.009358910413634, 4.089939651, -.012906864147], [.000298899454555, 5.909726519, 1.769322707946], [.000213903639035, 2.12562893, .000127274184], [.000198096356478, 2.743516829, .00067797343], [.000121038815896, 5.583994371, 3.2056615e-05], [8.3704204839e-05, 1.609453837, -.904021658088], [8.2352516637e-05, 1.446188771, 3.55155229498], [-3.1590653282e-05, .287512244, .878207919515], [-2.9450368131e-05, .45078003, -3.577366026002], [-2.7894669854e-05, 2.270437431, -1.795136449711]], [[.00404049178323, 1.047706317, -.000569206405], [.000220042103456, 3.336885786, -.000124913073], [.000166254474472, 2.413486237, .0], [5.9028247098e-05, 5.971993097, -3.0561602e-05]]], chebyshev: [[-0.000234691437047, -1.003553985e-06, -2.6102496e-07, -2.747047674e-06, -2.984156967e-06], [2.5903612172e-05, -5.8043834e-08, -1.82656276e-07, -1.543653049e-06, -1.197088512e-06], [-0.000173835841495, 3.808757e-08, 2.7801637e-08, -3.4954676e-08, 5.6714666e-08], [3.8067335768e-05, -2.10657419e-07, -1.58858363e-07, 2.867894e-09, 2.6881473e-08], [-1.03485888e-07, 3.12238251e-07, 2.3185075e-08, 1.7545277e-08, 2.6189772e-08], [1.17376777e-05, -1.72444072e-07, -1.10691156e-07, -1.9774466e-08, -5.116496e-09], [3.19509609e-06, 2.35985832e-07, -3.6904846e-08, 3.431697e-09, -1.2784178e-08], [-4.83167496e-06, 6.1372734e-08, 6.786311e-09, -1.30925e-10, 1.1953426e-08], [4.47094432e-07, -1.58131099e-07, 1.9077715e-08, 1.3533807e-08, 1.1574954e-08]] },
5
+ { name: "ganymede", l0: 0.2874089391143348, n0: 0.878207923589328, series: [[[.007156659457258, .0, .0], [1.393029911e-06, 1.158674588, 2.673344370427], [6.44982935e-07, 5.62221457, .891114788878], [2.29805952e-07, 1.299592404, 1.003443345673], [-1.22143437e-07, 4.961243633, 1.782229577757], [1.09579818e-07, 1.948670878, 1.505165046153], [7.0143562e-08, .649785081, .501721669631]], [[.000231079788623, 2.14029872, .001450097844], [-.000182863596412, 4.318867274, .013034138283], [.00015123787782, 4.937310237, .013584834813], [-.000116372096978, 4.300265986, 2.673344370427], [-9.5547806985e-05, 1.493661284, .012938928799], [8.1524685446e-05, 5.622213713, .891114788878], [-8.012196796e-05, 1.299592295, 1.003443345673], [-6.0701726018e-05, .649787697, .501721670433], [5.43922473e-05, 2.792754744, 2.9880874e-05], [-4.8925364647e-05, 5.371172809, .000124952783], [-4.2757498154e-05, 1.819651341, 1.782229577757], [-3.0736041783e-05, 1.94983727, 1.50516500649], [-1.6976734646e-05, 1.907863728, .003050767823], [1.5472589051e-05, 5.691271303, .000651640736], [-1.4526886365e-05, .188638755, .125308271812], [-1.3565445874e-05, 2.793023827, .000556636814], [-1.346486219e-05, 2.599197293, 2.006886694551], [9.552401732e-06, 2.317352045, 5.346688718104]], [[.001428981130732, 2.125629594, .00012727413], [.000771093122676, 5.583633, 3.2064341e-05], [.000592591178077, 4.089939664, -.012906864147], [.000204559749615, 5.271368367, -.125235440761], [.000178511864826, .287431567, .878207924425], [.000113199978489, 1.446212728, 3.55155229498], [-6.5877816921e-05, 2.270242399, -1.795136439454], [4.9705888833e-05, 5.90967922, 1.769322712929], [-3.1638492698e-05, 1.609305494, -.904021650284], [2.8780123733e-05, 4.621732127, -.626957123418], [-1.817443179e-05, 5.921064138, .376486239917], [1.0555817516e-05, 3.97201914, -1.128678804106]], [[.001593272157085, 3.33688628, -.000124913071], [.00085330931289, 2.413388169, .0], [.000351334791104, 5.972078985, -3.0561018e-05], [-.000144192925548, 1.047706176, -.000569206321], [1.5730352775e-05, 5.56040412, .002900366501]]], chebyshev: [[-0.000402499890224, -1.11797459e-07, -1.07044202e-07, -1.4196829596e-05, -1.5397610932e-05], [4.2287051494e-05, -2.78967293e-07, -2.23668695e-07, -7.93995494e-06, -6.120221413e-06], [-0.000288258753042, -7.0464534e-08, -2.18527599e-07, -2.08882225e-07, 3.15217558e-07], [6.2333837019e-05, -2.38693041e-07, -2.00040955e-07, 2.0976268e-08, 1.48179419e-07], [1.786928737e-06, 1.2286999e-08, -3.19586844e-07, 8.3507048e-08, 1.41150094e-07], [1.4414764355e-05, -1.533704e-07, -2.22086683e-07, -1.0772967e-07, -2.2406394e-08], [6.589443533e-06, 4.4731879e-08, -2.98609138e-07, 3.0630123e-08, -3.3331171e-08], [-6.191395002e-06, -1.6580212e-08, -1.29217449e-07, 1.1244943e-08, 1.0786344e-08], [7.82954615e-07, -8.2894606e-08, -1.50654591e-07, 7.087864e-09, 6.6249912e-08]] },
6
+ { name: "callisto", l0: -0.3620341291375704, n0: 0.376486233433828, series: [[[.012587970171531, .0, .0], [3.595204947e-06, .64965776, .50172168165], [2.758021065e-06, 1.808423578, 3.175066041336], [1.287489617e-06, 6.271890829, 1.39283646984], [-4.17372911e-07, 1.299065029, 1.003443369711], [2.79075772e-07, .7142887, .750072258691], [-1.99825226e-07, 1.948988101, 1.505165046153], [-1.00114984e-07, 2.598716873, 2.006886726601]], [[.000558604012382, 2.140420719, .001450097932], [-.000380581386818, 2.73588449, 2.9729651e-05], [.000220515286326, .649796526, .501721672436], [.000187789515116, 1.80847876, 3.175066041336], [7.6691697524e-05, 6.272011432, 1.392836463665], [7.4705685511e-05, 1.29959162, 1.003443345673], [-3.8832329737e-05, .712892348, .750072369723], [3.3503648431e-05, 5.371264118, .000124940117], [2.9303267794e-05, 1.949393934, 1.505165020913], [1.8594093547e-05, 1.463099837, .002900133941], [-1.7043802289e-05, 5.689338235, .000651650448], [1.5139383311e-05, 2.874951604, .000556460691], [-1.4882563726e-05, 3.332107462, .12530790075], [1.2992789668e-05, 2.599197355, 2.006886694551], [-1.1611739877e-05, 5.619226863, 9.3166257e-05], [6.621170289e-06, 4.856495819, .748622861666], [6.538744249e-06, 3.558012036, .001655051374], [6.158079814e-06, 3.249003789, 2.508608372195]], [[.007375580846798, 5.583607158, 3.2065099e-05], [.000206592416994, 5.920983157, .376486241947], [.000158986976402, .287440062, .878207924425], [-.000156113160535, 2.125739787, .000127274413], [.000148604338097, 1.44621343, 3.55155229498], [6.3507310873e-05, 5.909680329, 1.769322712929], [5.9935169852e-05, 4.112551758, -2.798579795459], [5.4066084273e-05, 5.539035085, .002868340823], [-4.8959690087e-05, 4.621814948, -.626957125295], [3.3368228353e-05, 5.206697524, -.373586017345], [2.9583242728e-05, 5.93226979, -1.016350227521], [2.9232546134e-05, 5.27076234, -.125235424486], [1.9758836944e-05, 3.331776802, .0], [-1.8355102975e-05, 3.972044325, -1.128678804106], [9.041119176e-06, 5.560671996, .001450183749], [-8.198797045e-06, 3.322331372, -1.630400483204], [-6.040657509e-06, 1.397026549, .004319183203], [5.689563612e-06, 4.199095667, -.372135926567]], [[.00384229778985, 2.413392209, .0], [.002245389179189, 5.972173677, -3.0561255e-05], [-.000260447945056, 3.336874631, -.0001249131], [3.3211214323e-05, 5.560413774, .002900376885]]], chebyshev: [[0.000306204347065, -1.81310026e-07, -1.407826174e-06, -6.4093665517e-05, -6.9606943591e-05], [-0.000168321429487, -1.260146186e-06, -1.353941375e-06, -3.5794886251e-05, -2.7663639767e-05], [0.000202182016979, -3.82306332e-07, -3.20084097e-07, -8.87261624e-07, 1.383280204e-06], [-0.000137641833741, -6.67102946e-07, -6.20618627e-07, 1.64506004e-07, 6.51631406e-07], [-5.3040440254e-05, -5.0521497e-08, -6.11742589e-07, 4.77415826e-07, 6.2030785e-07], [-1.1047492606e-05, 1.53918794e-07, -2.76537196e-07, -3.5903024e-07, -2.66081186e-07], [-1.056346749e-05, 9.2827978e-08, -1.33810977e-07, 1.1740629e-07, -2.09003718e-07], [3.1152654305e-05, 3.66048039e-07, 2.89677484e-07, 8.9505174e-08, -1.46372661e-07], [4.664958635e-06, 5.6803877e-08, 4.7071333e-08, 9.718757e-09, -1.22390975e-07]] },
7
+ ];
@@ -1,31 +1,31 @@
1
- // Made by scripts/make-moon-data.py: the Moon from JPL's Planetary Satellite Mean Elements (https://ssd.jpl.nasa.gov/sats/elem/), every other moon fitted to JPL Horizons' positions for 1950 to 2050; do not edit by hand.
1
+ // Made by scripts/make-moon-data.py: the Moon from JPL's Planetary Satellite Mean Elements (https://ssd.jpl.nasa.gov/sats/elem/), every other moon fitted to JPL Horizons' positions for 1800 to 2199; do not edit by hand.
2
2
  // The moons of the dwarf planets other than Pluto's are not in either: their orbits are in dwarf.ts, from the papers it cites, and are added at the end.
3
3
  import { DWARF_MOON_ORBITS } from "./dwarf.js";
4
4
  export const ORBITS = {
5
5
  moon: { parent: "earth", frame: "ecliptic", epoch: 946728000000, a: 384400, e: 0.0554, w: 318.15, m: 135.27, i: 5.16, node: 125.08, sid: 13.1763585, dw: 0.16435, dn: -0.05299 },
6
- phobos: { parent: "mars", frame: "laplace", pole: [317.7000, 52.9000], epoch: 946728000000, a: 9379, e: 0.015119, w: 216.4466, m: 190.3756, i: 1.0753, node: 169.1550, sid: 1128.8447723, dw: 0.870970, dn: -0.435786, acc: 1.7626e-08 },
7
- deimos: { parent: "mars", frame: "laplace", pole: [316.6000, 53.5000], epoch: 946728000000, a: 23459, e: 0.000272, w: 194.7636, m: 10.4792, i: 1.7885, node: 54.3986, sid: 285.1618839, dw: 0.035947, dn: -0.018082 },
8
- io: { parent: "jupiter", frame: "laplace", pole: [268.1000, 64.5000], epoch: 946728000000, a: 422050, e: 0.004180, w: 148.9328, m: 331.0148, i: 0.0383, node: 260.0942, sid: 203.4889612, dw: -0.606688, dn: -0.132821 },
9
- europa: { parent: "jupiter", frame: "laplace", pole: [268.1000, 64.5000], epoch: 946728000000, a: 671278, e: 0.009364, w: 45.3280, m: 345.5110, i: 0.4630, node: 183.6941, sid: 101.3747258, dw: -0.706863, dn: -0.032648 },
10
- ganymede: { parent: "jupiter", frame: "laplace", pole: [268.2000, 64.6000], epoch: 946728000000, a: 1070704, e: 0.001550, w: 204.1684, m: 328.1491, i: 0.1902, node: 49.3711, sid: 50.3176080, dw: -0.085108, dn: -0.006949 },
11
- callisto: { parent: "jupiter", frame: "laplace", pole: [268.7000, 64.8000], epoch: 946728000000, a: 1883241, e: 0.007373, w: 50.5011, m: 86.8148, i: 0.2344, node: 303.0858, sid: 21.5710731, dw: 0.004038, dn: -0.002183 },
12
- mimas: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 186019, e: 0.019677, w: 332.5555, m: 15.1011, i: 1.5771, node: 173.0221, sid: 381.9944568, dw: 2.000419, dn: -0.999500, wave: [43.418, 25631.1, 140.48] },
13
- enceladus: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 238411, e: 0.004863, w: 347.7976, m: 10.8851, i: 0.0384, node: 183.7437, sid: 262.7319015, dw: 0.337808, dn: 0.000158 },
14
- tethys: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 294976, e: 0.001031, w: 130.7569, m: 157.9367, i: 1.0923, node: 259.8172, sid: 190.6979160, dw: 1.005657, dn: -0.197850, wave: [2.080, 25631.1, -39.13] },
15
- dione: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 377651, e: 0.002244, w: 23.9210, m: 322.2940, i: 0.0458, node: 190.7749, sid: 131.5349324, dw: 0.083921, dn: 0.000334 },
16
- rhea: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 527235, e: 0.001014, w: 214.0290, m: 207.6217, i: 0.3323, node: 350.5663, sid: 79.6900471, dw: 0.029141, dn: -0.027653 },
17
- titan: { parent: "saturn", frame: "laplace", pole: [36.4000, 84.0000], epoch: 946728000000, a: 1222236, e: 0.028739, w: 184.8032, m: 163.5256, i: 0.3410, node: 23.4097, sid: 22.5769766, dw: 0.002735, dn: -0.001322 },
18
- iapetus: { parent: "saturn", frame: "laplace", pole: [288.7000, 78.9000], epoch: 946728000000, a: 3561731, e: 0.028384, w: 276.6311, m: 208.8251, i: 7.5692, node: 74.7761, sid: 4.5379486, dw: 0.000592, dn: -0.000316 },
19
- miranda: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 129874, e: 0.001371, w: 155.0214, m: 72.9701, i: 4.4275, node: 100.8616, sid: 254.6906648, dw: 0.110237, dn: -0.055413, wave: [1.375, 4492.9, -41.43] },
20
- ariel: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 190949, e: 0.001424, w: 203.0455, m: 122.6641, i: 0.0247, node: 237.4780, sid: 142.8356548, dw: 0.053280, dn: -0.035921 },
21
- umbriel: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 266003, e: 0.003883, w: 158.9377, m: 260.8156, i: 0.0796, node: 191.5526, sid: 86.8688751, dw: 0.016694, dn: -0.008759 },
22
- titania: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 436315, e: 0.001853, w: 222.1574, m: 53.4168, i: 0.0999, node: 6.0188, sid: 41.3514155, dw: 0.002907, dn: 0.000579 },
23
- oberon: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 583539, e: 0.001418, w: 241.3288, m: 73.2386, i: 0.1731, node: 38.0128, sid: 26.7394826, dw: -1.069893, dn: -0.001489 },
24
- triton: { parent: "neptune", frame: "laplace", pole: [119.3600, -43.4600], epoch: 946728000000, a: 354841, e: 0.000247, w: 305.9384, m: 292.6939, i: 23.1671, node: 182.1368, sid: 61.2572613, dw: -2.038014, dn: -0.001435 },
25
- nereid: { parent: "neptune", frame: "laplace", pole: [263.0036, 62.5201], epoch: 946728000000, a: 5515113, e: 0.750814, w: 234.3873, m: 216.7867, i: 0.1195, node: 27.9962, sid: 0.9996312, dw: -0.165444, dn: 0.165461, wave: [0.575, 25887.4, -84.95] },
26
- proteus: { parent: "neptune", frame: "laplace", pole: [299.3600, 43.4600], epoch: 946728000000, a: 117674, e: 0.000518, w: 17.1835, m: 257.1008, i: 1.0395, node: 0.0397, sid: 320.7656392, dw: 0.075729, dn: 0.001312 },
27
- charon: { parent: "pluto", frame: "laplace", pole: [132.9930, -6.1630], epoch: 946728000000, a: 19594, e: 0.000170, w: 145.3286, m: 148.8263, i: 0.0831, node: 10.0058, sid: 56.3625311, dw: -0.000103, dn: 0.000106 },
28
- nix: { parent: "pluto", frame: "laplace", pole: [132.9930, -6.1630], epoch: 946728000000, a: 49331, e: 0.015293, w: 10.4893, m: 71.8449, i: 0.0845, node: 9.7857, sid: 14.4841692, dw: -0.611124, dn: 0.000103 },
29
- hydra: { parent: "pluto", frame: "laplace", pole: [132.9930, -6.1630], epoch: 946728000000, a: 65177, e: 0.008506, w: 342.3759, m: 135.3153, i: 0.2865, node: 115.2941, sid: 9.4235838, dw: 3.865115, dn: -0.070628 },
6
+ phobos: { parent: "mars", frame: "laplace", pole: [317.7000, 52.9000], epoch: 946728000000, a: 9379, e: 0.015119, w: 216.4977, m: 190.1997, i: 1.0774, node: 169.1169, sid: 1128.8447638, dw: 0.870973, dn: -0.435790, acc: 1.8810e-08 },
7
+ deimos: { parent: "mars", frame: "laplace", pole: [316.6000, 53.5000], epoch: 946728000000, a: 23459, e: 0.000272, w: 195.2788, m: 9.9280, i: 1.8013, node: 54.3960, sid: 285.1618893, dw: 0.036016, dn: -0.018069 },
8
+ io: { parent: "jupiter", frame: "laplace", pole: [268.1000, 64.5000], epoch: 946728000000, a: 422050, e: 0.004180, w: 148.5870, m: 330.9876, i: 0.0389, node: 260.4378, sid: 203.4889597, dw: -0.606701, dn: -0.132808 },
9
+ europa: { parent: "jupiter", frame: "laplace", pole: [268.1000, 64.5000], epoch: 946728000000, a: 671278, e: 0.009365, w: 45.0131, m: 345.4922, i: 0.4649, node: 184.0137, sid: 101.3747250, dw: -0.706875, dn: -0.032634 },
10
+ ganymede: { parent: "jupiter", frame: "laplace", pole: [268.2000, 64.6000], epoch: 946728000000, a: 1070705, e: 0.001614, w: 46.1946, m: 117.5598, i: 0.1903, node: 57.9276, sid: 50.3176077, dw: -0.122518, dn: -0.007126 },
11
+ callisto: { parent: "jupiter", frame: "laplace", pole: [268.7000, 64.8000], epoch: 946728000000, a: 1883240, e: 0.007373, w: 44.4316, m: 87.3746, i: 0.2475, node: 308.5920, sid: 21.5710727, dw: 0.003690, dn: -0.001851 },
12
+ mimas: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 186020, e: 0.019682, w: 332.6162, m: 14.7362, i: 1.5759, node: 172.9916, sid: 381.9944922, dw: 2.000419, dn: -0.999500, wave: [43.360, 25631.1, 140.77] },
13
+ enceladus: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 238411, e: 0.004863, w: 347.2062, m: 10.8783, i: 0.0376, node: 184.3153, sid: 262.7318996, dw: 0.337757, dn: 0.000206 },
14
+ tethys: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 294976, e: 0.001030, w: 300.5426, m: 348.0806, i: 1.0922, node: 259.8208, sid: 190.6979127, dw: 1.005649, dn: -0.197849, wave: [2.079, 25631.1, -38.90] },
15
+ dione: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 377651, e: 0.002240, w: 23.6277, m: 322.2544, i: 0.0468, node: 191.0740, sid: 131.5349315, dw: 0.083977, dn: 0.000274 },
16
+ rhea: { parent: "saturn", frame: "laplace", pole: [40.6000, 83.5000], epoch: 946728000000, a: 527235, e: 0.001009, w: 213.5465, m: 207.7724, i: 0.3372, node: 350.8591, sid: 79.6900466, dw: 0.028925, dn: -0.027520 },
17
+ titan: { parent: "saturn", frame: "laplace", pole: [36.4000, 84.0000], epoch: 946728000000, a: 1222236, e: 0.028878, w: 182.8975, m: 163.2808, i: 0.3344, node: 25.5528, sid: 22.5769762, dw: 0.002727, dn: -0.001324 },
18
+ iapetus: { parent: "saturn", frame: "laplace", pole: [288.7000, 78.9000], epoch: 946728000000, a: 3561733, e: 0.028566, w: 275.7198, m: 209.3991, i: 7.5910, node: 74.9006, sid: 4.5379489, dw: 0.000599, dn: -0.000314 },
19
+ miranda: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 129874, e: 0.001370, w: 154.8103, m: 72.7773, i: 4.4274, node: 100.8573, sid: 254.6906627, dw: 0.110266, dn: -0.055413 },
20
+ ariel: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 190949, e: 0.001406, w: 14.6840, m: 117.9260, i: 0.0276, node: 70.5897, sid: 142.8356533, dw: 0.038335, dn: -0.021279, acc: -4.5011e-10 },
21
+ umbriel: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 266003, e: 0.003890, w: 183.1711, m: 255.7500, i: 0.0862, node: 172.3446, sid: 86.8688746, dw: 0.015401, dn: -0.007613 },
22
+ titania: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 436315, e: 0.001582, w: 146.8303, m: 104.0204, i: 0.1313, node: 30.7310, sid: 41.3514151, dw: -0.491945, dn: -0.000752 },
23
+ oberon: { parent: "uranus", frame: "laplace", pole: [77.3110, 15.1750], epoch: 946728000000, a: 583539, e: 0.001617, w: 283.8793, m: 43.4715, i: 0.1409, node: 25.2251, sid: 26.7394825, dw: -0.547716, dn: -0.000404 },
24
+ triton: { parent: "neptune", frame: "laplace", pole: [119.3600, -43.4600], epoch: 946728000000, a: 354841, e: 0.000247, w: 242.5418, m: 356.0407, i: 23.1259, node: 182.1782, sid: 61.2572608, dw: -2.038006, dn: -0.001436 },
25
+ nereid: { parent: "neptune", frame: "laplace", pole: [262.9670, 62.5306], epoch: 946728000000, a: 5515142, e: 0.750637, w: 33.5592, m: 216.7074, i: 0.4751, node: 228.9244, sid: 0.9996299, dw: -0.075681, dn: 0.075699, wave: [0.555, 29462.3, -82.66] },
26
+ proteus: { parent: "neptune", frame: "laplace", pole: [299.3600, 43.4600], epoch: 946728000000, a: 117674, e: 0.000518, w: 18.0840, m: 257.0336, i: 0.9980, node: 359.1578, sid: 320.7656368, dw: 0.075705, dn: 0.001336 },
27
+ charon: { parent: "pluto", frame: "laplace", pole: [132.9930, -6.1630], epoch: 946728000000, a: 19594, e: 0.000170, w: 145.5839, m: 148.8112, i: 0.0832, node: 9.7573, sid: 56.3625307, dw: -0.000061, dn: 0.000064 },
28
+ nix: { parent: "pluto", frame: "laplace", pole: [132.9930, -6.1630], epoch: 946728000000, a: 49331, e: 0.015290, w: 307.1081, m: 135.3103, i: 0.0847, node: 9.7013, sid: 14.4841691, dw: -0.574755, dn: 0.000064 },
29
+ hydra: { parent: "pluto", frame: "laplace", pole: [132.9930, -6.1630], epoch: 946728000000, a: 65177, e: 0.008508, w: 152.6898, m: 325.4937, i: 0.2857, node: 114.7977, sid: 9.4235842, dw: 3.910425, dn: -0.070598 },
30
30
  ...DWARF_MOON_ORBITS,
31
31
  };
@@ -0,0 +1,17 @@
1
+ export type Tass17Term = readonly number[];
2
+ export interface Tass17Moon {
3
+ name: string;
4
+ l0: number;
5
+ n0: number;
6
+ longTerms: number;
7
+ series: readonly [readonly Tass17Term[], readonly Tass17Term[], readonly Tass17Term[], readonly Tass17Term[]];
8
+ }
9
+ export declare const TASS17_CONSTANTS: {
10
+ gk: number;
11
+ tas: number;
12
+ incline: number;
13
+ node: number;
14
+ massRatio: number[];
15
+ meanMotion: number[];
16
+ };
17
+ export declare const TASS17: readonly Tass17Moon[];
@@ -0,0 +1,10 @@
1
+ export const TASS17_CONSTANTS = { gk: 0.01720209895, tas: 3498.79, incline: 28.0512, node: 169.5291, massRatio: [15772870.66246, 6666666.666667, 943396.2264151, 509424.350484, 231481.4814815, 4225.86397789, 33333333.33333, 322580.6451613, 0.0002858130953844], meanMotion: [6.667061728782, 4.585536751534, 3.328306445055, 2.295717646433, 1.390853715957, 0.394042567691, 0.2953088138695, 0.07920197763193, 0.0005839811452566] };
2
+ export const TASS17 = [
3
+ { name: "mimas", l0: 0.1822484926062486, n0: 2435.144296437475, longTerms: 29, series: [[[.005196910356, 3.1415927, .0, 0, 0, 0, 0, 0, 0, 0, 0], [.000124713212, 3.3845534, 2428.76308172, 2, 0, -2, 0, 0, 0, 0, 0]], [[.757407322863, .6863463, .08904538, 0, 0, 0, 0, 0, 0, 0, 0], [.012432991652, 2.0590389, .26713613, 0, 0, 0, 0, 0, 0, 0, 0], [.002266397526, 2.2096889, 10.19765304, 0, 0, 0, 0, 0, 0, 0, 0], [.001059900649, 4.6649352, 10.10860767, 0, 0, 0, 0, 0, 0, 0, 0], [.001022783782, 2.8960352, 10.28669842, 0, 0, 0, 0, 0, 0, 0, 0], [.00072660424, 1.3726926, .17809075, 0, 0, 0, 0, 0, 0, 0, 0], [.000506082714, 4.5336232, .05765338, 0, 0, 0, 0, 0, 0, 0, 0], [.000359028331, 3.4317315, .44522688, 0, 0, 0, 0, 0, 0, 0, 0], [.000262800894, .0544571, .06492496, 0, 0, 0, 0, 0, 0, 0, 0], [.000245940871, 3.1222547, .12043737, 0, 0, 0, 0, 0, 0, 0, 0], [.000223717127, .8369963, 10.01956229, 0, 0, 0, 0, 0, 0, 0, 0], [.000209748179, 3.5823815, 10.3757438, 0, 0, 0, 0, 0, 0, 0, 0], [.000196976197, 4.4598281, .11316579, 0, 0, 0, 0, 0, 0, 0, 0], [.000127602394, 5.4468317, 5.02184135, 0, 0, 0, 0, 0, 0, 0, 0], [.000116395369, 3.6779316, 5.19993211, 0, 0, 0, 0, 0, 0, 0, 0], [9.230819e-05, 2.4359084, .031392, 0, 0, 0, 0, 0, 0, 0, 0], [7.3454364e-05, 4.2399277, .03866358, 0, 0, 0, 0, 0, 0, 0, 0], [4.8700039e-05, 3.2922426, 9.93051691, 0, 0, 0, 0, 0, 0, 0, 0], [4.4730299e-05, 4.2687278, 10.46478917, 0, 0, 0, 0, 0, 0, 0, 0], [2.7996118e-05, 5.2199695, .14669876, 0, 0, 0, 0, 0, 0, 0, 0], [1.3175561e-05, 2.4903656, .09631696, 0, 0, 0, 0, 0, 0, 0, 0], [1.2844121e-05, 2.7647231, .23574414, 0, 0, 0, 0, 0, 0, 0, 0], [1.0965515e-05, 2.0239197, .0817738, 0, 0, 0, 0, 0, 0, 0, 0], [9.505948e-06, 3.6972696, 5.07949473, 0, 0, 0, 0, 0, 0, 0, 0], [9.283151e-06, 1.8040193, .00727158, 0, 0, 0, 0, 0, 0, 0, 0], [9.274943e-06, .6670084, .20948275, 0, 0, 0, 0, 0, 0, 0, 0], [8.715615e-06, 4.4949473, .29852813, 0, 0, 0, 0, 0, 0, 0, 0], [5.198697e-06, 4.3836159, 5.16854011, 0, 0, 0, 0, 0, 0, 0, 0], [3.847029e-06, 6.1525159, 4.99044936, 0, 0, 0, 0, 0, 0, 0, 0], [.000145635712, .2429607, 2428.76308172, 2, 0, -2, 0, 0, 0, 0, 0]], [[.01598170384, 6.2224731, 6.38121472, -1, 0, 2, 0, 0, 0, 0, 0], [.007314708595, 2.3945341, 6.29216934, -1, 0, 2, 0, 0, 0, 0, 0], [.007111400179, .6256341, 6.4702601, -1, 0, 2, 0, 0, 0, 0, 0], [.001511549643, 4.8497805, 6.20312396, -1, 0, 2, 0, 0, 0, 0, 0], [.001462159664, 1.3119804, 6.55930547, -1, 0, 2, 0, 0, 0, 0, 0], [.000333621932, 1.0218415, 6.11407859, -1, 0, 2, 0, 0, 0, 0, 0], [.00033067402, 1.9983267, 6.64835085, -1, 0, 2, 0, 0, 0, 0, 0], [.000160745569, 4.0128281, -3.81643833, -1, 0, 2, 0, 0, 0, 0, 0], [.00260270042, .1822485, 2435.14429644, 1, 0, 0, 0, 0, 0, 0, 0]], [[.011889636182, 4.0877879, -6.37188169, -1, 0, 2, 0, 0, 0, 0, 0], [.005317666808, .2598489, -6.46092707, -1, 0, 2, 0, 0, 0, 0, 0], [.005301694965, 4.7741342, -6.28283631, -1, 0, 2, 0, 0, 0, 0, 0], [.001092196252, 2.7150953, -6.54997244, -1, 0, 2, 0, 0, 0, 0, 0], [.001074089419, 5.4604805, -6.19379094, -1, 0, 2, 0, 0, 0, 0, 0], [.00023284302, 6.1468268, -6.10474556, -1, 0, 2, 0, 0, 0, 0, 0], [.000222421339, 5.1703416, -6.63901782, -1, 0, 2, 0, 0, 0, 0, 0]]] },
4
+ { name: "enceladus", l0: 0.7997716657090215, n0: 1674.867298497696, longTerms: 3, series: [[[.003147075653, 3.1415927, .0, 0, 0, 0, 0, 0, 0, 0, 0]], [[.004496393703, 2.3429594, .56590952, 0, 0, 0, 0, 0, 0, 0, 0], [.003354575502, 4.5978339, 1.61701655, 0, 0, 0, 0, 0, 0, 0, 0], [3.106537e-05, 2.9124825, 3.23403309, 0, 0, 0, 0, 0, 0, 0, 0]], [[.004803805198, 3.1894234, 2.15444222, 0, -1, 0, 2, 0, 0, 0, 0], [.000109772, 5.5323831, 2.72035174, 0, -1, 0, 2, 0, 0, 0, 0], [.001576763094, .7997717, 1674.8672985, 0, 1, 0, 0, 0, 0, 0, 0]], [[.00012809389, 1.9831496, -2.65919659, 0, -1, 0, 2, 0, 0, 0, 0]]] },
5
+ { name: "tethys", l0: 5.239109365414447, n0: 1215.663929056177, longTerms: 28, series: [[[.002047958692, 3.1415927, .0, 0, 0, 0, 0, 0, 0, 0, 0]], [[.035971930035, 3.827939, .08904538, 0, 0, 0, 0, 0, 0, 0, 0], [.000589180658, 5.2006316, .26713613, 0, 0, 0, 0, 0, 0, 0, 0], [.000104985975, 5.3512815, 10.19765304, 0, 0, 0, 0, 0, 0, 0, 0], [4.9446696e-05, 1.5233426, 10.10860767, 0, 0, 0, 0, 0, 0, 0, 0], [4.7723457e-05, 6.0376278, 10.28669842, 0, 0, 0, 0, 0, 0, 0, 0], [3.4321621e-05, 4.5142853, .17809075, 0, 0, 0, 0, 0, 0, 0, 0], [2.5558212e-05, 1.3920305, .05765338, 0, 0, 0, 0, 0, 0, 0, 0], [1.7174348e-05, 2.0783768, .14669876, 0, 0, 0, 0, 0, 0, 0, 0], [1.6970934e-05, .2901388, .44522688, 0, 0, 0, 0, 0, 0, 0, 0], [1.3232719e-05, 1.3533547, .29852813, 0, 0, 0, 0, 0, 0, 0, 0], [1.267529e-05, 3.1960498, .06492496, 0, 0, 0, 0, 0, 0, 0, 0], [1.2661518e-05, 5.9063158, .23574414, 0, 0, 0, 0, 0, 0, 0, 0], [1.1571953e-05, 5.1655123, .0817738, 0, 0, 0, 0, 0, 0, 0, 0], [1.0800212e-05, 5.5775011, .031392, 0, 0, 0, 0, 0, 0, 0, 0], [1.0527248e-05, 3.9785889, 10.01956229, 0, 0, 0, 0, 0, 0, 0, 0], [1.0015578e-05, .6318892, .02412042, 0, 0, 0, 0, 0, 0, 0, 0], [9.867772e-06, .4407888, 10.3757438, 0, 0, 0, 0, 0, 0, 0, 0], [9.845954e-06, 5.6319582, .09631696, 0, 0, 0, 0, 0, 0, 0, 0], [9.815613e-06, 6.2638474, .12043737, 0, 0, 0, 0, 0, 0, 0, 0], [9.19495e-06, 1.3182355, .11316579, 0, 0, 0, 0, 0, 0, 0, 0], [8.03714e-06, .5556769, 5.07949473, 0, 0, 0, 0, 0, 0, 0, 0], [7.218513e-06, 3.808601, .20948275, 0, 0, 0, 0, 0, 0, 0, 0], [6.00149e-06, 2.305239, 5.02184135, 0, 0, 0, 0, 0, 0, 0, 0], [5.489567e-06, .536339, 5.19993211, 0, 0, 0, 0, 0, 0, 0, 0], [4.021385e-06, 4.2399277, .03866358, 0, 0, 0, 0, 0, 0, 0, 0], [3.767846e-06, 3.0109233, 4.99044936, 0, 0, 0, 0, 0, 0, 0, 0], [3.600131e-06, 1.2420232, 5.16854011, 0, 0, 0, 0, 0, 0, 0, 0], [3.094782e-06, 1.8040193, .00727158, 0, 0, 0, 0, 0, 0, 0, 0]], [[.000156476742, 4.5684611, 1.26305641, -1, 0, 2, 0, 0, 0, 0, 0], [8.6810077e-05, .7405222, 1.17401103, -1, 0, 2, 0, 0, 0, 0, 0], [8.1688793e-05, 5.9411537, 1.44114716, -1, 0, 2, 0, 0, 0, 0, 0], [8.1011653e-05, 3.1957685, 1.08496566, -1, 0, 2, 0, 0, 0, 0, 0], [7.0814355e-05, 5.2548074, 1.35210179, -1, 0, 2, 0, 0, 0, 0, 0], [.001026432489, 5.239109, 1215.66392906, 0, 0, 1, 0, 0, 0, 0, 0]], [[.007978986672, 3.9377805, -1.26099496, -1, 0, 2, 0, 0, 0, 0, 0], [.003586811057, .1098416, -1.35004034, -1, 0, 2, 0, 0, 0, 0, 0], [.003578626571, 4.6241268, -1.17194958, -1, 0, 2, 0, 0, 0, 0, 0], [.000745607996, 2.5650879, -1.43908571, -1, 0, 2, 0, 0, 0, 0, 0], [.000726908879, 5.3104731, -1.08290421, -1, 0, 2, 0, 0, 0, 0, 0], [.000163406184, 5.9968194, -.99385883, -1, 0, 2, 0, 0, 0, 0, 0], [.000162927867, 5.0203343, -1.52813109, -1, 0, 2, 0, 0, 0, 0, 0]]] },
6
+ { name: "dione", l0: 1.99459258527906, n0: 838.5108703595477, longTerms: 3, series: [[[.001245046723, 3.1415927, .0, 0, 0, 0, 0, 0, 0, 0, 0]], [[.000125321409, 5.484552, .56590952, 0, 0, 0, 0, 0, 0, 0, 0], [9.4708633e-05, 1.4562412, 1.61701655, 0, 0, 0, 0, 0, 0, 0, 0], [2.711677e-06, 6.0540751, 3.23403309, 0, 0, 0, 0, 0, 0, 0, 0]], [[.002203368656, 4.8747752, .53742567, 0, -1, 0, 2, 0, 0, 0, 0], [.000117225275, 2.6819797, .00893386, 0, 0, 0, 0, 0, 0, 0, 0], [.000624554027, 1.9945977, 838.51087036, 0, 0, 0, 1, 0, 0, 0, 0]], [[5.9115578e-05, 3.2215059, .0, 0, 0, 0, 0, 0, 0, 0, 0], [.000165536386, 1.5566434, -.53763153, 0, -1, 0, 2, 0, 0, 0, 0]]] },
7
+ { name: "rhea", l0: 6.221340947932125, n0: 508.009319753336, longTerms: 11, series: [[[.000626333815, 3.1415927, .0, 0, 0, 0, 0, 0, 0, 0, 0], [6.4974769e-05, 5.7106855, 728.17054577, 0, 0, 0, 0, 2, -2, 0, 0]], [[.000498262456, 4.765136, .00192554, 0, 0, 0, 0, 0, 0, 0, 0], [.000325504768, 3.3039591, .00893124, 0, 0, 0, 0, 0, 0, 0, 0], [6.3905302e-05, 2.8649575, .42659824, 0, 0, 0, 0, 0, 0, 0, 0], [6.1474054e-05, 3.6667436, .17546762, 0, 0, 0, 0, 0, 0, 0, 0], [4.6937692e-05, 4.4095771, .21329912, 0, 0, 0, 0, 0, 0, 0, 0], [1.8307531e-05, .2440869, .16653638, 0, 0, 0, 0, 0, 0, 0, 0], [1.7725084e-05, 5.1964718, .01786773, 0, 0, 0, 0, 0, 0, 0, 0], [9.471405e-06, .7450246, .0378315, 0, 0, 0, 0, 0, 0, 0, 0], [8.699582e-06, 4.1332774, .63989736, 0, 0, 0, 0, 0, 0, 0, 0], [4.462723e-06, 4.2223125, .00693477, 0, 0, 0, 0, 0, 0, 0, 0], [3.475127e-06, 5.9050217, .00385109, 0, 0, 0, 0, 0, 0, 0, 0], [9.2655559e-05, 5.7106855, 728.17054577, 0, 0, 0, 0, 2, -2, 0, 0], [5.2293417e-05, 4.4261391, 364.08527289, 0, 0, 0, 0, 1, -1, 0, 0]], [[.000971261192, 2.6879219, .00893386, 0, 0, 0, 0, 0, 0, 0, 0], [.000167185267, .053587, .17554922, 0, 0, 0, 0, 0, 0, 0, 0], [.000311604301, 6.2213387, 508.00932017, 0, 0, 0, 0, 1, 0, 0, 0], [.000110838491, 3.6522459, -220.1612256, 0, 0, 0, 0, -1, 2, 0, 0]], [[.000420656325, 3.2214974, .0, 0, 0, 0, 0, 0, 0, 0, 0], [.002970532433, 2.6268786, -.17546762, 0, 0, 0, 0, 0, 0, 0, 0], [.000178750941, 6.2045513, -.00893124, 0, 0, 0, 0, 0, 0, 0, 0]]] },
8
+ { name: "titan", l0: 4.936792168079816, n0: 143.9240478491399, longTerms: 18, series: [[[.000134808993, 3.1415927, .0, 0, 0, 0, 0, 0, 0, 0, 0], [2.5140518e-05, 4.4261391, 364.08527289, 0, 0, 0, 0, 1, -1, 0, 0]], [[.001489184841, 4.4829053, .00192554, 0, 0, 0, 0, 0, 0, 0, 0], [.000627797694, .1641703, .00893124, 0, 0, 0, 0, 0, 0, 0, 0], [.000206453251, 2.8758951, .42659824, 0, 0, 0, 0, 0, 0, 0, 0], [.000183993699, 4.4325392, .21329912, 0, 0, 0, 0, 0, 0, 0, 0], [3.2052225e-05, 2.4210503, .00686799, 0, 0, 0, 0, 0, 0, 0, 0], [2.9106462e-05, 4.1335117, .63989736, 0, 0, 0, 0, 0, 0, 0, 0], [2.7828329e-05, 2.0858768, .01786773, 0, 0, 0, 0, 0, 0, 0, 0], [9.861735e-06, 5.8208768, .00385109, 0, 0, 0, 0, 0, 0, 0, 0], [6.328208e-06, 1.0995958, .20646793, 0, 0, 0, 0, 0, 0, 0, 0], [3.918483e-06, 3.1028699, .43552948, 0, 0, 0, 0, 0, 0, 0, 0], [3.898032e-06, 2.6919289, .10318689, 0, 0, 0, 0, 0, 0, 0, 0], [3.675186e-06, 3.1321806, .11020638, 0, 0, 0, 0, 0, 0, 0, 0], [3.340295e-06, 3.9491938, .40873051, 0, 0, 0, 0, 0, 0, 0, 0], [3.080474e-06, 5.3909641, .85319648, 0, 0, 0, 0, 0, 0, 0, 0], [2.919924e-06, 2.618006, .43342943, 0, 0, 0, 0, 0, 0, 0, 0], [2.671699e-06, .0178072, .41976705, 0, 0, 0, 0, 0, 0, 0, 0], [1.807247e-06, 5.8978921, .31639186, 0, 0, 0, 0, 0, 0, 0, 0], [1.012886e-06, 3.8240119, .22013031, 0, 0, 0, 0, 0, 0, 0, 0]], [[.028926536504, 2.6876019, .00893386, 0, 0, 0, 0, 0, 0, 0, 0], [.000192126156, .6049785, -.00893386, 0, 0, 0, 0, 0, 0, 0, 0], [7.4465646e-05, 3.4845579, .41766438, 0, 0, 0, 0, 0, 0, 0, 0], [2.4294021e-05, 4.4970273, .00700832, 0, 0, 0, 0, 0, 0, 0, 0], [2.391668e-05, 4.0046713, .01085941, 0, 0, 0, 0, 0, 0, 0, 0], [1.7207312e-05, 3.4231771, .00197469, 0, 0, 0, 0, 0, 0, 0, 0], [6.6878712e-05, 4.9367923, 143.92404729, 0, 0, 0, 0, 0, 1, 0, 0]], [[.005602364095, 3.2214983, .0, 0, 0, 0, 0, 0, 0, 0, 0], [.002789942948, 6.2046949, -.00893124, 0, 0, 0, 0, 0, 0, 0, 0], [.000131236331, 5.0442692, -.00192554, 0, 0, 0, 0, 0, 0, 0, 0], [.000112567079, 6.0842051, .42659824, 0, 0, 0, 0, 0, 0, 0, 0], [1.9166685e-05, 5.0949747, -.21329912, 0, 0, 0, 0, 0, 0, 0, 0]]] },
9
+ { name: "iapetus", l0: 0.1661250302251527, n0: 28.92852233006167, longTerms: 22, series: [[[.000493188068, 3.1415927, .0, 0, 0, 0, 0, 0, 0, 0, 0], [.001422582506, 1.6290747, 114.99552496, 0, 0, 0, 0, 0, 1, 0, -1], [1.2827606e-05, 2.9481741, 114.9974505, 0, 0, 0, 0, 0, 1, 0, -1], [1.1738085e-05, .3099779, 114.99359941, 0, 0, 0, 0, 0, 1, 0, -1], [.000103909391, 3.6037306, 57.43044643, 0, 0, 0, 0, 0, 0, 0, 2], [1.3182214e-05, 3.6036279, 57.43044643, 0, 0, 0, 0, 0, 0, 0, 2], [6.634921e-06, 1.7811673, 57.43237198, 0, 0, 0, 0, 0, 0, 0, 2], [4.8158909e-05, 4.85738, 86.06897732, 0, 0, 0, 0, 0, 1, 0, -2], [3.7911407e-05, 3.8778929, 258.91063838, 0, 0, 0, 0, 0, 2, 0, -1], [3.4797018e-05, 2.9136211, 479.08079784, 0, 0, 0, 0, 1, 0, 0, -1], [2.1097978e-05, 6.1691375, 28.92654764, 0, 0, 0, 0, 0, 0, 0, 1], [1.178035e-05, 3.7673167, 28.91958847, 0, 0, 0, 0, 0, 0, 0, 1], [2.0351442e-05, 2.3886229, 57.21714732, 0, 0, 0, 0, 0, 0, 0, 2], [1.8705379e-05, 4.9700653, 809.58234803, 0, 0, 0, 1, 0, 0, 0, -1], [1.6385564e-05, 3.1205906, 172.85449516, 0, 0, 0, 0, 0, 1, 0, 1], [1.529824e-05, 4.943058, 172.85256962, 0, 0, 0, 0, 0, 1, 0, 1], [1.5570034e-05, 3.2581492, 229.99104991, 0, 0, 0, 0, 0, 2, 0, -2], [1.2281863e-05, .1724889, 57.85704466, 0, 0, 0, 0, 0, 0, 0, 2], [1.176258e-05, 3.3141843, 57.85704466, 0, 0, 0, 0, 0, 0, 0, 2], [6.557352e-06, 1.4915168, 57.8589702, 0, 0, 0, 0, 0, 0, 0, 2], [6.405368e-06, 3.3139849, 57.85704466, 0, 0, 0, 0, 0, 0, 0, 2], [6.172683e-06, 4.6332138, 57.8589702, 0, 0, 0, 0, 0, 0, 0, 2], [1.1298351e-05, 1.9313913, 1186.73540673, 0, 0, 1, 0, 0, 0, 0, -1], [8.894452e-06, 3.7177784, 28.50389879, 0, 0, 0, 0, 0, 0, 0, 1]], [[.19283869166, 1.3167433, .00192554, 0, 0, 0, 0, 0, 0, 0, 0], [.001197700128, 2.9058163, .00385109, 0, 0, 0, 0, 0, 0, 0, 0], [.001125807496, 4.4141245, .21329912, 0, 0, 0, 0, 0, 0, 0, 0], [.000746641091, 3.4116003, .00893124, 0, 0, 0, 0, 0, 0, 0, 0], [.000300429568, 4.1827603, .42852378, 0, 0, 0, 0, 0, 0, 0, 0], [.000240046101, 2.92635, .42659824, 0, 0, 0, 0, 0, 0, 0, 0], [.000178544427, 3.8971599, .00691978, 0, 0, 0, 0, 0, 0, 0, 0], [7.3936956e-05, 5.5032531, .43044933, 0, 0, 0, 0, 0, 0, 0, 0], [5.2830859e-05, 6.2186352, .21137358, 0, 0, 0, 0, 0, 0, 0, 0], [4.0766525e-05, 3.7764098, .01083538, 0, 0, 0, 0, 0, 0, 0, 0], [4.0289913e-05, 1.0959893, .20646793, 0, 0, 0, 0, 0, 0, 0, 0], [3.8118165e-05, 5.4498358, .6418229, 0, 0, 0, 0, 0, 0, 0, 0], [3.6202546e-05, .6177614, .01282203, 0, 0, 0, 0, 0, 0, 0, 0], [3.5860137e-05, 2.4360624, .21522466, 0, 0, 0, 0, 0, 0, 0, 0], [3.4904418e-05, 4.1591049, .63989736, 0, 0, 0, 0, 0, 0, 0, 0], [2.3772276e-05, 3.2392547, .10318689, 0, 0, 0, 0, 0, 0, 0, 0], [2.1486858e-05, 3.3241098, .02002818, 0, 0, 0, 0, 0, 0, 0, 0], [2.0236353e-05, 5.3426528, .01786773, 0, 0, 0, 0, 0, 0, 0, 0], [1.6030862e-05, 2.4857103, .42264886, 0, 0, 0, 0, 0, 0, 0, 0], [1.3140542e-05, 5.8736638, .31639186, 0, 0, 0, 0, 0, 0, 0, 0], [9.878271e-06, .4692951, .64374845, 0, 0, 0, 0, 0, 0, 0, 0], [7.459888e-06, 4.0873932, .22013031, 0, 0, 0, 0, 0, 0, 0, 0], [.000728254974, 4.7706673, 114.99552496, 0, 0, 0, 0, 0, 1, 0, -1], [.000122687758, 3.6037306, 57.43044643, 0, 0, 0, 0, 0, 0, 0, 2], [1.4426542e-05, 3.6036279, 57.43044643, 0, 0, 0, 0, 0, 0, 0, 2], [7.287158e-06, 1.7811671, 57.43237198, 0, 0, 0, 0, 0, 0, 0, 2], [.000116960486, 2.9018942, .71654053, 0, 0, 0, 0, 0, -1, 0, 5], [.000107833831, 4.7292547, .71461498, 0, 0, 0, 0, 0, -1, 0, 5], [8.8813809e-05, 3.1507612, .72048991, 0, 0, 0, 0, 0, -1, 0, 5], [8.0756557e-05, .4519506, .70958135, 0, 0, 0, 0, 0, -1, 0, 5], [7.2858937e-05, 2.2815567, .70765581, 0, 0, 0, 0, 0, -1, 0, 5], [7.2713035e-05, 1.3538354, .72241545, 0, 0, 0, 0, 0, -1, 0, 5], [3.5319612e-05, 4.9360143, .71856436, 0, 0, 0, 0, 0, -1, 0, 5], [3.0192813e-05, 1.1232393, .71846607, 0, 0, 0, 0, 0, -1, 0, 5], [2.3287513e-05, 5.8144245, .724341, 0, 0, 0, 0, 0, -1, 0, 5], [2.1866937e-05, 1.9952748, .70370643, 0, 0, 0, 0, 0, -1, 0, 5], [1.67287e-05, 4.8664367, .7115069, 0, 0, 0, 0, 0, -1, 0, 5], [1.4750744e-05, 5.7197961, .69674725, 0, 0, 0, 0, 0, -1, 0, 5], [1.3992387e-05, 4.2397592, .70262218, 0, 0, 0, 0, 0, -1, 0, 5], [1.1794231e-05, 6.061719, .70069664, 0, 0, 0, 0, 0, -1, 0, 5], [8.812132e-06, 1.1857884, .71851522, 0, 0, 0, 0, 0, -1, 0, 5], [8.507522e-06, 3.014199, .71658967, 0, 0, 0, 0, 0, -1, 0, 5], [6.197295e-06, 3.2904764, .72942115, 0, 0, 0, 0, 0, -1, 0, 5], [5.971965e-06, .8753491, .70573027, 0, 0, 0, 0, 0, -1, 0, 5], [2.6371835e-05, 4.6834741, 143.92207259, 0, 0, 0, 0, 0, 1, 0, 0], [2.4033704e-05, 2.3886229, 57.21714732, 0, 0, 0, 0, 0, 0, 0, 2], [2.2228797e-05, .7364334, 258.91063838, 0, 0, 0, 0, 0, 2, 0, -1], [2.1817215e-05, 6.0552137, 479.08079784, 0, 0, 0, 0, 1, 0, 0, -1], [2.0373426e-05, 3.6865741, 28.50389879, 0, 0, 0, 0, 0, 0, 0, 1], [1.7695636e-05, 3.2581492, 229.99104991, 0, 0, 0, 0, 0, 2, 0, -2], [1.3815843e-05, 3.3141843, 57.85704466, 0, 0, 0, 0, 0, 0, 0, 2], [1.3401705e-05, .172489, 57.85704466, 0, 0, 0, 0, 0, 0, 0, 2], [6.761318e-06, 4.6332135, 57.8589702, 0, 0, 0, 0, 0, 0, 0, 2], [1.1847154e-05, 1.8284727, 809.58234803, 0, 0, 0, 1, 0, 0, 0, -1], [1.0294535e-05, 3.1205903, 172.85449516, 0, 0, 0, 0, 0, 1, 0, 1], [9.488209e-06, 4.9430576, 172.85256962, 0, 0, 0, 0, 0, 1, 0, 1], [7.269853e-06, 5.072984, 1186.73540673, 0, 0, 1, 0, 0, 0, 0, -1], [6.013025e-06, 1.7431224, 86.06897732, 0, 0, 0, 0, 0, 1, 0, -2]], [[.001016094463, 5.1068426, .0, 0, 0, 0, 0, 0, 0, 0, 0], [.029356481073, 3.3586498, .00197469, 0, 0, 0, 0, 0, 0, 0, 0], [.000995358414, 5.8316033, .00893386, 0, 0, 0, 0, 0, 0, 0, 0], [.000735719473, 6.0358292, -.00197469, 0, 0, 0, 0, 0, 0, 0, 0], [.000669905037, 4.7530142, -.00390023, 0, 0, 0, 0, 0, 0, 0, 0], [.000415186913, 4.7439644, .00390023, 0, 0, 0, 0, 0, 0, 0, 0], [.000378927303, 2.7452928, .42462355, 0, 0, 0, 0, 0, 0, 0, 0], [.000199166942, 4.4854767, .00700832, 0, 0, 0, 0, 0, 0, 0, 0], [.000189985405, 3.517567, -.00582578, 0, 0, 0, 0, 0, 0, 0, 0], [.000123489426, .865295, .01085941, 0, 0, 0, 0, 0, 0, 0, 0], [.000101180493, 3.7453487, -.00893386, 0, 0, 0, 0, 0, 0, 0, 0], [6.9280989e-05, 5.5761419, -.01085941, 0, 0, 0, 0, 0, 0, 0, 0], [4.8896877e-05, 4.0149828, .63792267, 0, 0, 0, 0, 0, 0, 0, 0], [2.0827288e-05, 1.17387, -.01278495, 0, 0, 0, 0, 0, 0, 0, 0], [2.0393853e-05, 4.5851551, .21132443, 0, 0, 0, 0, 0, 0, 0, 0], [1.799641e-05, .2341543, .41766438, 0, 0, 0, 0, 0, 0, 0, 0], [1.5952516e-05, 6.2344321, .21329912, 0, 0, 0, 0, 0, 0, 0, 0], [1.3431534e-05, 4.6493063, .21527381, 0, 0, 0, 0, 0, 0, 0, 0], [1.2878539e-05, 5.2877829, -.21132443, 0, 0, 0, 0, 0, 0, 0, 0], [1.1304693e-05, 4.5746124, .42264886, 0, 0, 0, 0, 0, 0, 0, 0], [1.0653113e-05, .0035136, .42852378, 0, 0, 0, 0, 0, 0, 0, 0], [6.594413e-06, 1.1603922, .43049847, 0, 0, 0, 0, 0, 0, 0, 0], [.00059375146, 4.9367923, 143.92404729, 0, 0, 0, 0, 0, 1, 0, 0], [.000273855743, 1.678643, -86.06700263, 0, 0, 0, 0, 0, -1, 0, 2], [.000253284257, .166125, 28.92852233, 0, 0, 0, 0, 0, 0, 0, 1], [.000104914728, 5.9871723, -28.5019241, 0, 0, 0, 0, 0, 0, 0, -1], [1.3280653e-05, 5.9872751, -28.5019241, 0, 0, 0, 0, 0, 0, 0, -1], [6.684463e-06, 1.5265503, -28.50384965, 0, 0, 0, 0, 0, 0, 0, -1], [2.0581053e-05, .9190948, -28.28862499, 0, 0, 0, 0, 0, 0, 0, -1], [1.7213429e-05, .9024276, 287.83916071, 0, 0, 0, 0, 0, 2, 0, 0], [1.6451039e-05, 6.2213387, 508.00932017, 0, 0, 0, 0, 1, 0, 0, 0], [1.2952324e-05, 4.7061879, -57.14045499, 0, 0, 0, 0, 0, -1, 0, 3], [1.2467019e-05, 3.0561313, .71851522, 0, 0, 0, 0, 0, -1, 0, 5], [1.1416094e-05, 4.8786431, .71658967, 0, 0, 0, 0, 0, -1, 0, 5], [1.2281878e-05, 3.1352288, -28.92852233, 0, 0, 0, 0, 0, 0, 0, -1], [1.1762598e-05, 6.2767187, -28.92852233, 0, 0, 0, 0, 0, 0, 0, -1], [6.172687e-06, 4.9576892, -28.93044787, 0, 0, 0, 0, 0, 0, 0, -1], [1.1544999e-05, .628263, 86.35896876, 0, 0, 0, 0, 0, 0, 0, 3], [1.0504213e-05, .1871271, -143.92597283, 0, 0, 0, 0, 0, -1, 0, 0], [9.807167e-06, 4.647845, -143.92404729, 0, 0, 0, 0, 0, -1, 0, 0], [1.0486276e-05, .0495684, -201.06252758, 0, 0, 0, 0, 0, -2, 0, 3], [1.0343508e-05, 1.7926908, -114.99355026, 0, 0, 0, 0, 0, -1, 0, 1], [9.02941e-06, 1.9945977, 838.51087036, 0, 0, 0, 1, 0, 0, 0, 0], [8.024442e-06, 3.1936699, 57.85506997, 0, 0, 0, 0, 0, 0, 0, 2], [7.066767e-06, 5.7070156, -229.98211605, 0, 0, 0, 0, 0, -2, 0, 2], [6.251474e-06, .3940966, -450.15227551, 0, 0, 0, 0, -1, 0, 0, 2], [5.65937e-06, 5.239109, 1215.66392906, 0, 0, 1, 0, 0, 0, 0, 0]], [[.13201653327, 3.2215236, .0, 0, 0, 0, 0, 0, 0, 0, 0], [.067945491457, 5.0478864, -.00192554, 0, 0, 0, 0, 0, 0, 0, 0], [.00068924343, 1.3980384, .00192554, 0, 0, 0, 0, 0, 0, 0, 0], [.000273063412, 3.0740264, -.00893124, 0, 0, 0, 0, 0, 0, 0, 0], [.00026411122, 6.085251, .42659824, 0, 0, 0, 0, 0, 0, 0, 0], [.000181691904, 1.1230185, .42852378, 0, 0, 0, 0, 0, 0, 0, 0], [4.5703939e-05, 3.6630282, -.00385109, 0, 0, 0, 0, 0, 0, 0, 0], [4.4944178e-05, 5.0929819, -.21329912, 0, 0, 0, 0, 0, 0, 0, 0], [3.3746206e-05, 1.0722121, .63989736, 0, 0, 0, 0, 0, 0, 0, 0], [3.0102917e-05, 4.3233898, .21329912, 0, 0, 0, 0, 0, 0, 0, 0], [2.873149e-05, 1.1304178, .00390023, 0, 0, 0, 0, 0, 0, 0, 0], [2.8328417e-05, 3.7754189, -.21522466, 0, 0, 0, 0, 0, 0, 0, 0], [2.8298117e-05, 3.1798138, .21137358, 0, 0, 0, 0, 0, 0, 0, 0], [2.3487856e-05, 2.3920693, .6418229, 0, 0, 0, 0, 0, 0, 0, 0], [1.9156445e-05, 1.6669838, .00587493, 0, 0, 0, 0, 0, 0, 0, 0], [1.3887911e-05, 6.1995458, -.00683119, 0, 0, 0, 0, 0, 0, 0, 0], [1.3630491e-05, 1.5730812, -.01085678, 0, 0, 0, 0, 0, 0, 0, 0], [1.1154029e-05, 2.1243709, .01786773, 0, 0, 0, 0, 0, 0, 0, 0], [9.901282e-06, 3.0225659, .21522466, 0, 0, 0, 0, 0, 0, 0, 0], [9.851993e-06, 3.5680181, .00893124, 0, 0, 0, 0, 0, 0, 0, 0], [6.56416e-06, 5.8991996, .01090856, 0, 0, 0, 0, 0, 0, 0, 0], [5.927926e-06, 2.2367658, -.00592407, 0, 0, 0, 0, 0, 0, 0, 0], [2.9878199e-05, 1.5924506, -114.99552496, 0, 0, 0, 0, 0, -1, 0, 1], [1.5985387e-05, 3.4149118, -114.9974505, 0, 0, 0, 0, 0, -1, 0, 1], [2.0110865e-05, 5.0229849, 172.85256962, 0, 0, 0, 0, 0, 1, 0, 1], [1.081178e-05, 3.2005232, 172.85449516, 0, 0, 0, 0, 0, 1, 0, 1]]] },
10
+ ];
@@ -0,0 +1,64 @@
1
+ import type { Series } from "./vsop.ts";
2
+ import type { Vec3 } from "../vec.ts";
3
+ /** A moon's position from its planet's centre in the J2000 ecliptic, in kilometres, at a moment in terrestrial time (milliseconds since 1970). */
4
+ export type MoonTheory = (terrestrialMs: number) => Vec3;
5
+ /**
6
+ * Teach `moonVector` a moon's theory. The entry points under `@johnmorrisdotca/wakusei-planets/tables` call this as they load.
7
+ *
8
+ * @param id - The moon's name.
9
+ * @param theory - Its position from the planet's centre at a moment in terrestrial time.
10
+ * @returns The theory, as it was given.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { moonTheoryOf, registerMoonTheory } from "@johnmorrisdotca/wakusei-planets/tables";
15
+ *
16
+ * registerMoonTheory("test-moon", () => [1, 0, 0]);
17
+ * console.log(moonTheoryOf("test-moon")?.(0)[0]);
18
+ * ```
19
+ */
20
+ export declare function registerMoonTheory(id: string, theory: MoonTheory): MoonTheory;
21
+ /**
22
+ * The theory registered for a moon, or `undefined` when its entry point has not been imported.
23
+ *
24
+ * @param id - The moon's name.
25
+ * @returns The registered theory, or `undefined`.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * import { moonTheoryOf } from "@johnmorrisdotca/wakusei-planets/tables";
30
+ *
31
+ * console.log(moonTheoryOf("titan") === undefined || typeof moonTheoryOf("titan") === "function");
32
+ * ```
33
+ */
34
+ export declare const moonTheoryOf: (id: string) => MoonTheory | undefined;
35
+ /**
36
+ * Teach `heliocentric` a finer VSOP87B series for a planet, used in place of the small one in the package. The entry point `@johnmorrisdotca/wakusei-planets/tables/vsop` calls this for Mercury to Neptune.
37
+ *
38
+ * @param id - The planet's name.
39
+ * @param series - Its longitude, latitude and radius series, as `scripts/make-vsop-data.py fine` writes them.
40
+ * @returns The series, as it was given.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * import { planetSeriesOf, registerPlanetSeries } from "@johnmorrisdotca/wakusei-planets/tables";
45
+ *
46
+ * registerPlanetSeries("test-planet", [[[[1, 0, 0]]], [[]], [[[1, 0, 0]]]]);
47
+ * console.log(planetSeriesOf("test-planet") !== undefined);
48
+ * ```
49
+ */
50
+ export declare function registerPlanetSeries(id: string, series: Series): Series;
51
+ /**
52
+ * The finer series registered for a planet, or `undefined` when `tables/vsop` has not been imported.
53
+ *
54
+ * @param id - The planet's name.
55
+ * @returns The registered series, or `undefined`.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * import { planetSeriesOf } from "@johnmorrisdotca/wakusei-planets/tables";
60
+ *
61
+ * console.log(planetSeriesOf("earth") === undefined || Array.isArray(planetSeriesOf("earth")));
62
+ * ```
63
+ */
64
+ export declare const planetSeriesOf: (id: string) => Series | undefined;
@@ -0,0 +1,70 @@
1
+ const KEY = Symbol.for("johnmorrisdotca.wakusei-planets.moon-theories");
2
+ const SERIES_KEY = Symbol.for("johnmorrisdotca.wakusei-planets.planet-series");
3
+ const planetSeries = (globalThis[SERIES_KEY] ??= new Map());
4
+ const theories = (globalThis[KEY] ??= new Map());
5
+ /**
6
+ * Teach `moonVector` a moon's theory. The entry points under `@johnmorrisdotca/wakusei-planets/tables` call this as they load.
7
+ *
8
+ * @param id - The moon's name.
9
+ * @param theory - Its position from the planet's centre at a moment in terrestrial time.
10
+ * @returns The theory, as it was given.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { moonTheoryOf, registerMoonTheory } from "@johnmorrisdotca/wakusei-planets/tables";
15
+ *
16
+ * registerMoonTheory("test-moon", () => [1, 0, 0]);
17
+ * console.log(moonTheoryOf("test-moon")?.(0)[0]);
18
+ * ```
19
+ */
20
+ export function registerMoonTheory(id, theory) {
21
+ theories.set(id, theory);
22
+ return theory;
23
+ }
24
+ /**
25
+ * The theory registered for a moon, or `undefined` when its entry point has not been imported.
26
+ *
27
+ * @param id - The moon's name.
28
+ * @returns The registered theory, or `undefined`.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * import { moonTheoryOf } from "@johnmorrisdotca/wakusei-planets/tables";
33
+ *
34
+ * console.log(moonTheoryOf("titan") === undefined || typeof moonTheoryOf("titan") === "function");
35
+ * ```
36
+ */
37
+ export const moonTheoryOf = (id) => theories.get(id);
38
+ /**
39
+ * Teach `heliocentric` a finer VSOP87B series for a planet, used in place of the small one in the package. The entry point `@johnmorrisdotca/wakusei-planets/tables/vsop` calls this for Mercury to Neptune.
40
+ *
41
+ * @param id - The planet's name.
42
+ * @param series - Its longitude, latitude and radius series, as `scripts/make-vsop-data.py fine` writes them.
43
+ * @returns The series, as it was given.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * import { planetSeriesOf, registerPlanetSeries } from "@johnmorrisdotca/wakusei-planets/tables";
48
+ *
49
+ * registerPlanetSeries("test-planet", [[[[1, 0, 0]]], [[]], [[[1, 0, 0]]]]);
50
+ * console.log(planetSeriesOf("test-planet") !== undefined);
51
+ * ```
52
+ */
53
+ export function registerPlanetSeries(id, series) {
54
+ planetSeries.set(id, series);
55
+ return series;
56
+ }
57
+ /**
58
+ * The finer series registered for a planet, or `undefined` when `tables/vsop` has not been imported.
59
+ *
60
+ * @param id - The planet's name.
61
+ * @returns The registered series, or `undefined`.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * import { planetSeriesOf } from "@johnmorrisdotca/wakusei-planets/tables";
66
+ *
67
+ * console.log(planetSeriesOf("earth") === undefined || Array.isArray(planetSeriesOf("earth")));
68
+ * ```
69
+ */
70
+ export const planetSeriesOf = (id) => planetSeries.get(id);