@johnmorrisdotca/wakusei-planets 0.17.2 → 0.20.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 +35 -0
- package/NOTICE.md +8 -4
- package/README.md +9 -5
- package/dist/calendar.d.ts +119 -0
- package/dist/calendar.js +154 -0
- package/dist/clock.d.ts +244 -0
- package/dist/clock.js +326 -0
- package/dist/coordinates.d.ts +177 -0
- package/dist/coordinates.js +169 -0
- package/dist/data/lunar.d.ts +4 -0
- package/dist/data/lunar.js +548 -0
- package/dist/data/orbits.d.ts +5 -1
- package/dist/data/orbits.js +26 -26
- package/dist/data/pluto.d.ts +6 -0
- package/dist/data/pluto.js +29 -0
- package/dist/data/tables.d.ts +41 -0
- package/dist/data/tables.js +37 -0
- package/dist/data/vsop.d.ts +21 -0
- package/dist/data/vsop.js +27 -0
- package/dist/element.d.ts +5 -3
- package/dist/element.js +22 -9
- package/dist/ephemeris.d.ts +4 -16
- package/dist/ephemeris.js +76 -33
- package/dist/live.js +1 -1
- package/dist/mars.d.ts +41 -0
- package/dist/mars.js +52 -0
- package/dist/scales.d.ts +46 -0
- package/dist/scales.js +75 -0
- package/dist/sidereal.d.ts +66 -0
- package/dist/sidereal.js +88 -0
- package/dist/sky/engine.d.ts +46 -0
- package/dist/sky/engine.js +145 -0
- package/dist/sky/events.d.ts +37 -0
- package/dist/sky/events.js +133 -0
- package/dist/suncalc-legacy.d.ts +187 -0
- package/dist/suncalc-legacy.js +168 -0
- package/dist/suncalc.d.ts +209 -0
- package/dist/suncalc.js +173 -0
- package/dist/tables/all.d.ts +2 -0
- package/dist/tables/all.js +2 -0
- package/dist/tables/ceres.d.ts +1 -0
- package/dist/tables/ceres.js +57 -0
- package/dist/tables/dwarfs.d.ts +1 -0
- package/dist/tables/dwarfs.js +59 -0
- package/dist/theory.d.ts +20 -0
- package/dist/theory.js +98 -0
- package/dist/time.d.ts +6 -0
- package/dist/time.js +7 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/when.d.ts +16 -0
- package/dist/when.js +18 -0
- package/package.json +71 -5
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Made by scripts/make-pluto-data.py from JPL Horizons (https://ssd.jpl.nasa.gov/api/horizons.api): the Pluto system's barycentre, heliocentric, ecliptic and equinox J2000, in au.
|
|
2
|
+
// 1800 to 2200 as 20 Chebyshev segments of 20 Julian years, degree 13; measured on samples held back from the fit: 0.14637 arc-seconds. Each segment is fitted on its own, so the position can step by about that much where one ends and the next begins. Do not edit by hand.
|
|
3
|
+
/** Milliseconds since 1970, in terrestrial time, at the start of the first segment (1800-01-01). */
|
|
4
|
+
export const PLUTO_START = -5364662400000;
|
|
5
|
+
/** The length of a segment in milliseconds: 20 Julian years. */
|
|
6
|
+
export const PLUTO_SEGMENT_MS = 631152000000;
|
|
7
|
+
/** By segment, then x, y, z, then the Chebyshev coefficients, in au. */
|
|
8
|
+
export const PLUTO = [
|
|
9
|
+
[[40.344446136, 3.515614495, -0.499162168, 0.005727844, 0.003670603, -0.001356546, -0.001400279, 0.000358474, 0.000282661, -8.9823e-05, -6.4595e-05, 2.9375e-05, 2.1071e-05, -1.07e-05], [-8.700807244, 8.13406237, 0.112862576, -0.021920924, 0.002300074, 0.002531687, -0.00074622, -0.000646165, 0.000171877, 0.000130398, -4.8866e-05, -3.4495e-05, 1.9609e-05, 1.125e-05], [-10.736278193, -1.88710775, 0.132813751, 0.000648563, -0.000221748, 2.8034e-05, 3.4018e-05, -5.554e-06, -7.078e-06, 1.631e-06, 1.668e-06, -5.85e-07, -5.51e-07, 2.18e-07]],
|
|
10
|
+
[[43.586210133, -0.213165155, -0.424676166, 0.004422239, 0.000223162, 0.002902293, -0.000170873, -0.000705644, -4.4214e-05, 8.1997e-05, 5.838e-05, -4.949e-06, -2.4911e-05, -3.369e-06], [7.823416547, 8.227929499, -0.077227057, -0.011886782, -0.003452425, 0.000271166, 0.001606074, -3.8714e-05, -0.000258229, -6.8345e-05, 2.3993e-05, 3.9646e-05, 2.417e-06, -1.1872e-05], [-13.443047556, -0.821039244, 0.131269119, -0.000628108, -2.8694e-05, -6.2643e-05, -2.907e-06, 1.5935e-05, 2.165e-06, -1.537e-06, -1.493e-06, -4.6e-08, 5.79e-07, 1.4e-07]],
|
|
11
|
+
[[40.024005033, -3.286552127, -0.345965546, 0.007998585, -0.003538483, -0.000927609, 0.001553677, 0.000194547, -0.00020759, 3.3137e-05, -1.632e-05, -2.875e-05, 1.4576e-05, 6.304e-06], [23.265805041, 7.115955489, -0.199430449, -0.006816271, 0.001366537, -0.002805196, -0.000507445, 0.000660956, 2.855e-05, -3.1267e-05, 3.9939e-05, -2.037e-05, -1.605e-05, 7.18e-06], [-14.066265389, 0.189052786, 0.120708833, -0.001083876, 5.3154e-05, 3.1295e-05, -3.2642e-05, -6.836e-06, 4.55e-06, -7.3e-07, 1.93e-07, 7.72e-07, -2.69e-07, -1.83e-07]],
|
|
12
|
+
[[30.970064606, -5.689235033, -0.257092217, 0.009059903, 0.002623937, -0.002145956, -0.00105183, 0.000567291, 0.000179716, -0.000138051, -2.3705e-05, 4.3372e-05, 2.873e-06, -1.5267e-05], [35.574917226, 5.1164511, -0.294030025, -0.009470112, 0.002826842, 0.001913966, -0.001192911, -0.000466631, 0.000268931, 6.429e-05, -7.4778e-05, -9.002e-06, 2.8623e-05, 2.09e-07], [-12.766587326, 1.098445214, 0.106231804, -0.001357287, -8.8221e-05, 3.929e-05, 2.8397e-05, -1.0841e-05, -5.212e-06, 2.857e-06, 8.96e-07, -9.28e-07, -2.07e-07, 3.49e-07]],
|
|
13
|
+
[[17.819357127, -7.37804348, -0.156529136, 0.007070891, 0.001725354, 0.002599747, -0.000726905, -0.000654058, 6.267e-05, 0.000124566, 3.4355e-05, -3.0962e-05, -2.0878e-05, 6.24e-06], [43.158460321, 2.384370527, -0.387665126, -0.008012148, -0.00342295, 0.001293997, 0.0014288, -0.000291706, -0.000279186, -2.1541e-05, 6.0836e-05, 2.7834e-05, -1.5627e-05, -1.2103e-05], [-9.775434719, 1.876934704, 0.087204522, -0.001875378, -7.1853e-05, -6.4617e-05, 1.0057e-05, 1.5794e-05, -2.24e-07, -2.641e-06, -1.034e-06, 5.44e-07, 5.3e-07, -8.8e-08]],
|
|
14
|
+
[[2.206547986, -8.12900098, -0.02435273, 0.014167128, -0.003326255, 0.000166947, 0.001635501, -4.5921e-05, -0.000196448, 1.5045e-05, -3.7122e-05, -5.845e-06, 2.117e-05, 4.31e-07], [44.564358043, -1.049994589, -0.475649676, -0.00494049, -6.9629e-05, -0.002936509, 9.3174e-05, 0.000683975, -2.4699e-05, -8.543e-06, 1.0577e-05, -3.4024e-05, -2.32e-06, 8.968e-06], [-5.409797072, 2.463969753, 0.057270253, -0.003291679, -4.7103e-05, 2.531e-06, -3.7032e-05, -1.638e-06, 4.577e-06, -3.04e-07, 7.42e-07, 2.89e-07, -4.54e-07, -4.8e-08]],
|
|
15
|
+
[[-13.597960711, -7.489048662, 0.196098923, 0.025326658, 0.002114992, -0.002684392, -0.000567764, 0.00069184, 4.9838e-05, -0.000141225, 2.3556e-05, 3.8591e-05, -1.617e-05, -1.0484e-05], [38.410323443, -5.155942766, -0.540990562, -0.004273774, 0.004045833, 0.001080681, -0.001491621, -0.000225829, 0.000304271, -1.2649e-05, -7.0863e-05, 1.9578e-05, 2.2382e-05, -9.742e-06], [-0.179677122, 2.719733277, 0.001420564, -0.006395579, -0.000314287, 4.6892e-05, 1.8746e-05, -1.4581e-05, -2.352e-06, 3.218e-06, -2.31e-07, -9.47e-07, 2.68e-07, 2.7e-07]],
|
|
16
|
+
[[-25.988946344, -4.603942938, 0.551559411, 0.033305747, 0.003156874, 0.001883569, -0.001185984, -0.000512856, 0.000180297, 0.000132853, -9.077e-06, -4.3422e-05, -5.445e-06, 1.3629e-05], [23.788538759, -9.433435408, -0.493713354, 0.014025554, -0.000593781, 0.002219063, 0.001073366, -0.000514476, -0.000246017, 5.0531e-05, 7.4769e-05, 1.564e-06, -2.646e-05, -4.554e-06], [4.969654204, 2.34008748, -0.106181736, -0.011784645, -0.00040478, -4.3796e-05, 2.371e-05, 1.397e-05, -2.792e-06, -3.205e-06, -2.36e-07, 9.51e-07, 2.56e-07, -2.68e-07]],
|
|
17
|
+
[[-29.482199508, 1.428732835, 0.931439179, 0.018944268, -0.006598091, 0.000939535, 0.001490282, -0.000277436, -0.000184671, -6.61e-06, -2.8679e-05, 2.0433e-05, 1.7541e-05, -4.294e-06], [2.061014959, -11.930496831, -0.055938485, 0.062274318, 0.001373724, -0.002815402, 0.000652734, 0.000624199, -6.9609e-05, -1.3147e-05, -2.5094e-05, -2.7923e-05, 1.2473e-05, 7.678e-06], [8.306316828, 0.863531619, -0.264119612, -0.012108536, 0.000693411, 7.611e-05, -3.3923e-05, 3.863e-06, 4.739e-06, -2.4e-07, 5.17e-07, -1.66e-07, -3.62e-07, -1.8e-08]],
|
|
18
|
+
[[-19.225176221, 8.672541784, 0.739873234, -0.052125728, -0.003962969, -0.00257872, 2.3596e-05, 0.000714338, -7.1748e-05, -0.000102014, 5.7153e-05, 1.6217e-05, -2.553e-05, -7.21e-07], [-19.670307252, -9.104917139, 0.759723241, 0.056409429, -0.000350862, -0.000326253, -0.001579476, 3.9553e-05, 0.00028115, -7.3015e-05, -3.9601e-05, 3.7659e-05, 6.089e-06, -1.3318e-05], [7.665546437, -1.532148251, -0.295242504, 0.009662852, 0.00157073, 5.483e-06, -3.209e-06, -1.5313e-05, 4.43e-07, 1.926e-06, -1.086e-06, -2.69e-07, 5.82e-07, 5.9e-08]],
|
|
19
|
+
[[1.587828079, 11.484736848, -0.036759937, -0.058959474, 0.006130925, 0.001196089, -0.001495303, -0.000291618, 0.0002794, 9.6431e-05, -5.3325e-05, -3.5535e-05, 1.4393e-05, 1.4062e-05], [-30.62171999, -1.684721571, 0.960859731, -0.021626485, -0.004717175, 0.002933919, 0.000587942, -0.000675295, -0.000156848, 0.000119297, 5.7639e-05, -2.7208e-05, -2.3878e-05, 6.576e-06], [2.817586088, -3.142641935, -0.091621468, 0.018849169, -0.000504613, -0.000100271, 3.6884e-05, 9.637e-06, -5.732e-06, -2.829e-06, 1.062e-06, 9.55e-07, -3.01e-07, -3.51e-07]],
|
|
20
|
+
[[22.59950071, 9.167462488, -0.464749199, -0.016665721, -0.000716002, 0.001999091, 0.001139065, -0.000478304, -0.000168937, -1.3519e-05, 2.913e-06, 3.4803e-05, 5.385e-06, -8.894e-06], [-27.406330258, 4.568098431, 0.570860016, -0.034054939, -0.002122689, -0.001985647, 0.001159389, 0.000492685, -0.000119927, -4.0871e-05, -4.2467e-05, -5.175e-06, 2.1758e-05, 3.634e-06], [-3.603878251, -3.141582331, 0.072719727, 0.008257527, -0.000542878, -1.699e-05, -2.9477e-05, 8.666e-06, 4.371e-06, 4.55e-07, 3.9e-08, -7.5e-07, -1.76e-07, 2.01e-07]],
|
|
21
|
+
[[36.939341225, 5.129731202, -0.519373952, 0.004692931, -0.000858295, -0.00277941, 0.000575506, 0.000648955, -0.000157268, -4.3593e-05, 6.2329e-05, -1.1832e-05, -2.126e-05, 7.987e-06], [-14.920300329, 7.625932875, 0.215376737, -0.022982384, 0.004261566, -0.001052646, -0.001515004, 0.000287092, 0.00021381, -9.8581e-05, 3.602e-06, 3.7558e-05, -1.1704e-05, -9.365e-06], [-9.088338853, -2.298211979, 0.127118461, 0.001770862, -0.00021148, 7.7677e-05, -7.122e-06, -1.5554e-05, 2.653e-06, 1.231e-06, -1.428e-06, 1.69e-07, 5.14e-07, -1.54e-07]],
|
|
22
|
+
[[43.205691842, 1.195120891, -0.454915197, 0.006263429, 0.003792164, 6.4192e-05, -0.001581, -2.6086e-05, 0.000329524, 2.3344e-05, -7.9875e-05, -1.1651e-05, 2.7516e-05, 5.051e-06], [1.254520347, 8.357911117, -0.011301006, -0.016772082, 0.00026938, 0.002835932, 3.5504e-05, -0.00073666, -2.5758e-05, 0.000156403, 1.7216e-05, -4.3622e-05, -8.368e-06, 1.4717e-05], [-12.632067846, -1.240559784, 0.133482588, -0.000320067, -0.000144806, -9.2e-06, 3.4764e-05, 3.759e-06, -7.372e-06, -1.182e-06, 1.796e-06, 4.57e-07, -6.23e-07, -1.74e-07]],
|
|
23
|
+
[[42.191972134, -2.147760207, -0.376984473, 0.004999433, -0.001502285, 0.002683245, 0.000636743, -0.000622637, -0.00013744, 1.0166e-05, 3.9081e-05, 3.0136e-05, -1.0141e-05, -9.954e-06], [17.40650037, 7.670664941, -0.156884695, -0.0089054, -0.003190464, -0.001156705, 0.001490487, 0.000298923, -0.000179317, -6.9697e-05, -3.0622e-05, 2.1945e-05, 2.0888e-05, -2.702e-06], [-14.066676337, -0.200769018, 0.125358392, -0.000915656, 2.1834e-05, -5.3184e-05, -2.0185e-05, 1.2522e-05, 3.792e-06, 1.8e-07, -7.47e-07, -8.13e-07, 1.34e-07, 2.36e-07]],
|
|
24
|
+
[[35.163637166, -4.812516365, -0.29417343, 0.008740902, -0.002523193, -0.002194203, 0.001086111, 0.000500995, -0.000202168, 7.964e-06, 3.8981e-05, -3.2397e-05, -7.663e-06, 1.0781e-05], [31.161533501, 6.005490485, -0.257172975, -0.006361613, 0.002838312, -0.001972201, -0.001215987, 0.00049125, 0.000131694, -8.4327e-05, 3.8386e-05, 1.8767e-05, -2.1633e-05, -1.441e-06], [-13.505489845, 0.751092972, 0.112335187, -0.00123999, 2.864e-05, 5.6229e-05, -1.9316e-05, -1.3283e-05, 4.06e-06, 1.89e-07, -1.095e-06, 6.51e-07, 2.87e-07, -2.4e-07]],
|
|
25
|
+
[[23.470348929, -6.796378683, -0.198408928, 0.009070366, 0.003645704, -0.000924181, -0.0014934, 0.000248404, 0.000311137, -5.8747e-05, -7.5365e-05, 1.8675e-05, 2.6244e-05, -6.499e-06], [40.799190134, 3.554422071, -0.349299005, -0.009580279, 0.001209012, 0.002693552, -0.000520043, -0.000695427, 0.000117154, 0.000148541, -3.1604e-05, -4.1399e-05, 1.2454e-05, 1.4391e-05], [-11.154637663, 1.585632246, 0.095485724, -0.001630994, -0.000116433, 7.416e-06, 3.5322e-05, -2.489e-06, -7.465e-06, 6.1e-07, 1.822e-06, -2.05e-07, -6.45e-07, 6.5e-08]],
|
|
26
|
+
[[8.617349343, -7.964053047, -0.083429336, 0.009547488, 0.000131406, 0.002909691, 5.8982e-05, -0.000695276, -7.7812e-05, 5.8516e-05, 5.7956e-05, 7.329e-06, -2.2269e-05, -6.496e-06], [44.837482152, 0.402896054, -0.442059605, -0.007302726, -0.003666577, -9.9599e-05, 0.001607532, 6.2777e-05, -0.000236018, -7.6116e-05, 5.002e-06, 3.7822e-05, 9.769e-06, -9.773e-06], [-7.289593151, 2.259325743, 0.071159401, -0.002556161, -7.563e-05, -6.6851e-05, -7.803e-06, 1.5158e-05, 2.624e-06, -9.45e-07, -1.251e-06, -3.3e-07, 4.46e-07, 1.88e-07]],
|
|
27
|
+
[[-7.446981919, -7.95590864, 0.093140644, 0.019706365, -0.002787998, -0.001321578, 0.001461988, 0.000295423, -0.00021138, 3.3052e-05, 6.27e-07, -3.447e-05, 8.661e-06, 8.537e-06], [41.854284569, -3.44768981, -0.520271856, -0.003637425, 0.001910417, -0.002622228, -0.000744879, 0.000629792, 5.6067e-05, -4.9136e-05, 4.6473e-05, -8.389e-06, -2.0314e-05, 5.221e-06], [-2.322831682, 2.671894622, 0.028252562, -0.004860504, -0.000136891, 3.2534e-05, -2.9678e-05, -9.295e-06, 4.478e-06, -4.91e-07, -2.28e-07, 7.88e-07, -1.02e-07, -2.11e-07]],
|
|
28
|
+
[[-21.753468282, -6.096639211, 0.39256025, 0.032397514, 0.003651638, -0.001838891, -0.001222968, 0.000485569, 0.000228856, -0.000123971, -4.3117e-05, 3.9963e-05, 1.1231e-05, -1.4869e-05], [30.642479685, -7.780866886, -0.539156487, 0.003316364, 0.003662219, 0.002285534, -0.001008029, -0.0005526, 0.000234838, 9.6155e-05, -6.6643e-05, -2.0181e-05, 2.7319e-05, 5.517e-06], [3.014938, 2.596413626, -0.055270755, -0.009489898, -0.000435246, 2.5989e-05, 3.2182e-05, -8.409e-06, -6.179e-06, 2.389e-06, 1.311e-06, -7.89e-07, -3.88e-07, 3.01e-07]],
|
|
29
|
+
];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** One body's table of Chebyshev segments. */
|
|
2
|
+
export interface FittedTable {
|
|
3
|
+
/** Milliseconds since 1970, in terrestrial time, at the start of the first segment. */
|
|
4
|
+
start: number;
|
|
5
|
+
/** The length of a segment in milliseconds. */
|
|
6
|
+
segment: number;
|
|
7
|
+
/** The error on samples held back from the fit, in arc-seconds. */
|
|
8
|
+
worst: number;
|
|
9
|
+
/** By segment, then x, y, z, then the Chebyshev coefficients, in au. */
|
|
10
|
+
segments: readonly (readonly (readonly number[])[])[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Teach `heliocentric` a body's fitted table. The entry points `@johnmorrisdotca/wakusei-planets/tables/ceres` and `/tables/dwarfs` call this as they load.
|
|
14
|
+
*
|
|
15
|
+
* @param id - The body's name.
|
|
16
|
+
* @param table - Its Chebyshev segments, as `scripts/make-dwarf-data.py` writes them.
|
|
17
|
+
* @returns The table, as it was given.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { registerTable, tableOf } from "@johnmorrisdotca/wakusei-planets/tables";
|
|
22
|
+
*
|
|
23
|
+
* registerTable("ceres", { start: 0, segment: 1000, worst: 0, segments: [[[0], [0], [0]]] });
|
|
24
|
+
* console.log(tableOf("ceres")?.worst);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function registerTable(id: string, table: FittedTable): FittedTable;
|
|
28
|
+
/**
|
|
29
|
+
* The table registered for a body, or `undefined` when its entry point has not been imported.
|
|
30
|
+
*
|
|
31
|
+
* @param id - The body's name.
|
|
32
|
+
* @returns The registered table, or `undefined`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* import { tableOf } from "@johnmorrisdotca/wakusei-planets/tables";
|
|
37
|
+
*
|
|
38
|
+
* console.log(tableOf("sedna") === undefined);
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const tableOf: (id: string) => FittedTable | undefined;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// The fitted position tables a page has loaded, one table for the whole page on `globalThis` (a CDN's bundler gives each entry point its own copy of a file, and the copies must still share the tables).
|
|
2
|
+
// `@johnmorrisdotca/wakusei-planets/tables` and its parts register tables; `heliocentric` uses a body's table when one is registered and its approximate elements otherwise.
|
|
3
|
+
const KEY = Symbol.for("johnmorrisdotca.wakusei-planets.tables");
|
|
4
|
+
const tables = (globalThis[KEY] ??= new Map());
|
|
5
|
+
/**
|
|
6
|
+
* Teach `heliocentric` a body's fitted table. The entry points `@johnmorrisdotca/wakusei-planets/tables/ceres` and `/tables/dwarfs` call this as they load.
|
|
7
|
+
*
|
|
8
|
+
* @param id - The body's name.
|
|
9
|
+
* @param table - Its Chebyshev segments, as `scripts/make-dwarf-data.py` writes them.
|
|
10
|
+
* @returns The table, as it was given.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { registerTable, tableOf } from "@johnmorrisdotca/wakusei-planets/tables";
|
|
15
|
+
*
|
|
16
|
+
* registerTable("ceres", { start: 0, segment: 1000, worst: 0, segments: [[[0], [0], [0]]] });
|
|
17
|
+
* console.log(tableOf("ceres")?.worst);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export function registerTable(id, table) {
|
|
21
|
+
tables.set(id, table);
|
|
22
|
+
return table;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The table registered for a body, or `undefined` when its entry point has not been imported.
|
|
26
|
+
*
|
|
27
|
+
* @param id - The body's name.
|
|
28
|
+
* @returns The registered table, or `undefined`.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { tableOf } from "@johnmorrisdotca/wakusei-planets/tables";
|
|
33
|
+
*
|
|
34
|
+
* console.log(tableOf("sedna") === undefined);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export const tableOf = (id) => tables.get(id);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type Term = readonly [number, number, number];
|
|
2
|
+
export type Variable = readonly (readonly Term[])[];
|
|
3
|
+
export type Series = readonly [Variable, Variable, Variable];
|
|
4
|
+
/** Mercury's series, on its own so that a page that needs one planet imports only it. */
|
|
5
|
+
export declare const VSOP_MERCURY: Series;
|
|
6
|
+
/** Venus's series, on its own so that a page that needs one planet imports only it. */
|
|
7
|
+
export declare const VSOP_VENUS: Series;
|
|
8
|
+
/** Earth's series, on its own so that a page that needs one planet imports only it. */
|
|
9
|
+
export declare const VSOP_EARTH: Series;
|
|
10
|
+
/** Mars's series, on its own so that a page that needs one planet imports only it. */
|
|
11
|
+
export declare const VSOP_MARS: Series;
|
|
12
|
+
/** Jupiter's series, on its own so that a page that needs one planet imports only it. */
|
|
13
|
+
export declare const VSOP_JUPITER: Series;
|
|
14
|
+
/** Saturn's series, on its own so that a page that needs one planet imports only it. */
|
|
15
|
+
export declare const VSOP_SATURN: Series;
|
|
16
|
+
/** Uranus's series, on its own so that a page that needs one planet imports only it. */
|
|
17
|
+
export declare const VSOP_URANUS: Series;
|
|
18
|
+
/** Neptune's series, on its own so that a page that needs one planet imports only it. */
|
|
19
|
+
export declare const VSOP_NEPTUNE: Series;
|
|
20
|
+
/** Every planet's series by name. */
|
|
21
|
+
export declare const VSOP87: Record<string, Series>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Mercury's series, on its own so that a page that needs one planet imports only it. */
|
|
2
|
+
export const VSOP_MERCURY = [[[[4.4025071014, 0.0, 0.0], [.4098941498, 1.48302, 26087.903142], [.050462942, 4.477855, 52175.806283], [.0085534684, 1.165203, 78263.709425], [.0016559036, 4.119692, 104351.612566], [.000345619, .779308, 130439.515708], [7.58348e-05, 3.713484, 156527.418849], [3.55975e-05, 1.512027, 1109.378552], [1.72601e-05, .358323, 182615.321991], [1.80346e-05, 4.103332, 5661.332049], [1.36468e-05, 4.599183, 27197.281694], [1.58992e-05, 2.995104, 25028.521211], [1.01733e-05, .880314, 31749.235191], [7.1418e-06, 1.541449, 24978.524589], [6.4376e-06, 5.302662, 21535.949645], [4.042e-06, 3.28229, 208703.225133], [3.5244e-06, 5.241564, 20426.571092], [3.4331e-06, 5.765317, 955.599742], [3.3922e-06, 5.863278, 25558.212176], [4.5114e-06, 6.049893, 51116.424353], [3.2533e-06, 1.336745, 53285.184835], [3.4521e-06, 2.79212, 15874.617595]], [[26087.9031368553, 0.0, 0.0], [.0113119981, 6.218742, 26087.903142], [.002922423, 3.044494, 52175.806283], [.0007577508, 6.085688, 78263.709425], [.0001967653, 2.809651, 104351.612566], [5.11988e-05, 5.794324, 130439.515708], [1.33632e-05, 2.479099, 156527.418849]], [[.0001639513, 4.677596, 26087.903142], [8.12387e-05, 1.403056, 52175.806283]]], [[[.1173752896, 1.983575, 26087.903142], [.02388077, 5.03739, 52175.806283], [.0122283953, 3.141593, 0.0], [.0054325181, 1.796444, 78263.709425], [.0012977877, 4.832325, 104351.612566], [.0003186693, 1.580885, 130439.515708], [7.9633e-05, 4.609721, 156527.418849], [2.01419e-05, 1.353242, 182615.321991], [5.1395e-06, 4.378354, 208703.225133]], [[.0027464607, 3.950085, 26087.903142], [.0009973771, 3.141593, 0.0], [.0001877205, .051413, 78263.709425], [.0002397073, 2.532721, 52175.806283], [8.09751e-05, 3.209464, 104351.612566], [2.89073e-05, .009436, 130439.515708]]], [[[.3952827165, 0.0, 0.0], [.0783413182, 6.192337, 26087.903142], [.0079552556, 2.959897, 52175.806283], [.0012128176, 6.010642, 78263.709425], [.0002192197, 2.778201, 104351.612566], [4.35406e-05, 5.828945, 130439.515708], [9.1823e-06, 2.596506, 156527.418849]], [[.0021734774, 4.656172, 26087.903142], [.0004414183, 1.423855, 52175.806283], [.0001009448, 4.474663, 78263.709425], [2.43281e-05, 1.242261, 104351.612566], [1.62437e-05, 0.0, 0.0]]]];
|
|
3
|
+
/** Venus's series, on its own so that a page that needs one planet imports only it. */
|
|
4
|
+
export const VSOP_VENUS = [[[[3.1761466677, 0.0, 0.0], [.0135396842, 5.593133, 10213.285546], [.0008989164, 5.3065, 20426.571092], [5.47719e-05, 4.416307, 7860.419392], [3.45574e-05, 2.699644, 11790.629089], [2.37206e-05, 2.993775, 3930.209696], [1.31717e-05, 5.186682, 26.29832], [1.66415e-05, 4.250186, 1577.343542], [1.43839e-05, 4.157451, 9683.594581], [1.20052e-05, 6.153571, 30639.856639], [7.6138e-06, 1.950147, 529.690965], [7.0768e-06, 1.064667, 775.522611], [5.8484e-06, 3.998399, 191.448266], [7.6931e-06, .816296, 9437.762935], [4.9992e-06, 4.123402, 15720.838785], [3.2622e-06, 4.590565, 10404.733812], [4.295e-06, 3.586429, 19367.189162], [3.2697e-06, 5.677366, 5507.553239]], [[10213.2855462164, 0.0, 0.0], [.0009561781, 2.464065, 10213.285546], [7.7872e-05, .624785, 20426.571092]]], [[[.0592363847, .267028, 10213.285546], [.0004010798, 1.147372, 20426.571092], [.0003281492, 3.141593, 0.0], [1.01139e-05, 1.089461, 30639.856639]], [[.0028782124, 1.88965, 10213.285546], [3.49958e-05, 3.711176, 20426.571092], [1.25784e-05, 0.0, 0.0]], [[.0001265774, 3.347965, 10213.285546]]], [[[.7233482089, 0.0, 0.0], [.0048982418, 4.021518, 10213.285546], [1.65806e-05, 4.902067, 20426.571092], [1.6321e-05, 2.845488, 7860.419392], [1.37804e-05, 1.128466, 11790.629089], [4.9839e-06, 2.586822, 9683.594581], [3.7396e-06, 1.423148, 3930.209696]], [[.0003455104, .891987, 10213.285546]]]];
|
|
5
|
+
/** Earth's series, on its own so that a page that needs one planet imports only it. */
|
|
6
|
+
export const VSOP_EARTH = [[[[1.7534704567, 0.0, 0.0], [.0334165645, 4.669257, 6283.07585], [.0003489428, 4.626102, 12566.1517], [3.41757e-05, 2.828866, 3.523118], [3.49706e-05, 2.744118, 5753.384885], [3.1359e-05, 3.62767, 77713.771468], [2.67622e-05, 4.418083, 7860.419392], [2.34269e-05, 6.135162, 3930.209696], [1.27317e-05, 2.037097, 529.690965], [1.32429e-05, .742463, 11506.76977], [9.0185e-06, 2.045054, 26.29832], [1.19917e-05, 1.109629, 1577.343542], [8.5722e-06, 3.508492, 398.149003], [7.7979e-06, 1.178827, 5223.69392], [9.9025e-06, 5.232681, 5884.926847], [7.5314e-06, 2.533391, 5507.553239], [5.0527e-06, 4.582926, 18849.22755], [4.9239e-06, 4.205057, 775.522611], [3.5667e-06, 2.919541, .06731], [3.1709e-06, 5.849019, 11790.629089]], [[6283.0758499914, 0.0, 0.0], [.0020605886, 2.678235, 6283.07585], [4.30342e-05, 2.635122, 12566.1517]], [[8.72186e-05, 1.072536, 6283.07585]]], [[], [[.0022777772, 3.413766, 6283.07585], [3.80568e-05, 3.370634, 12566.1517], [3.61959e-05, 0.0, 0.0]], [[9.72142e-05, 5.151928, 6283.07585]]], [[[1.0001398878, 0.0, 0.0], [.0167069963, 3.098464, 6283.07585], [.0001395602, 3.055246, 12566.1517], [3.08372e-05, 5.198467, 77713.771468], [1.62846e-05, 1.173876, 5753.384885], [1.57557e-05, 2.846852, 7860.419392], [9.248e-06, 5.452922, 11506.76977], [5.4244e-06, 4.564092, 3930.209696], [4.7211e-06, 3.661, 5884.926847], [3.2878e-06, 5.899837, 5223.69392], [3.4597e-06, .963686, 5507.553239], [3.0678e-06, .298671, 5573.142801]], [[.0010301861, 1.10749, 6283.07585], [1.72124e-05, 1.064423, 12566.1517]]]];
|
|
7
|
+
/** Mars's series, on its own so that a page that needs one planet imports only it. */
|
|
8
|
+
export const VSOP_MARS = [[[[6.2034771158, 0.0, 0.0], [.1865636809, 5.050371, 3340.612427], [.0110821682, 5.400998, 6681.224853], [.0009179841, 5.754787, 10021.83728], [.0002774499, 5.970495, 3.523118], [.0001061024, 2.939586, 2281.230497], [.000123159, .849561, 2810.921462], [8.92678e-05, 4.156978, .017254], [8.71569e-05, 6.110052, 13362.449707], [6.79756e-05, .364622, 398.149003], [7.77487e-05, 3.339688, 5621.842923], [3.57508e-05, 1.661865, 2544.31442], [4.16111e-05, .22815, 2942.463423], [3.07525e-05, .856966, 191.448266], [2.62812e-05, .648061, 3337.089308], [2.93755e-05, 6.078937, .06731], [2.38941e-05, 5.038964, 796.298007], [2.57984e-05, .029967, 3344.135545], [1.52814e-05, 1.149793, 6151.533888], [1.79881e-05, .656341, 529.690965], [1.26436e-05, 3.622751, 5092.151958], [1.28623e-05, 3.067961, 2146.165416], [1.5464e-05, 2.915797, 1751.539531], [1.0249e-05, 3.693341, 8962.45535], [8.9157e-06, .182938, 16703.062133], [8.5876e-06, 2.400938, 2914.014236], [8.3272e-06, 2.464186, 3340.595173], [8.3272e-06, 4.494958, 3340.62968], [7.129e-06, 3.663355, 1059.38193], [7.4872e-06, 3.822486, 155.420399], [7.2386e-06, .674973, 3738.76143], [6.3555e-06, 2.921822, 8432.764385], [6.5516e-06, .488641, 3127.313331], [5.5047e-06, 3.81001, .980321], [5.5275e-06, 4.474793, 1748.016413], [4.2597e-06, .553643, 6283.07585], [4.1513e-06, .496623, 213.299095], [4.7217e-06, 3.625471, 1194.44701], [3.0655e-06, .380528, 6684.747972], [3.1214e-06, .998539, 6677.701735], [3.0238e-06, 4.48618, 3532.060693]], [[3340.6124270051, 0.0, 0.0], [.0145755452, 3.604337, 3340.612427], [.0016841471, 3.923186, 6681.224853], [.0002062298, 4.261088, 10021.83728], [3.45239e-05, 4.732104, 3.523118], [2.58633e-05, 4.606701, 13362.449707]], [[.0005815258, 2.049617, 3340.612427], [.0001345958, 2.457387, 6681.224853]]], [[[.0319713499, 3.76832, 3340.612427], [.0029803323, 4.10617, 6681.224853], [.0028910474, 0.0, 0.0], [.0003136554, 4.446511, 10021.83728], [3.4841e-05, 4.788125, 13362.449707], [4.43e-06, 5.65233, 3337.089308], [4.434e-06, 5.026426, 3344.135545], [3.9911e-06, 5.130568, 16703.062133]], [[.0021731099, 6.044722, 3340.612427], [.0002097695, 3.141593, 0.0], [.0001283471, 1.608107, 6681.224853], [3.32098e-05, 2.62947, 10021.83728]], [[8.88845e-05, 1.061961, 3340.612427]]], [[[1.5303348827, 0.0, 0.0], [.1418495316, 3.479713, 3340.612427], [.0066077636, 3.817834, 6681.224853], [.0004617912, 4.155953, 10021.83728], [8.10973e-05, 5.559584, 2810.921462], [7.48532e-05, 1.772391, 5621.842923], [5.52319e-05, 1.364363, 2281.230497], [3.82516e-05, 4.494072, 13362.449707], [2.30654e-05, .090816, 2544.31442], [1.9994e-05, 5.360596, 3337.089308], [2.48439e-05, 4.925456, 2942.463423], [1.96019e-05, 4.742494, 3344.135545], [1.16712e-05, 2.112609, 5092.151958], [1.10282e-05, 5.009084, 398.149003], [8.9907e-06, 4.407911, 529.690965], [9.9225e-06, 5.83862, 6151.533888], [8.0735e-06, 2.102171, 1059.38193], [7.9791e-06, 3.448392, 796.298007], [7.4097e-06, 1.499063, 2146.165416], [6.9234e-06, 2.133789, 8962.45535], [6.3314e-06, .893533, 3340.595173], [7.2558e-06, 1.245168, 8432.764385], [6.3314e-06, 2.924304, 3340.62968], [5.7436e-06, .828962, 2914.014236], [5.2617e-06, 5.38293, 3738.76143], [6.2998e-06, 1.287375, 1751.539531], [4.7277e-06, 5.198505, 3127.313331], [3.481e-06, 4.832192, 16703.062133]], [[.0110743334, 2.032505, 3340.612427], [.0010317589, 2.370718, 6681.224853], [.000128772, 0.0, 0.0], [.0001081588, 2.708881, 10021.83728]], [[.0004424225, .479306, 3340.612427], [8.13804e-05, .869984, 6681.224853]]]];
|
|
9
|
+
/** Jupiter's series, on its own so that a page that needs one planet imports only it. */
|
|
10
|
+
export const VSOP_JUPITER = [[[[.5995469149, 0.0, 0.0], [.0969589872, 5.061918, 529.690965], [.0057361014, 1.444062, 7.113547], [.0030638921, 5.417347, 1059.38193], [.000971783, 4.142647, 632.783739], [.0007290308, 3.640429, 522.577418], [.0006426398, 3.411452, 103.092774], [.0003980606, 2.293767, 419.484644], [.0003885777, 1.272318, 316.39187], [.0002796463, 1.784546, 536.804512], [.0001358973, 5.77481, 1589.072895], [8.24635e-05, 3.582279, 206.185548], [8.7687e-05, 3.630003, 949.175609], [7.36804e-05, 5.081012, 735.876514], [6.26315e-05, .024976, 213.299095], [6.11406e-05, 4.5132, 1162.474704], [4.9054e-05, 1.320845, 110.206321], [5.30528e-05, 1.306712, 14.227094], [5.30544e-05, 4.186256, 1052.268383], [4.64725e-05, 4.699581, 3.932153], [3.04502e-05, 4.316764, 426.598191], [2.61e-05, 1.566674, 846.082835], [2.02819e-05, 1.063765, 3.181394], [1.76476e-05, 2.141487, 1066.495477], [1.72297e-05, 3.880363, 1265.567479], [1.92094e-05, .971682, 639.897286], [1.63322e-05, 3.582018, 515.463871], [1.432e-05, 4.296856, 625.670192], [9.7327e-06, 4.097645, 95.979227], [8.8446e-06, 2.437002, 412.371097], [7.3285e-06, 6.085351, 838.969288], [7.3109e-06, 3.805923, 1581.959348], [6.9197e-06, 6.133653, 2118.76386], [7.0917e-06, 1.292748, 742.990061], [6.1448e-06, 4.108506, 1478.866574], [4.9522e-06, 3.755641, 323.505417], [5.819e-06, 4.539696, 309.278323], [3.7566e-06, 4.703043, 1368.660253], [3.8988e-06, 4.897068, 1692.16567], [3.4102e-06, 5.714524, 533.623118], [3.3046e-06, 4.740498, .048184], [4.4085e-06, 2.958186, 454.909367], [4.1727e-06, 1.035544, 2.447681]], [[529.6909650881, 0.0, 0.0], [.0048950324, 4.220829, 529.690965], [.0022891722, 6.026469, 7.113547], [.0003009948, 4.545408, 1059.38193], [.0002072092, 5.459432, 522.577418], [.0001210365, .169948, 536.804512], [6.06799e-05, 4.424223, 103.092774], [5.43397e-05, 3.984807, 419.484644], [4.23774e-05, 5.890087, 14.227094], [2.21197e-05, 5.267667, 206.185548], [1.9835e-05, 4.886007, 1589.072895], [1.29577e-05, 5.551328, 3.181394]], [[.000472336, 4.321485, 7.113547], [.0003064944, 2.929778, 529.690965], [.000148376, 3.141593, 0.0]]], [[[.022686157, 3.558526, 529.690965], [.0010997163, 3.908093, 1059.38193], [.0011009036, 0.0, 0.0], [8.10143e-05, 3.605096, 522.577418], [6.044e-05, 4.258831, 1589.072895], [6.43778e-05, .306271, 536.804512], [1.10688e-05, 2.985344, 1162.474704], [9.4165e-06, 2.936191, 1052.268383], [8.9409e-06, 1.754474, 7.113547], [7.6728e-06, 2.154736, 632.783739], [9.4433e-06, 1.675223, 426.598191], [6.8422e-06, 3.678088, 213.299095], [6.2922e-06, .643433, 1066.495477], [8.3586e-06, 5.17882, 103.092774], [5.3167e-06, 2.703059, 110.206321], [5.5852e-06, .013548, 846.082835], [4.6445e-06, 1.173373, 949.175609], [4.3107e-06, 2.60825, 419.484644], [3.5143e-06, 4.61063, 2118.76386]], [[.0007820345, 1.523779, 529.690965], [7.7899e-05, 2.597341, 1059.38193], [2.7886e-05, 4.856227, 536.804512], [2.42973e-05, 5.459473, 522.577418], [1.98578e-05, 0.0, 0.0]], [[5.49832e-05, 3.015963, 529.690965]]], [[[5.2088742933, 0.0, 0.0], [.2520932712, 3.491086, 529.690965], [.0061059998, 3.841154, 1059.38193], [.0028202946, 2.574199, 632.783739], [.0018764735, 2.075904, 522.577418], [.0008679291, .710011, 419.484644], [.0007206297, .214657, 536.804512], [.0006551725, 5.979959, 316.39187], [.0002913454, 1.677594, 103.092774], [.0003013533, 2.16132, 949.175609], [.0002345327, 3.540235, 735.876514], [.0002228374, 4.193626, 1589.072895], [.000239473, .27458, 7.113547], [.0001303261, 2.96043, 1162.474704], [9.70336e-05, 1.906696, 206.185548], [.0001274902, 2.715503, 1052.268383], [9.16139e-05, 4.41353, 213.299095], [7.89451e-05, 2.479076, 426.598191], [7.05793e-05, 2.181848, 1265.567479], [6.1377e-05, 6.264182, 846.082835], [5.477e-05, 5.6573, 639.897286], [3.50249e-05, .565324, 1066.495477], [4.13682e-05, 2.722209, 625.670192], [4.16995e-05, 2.016038, 515.463871], [2.49997e-05, 4.551817, 838.969288], [2.61698e-05, 2.00994, 1581.959348], [1.91201e-05, .856211, 412.371097], [2.12768e-05, 6.127552, 742.990061], [1.61057e-05, 3.088715, 1368.660253], [1.47951e-05, 2.680213, 1478.866574], [1.23063e-05, 1.89052, 323.505417], [1.21689e-05, 1.801763, 110.206321], [9.6111e-06, 4.54877, 2118.76386], [8.8576e-06, 4.147839, 533.623118], [7.7658e-06, 3.677108, 728.762967], [9.9859e-06, 2.872054, 309.278323], [1.01473e-05, 1.386758, 454.909367], [7.2716e-06, 3.988273, 1155.361157], [6.5533e-06, 2.790726, 1685.052123], [8.2138e-06, 1.593515, 1898.351218], [6.2082e-06, 4.822752, 956.289156], [6.5407e-06, 3.381407, 1692.16567], [8.1199e-06, 5.940934, 909.818733], [5.6209e-06, .081149, 543.918059], [5.4222e-06, .283572, 525.758812], [4.5784e-06, .127205, 1375.7738], [6.1474e-06, 2.276337, 942.062062], [4.3582e-06, 2.602793, 95.979227], [4.9601e-06, 5.530202, 380.127768], [4.6997e-06, 2.818838, 1795.258444], [4.4506e-06, .146486, 14.227094], [3.3815e-06, 2.798871, 1045.154836], [3.1904e-06, 1.348186, 2214.743088], [3.093e-06, 5.368394, 1272.681026], [3.458e-06, 1.56405, 491.557929], [3.0336e-06, 1.154075, 5753.384885]], [[.0127180152, 2.649375, 529.690965], [.0006166182, 3.000765, 1059.38193], [.0005344371, 3.897174, 522.577418], [.0003118517, 4.88277, 536.804512], [.0004139027, 0.0, 0.0], [.0001184726, 2.413288, 419.484644], [9.16645e-05, 4.759786, 7.113547], [3.1756e-05, 2.792984, 103.092774], [3.20348e-05, 5.210841, 735.876514], [3.40358e-05, 3.346896, 1589.072895], [2.59993e-05, 3.634391, 206.185548], [2.41213e-05, 1.469483, 426.598191], [2.80607e-05, 3.74227, 515.463871], [2.67661e-05, 4.330517, 1052.268383], [2.10039e-05, 3.927728, 639.897286], [1.64616e-05, 5.309476, 1066.495477], [1.64109e-05, 4.416285, 625.670192]], [[.0007964496, 1.358659, 529.690965], [8.25164e-05, 5.777745, 522.577418], [7.02994e-05, 3.274774, 536.804512], [5.31403e-05, 1.83835, 1059.38193]]]];
|
|
11
|
+
/** Saturn's series, on its own so that a page that needs one planet imports only it. */
|
|
12
|
+
export const VSOP_SATURN = [[[[.8740135402, 0.0, 0.0], [.1110765976, 3.962051, 213.299095], [.0141415096, 4.585815, 7.113547], [.0039837939, .52112, 206.185548], [.0035076924, 3.303299, 426.598191], [.002068163, .246584, 103.092774], [.000792713, 3.840071, 220.412642], [.0002399035, 4.669769, 110.206321], [.0001657359, .437192, 419.484644], [.0001490699, 5.769032, 316.39187], [.0001582029, .938092, 632.783739], [.0001460956, 1.565185, 3.932153], [.000131603, 4.448913, 14.227094], [.0001505354, 2.716699, 639.897286], [.000130053, 5.98119, 11.0457], [.0001072507, 3.129395, 202.253395], [5.86321e-05, .236569, 529.690965], [5.22776e-05, 4.207834, 3.181394], [6.12632e-05, 1.763287, 277.034994], [5.01969e-05, 3.177877, 433.711738], [4.59255e-05, .619777, 199.072001], [4.00587e-05, 2.244797, 63.735898], [2.9538e-05, .982804, 95.979227], [3.87367e-05, 3.222832, 138.517497], [2.46119e-05, 2.031639, 735.876514], [3.26948e-05, .774926, 949.175609], [1.75815e-05, 3.265801, 522.577418], [1.64017e-05, 5.505045, 846.082835], [1.39133e-05, 4.023332, 323.505417], [1.58065e-05, 4.372653, 309.278323], [1.1235e-05, 2.837268, 415.552491], [1.01728e-05, 3.717001, 227.526189], [8.4864e-06, 3.191502, 209.366942], [1.08723e-05, 4.183433, 2.447681], [9.5676e-06, .507443, 1265.567479], [7.8921e-06, 5.007451, .963208], [6.87e-06, 1.747142, 1052.268383], [6.5448e-06, 1.598893, .048184], [7.4882e-06, 2.143968, 853.196382], [6.3398e-06, 2.298874, 412.371097], [7.436e-06, 5.252777, 224.344796], [8.5268e-06, 3.421413, 175.16606], [5.7984e-06, 3.092548, 74.781599], [6.2488e-06, .970481, 210.117702], [5.2987e-06, 4.44939, 117.319868], [5.4265e-06, 1.51825, 9.561228], [4.7428e-06, 5.475265, 742.990061], [4.4855e-06, 1.289914, 127.471797], [5.4636e-06, 2.126779, 350.33212], [4.7804e-06, 2.964867, 137.033024], [3.5499e-06, 3.012802, 838.969288], [4.5186e-06, 1.044373, 490.334089], [3.4742e-06, 1.539233, 340.770892], [3.4348e-06, .246038, .521265], [3.0903e-06, 3.49491, 216.480489], [3.2219e-06, .961365, 203.737868], [3.7232e-06, 2.278229, 217.231249], [3.2156e-06, 2.571852, 647.010833], [3.302e-06, .247217, 1581.959348]], [[213.2990952169, 0.0, 0.0], [.0129737086, 1.828349, 213.299095], [.0056434539, 2.884997, 7.113547], [.0009373437, 1.063118, 426.598191], [.0010767496, 2.277691, 206.185548], [.0004024445, 2.041081, 220.412642], [.0001994177, 1.279544, 103.092774], [.0001051168, 2.748803, 14.227094], [6.41611e-05, .382383, 639.897286], [4.84899e-05, 2.430376, 419.484644], [4.05689e-05, 2.921332, 110.206321], [3.76864e-05, 3.649653, 3.932153], [3.38469e-05, 2.416945, 3.181394], [3.23169e-05, 1.2615, 433.711738], [3.07141e-05, 2.327395, 199.072001], [1.95318e-05, 3.563781, 11.0457], [1.24947e-05, 2.628108, 95.979227]], [[.0011644133, 1.179881, 7.113547], [.0009184184, .073252, 213.299095], [.0003666173, 0.0, 0.0], [.000152745, 4.064932, 206.185548], [.0001098726, 5.444792, 426.598191], [.0001062983, .257643, 220.412642]]], [[[.0433067804, 3.602844, 213.299095], [.002403483, 2.852385, 426.598191], [.0008474594, 0.0, 0.0], [.0003086336, 3.484415, 220.412642], [.0003411606, .572973, 206.185548], [.0001473407, 2.118466, 639.897286], [9.91667e-05, 5.790032, 419.484644], [6.99356e-05, 4.736047, 7.113547], [4.80759e-05, 5.433053, 316.39187], [4.78839e-05, 4.965129, 110.206321], [3.43213e-05, 2.732557, 433.711738], [1.50613e-05, 6.013045, 103.092774], [1.0603e-05, 5.630993, 529.690965], [9.6907e-06, 5.20435, 632.783739], [9.4205e-06, 1.396467, 853.196382], [7.0764e-06, 3.803023, 323.505417], [5.5231e-06, 5.131491, 202.253395], [3.9967e-06, 3.358914, 227.526189], [3.1606e-06, 1.997167, 647.010833], [3.1938e-06, 3.625717, 209.366942], [3.1422e-06, .465102, 217.231249]], [[.0019892799, 4.93901, 213.299095], [.0003694792, 3.141593, 0.0], [.0001796699, .519794, 426.598191], [.0001091972, 1.794633, 220.412642], [.0001332026, 2.264815, 206.185548], [3.24343e-05, 1.21094, 419.484644], [2.90052e-05, 6.170335, 639.897286], [1.58471e-05, .934164, 433.711738], [1.58067e-05, 3.081717, 7.113547]], [[.0001388426, .08995, 213.299095]]], [[[9.5575813549, 0.0, 0.0], [.5292138286, 2.392262, 213.299095], [.0187367987, 5.235496, 206.185548], [.0146466393, 1.64763, 426.598191], [.0082189114, 5.9352, 316.39187], [.0054750692, 5.015326, 103.092774], [.0037168465, 2.271148, 220.412642], [.0036177876, 3.139043, 7.113547], [.0014061751, 5.704066, 632.783739], [.0010897485, 3.293134, 110.206321], [.0006900696, 5.940995, 419.484644], [.0006105337, .940377, 639.897286], [.0004891329, 1.557336, 202.253395], [.0003414377, .195191, 277.034994], [.0003240177, 5.470846, 949.175609], [.000209366, .463493, 735.876514], [.000208393, 1.521025, 433.711738], [.0002074675, 5.332555, 199.072001], [.000152984, 3.059438, 529.690965], [.0001429648, 2.604335, 323.505417], [.0001199334, 5.98051, 846.082835], [.0001138026, 1.731054, 522.577418], [.0001288462, 1.648907, 138.517497], [7.75266e-05, 5.851907, 95.979227], [9.796e-05, 5.204775, 1265.567479], [6.46582e-05, .177322, 1052.268383], [6.77061e-05, 3.004323, 14.227094], [5.85046e-05, 1.455201, 415.552491], [5.30742e-05, .597422, 63.735898], [4.69549e-05, 2.149139, 227.526189], [4.04405e-05, 1.640066, 209.366942], [3.68824e-05, .780173, 412.371097], [3.37658e-05, 3.695268, 224.344796], [2.88543e-05, 1.387645, 838.969288], [2.97595e-05, 5.684691, 210.117702], [3.41962e-05, 4.945505, 1581.959348], [3.46094e-05, 1.850887, 175.16606], [3.4007e-05, .553853, 350.33212], [2.50766e-05, 3.538548, 742.990061], [2.44826e-05, 6.18411, 1368.660253], [2.40613e-05, 2.965571, 117.319868], [2.8811e-05, .179625, 853.196382], [2.17393e-05, .015043, 340.770892], [2.02475e-05, 5.054044, 11.0457], [1.74028e-05, 2.346586, 309.278323], [1.86149e-05, 5.933698, 625.670192], [1.88837e-05, .029657, 3.932153], [1.61096e-05, 1.172946, 74.781599], [1.46265e-05, 1.925921, 216.480489], [1.47467e-05, 5.676705, 203.737868], [1.39512e-05, 5.936814, 127.471797], [1.78107e-05, .763211, 217.231249], [1.81717e-05, 5.77721, 490.334089], [1.47265e-05, 1.400744, 137.033024], [1.30424e-05, .772422, 647.010833], [1.14963e-05, 5.740185, 1162.474704], [1.12666e-05, 4.466955, 265.989293], [1.27762e-05, 2.984164, 1059.38193], [1.20707e-05, .753042, 351.816592], [1.07137e-05, 1.135594, 1155.361157], [1.02084e-05, 5.912164, 1685.052123], [1.31485e-05, 5.112113, 211.814623], [1.29545e-05, 4.691818, 1898.351218], [1.09907e-05, 1.817727, 149.563197], [9.987e-06, 2.631536, 200.768922], [9.8589e-06, 2.259946, 956.289156], [9.325e-06, 3.669765, 554.069987], [6.6438e-06, .602938, 728.762967], [6.5977e-06, 4.666266, 195.139848], [6.1773e-06, 5.620795, 942.062062], [6.2632e-06, 5.942238, 1478.866574], [4.8232e-06, 1.840485, 479.288389], [4.8802e-06, 2.793701, 3.181394], [4.6998e-06, .838525, 1471.753027], [4.5179e-06, 5.645114, 2001.443992], [5.5312e-06, 3.411132, 269.921447], [5.3442e-06, 1.264483, 275.550521], [4.7246e-06, 1.881976, 515.463871], [4.0556e-06, 1.639894, 536.804512], [5.1698e-06, 4.443017, 2214.743088], [4.5303e-06, 3.003559, 302.164776], [4.9436e-06, 2.286318, 278.519466], [4.8996e-06, 5.806278, 191.207695], [4.2744e-06, .057286, 284.148541], [3.3968e-06, 1.401933, 440.825285], [3.4067e-06, .890951, 628.851586], [3.8594e-06, 1.997113, 1272.681026], [3.4278e-06, 5.855873, 1795.258444], [3.4138e-06, 2.376198, 525.498179], [3.0338e-06, .879512, 6069.776755]], [[.0618298134, .258435, 213.299095], [.0050657724, .711146, 206.185548], [.0034139403, 5.796357, 426.598191], [.001884912, .472156, 220.412642], [.0018626149, 3.141593, 0.0], [.0014389115, 1.407448, 7.113547], [.0004962121, 6.017443, 103.092774], [.0002092843, 5.092449, 639.897286], [.0001995256, 1.175606, 419.484644], [.0001883954, 1.608183, 110.206321], [.0001289284, 5.943294, 433.711738], [.0001387685, .758849, 199.072001], [5.39684e-05, 1.288536, 14.227094], [4.86929e-05, .867972, 323.505417], [4.24722e-05, .39295, 227.526189], [3.25233e-05, 1.258502, 95.979227], [2.85607e-05, 2.167313, 735.876514], [2.90954e-05, 4.606807, 202.253395], [3.08141e-05, 3.436625, 522.577418], [1.98773e-05, 2.450538, 412.371097], [1.94144e-05, 6.023923, 209.366942], [1.58178e-05, 1.291891, 210.117702], [1.33952e-05, 4.308125, 853.196382], [1.31546e-05, 1.252956, 117.319868], [1.20287e-05, 1.866619, 316.39187]], [[.0043690257, 4.786717, 213.299095], [.000719225, 2.500701, 206.185548], [.0004976687, 4.971678, 220.412642], [.0004322078, 3.86941, 426.598191], [.0002964577, 5.963099, 7.113547]], [[.0002031524, 3.021861, 213.299095]]]];
|
|
13
|
+
/** Uranus's series, on its own so that a page that needs one planet imports only it. */
|
|
14
|
+
export const VSOP_URANUS = [[[[5.481292943, 0.0, 0.0], [.0926040823, .891064, 74.781599], [.015042479, 3.627193, 1.484473], [.0036598167, 1.899622, 73.297126], [.0027232817, 3.358237, 149.563197], [.0007032846, 5.392545, 63.735898], [.0006889268, 6.092925, 76.266071], [.0006199862, 2.269521, 2.968945], [.0006195072, 2.850989, 11.0457], [.0002646877, 3.141521, 71.812653], [.0002571048, 6.113798, 454.909367], [.0002107885, 4.360593, 148.078724], [.0001781865, 1.744369, 36.648563], [.0001461351, 4.737322, 3.932153], [.0001116251, 5.826818, 224.344796], [.0001099791, .48865, 138.517497], [9.52748e-05, 2.955169, 35.16409], [7.5456e-05, 5.236266, 109.945689], [4.22024e-05, 3.233282, 70.849445], [4.0519e-05, 2.27755, 151.04767], [3.3546e-05, 1.06549, 4.453418], [2.92672e-05, 4.629037, 9.561228], [3.49034e-05, 5.483061, 146.594252], [3.14407e-05, 4.751996, 77.750544], [2.92233e-05, 5.352354, 85.827299], [2.27279e-05, 4.366004, 70.32818], [2.05122e-05, 1.517736, .111875], [2.1486e-05, .607459, 38.133036], [1.99164e-05, 4.924376, 277.034994], [1.37623e-05, 2.042835, 65.220371], [1.6669e-05, 3.627441, 380.127768], [1.28411e-05, 3.11348, 202.253395], [1.15043e-05, .933436, 3.181394], [1.53322e-05, 2.585947, 52.690198], [1.2816e-05, .542713, 222.860323], [1.37214e-05, 4.196415, 111.430161], [1.22103e-05, .199007, 108.461216], [9.4618e-06, 1.192532, 127.471797], [1.15099e-05, 4.178989, 33.679618], [1.24435e-05, .916144, 2.447681], [1.07201e-05, .23566, 62.251426], [1.09046e-05, 1.775015, 12.530173], [7.0794e-06, 5.182917, 213.299095], [6.5338e-06, .965879, 78.713752], [6.2757e-06, .18209, 984.600332], [5.2449e-06, 2.012754, 299.126394], [5.594e-06, 3.357686, .521265], [6.0685e-06, 5.432099, 529.690965], [4.049e-06, 5.986905, 8.076755], [4.6718e-06, .414825, 145.109779], [4.7131e-06, 1.406616, 184.727287], [4.8323e-06, 2.105532, .963208], [3.9557e-06, 5.870379, 351.816592], [4.3353e-06, 5.52141, 183.242815], [3.0984e-06, 5.833019, 145.631044], [3.7864e-06, 2.349894, 56.622351], [3.9903e-06, .337965, 415.552491], [3.0039e-06, 5.643552, 22.091401]], [[74.7815986091, 0.0, 0.0], [.0015433286, 5.241588, 74.781599], [.0002445647, 1.712603, 1.484473], [9.25844e-05, .428297, 11.0457], [8.26598e-05, 1.502181, 63.735898], [9.15016e-05, 1.412138, 149.563197], [3.89911e-05, .464836, 3.932153], [2.27706e-05, 4.171992, 76.266071], [1.92747e-05, .529762, 2.968945], [1.23272e-05, 1.586321, 70.849445]]], [[[.0134627765, 2.618778, 74.781599], [.000623414, 5.081112, 149.563197], [.000616012, 3.141593, 0.0], [9.96372e-05, 1.616038, 76.266071], [9.92616e-05, .576304, 73.297126], [3.25947e-05, 1.261193, 224.344796], [2.9723e-05, 2.243672, 1.484473], [2.01027e-05, 6.055509, 148.078724], [1.52216e-05, .279596, 63.735898], [9.2406e-06, 4.038225, 151.04767], [7.6064e-06, 6.139994, 71.812653], [4.2027e-06, 5.212801, 11.0457], [4.3066e-06, 3.554439, 213.299095], [4.3685e-06, 3.380811, 529.690965], [5.2231e-06, 3.320864, 138.517497], [4.3463e-06, .340632, 77.750544], [4.6263e-06, .742567, 85.827299]], [[.0003410198, .013219, 74.781599], [2.48011e-05, 2.739614, 149.563197], [1.71938e-05, 0.0, 0.0]]], [[[19.2126484721, 0.0, 0.0], [.8878498441, 5.603775, 74.781599], [.0344083606, .328361, 73.297126], [.0205565386, 1.782952, 149.563197], [.0064932241, 4.522473, 76.266071], [.0060224787, 3.860038, 63.735898], [.0049640417, 1.401399, 454.909367], [.0033852537, 1.580028, 138.517497], [.0024350911, 1.570866, 71.812653], [.001905223, 1.998094, 1.484473], [.0016185884, 2.791378, 148.078724], [.0014370618, 1.383685, 11.0457], [.0009319241, .174372, 36.648563], [.0007142455, 4.245092, 224.344796], [.0008980601, 3.661054, 109.945689], [.0003900972, 1.669714, 70.849445], [.000466773, 1.399764, 35.16409], [.0003902562, 3.362348, 277.034994], [.0003675527, 3.886493, 146.594252], [.0003034872, .701008, 151.04767], [.0002915641, 3.180563, 77.750544], [.0002047159, 1.55588, 202.253395], [.0002562076, 5.256561, 380.127768], [.0002578588, 3.785377, 85.827299], [.0002263707, .725187, 529.690965], [.0002047353, 2.796402, 70.32818], [.000179013, .554551, 2.968945], [.0001232811, 5.960373, 127.471797], [.0001470167, 4.904345, 108.461216], [.0001149468, .43772, 65.220371], [.0001550237, 5.354054, 38.133036], [.000107925, 1.421063, 213.299095], [.0001169569, 3.298242, 3.932153], [.0001195908, 1.750434, 984.600332], [.0001289645, 2.621541, 111.430161], [.0001185296, .993442, 52.690198], [9.11162e-05, 4.996336, 62.251426], [8.42079e-05, 5.253514, 222.860323], [7.44899e-05, .794955, 351.816592], [8.40238e-05, 5.038765, 415.552491], [6.04622e-05, 5.679586, 78.713752], [5.52441e-05, 3.114933, 9.561228], [7.3293e-05, 3.972766, 183.242815], [5.44457e-05, 5.105748, 145.109779], [5.2382e-05, 2.629605, 33.679618], [4.07952e-05, 3.220641, 340.770892], [3.80165e-05, 6.109827, 184.727287], [3.91873e-05, 4.250177, 39.617508], [2.94076e-05, 2.146497, 137.033024], [3.7812e-05, 3.458404, 456.393839], [2.94222e-05, .423928, 299.126394], [3.68632e-05, 2.48726, 453.424894], [3.1015e-05, 4.140286, 219.891378], [2.96264e-05, .829819, 56.622351], [2.93758e-05, 3.676522, 140.00197], [2.86479e-05, .30999, 12.530173], [2.53811e-05, 4.854432, 131.40395], [1.96279e-05, 5.243268, 84.342826], [2.36372e-05, .442447, 554.069987], [1.97841e-05, 6.12839, 106.976743], [2.1826e-05, 2.940425, 305.346169], [1.96325e-05, .041146, 221.37585], [1.82978e-05, 4.011052, 68.843708], [1.64292e-05, .355581, 67.668052], [1.58488e-05, 3.162658, 225.829268], [1.84802e-05, 2.911163, 909.818733], [1.63226e-05, 4.230386, 22.091401], [1.4022e-05, 1.391067, 265.989293], [1.40402e-05, 5.635679, 4.453418], [1.65649e-05, 1.964365, 79.235017], [1.24848e-05, 5.440086, 54.174671], [1.5634e-05, 1.479195, 112.914634], [1.24851e-05, 4.889645, 479.288389], [1.19765e-05, 2.521525, 145.631044], [1.50694e-05, 5.241854, 181.758342], [1.48195e-05, 5.662014, 152.532143], [1.43912e-05, 1.530477, 447.79582], [1.40887e-05, 4.419212, 462.022914], [1.477e-05, 4.321732, 256.539941], [1.22823e-05, 5.976978, 59.803745], [1.24989e-05, 6.244805, 160.608897], [9.0652e-06, 5.620131, 74.669724], [1.09069e-05, 4.153943, 77.962992], [8.4483e-06, .129661, 82.858353], [9.0058e-06, 2.373031, 74.893473], [1.07165e-05, 1.742982, 528.206492], [6.8952e-06, 3.080879, 69.364973], [5.9401e-06, 4.500317, 8.076755], [7.1864e-06, 4.000287, 128.956269], [6.9987e-06, .0399, 143.625306], [5.7567e-06, 5.89554, 66.704844], [7.5868e-06, 2.136938, 692.587484], [7.1027e-06, 5.416052, 218.406905], [5.4866e-06, 5.628118, 3.181394], [6.5176e-06, 4.423171, 18.159247], [5.3973e-06, 6.207798, 71.600205], [5.449e-06, 5.694095, 203.737868], [7.1025e-06, 4.219675, 381.612241], [5.9403e-06, 3.837942, 32.195145], [7.099e-06, 4.489627, 293.188503], [7.057e-06, .455185, 835.037134], [5.8785e-06, 5.082682, 186.21176], [5.9819e-06, .357925, 269.921447], [6.4215e-06, 2.710908, 87.311772], [4.9564e-06, 2.651117, 200.768922], [6.3017e-06, 4.461536, 275.550521], [5.7495e-06, 5.578773, 2.447681], [5.6962e-06, 1.639246, 77.229279], [5.5667e-06, 1.072319, 1059.38193], [4.4936e-06, .279882, 617.805886], [4.637e-06, 1.434508, 297.641922], [4.3654e-06, .527839, 209.366942], [4.6392e-06, 2.355197, 211.814623], [4.3594e-06, 2.100772, 1514.291297], [5.1553e-06, 3.232742, 284.148541], [4.55e-06, 4.08342, 99.160621], [4.7725e-06, 2.893817, 39.356876], [5.4269e-06, 5.394573, 278.519466], [4.099e-06, 3.049619, 404.50679], [3.6839e-06, .710795, 125.987324], [5.0318e-06, 5.839155, 191.207695], [4.874e-06, .064243, 60.766953], [4.5503e-06, 2.59321, 490.334089], [4.3635e-06, 2.081294, 51.205725], [4.3576e-06, 2.794444, 75.744806], [3.2348e-06, 4.829392, 195.139848], [3.5934e-06, .008704, 35.424723], [4.2908e-06, 3.080578, 41.101981], [3.1999e-06, 5.48622, 14.977854], [4.1396e-06, .088226, 258.024413], [3.7973e-06, .058345, 378.643295], [4.2021e-06, 2.253923, 81.001374], [3.5753e-06, 4.714083, 173.94222], [3.5894e-06, .352695, 426.598191], [4.0537e-06, 6.12345, 24.379022], [3.6509e-06, 5.594719, 255.055468], [3.0816e-06, 3.923166, 116.426096], [3.2555e-06, 4.719733, 134.585344], [3.8641e-06, .686292, 230.564571], [3.0558e-06, 3.761315, 344.703045], [3.5335e-06, 4.657207, 329.837066], [3.0184e-06, .131736, 565.115688], [3.0535e-06, 2.555347, 6208.294251]], [[.0147989663, 3.672057, 74.781599], [.0007121214, 6.22601, 63.735898], [.0006862716, 6.134112, 149.563197], [.0002085755, 5.246258, 11.0457], [.0002146836, 2.601757, 76.266071], [.0002405937, 3.141593, 0.0], [.0001140506, .018497, 70.849445], [7.4968e-05, .423614, 73.297126], [4.24361e-05, 1.416911, 85.827299], [3.50595e-05, 2.583481, 138.517497], [3.2288e-05, 5.254956, 3.932153], [3.92683e-05, 3.155263, 71.812653], [3.0599e-05, .153238, 1.484473], [3.57825e-05, 2.311579, 224.344796], [2.56424e-05, .980785, 148.078724], [2.42919e-05, 3.994507, 52.690198], [1.64483e-05, 2.653104, 127.471797], [1.58357e-05, 1.430495, 78.713752], [1.41338e-05, 4.574616, 202.253395], [1.48972e-05, 2.675684, 56.622351], [1.40328e-05, 1.369862, 77.750544], [1.22789e-05, 1.046994, 62.251426], [1.50784e-05, 5.060192, 151.04767]], [[.000224399, .699533, 74.781599]]]];
|
|
15
|
+
/** Neptune's series, on its own so that a page that needs one planet imports only it. */
|
|
16
|
+
export const VSOP_NEPTUNE = [[[[5.3118863305, 0.0, 0.0], [.0179847553, 2.901013, 38.133036], [.0101972765, .485809, 1.484473], [.0012453184, 4.830081, 36.648563], [.0004206447, 5.41055, 2.968945], [.0003771458, 6.092218, 35.16409], [.0003378474, 1.244889, 76.266071], [.0001648274, 7.7e-05, 491.557929], [9.19858e-05, 4.937471, 39.617508], [8.99425e-05, .274622, 175.16606], [4.21624e-05, 1.987119, 73.297126], [3.36481e-05, 1.035901, 33.679618], [2.2848e-05, 4.206069, 4.453418], [1.43352e-05, 2.783398, 74.781599], [9.0024e-06, 2.076072, 109.945689], [7.45e-06, 3.190325, 71.812653], [5.0622e-06, 5.747861, 114.399107], [3.9955e-06, .349723, 1021.248895], [3.4519e-06, 3.461853, 41.101981], [3.0634e-06, .496841, .521265], [3.23e-06, 2.248149, 32.195145], [3.403e-06, 3.303762, 77.750544]], [[38.1330356396, 0.0, 0.0], [.0001660417, 4.863233, 1.484473], [.0001574405, 2.278874, 38.133036], [1.30626e-05, 3.672852, 2.968945]]], [[[.0308862293, 1.441044, 38.133036], [.0002778009, 5.912719, 76.266071], [.0002762361, 0.0, 0.0], [.0001535549, 2.521238, 36.648563], [.0001544813, 3.508771, 39.617508], [1.99992e-05, 1.509987, 74.781599], [1.96754e-05, 4.377782, 1.484473], [1.01514e-05, 3.21561, 35.16409], [6.0577e-06, 2.802466, 73.297126], [5.9488e-06, 2.128927, 41.101981], [5.8881e-06, 3.186559, 2.968945], [4.0183e-06, 4.168834, 114.399107]], [[5.1509e-05, 2.142705, 38.133036]]], [[[30.0701320583, 0.0, 0.0], [.2706225963, 1.329995, 38.133036], [.0169176401, 3.251861, 36.648563], [.0080783055, 5.185929, 1.484473], [.0053776051, 4.521139, 35.16409], [.0049572514, 1.571056, 491.557929], [.0027457197, 1.845523, 175.16606], [.0013513409, 3.372206, 39.617508], [.0012180175, 5.797545, 76.266071], [.0010089607, .377027, 73.297126], [.0006979133, 3.796166, 2.968945], [.0004668784, 5.74938, 33.679618], [.0002459453, .508017, 109.945689], [.0001693948, 1.594225, 71.812653], [.0001422981, 1.077859, 74.781599], [.0001201232, 1.920594, 1021.248895], [8.39435e-05, .678182, 146.594252], [7.5718e-05, 1.071492, 388.465155], [5.72087e-05, 2.590617, 4.453418], [4.84021e-05, 1.90681, 41.101981], [4.48349e-05, 2.905735, 529.690965], [4.2696e-05, 3.413335, 453.424894], [4.35359e-05, .679849, 32.195145], [4.42055e-05, 1.749907, 108.461216], [2.87976e-05, 1.986272, 137.033024], [2.63553e-05, 3.09756, 213.299095], [3.38111e-05, .84811, 183.242815], [2.87751e-05, 3.674172, 350.33212], [2.30651e-05, 2.809646, 70.32818], [2.52994e-05, 5.798223, 490.073457], [2.52287e-05, .486121, 493.042402], [2.08593e-05, .618539, 33.94025], [1.97652e-05, 5.11703, 168.052513], [1.90405e-05, 1.721659, 182.279607], [1.65353e-05, 1.92782, 145.109779], [1.43451e-05, 1.699859, 484.444382], [1.40303e-05, 4.589142, 498.671476], [1.49999e-05, 1.016199, 219.891378], [1.39798e-05, .761998, 176.650533], [1.40276e-05, 6.076591, 173.681587], [1.12828e-05, 5.966665, 9.561228], [1.22806e-05, 1.599159, 77.750544], [8.3556e-06, 3.970505, 114.399107], [8.1141e-06, 3.002641, 46.20979], [7.3154e-06, 2.104458, 181.758342], [6.1562e-06, 2.978679, 106.976743], [7.0345e-06, 1.187482, 256.539941], [5.0196e-06, 1.386547, 5.937891], [5.3048e-06, 4.241122, 111.430161], [4.371e-06, 2.270292, 1550.93986], [3.9991e-06, 1.256123, 8.076755], [4.2099e-06, 1.892482, 30.710672], [3.8246e-06, 3.299641, 983.115859], [4.2289e-06, 5.530996, 525.498179], [3.5506e-06, 2.278731, 218.406905], [3.145e-06, 3.959329, 381.351608], [3.3326e-06, 5.750149, 39.096243], [3.2143e-06, 1.506243, 454.909367], [3.092e-06, 2.854513, 72.073286], [3.4554e-06, 1.358019, 293.188503], [3.0736e-06, .3194, 601.764251], [3.06e-06, 2.724751, 6244.942814]], [[.0023633862, .70498, 38.133036], [.0001322003, 3.320144, 1.484473], [8.62178e-05, 6.216269, 35.16409], [2.70159e-05, 1.88125, 39.617508], [2.15306e-05, 5.16877, 76.266071], [2.15417e-05, 2.094303, 2.968945], [1.46331e-05, 1.184102, 33.679618], [1.60316e-05, 0.0, 0.0]]]];
|
|
17
|
+
/** Every planet's series by name. */
|
|
18
|
+
export const VSOP87 = {
|
|
19
|
+
mercury: VSOP_MERCURY,
|
|
20
|
+
venus: VSOP_VENUS,
|
|
21
|
+
earth: VSOP_EARTH,
|
|
22
|
+
mars: VSOP_MARS,
|
|
23
|
+
jupiter: VSOP_JUPITER,
|
|
24
|
+
saturn: VSOP_SATURN,
|
|
25
|
+
uranus: VSOP_URANUS,
|
|
26
|
+
neptune: VSOP_NEPTUNE,
|
|
27
|
+
};
|
package/dist/element.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SharedRenderer } from "@johnmorrisdotca/kazoku-ui/renderer";
|
|
2
|
+
import "./tables/all.ts";
|
|
2
3
|
import { type BodyId, type Look } from "./facts.ts";
|
|
3
4
|
import { type ThreeParts } from "./scene/body.ts";
|
|
4
5
|
import { setThreeLoader } from "./scene/shared.ts";
|
|
@@ -25,7 +26,7 @@ export type WakuseiState = "line" | "loading" | "still" | "live" | "lost" | "una
|
|
|
25
26
|
* console.log(TEXTURE_BASE);
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
|
-
export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.
|
|
29
|
+
export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.20.0/dist/textures/";
|
|
29
30
|
/**
|
|
30
31
|
* Where the sharpest surface pictures are: the files of this exact version in the repository, on jsDelivr's GitHub address. The npm package holds only the two smaller widths, so a page that
|
|
31
32
|
* never zooms in never fetches them. Set `texture-far-base` on an element to serve them yourself.
|
|
@@ -37,7 +38,7 @@ export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdot
|
|
|
37
38
|
* console.log(TEXTURE_FAR_BASE);
|
|
38
39
|
* ```
|
|
39
40
|
*/
|
|
40
|
-
export declare const TEXTURE_FAR_BASE = "https://cdn.jsdelivr.net/gh/johnmorrisdotca/wakusei-planets@v0.
|
|
41
|
+
export declare const TEXTURE_FAR_BASE = "https://cdn.jsdelivr.net/gh/johnmorrisdotca/wakusei-planets@v0.20.0/textures/";
|
|
41
42
|
/**
|
|
42
43
|
* The `<wakusei-body>` custom element: a body of the solar system, drawn in a look.
|
|
43
44
|
*
|
|
@@ -79,10 +80,11 @@ export declare class WakuseiBody extends HTMLElement {
|
|
|
79
80
|
goLive(): Promise<boolean>;
|
|
80
81
|
/** Give the WebGL context back: the picture stays as a still. */
|
|
81
82
|
rest(): void;
|
|
82
|
-
/** The shared controllers' camera: `yaw` turns the body about its pole, `tilt` tips its top away from you as it grows (a drag up moves the surface up), `zoom` and
|
|
83
|
+
/** The shared controllers' camera: `yaw` turns the body about its pole, `tilt` tips its top away from you as it grows (a drag up moves the surface up), `roll` turns the picture clockwise about the line of sight, `zoom` scales it, and `panX` and `panY` move it by that many CSS pixels from the middle. */
|
|
83
84
|
setView(view: {
|
|
84
85
|
yaw?: number;
|
|
85
86
|
tilt?: number;
|
|
87
|
+
roll?: number;
|
|
86
88
|
zoom?: number;
|
|
87
89
|
panX?: number;
|
|
88
90
|
panY?: number;
|
package/dist/element.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "./tables/all.js";
|
|
1
2
|
import { orbitPath, nearMoons } from "./ephemeris.js";
|
|
2
3
|
import { BODIES, ringReach } from "./facts.js";
|
|
3
4
|
import { createGate, frameCap } from "./gate.js";
|
|
@@ -119,6 +120,7 @@ export class WakuseiBody extends HTMLElement {
|
|
|
119
120
|
#start;
|
|
120
121
|
#yaw = 0;
|
|
121
122
|
#tilt = 0;
|
|
123
|
+
#roll = 0;
|
|
122
124
|
#pitchDelta = 0;
|
|
123
125
|
#lastAnchors = -1;
|
|
124
126
|
#zoom = 1;
|
|
@@ -250,13 +252,15 @@ export class WakuseiBody extends HTMLElement {
|
|
|
250
252
|
}
|
|
251
253
|
}
|
|
252
254
|
}
|
|
253
|
-
/** The shared controllers' camera: `yaw` turns the body about its pole, `tilt` tips its top away from you as it grows (a drag up moves the surface up), `zoom` and
|
|
255
|
+
/** The shared controllers' camera: `yaw` turns the body about its pole, `tilt` tips its top away from you as it grows (a drag up moves the surface up), `roll` turns the picture clockwise about the line of sight, `zoom` scales it, and `panX` and `panY` move it by that many CSS pixels from the middle. */
|
|
254
256
|
setView(view) {
|
|
257
|
+
const half = Math.max(1, this.clientWidth) / 2;
|
|
255
258
|
this.#yaw = view.yaw ?? 0;
|
|
256
259
|
this.#tilt = view.tilt ?? 0;
|
|
260
|
+
this.#roll = view.roll ?? 0;
|
|
257
261
|
this.#zoom = view.zoom ?? 1;
|
|
258
|
-
this.#panX = view.panX ?? 0;
|
|
259
|
-
this.#panY = view.panY ?? 0;
|
|
262
|
+
this.#panX = -(view.panX ?? 0) / half;
|
|
263
|
+
this.#panY = (view.panY ?? 0) / half;
|
|
260
264
|
this.#queue(true);
|
|
261
265
|
}
|
|
262
266
|
// --- the clock ------------------------------------------------------------------------------------------------------------------------------------
|
|
@@ -300,6 +304,13 @@ export class WakuseiBody extends HTMLElement {
|
|
|
300
304
|
meridian = turnVec(meridian, x, tiltBy);
|
|
301
305
|
light = turnVec(light, x, tiltBy);
|
|
302
306
|
}
|
|
307
|
+
const roll = -this.#roll;
|
|
308
|
+
if (roll !== 0) {
|
|
309
|
+
const z = [0, 0, 1];
|
|
310
|
+
pole = turnVec(pole, z, roll);
|
|
311
|
+
meridian = turnVec(meridian, z, roll);
|
|
312
|
+
light = turnVec(light, z, roll);
|
|
313
|
+
}
|
|
303
314
|
const r = this.#request();
|
|
304
315
|
const scaleTo = this.getAttribute("scale-to");
|
|
305
316
|
const range = this.hasAttribute("range") ? num(this.getAttribute("range"), 0) : undefined;
|
|
@@ -310,25 +321,27 @@ export class WakuseiBody extends HTMLElement {
|
|
|
310
321
|
.filter((m) => m.distance <= extent * 1.05)
|
|
311
322
|
.map((m) => {
|
|
312
323
|
const orbit = this.#orbits.get(m.id);
|
|
313
|
-
const
|
|
314
|
-
|
|
324
|
+
const tipped = tiltBy === 0 ? [m.x, m.y, m.z] : turnVec([m.x, m.y, m.z], [1, 0, 0], tiltBy);
|
|
325
|
+
const rotated = roll === 0 ? tipped : turnVec(tipped, [0, 0, 1], roll);
|
|
326
|
+
return { id: m.id, x: rotated[0], y: rotated[1], z: rotated[2], ...(orbit !== undefined ? { orbit: tiltBy === 0 && roll === 0 ? orbit : this.#tiltedOrbit(m.id, orbit, tiltBy, roll) } : {}) };
|
|
315
327
|
})
|
|
316
328
|
: undefined;
|
|
317
329
|
return { pose: { pole, meridian, light }, extent, sky: frame.time !== undefined, zoom: this.#zoom, panX: clampPan(this.#panX, extent, this.#zoom), panY: clampPan(this.#panY, extent, this.#zoom), ...(moons !== undefined ? { moons } : {}) };
|
|
318
330
|
}
|
|
319
331
|
#tilted = new Map();
|
|
320
|
-
#tiltedOrbit(id, orbit, tilt) {
|
|
332
|
+
#tiltedOrbit(id, orbit, tilt, roll) {
|
|
321
333
|
const held = this.#tilted.get(id);
|
|
322
|
-
if (held !== undefined && held.source === orbit && held.tilt === tilt)
|
|
334
|
+
if (held !== undefined && held.source === orbit && held.tilt === tilt && held.roll === roll)
|
|
323
335
|
return held.out;
|
|
324
336
|
const out = new Float32Array(orbit.length);
|
|
325
337
|
for (let i = 0; i < orbit.length; i += 3) {
|
|
326
|
-
const
|
|
338
|
+
const tipped = turnVec([orbit[i], orbit[i + 1], orbit[i + 2]], [1, 0, 0], tilt);
|
|
339
|
+
const v = roll === 0 ? tipped : turnVec(tipped, [0, 0, 1], roll);
|
|
327
340
|
out[i] = v[0];
|
|
328
341
|
out[i + 1] = v[1];
|
|
329
342
|
out[i + 2] = v[2];
|
|
330
343
|
}
|
|
331
|
-
this.#tilted.set(id, { source: orbit, tilt, out });
|
|
344
|
+
this.#tilted.set(id, { source: orbit, tilt, roll, out });
|
|
332
345
|
return out;
|
|
333
346
|
}
|
|
334
347
|
#ensureOrbits(frame) {
|
package/dist/ephemeris.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { moonGeocentric } from "./theory.ts";
|
|
2
|
+
export { moonGeocentric };
|
|
1
3
|
import { type BodyId, type HostId, type MoonId } from "./facts.ts";
|
|
2
4
|
import { type Vec3 } from "./vec.ts";
|
|
3
5
|
/** Solve Kepler's equation for the eccentric anomaly, all in radians. */
|
|
4
6
|
export declare function kepler(meanAnomaly: number, e: number): number;
|
|
5
7
|
/**
|
|
6
|
-
* A planet's or dwarf planet's position in the Sun's frame (J2000 ecliptic, astronomical units) at a time:
|
|
8
|
+
* A planet's or dwarf planet's position in the Sun's frame (J2000 ecliptic, astronomical units) at a time: Mercury to Neptune from the VSOP87B series, and Pluto and the other dwarf planets from tables fitted to Horizons (each within a few arc-seconds or better, see the accuracy guide; outside a table's years a dwarf planet falls back to the osculating elements of one epoch from JPL's Small-Body Database).
|
|
7
9
|
* @param planet - The planet's or dwarf planet's name.
|
|
8
|
-
* @param ms - The instant, in milliseconds since 1970.
|
|
10
|
+
* @param ms - The instant, in milliseconds since 1970 (UTC).
|
|
9
11
|
* @returns The position as x, y, z in au.
|
|
10
12
|
*
|
|
11
13
|
* @example
|
|
@@ -30,20 +32,6 @@ export declare function heliocentric(planet: HostId, ms: number): Vec3;
|
|
|
30
32
|
* ```
|
|
31
33
|
*/
|
|
32
34
|
export declare function meanSunAu(id: HostId): number;
|
|
33
|
-
/**
|
|
34
|
-
* The Moon's position from the Earth's centre (J2000 ecliptic, kilometres), from the largest terms of Meeus's lunar series.
|
|
35
|
-
* @param ms - The instant, in milliseconds since 1970.
|
|
36
|
-
* @returns The position as x, y, z in kilometres.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```ts
|
|
40
|
-
* import { moonGeocentric } from "@johnmorrisdotca/wakusei-planets";
|
|
41
|
-
*
|
|
42
|
-
* const [x, y, z] = moonGeocentric(Date.UTC(2026, 10, 2));
|
|
43
|
-
* console.log(Math.round(Math.hypot(x, y, z)) > 350000);
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
export declare function moonGeocentric(ms: number): Vec3;
|
|
47
35
|
/** The north pole of a body as a J2000 ecliptic unit vector. */
|
|
48
36
|
export declare function poleOf(id: BodyId): Vec3;
|
|
49
37
|
/** The prime meridian's direction (J2000 ecliptic unit vector) when it has turned to `w` degrees. */
|
package/dist/ephemeris.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
// Where the planets and their moons are at a date and time, and how a body looks from the Earth then: its pole, the face that turns toward us, where the Sun is.
|
|
2
|
-
// Planets
|
|
3
|
-
//
|
|
2
|
+
// Planets Mercury to Neptune: the VSOP87B series of Bretagnon and Francou, truncated (data/vsop.ts), in terrestrial time (time.ts). Pluto: a Chebyshev table fitted to JPL Horizons for 1800 to 2200 (data/pluto.ts),
|
|
3
|
+
// and outside those years JPL's "Keplerian Elements for Approximate Positions of the Major Planets", Table 1 (https://ssd.jpl.nasa.gov/planets/approx_pos.html). The Moon: the lunar solution ELP2000-82B (Chapront-Touze and Chapront, IMCCE) cut to its largest terms (data/lunar.ts). Other moons: fitted to JPL Horizons (data/orbits.ts).
|
|
4
4
|
// Light travel time is allowed for, so a turning planet shows the face it really showed when the light left. Pure: no DOM, no three.js.
|
|
5
5
|
import { ORBITS } from "./data/orbits.js";
|
|
6
6
|
import { DWARF_ELEMENTS } from "./data/dwarf.js";
|
|
7
|
+
import { tableOf } from "./data/tables.js";
|
|
8
|
+
import { PLUTO, PLUTO_SEGMENT_MS, PLUTO_START } from "./data/pluto.js";
|
|
9
|
+
import { VSOP87 } from "./data/vsop.js";
|
|
10
|
+
import { moonGeocentric, vsopPosition } from "./theory.js";
|
|
11
|
+
export { moonGeocentric };
|
|
12
|
+
import { toTerrestrialTime } from "./clock.js";
|
|
7
13
|
import { BODIES, MOONS_OF } from "./facts.js";
|
|
8
14
|
import { add, cross, DEG, dot, fromRaDec, length, OBLIQUITY, RAD, scale, sub, toEcliptic, unit, wrap360 } from "./vec.js";
|
|
9
15
|
/** Milliseconds since 1970 at J2000.0 (2000-01-01 12:00 TT, taken as UTC). */
|
|
@@ -42,10 +48,57 @@ export function kepler(meanAnomaly, e) {
|
|
|
42
48
|
}
|
|
43
49
|
return E;
|
|
44
50
|
}
|
|
51
|
+
const PLUTO_TABLE = { start: PLUTO_START, segment: PLUTO_SEGMENT_MS, worst: 0, segments: PLUTO };
|
|
52
|
+
/** A position from a Chebyshev table, as x, y, z in au, or undefined outside the years it covers. */
|
|
53
|
+
function fittedPosition(table, terrestrialMs) {
|
|
54
|
+
const segment = Math.floor((terrestrialMs - table.start) / table.segment);
|
|
55
|
+
const coefficients = table.segments[segment];
|
|
56
|
+
if (coefficients === undefined)
|
|
57
|
+
return undefined;
|
|
58
|
+
const x = (2 * (terrestrialMs - table.start - segment * table.segment)) / table.segment - 1;
|
|
59
|
+
const at = (axis) => {
|
|
60
|
+
let b1 = 0;
|
|
61
|
+
let b2 = 0;
|
|
62
|
+
for (let k = axis.length - 1; k >= 1; k -= 1) {
|
|
63
|
+
const b0 = 2 * x * b1 - b2 + axis[k];
|
|
64
|
+
b2 = b1;
|
|
65
|
+
b1 = b0;
|
|
66
|
+
}
|
|
67
|
+
return x * b1 - b2 + axis[0];
|
|
68
|
+
};
|
|
69
|
+
return [at(coefficients[0]), at(coefficients[1]), at(coefficients[2])];
|
|
70
|
+
}
|
|
71
|
+
/** Each planet's mass as a fraction of the Sun's (IAU 2012 and JPL DE440 values; the Earth with its Moon), to find the Sun's place among the planets. */
|
|
72
|
+
const MASS_OVER_SUN = {
|
|
73
|
+
mercury: 1 / 6023657.33,
|
|
74
|
+
venus: 1 / 408523.72,
|
|
75
|
+
earth: 1 / 328900.56,
|
|
76
|
+
mars: 1 / 3098703.59,
|
|
77
|
+
jupiter: 1 / 1047.3486,
|
|
78
|
+
saturn: 1 / 3497.9018,
|
|
79
|
+
uranus: 1 / 22902.98,
|
|
80
|
+
neptune: 1 / 19412.26,
|
|
81
|
+
};
|
|
82
|
+
/** The barycentre of the solar system seen from the Sun (J2000 ecliptic, au): the planets' mass-weighted places, which move the Sun about a million kilometres in twelve years. */
|
|
83
|
+
function barycentreFromSun(terrestrialMs) {
|
|
84
|
+
let x = 0;
|
|
85
|
+
let y = 0;
|
|
86
|
+
let z = 0;
|
|
87
|
+
let total = 1;
|
|
88
|
+
for (const id of Object.keys(MASS_OVER_SUN)) {
|
|
89
|
+
const m = MASS_OVER_SUN[id];
|
|
90
|
+
const p = vsopPosition(VSOP87[id], terrestrialMs);
|
|
91
|
+
x += m * p[0];
|
|
92
|
+
y += m * p[1];
|
|
93
|
+
z += m * p[2];
|
|
94
|
+
total += m;
|
|
95
|
+
}
|
|
96
|
+
return [x / total, y / total, z / total];
|
|
97
|
+
}
|
|
45
98
|
/**
|
|
46
|
-
* A planet's or dwarf planet's position in the Sun's frame (J2000 ecliptic, astronomical units) at a time:
|
|
99
|
+
* A planet's or dwarf planet's position in the Sun's frame (J2000 ecliptic, astronomical units) at a time: Mercury to Neptune from the VSOP87B series, and Pluto and the other dwarf planets from tables fitted to Horizons (each within a few arc-seconds or better, see the accuracy guide; outside a table's years a dwarf planet falls back to the osculating elements of one epoch from JPL's Small-Body Database).
|
|
47
100
|
* @param planet - The planet's or dwarf planet's name.
|
|
48
|
-
* @param ms - The instant, in milliseconds since 1970.
|
|
101
|
+
* @param ms - The instant, in milliseconds since 1970 (UTC).
|
|
49
102
|
* @returns The position as x, y, z in au.
|
|
50
103
|
*
|
|
51
104
|
* @example
|
|
@@ -57,6 +110,23 @@ export function kepler(meanAnomaly, e) {
|
|
|
57
110
|
* ```
|
|
58
111
|
*/
|
|
59
112
|
export function heliocentric(planet, ms) {
|
|
113
|
+
const vsop = VSOP87[planet];
|
|
114
|
+
if (vsop !== undefined)
|
|
115
|
+
return vsopPosition(vsop, toTerrestrialTime(ms));
|
|
116
|
+
if (planet === "pluto") {
|
|
117
|
+
const table = fittedPosition(PLUTO_TABLE, toTerrestrialTime(ms));
|
|
118
|
+
if (table !== undefined)
|
|
119
|
+
return table;
|
|
120
|
+
}
|
|
121
|
+
const fitted = tableOf(planet);
|
|
122
|
+
if (fitted !== undefined) {
|
|
123
|
+
const tt = toTerrestrialTime(ms);
|
|
124
|
+
const table = fittedPosition(fitted, tt);
|
|
125
|
+
if (table !== undefined) {
|
|
126
|
+
const sun = barycentreFromSun(tt);
|
|
127
|
+
return [table[0] + sun[0], table[1] + sun[1], table[2] + sun[2]];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
60
130
|
let a;
|
|
61
131
|
let e;
|
|
62
132
|
let I;
|
|
@@ -111,34 +181,6 @@ export function meanSunAu(id) {
|
|
|
111
181
|
const dwarf = DWARF_ELEMENTS[id];
|
|
112
182
|
return dwarf !== undefined ? dwarf.a : ELEMENTS[id][0];
|
|
113
183
|
}
|
|
114
|
-
/**
|
|
115
|
-
* The Moon's position from the Earth's centre (J2000 ecliptic, kilometres), from the largest terms of Meeus's lunar series.
|
|
116
|
-
* @param ms - The instant, in milliseconds since 1970.
|
|
117
|
-
* @returns The position as x, y, z in kilometres.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```ts
|
|
121
|
-
* import { moonGeocentric } from "@johnmorrisdotca/wakusei-planets";
|
|
122
|
-
*
|
|
123
|
-
* const [x, y, z] = moonGeocentric(Date.UTC(2026, 10, 2));
|
|
124
|
-
* console.log(Math.round(Math.hypot(x, y, z)) > 350000);
|
|
125
|
-
* ```
|
|
126
|
-
*/
|
|
127
|
-
export function moonGeocentric(ms) {
|
|
128
|
-
const T = centuries(ms);
|
|
129
|
-
const Lm = 218.3164477 + 481267.88123421 * T;
|
|
130
|
-
const D = (297.8501921 + 445267.1114034 * T) * RAD;
|
|
131
|
-
const M = (357.5291092 + 35999.0502909 * T) * RAD;
|
|
132
|
-
const Mp = (134.9633964 + 477198.8675055 * T) * RAD;
|
|
133
|
-
const F = (93.272095 + 483202.0175233 * T) * RAD;
|
|
134
|
-
const lon = Lm + 6.289 * Math.sin(Mp) + 1.274 * Math.sin(2 * D - Mp) + 0.658 * Math.sin(2 * D) + 0.214 * Math.sin(2 * Mp) - 0.186 * Math.sin(M) - 0.114 * Math.sin(2 * F) - 0.059 * Math.sin(2 * D - 2 * Mp) - 0.057 * Math.sin(2 * D - M - Mp) + 0.053 * Math.sin(2 * D + Mp) + 0.046 * Math.sin(2 * D - M) + 0.041 * Math.sin(Mp - M);
|
|
135
|
-
const lat = 5.128 * Math.sin(F) + 0.2806 * Math.sin(Mp + F) + 0.2777 * Math.sin(Mp - F) + 0.1732 * Math.sin(2 * D - F);
|
|
136
|
-
const dist = 385000.56 - 20905.355 * Math.cos(Mp) - 3699.111 * Math.cos(2 * D - Mp) - 2955.968 * Math.cos(2 * D) - 569.925 * Math.cos(2 * Mp) + 48.888 * Math.cos(M) - 3.149 * Math.cos(2 * F);
|
|
137
|
-
// The longitude is of the date; take off the precession since J2000 (about 1.4 degrees a century) to put it in the J2000 frame.
|
|
138
|
-
const lam = (lon - 1.3969713 * T) * RAD;
|
|
139
|
-
const bet = lat * RAD;
|
|
140
|
-
return [dist * Math.cos(bet) * Math.cos(lam), dist * Math.cos(bet) * Math.sin(lam), dist * Math.sin(bet)];
|
|
141
|
-
}
|
|
142
184
|
/** The north pole of a body as a J2000 ecliptic unit vector. */
|
|
143
185
|
export function poleOf(id) {
|
|
144
186
|
const { ra, dec } = BODIES[id].pole;
|
|
@@ -285,7 +327,8 @@ function orbitVector(orbit, ms) {
|
|
|
285
327
|
const w = orbit.w + orbit.dw * dt;
|
|
286
328
|
const node = orbit.node + orbit.dn * dt;
|
|
287
329
|
const lambda0 = orbit.w + orbit.node + orbit.m;
|
|
288
|
-
const
|
|
330
|
+
const swing = orbit.wave === undefined ? 0 : orbit.wave[0] * Math.sin((2 * Math.PI * dt) / orbit.wave[1] + orbit.wave[2] * RAD);
|
|
331
|
+
const M = lambda0 + orbit.sid * dt + 0.5 * (orbit.acc ?? 0) * dt * dt + swing - w - node;
|
|
289
332
|
const E = kepler(M * RAD, orbit.e);
|
|
290
333
|
const x = orbit.a * (Math.cos(E) - orbit.e);
|
|
291
334
|
const y = orbit.a * Math.sqrt(1 - orbit.e * orbit.e) * Math.sin(E);
|
package/dist/live.js
CHANGED
|
@@ -17,7 +17,7 @@ export function defaultTurn(id) {
|
|
|
17
17
|
/** The degrees a second a body's own turn advances its prime meridian (a moon that keeps one face to its planet turns once a trip). */
|
|
18
18
|
export function turnRate(id) {
|
|
19
19
|
const f = BODIES[id];
|
|
20
|
-
return (f.synchronous === true && ORBITS[id] !== undefined ? ORBITS[id].sid : f.prime.rate) / 86400;
|
|
20
|
+
return (f.synchronous === true && ORBITS[id] !== undefined ? Math.sign(f.prime.rate) * Math.abs(ORBITS[id].sid) : f.prime.rate) / 86400;
|
|
21
21
|
}
|
|
22
22
|
/** The pictured moon-planet's moons, or none. */
|
|
23
23
|
const moonsOfPlanet = (id) => id in MOONS_OF;
|
package/dist/mars.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { When } from "./when.ts";
|
|
2
|
+
/**
|
|
3
|
+
* The Mars Sol Date: the count of Martian days, as the Julian date counts Earth's. 44796.0 is about 2000-01-06 00:00 TT.
|
|
4
|
+
* @param when - A `Date` or milliseconds since 1970 (UTC).
|
|
5
|
+
* @returns Sols, with the fraction of the sol.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { marsSolDate } from "@johnmorrisdotca/wakusei-planets/time";
|
|
10
|
+
*
|
|
11
|
+
* console.log(marsSolDate(Date.UTC(2021, 1, 18, 20, 55)).toFixed(3));
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function marsSolDate(when: When): number;
|
|
15
|
+
/**
|
|
16
|
+
* Coordinated Mars Time: the mean solar time on Mars's prime meridian, in hours from 0 up to 24 (a Martian hour is 1/24 of a sol).
|
|
17
|
+
* @param when - A `Date` or milliseconds since 1970 (UTC).
|
|
18
|
+
* @returns Hours.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { coordinatedMarsTime } from "@johnmorrisdotca/wakusei-planets/time";
|
|
23
|
+
*
|
|
24
|
+
* console.log(coordinatedMarsTime(Date.UTC(2021, 1, 18, 20, 55)).toFixed(2));
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function coordinatedMarsTime(when: When): number;
|
|
28
|
+
/**
|
|
29
|
+
* The local mean solar time on Mars at a longitude east of its prime meridian, in hours from 0 up to 24.
|
|
30
|
+
* @param when - A `Date` or milliseconds since 1970 (UTC).
|
|
31
|
+
* @param longitude - Degrees east (Jezero Crater is 77.45).
|
|
32
|
+
* @returns Hours.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* import { marsLocalMeanSolarTime } from "@johnmorrisdotca/wakusei-planets/time";
|
|
37
|
+
*
|
|
38
|
+
* console.log(marsLocalMeanSolarTime(Date.UTC(2021, 1, 18, 20, 55), 77.45).toFixed(1));
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function marsLocalMeanSolarTime(when: When, longitude: number): number;
|