1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.neptune = exports.uranus = exports.saturn = exports.jupiter = exports.mars = exports.earth = exports.venus = exports.mercury = undefined;
|
7 |
|
8 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | exports.Elements = Elements;
|
21 | exports.mean = mean;
|
22 | exports.inc = inc;
|
23 | exports.node = node;
|
24 |
|
25 | var _base = require('./base');
|
26 |
|
27 | var _base2 = _interopRequireDefault(_base);
|
28 |
|
29 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
30 |
|
31 |
|
32 | var mercury = exports.mercury = 'mercury';
|
33 | var venus = exports.venus = 'venus';
|
34 | var earth = exports.earth = 'earth';
|
35 | var mars = exports.mars = 'mars';
|
36 | var jupiter = exports.jupiter = 'jupiter';
|
37 | var saturn = exports.saturn = 'saturn';
|
38 | var uranus = exports.uranus = 'uranus';
|
39 | var neptune = exports.neptune = 'neptune';
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | function Elements(lon, axis, ecc, inc, node, peri) {
|
57 | var o = (typeof lon === 'undefined' ? 'undefined' : _typeof(lon)) === 'object' ? lon : {};
|
58 | this.lon = o.lon || lon;
|
59 | this.axis = o.axis || axis;
|
60 | this.ecc = o.ecc || ecc;
|
61 | this.inc = o.inc || inc;
|
62 | this.node = o.node || node;
|
63 | this.peri = o.peri || peri;
|
64 | }
|
65 |
|
66 |
|
67 |
|
68 |
|
69 | var cMean = {
|
70 | mercury: {
|
71 | L: [252.250906, 149474.0722491, 0.0003035, 0.000000018],
|
72 | a: [0.38709831],
|
73 | e: [0.20563175, 0.000020407, -0.0000000283, -0.00000000018],
|
74 | i: [7.004986, 0.0018215, -0.0000181, 0.000000056],
|
75 | Ω: [48.330893, 1.1861883, 0.00017542, 0.000000215],
|
76 | ϖ: [77.456119, 1.5564776, 0.00029544, 0.000000009]
|
77 | },
|
78 | venus: {
|
79 | L: [181.979801, 58519.2130302, 0.00031014, 0.000000015],
|
80 | a: [0.72332982],
|
81 | e: [0.00677192, -0.000047765, 0.0000000981, 0.00000000046],
|
82 | i: [3.394662, 0.0010037, -0.00000088, -0.000000007],
|
83 | Ω: [76.67992, 0.9011206, 0.00040618, -0.000000093],
|
84 | ϖ: [131.563703, 1.4022288, -0.00107618, -0.000005678]
|
85 | },
|
86 | earth: {
|
87 | L: [100.466457, 36000.7698278, 0.00030322, 0.00000002],
|
88 | a: [1.000001018],
|
89 | e: [0.01670863, -0.000042037, -0.0000001267, 0.00000000014],
|
90 | i: [0],
|
91 | Ω: undefined,
|
92 | ϖ: [102.937348, 1.7195366, 0.00045688, -0.000000018]
|
93 | },
|
94 | mars: {
|
95 | L: [355.433, 19141.6964471, 0.00031052, 0.000000016],
|
96 | a: [1.523679342],
|
97 | e: [0.09340065, 0.000090484, -0.0000000806, -0.00000000025],
|
98 | i: [1.849726, -0.0006011, 0.00001276, -0.000000007],
|
99 | Ω: [49.558093, 0.7720959, 0.00001557, 0.000002267],
|
100 | ϖ: [336.060234, 1.8410449, 0.00013477, 0.000000536]
|
101 | },
|
102 | jupiter: {
|
103 | L: [34.351519, 3036.3027748, 0.0002233, 0.000000037],
|
104 | a: [5.202603209, 0.0000001913],
|
105 | e: [0.04849793, 0.000163225, -0.0000004714, -0.00000000201],
|
106 | i: [1.303267, -0.0054965, 0.00000466, -0.000000002],
|
107 | Ω: [100.464407, 1.0209774, 0.00040315, 0.000000404],
|
108 | ϖ: [14.331207, 1.6126352, 0.00103042, -0.000004464]
|
109 | },
|
110 | saturn: {
|
111 | L: [50.077444, 1223.5110686, 0.00051908, -0.00000003],
|
112 | a: [9.554909192, -0.0000021390, 0.000000004],
|
113 | e: [0.05554814, -0.000346641, -0.0000006436, 0.0000000034],
|
114 | i: [2.488879, -0.0037362, -0.00001519, 0.000000087],
|
115 | Ω: [113.665503, 0.877088, -0.00012176, -0.000002249],
|
116 | ϖ: [93.057237, 1.9637613, 0.00083753, 0.000004928]
|
117 | },
|
118 | uranus: {
|
119 | L: [314.055005, 429.8640561, 0.0003039, 0.000000026],
|
120 | a: [19.218446062, -0.0000000372, 0.00000000098],
|
121 | e: [0.04638122, -0.000027293, 0.0000000789, 0.00000000024],
|
122 | i: [0.773197, 0.0007744, 0.00003749, -0.000000092],
|
123 | Ω: [74.005957, 0.5211278, 0.00133947, 0.000018484],
|
124 | ϖ: [173.005291, 1.486379, 0.00021406, 0.000000434]
|
125 | },
|
126 | neptune: {
|
127 | L: [304.348665, 219.8833092, 0.00030882, 0.000000018],
|
128 | a: [30.110386869, -0.0000001663, 0.00000000069],
|
129 | e: [0.00945575, 0.000006033, 0, -0.00000000005],
|
130 | i: [1.769953, -0.0093082, -0.00000708, 0.000000027],
|
131 | Ω: [131.784057, 1.1022039, 0.00025952, -0.000000637],
|
132 | ϖ: [48.120276, 1.4262957, 0.00038434, 0.00000002]
|
133 | }
|
134 |
|
135 | |
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 | };function mean(p, jde, e) {
|
147 | var T = _base2.default.J2000Century(jde);
|
148 | var c = cMean[p];
|
149 | e = e || new Elements();
|
150 | e.lon = _base2.default.pmod(_base2.default.horner(T, c.L) * Math.PI / 180, 2 * Math.PI);
|
151 | e.axis = _base2.default.horner(T, c.a);
|
152 | e.ecc = _base2.default.horner(T, c.e);
|
153 | e.inc = _base2.default.horner(T, c.i) * Math.PI / 180;
|
154 | e.node = _base2.default.horner(T, c.Ω) * Math.PI / 180;
|
155 | e.peri = _base2.default.horner(T, c.ϖ) * Math.PI / 180;
|
156 | return e;
|
157 | }
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 | function inc(p, jde) {
|
166 |
|
167 | return _base2.default.horner(_base2.default.J2000Century(jde), cMean[p].i) * Math.PI / 180;
|
168 | }
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 | function node(p, jde) {
|
177 |
|
178 | return _base2.default.horner(_base2.default.J2000Century(jde), cMean[p].Ω) * Math.PI / 180;
|
179 | }
|
180 |
|
181 | exports.default = {
|
182 | mercury: mercury,
|
183 | venus: venus,
|
184 | earth: earth,
|
185 | mars: mars,
|
186 | jupiter: jupiter,
|
187 | saturn: saturn,
|
188 | uranus: uranus,
|
189 | neptune: neptune,
|
190 | Elements: Elements,
|
191 | mean: mean,
|
192 | inc: inc,
|
193 | node: node
|
194 | }; |
\ | No newline at end of file |