-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathelp2000xyz.js
236 lines (226 loc) · 22.7 KB
/
elp2000xyz.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
// optimized (truncated) implementation of elp2000-82b
// terms are already pre-calculated for main problem
// coeffs are pre-multiplied with Delaunay's arguments
var elp82_w1 = [ 3.81034443058831, 8399.6852165876, -2.85472839847728e-05, 3.20170955004738e-08, -1.53637455543612e-10 ];
var elp82 = [
[ // error 50.3626100000136
[
[ -411.60287, 0, 3.25581046674294, 16866.9323162617, -0.000118784200008647, -9.89989536825672e-09, 4.04334610045353e-11 ],
[ 39.53393, 0, -0.900254568477138, -8538.2408893063, 0.000275811957624258, 2.60311009798143e-07, -1.22677253867957e-09 ],
[ 22639.55000, 0, 2.3555558982658, 8328.69142695536, 0.000157027757615611, 2.50411114429886e-07, -1.18633907767503e-09 ],
[ -45.10032, 0, 5.61136636500873, 25195.623743217, 3.82435576069635e-05, 2.4051121906163e-07, -1.1459056166705e-09 ],
[ -1.37259, 0, 1.45530132978866, -209.549462350937, 0.000432839715239869, 5.1072212422803e-07, -2.4131116163546e-09 ],
[ 769.02326, 0, 4.7111117965316, 16657.3828539107, 0.000314055515231222, 5.00822228859773e-07, -2.37267815535007e-09 ],
[ -3.99767, 0, 7.96692226327453, 33524.3151701724, 0.000195271315222574, 4.90922333491516e-07, -2.33224469434553e-09 ],
[ 36.12364, 0, 7.0666676947974, 24986.0742808661, 0.000471083272846833, 7.51233343289659e-07, -3.5590172330251e-09 ],
[ 1.93367, 0, 9.42222359306319, 33314.7657078214, 0.000628111030462444, 1.00164445771955e-06, -4.74535631070014e-09 ],
[ -9.67938, 0, 1.52894833043986, -16029.0808987427, -0.000316736050074076, -5.00109552748542e-07, 2.37267815535007e-09 ],
[ -147.32654, 0, 3.88450422870566, -7700.38947178736, -0.000159708292458466, -2.49698438318655e-07, 1.18633907767503e-09 ],
[ -666.44186, 0, 6.24006012697146, 628.301955168003, -2.68053484285462e-06, 7.12676111231018e-10 ],
[ -109.38419, 0, 8.59561602523726, 8956.99338212336, 0.000154347222772756, 2.51123790541117e-07, -1.18633907767503e-09 ],
[ -7.63041, 0, 10.9511719235031, 17285.6848090787, 0.000311374980388367, 5.01534904971004e-07, -2.37267815535007e-09 ],
[ -2.56813, 0, 10.1245643556771, -7072.08751661936, -0.00016238882730132, -2.48985762207424e-07, 1.18633907767503e-09 ],
[ -7.44804, 0, 12.4801202539429, 1256.60391033601, -5.36106968570925e-06, 1.42535222246204e-09 ],
[ -1.16177, 0, 14.8356761522087, 9585.29533729137, 0.000151666687929902, 2.51836466652349e-07, -1.18633907767503e-09 ],
[ -1.75296, 0, 0.487354944495847, -8886.00570709867, -0.000342504866852411, -4.68848766590599e-07, 2.21831347928479e-09 ],
[ -18.58467, 0, 2.84291084276165, -557.314280143312, -0.0001854771092368, -2.18437652160713e-07, 1.03197440160976e-09 ],
[ -124.98806, 0, 5.19846674102744, 7771.37714681205, -2.84493516211887e-05, 3.19734622691739e-08, -1.54364676065276e-10 ],
[ -8.45308, 0, 7.55402263929324, 16100.0685737674, 0.000128578405994422, 2.8238457669906e-07, -1.34070375374031e-09 ],
[ 1.07773, 0, 9.08297096973311, 70.9876750246913, -0.000188157644079654, -2.17724976049482e-07, 1.03197440160976e-09 ],
[ 17.95512, 0, 11.4385268679989, 8399.67910198005, -3.11298864640433e-05, 3.26861383804049e-08, -1.54364676065276e-10 ],
[ 1.26186, 0, 13.7940827662647, 16728.3705289354, 0.000125897871151568, 2.83097252810291e-07, -1.34070375374031e-09 ],
[ 7.37173, 0, -4.43874267015383, 5957.45895633273, -0.000208565391172279, -1.87889542114001e-07, 8.77609725544482e-10 ],
[ 8.05076, 0, -2.08318677188803, 14286.1503832881, -5.15376335566681e-05, 6.25215723158857e-08, -3.08729352130553e-10 ],
[ 8.60582, 0, -0.55423844144817, -1742.93051545463, -0.000368273683630745, -4.37587980432656e-07, 2.06394880321952e-09 ],
[ 205.44315, 0, 1.80131745681763, 6585.76091150073, -0.000211245926015134, -1.8717686600277e-07, 8.77609725544482e-10 ],
[ 2.14619, 0, 0.901062888340491, -1952.47997780556, 6.45660316091247e-05, 7.31341437953735e-08, -3.49162813135088e-10 ],
[ 164.73458, 0, 4.15687335508343, 14914.4523384561, -5.42181683995227e-05, 6.32342484271168e-08, -3.08729352130553e-10 ],
[ 14.53078, 0, 6.51242925334923, 23243.1437654115, 0.000102809589216088, 3.13645362857003e-07, -1.49506842980559e-09 ],
[ 1.17704, 0, 8.86798515161502, 31571.8351923668, 0.000259837346831699, 5.6405647728689e-07, -2.68140750748062e-09 ],
[ 13.19400, 0, 3.33026578725749, -9443.31998724199, -0.00052798197608921, -6.87286418751312e-07, 3.25028788089455e-09 ],
[ 211.65487, 0, 5.68582168552329, -1114.62856028662, -0.000370954218473599, -4.36875304321425e-07, 2.06394880321952e-09 ],
[ 4586.43061, 0, 8.04137758378909, 7214.06286666874, -0.000213926460857988, -1.86464189891539e-07, 8.77609725544482e-10 ],
[ -9.36601, 0, 11.297188050532, 24080.9951829304, -0.000332710660866636, -1.96364085259795e-07, 9.18043186549017e-10 ],
[ 55.17801, 0, 7.14112301531195, -1324.17802263756, 6.18854967662701e-05, 7.38468199066045e-08, -3.49162813135088e-10 ],
[ 2369.91227, 0, 10.3969334820549, 15542.7542936241, -5.68987032423774e-05, 6.39469245383478e-08, -3.08729352130553e-10 ],
[ -5.74170, 0, 13.6527439487978, 32409.6866098858, -0.000175682903251025, 5.40470291700911e-08, -2.68295891126017e-10 ],
[ -6.38325, 0, 9.49667891357775, 7004.5134043178, 0.000218913254381881, 3.24257934336491e-07, -1.53550189081012e-09 ],
[ 191.95575, 0, 12.7524893803207, 23871.4457205795, 0.000100129054373234, 3.14358038968234e-07, -1.49506842980559e-09 ],
[ 14.37964, 0, 15.1080452785865, 32200.1371475348, 0.000257156811988845, 5.64769153398121e-07, -2.68140750748062e-09 ],
[ 1.05949, 0, 17.4636011768523, 40528.8285744902, 0.000414184569604455, 8.15180267828007e-07, -3.86774658515566e-09 ],
[ 2.48897, 0, 11.9258818124948, -486.326605118622, -0.000373634753316454, -4.36162628210194e-07, 2.06394880321952e-09 ],
[ -28.39810, 0, 14.2814377107605, 7842.36482183674, -0.000216606995700843, -1.85751513780308e-07, 8.77609725544482e-10 ],
[ -1.43724, 0, 13.3811831422834, -695.876067469559, 5.92049619234154e-05, 7.45594960178355e-08, -3.49162813135088e-10 ],
[ -24.35910, 0, 16.6369936090263, 16171.0562487921, -5.9579238085232e-05, 6.46596006495788e-08, -3.08729352130553e-10 ],
[ -2.91464, 0, 18.9925495072921, 24499.7476757475, 9.7448519530379e-05, 3.15070715079465e-07, -1.49506842980559e-09 ],
[ -2.52138, 0, 20.521497837732, 8470.66677700474, -0.000219287530543698, -1.85038837669077e-07, 8.77609725544482e-10 ],
[ -1.22412, 0, 10.8842884265507, 6656.74858652542, -0.000399403570094788, -4.04901842052251e-07, 1.90958412715424e-09 ],
[ -3.20968, 0, 13.2398443248165, 14985.4400134808, -0.000242375812479177, -1.54490727622365e-07, 7.23245049479206e-10 ],
[ 2.73198, 0, 9.84269504060672, 13799.8237781695, -0.000425172386873122, -3.73641055894308e-07, 1.75521945108896e-09 ],
[ 4.37416, 0, 12.1982509388725, 22128.5152051248, -0.000268144629257511, -1.23229941464422e-07, 5.68880373413929e-10 ],
[ 1.87083, 0, 14.5538068371383, 30457.2066320802, -0.0001111168716419, 1.27181172965465e-07, -6.17458704261105e-10 ],
[ 1.18682, 0, 13.7271992693124, 6099.43430638211, -0.000584880679331588, -6.23339494212964e-07, 2.941558528764e-09 ],
[ 30.77247, 0, 16.0827551675782, 14428.1257333375, -0.000427852921715977, -3.72928379783077e-07, 1.75521945108896e-09 ],
[ 38.42974, 0, 18.438311065844, 22756.8171602928, -0.000270825164100366, -1.22517265353191e-07, 5.68880373413929e-10 ],
[ 13.89903, 0, 20.7938669641098, 31085.5085872482, -0.000113797406484755, 1.27893849076696e-07, -6.17458704261105e-10 ],
[ 1.97772, 0, 23.1494228623756, 39414.2000142036, 4.32303511308562e-05, 3.78304963506582e-07, -1.80379778193614e-09 ],
// where is this comming from now? x04[NUM04] and x10[NUM10][1,2]
// [ 7.06304, 1.64060949687467e-05, 2.18243919721684, -33.7565597948815, 3.08448160195509e-05, 3.69670431846021e-08, -1.7385418604588e-10 ],
// [ 1.14307, 3.14368303443491, 10.3492252753131, 8364.7398435741, -0.000214122325585157, -1.86376923428939e-07, 8.76155284501153e-10 ],
// [ 14.24883, 0.463255936572772, 26.7595591556604, 2.30119683011071, -0.000155460839798265, -2.51109246130684e-07, 1.19797460602166e-09 ],
] /* ,
[
[ 1.67680, 0, 6.24006012697146, 628.301955168003, -2.68053484285462e-06, 7.12676111231018e-10 ],
], */
],
[ // error 26.8708099999979
[
[ 18461.40000, 0, 1.62790523337147, 8433.46615813083, -5.93921000043237e-05, -4.94994768412836e-09, 2.02167305022677e-11 ],
[ -6.29664, 0, 4.8837157001144, 25300.3984743925, -0.000178176300012971, -1.48498430523851e-08, 6.0650191506803e-11 ],
[ 2.79871, 0, -2.52815980184861, -16971.7070474371, 0.000335204057628582, 2.65260957482272e-07, -1.24698926918184e-09 ],
[ 999.70079, 0, 0.72765066489433, -104.774731175468, 0.000216419857619935, 2.55361062114015e-07, -1.2065558081773e-09 ],
[ 1010.17430, 0, 3.98346113163727, 16762.1575850862, 9.76356576112872e-05, 2.45461166745758e-07, -1.16612234717277e-09 ],
[ -1.01941, 0, 7.2392715983802, 33629.0899013478, -2.11485423973602e-05, 2.35561271377501e-07, -1.12568888616823e-09 ],
[ 31.75985, 0, 3.08320656316013, 8223.91669577989, 0.000373447615235546, 5.05772176543901e-07, -2.39289488585234e-09 ],
[ 61.91229, 0, 6.33901702990307, 25090.8490120416, 0.000254663415226898, 4.95872281175645e-07, -2.3524614248478e-09 ],
[ 1.58131, 0, 5.43876246142593, 16552.6081227353, 0.000530475372851157, 7.56183290973788e-07, -3.57923396352737e-09 ],
[ 3.98407, 0, 8.69457292816886, 33419.5404389969, 0.000411691172842509, 7.46283395605531e-07, -3.53880050252284e-09 ],
[ -6.73173, 0, 2.25659899533419, -16133.8556299182, -0.000100316192454142, -2.44748490634527e-07, 1.16612234717277e-09 ],
[ -5.63260, 0, 5.51240946207713, 733.076686343471, -0.000219100392462789, -2.54648386002784e-07, 1.2065558081773e-09 ],
[ -4.83983, 0, 4.61215489359999, -7805.16420296283, 5.67115651614691e-05, 5.66262379535938e-09, -2.02167305022677e-11 ],
[ -6.46036, 0, 7.86796536034293, 9061.76811329883, -6.20726348471783e-05, -4.23727157289734e-09, 2.02167305022677e-11 ],
[ -5.07614, 0, 6.96771079186579, 523.527223992534, 0.00021373932277708, 2.56073738225246e-07, -1.2065558081773e-09 ],
[ -5.31151, 0, 10.2235212586087, 17390.4595402542, 9.49551227684326e-05, 2.46173842856989e-07, -1.16612234717277e-09 ],
[ -4.80578, 0, 3.57056150765598, -662.089011318781, 3.0942748383135e-05, 3.69234099533023e-08, -1.74581406567544e-10 ],
[ -5.36844, 0, 6.82637197439891, 16204.8433049429, -8.78414516255124e-05, 2.70235145850455e-08, -1.34147945563009e-10 ],
[ 1.08587, 0, -3.7110920052595, 5852.68422515726, 7.8544664476556e-06, 6.74715200000141e-08, -3.2894608263282e-10 ],
[ 7.43488, 0, 0.17341222344616, -1847.7052466301, -0.00015185382601081, -1.82226918318641e-07, 8.57392995042214e-10 ],
[ 8.86853, 0, 3.4292226901891, 15019.2270696316, -0.000270638026019457, -1.92126813686898e-07, 8.9782645604675e-10 ],
[ 29.57794, 0, 2.52896812171196, 6480.98618032527, 5.17393160480097e-06, 6.81841961112451e-08, -3.2894608263282e-10 ],
[ 7.95891, 0, 5.78477858845489, 23347.9184965869, -0.000113610268403846, 5.82843007429884e-08, -2.88512621628285e-10 ],
[ 1.76606, 0, 4.88452401997776, 14809.6776072806, 0.000162201689220412, 3.18595310541132e-07, -1.51528516030785e-09 ],
[ 1.13466, 0, 8.14033448672069, 31676.6099235423, 4.34174892117645e-05, 3.08695415172875e-07, -1.47485169930332e-09 ],
[ 1.51564, 0, 1.70236055388602, -17876.7861453728, -0.000468589876084886, -6.82336471067183e-07, 3.23007115039228e-09 ],
[ 15.56635, 0, 4.05791645215182, -9548.09471841745, -0.000311562118469276, -4.31925356637297e-07, 2.04373207271725e-09 ],
[ -1.62443, 0, 7.31372691889476, 7318.83759784421, -0.000430346318477923, -4.41825252005554e-07, 2.08416553372178e-09 ],
[ 166.57528, 0, 6.41347235041762, -1219.40329146209, -0.000154534360853665, -1.8151424220741e-07, 8.57392995042214e-10 ],
[ 199.48515, 0, 9.66928281716056, 15647.5290247996, -0.000273318560862312, -1.91414137575667e-07, 8.9782645604675e-10 ],
[ 2.18637, 0, 5.51321778194048, -9757.64418076839, 0.000121277596770594, 7.87967675907329e-08, -3.69379543637356e-10 ],
[ 623.65783, 0, 8.76902824868342, 7109.28813549327, 2.49339676194635e-06, 6.88968722224762e-08, -3.2894608263282e-10 ],
[ 117.26161, 0, 12.0248387154264, 23976.2204517549, -0.000116290803246701, 5.89969768542194e-08, -2.88512621628285e-10 ],
[ 33.35743, 0, 11.1245841469492, 15437.9795624486, 0.000159521154377557, 3.19307986652363e-07, -1.51528516030785e-09 ],
[ 15.12165, 0, 14.3803946136922, 32304.9118787103, 4.07369543689099e-05, 3.09408091284106e-07, -1.47485169930332e-09 ],
[ 2.14618, 0, 13.480140045215, 23766.670989404, 0.000316548911993168, 5.69719101082249e-07, -2.70162423798289e-09 ],
[ 1.51976, 0, 16.735950511958, 40633.6033056657, 0.000197764711984521, 5.59819205713992e-07, -2.66119077697835e-09 ],
[ -1.31788, 0, 15.909342944132, 16275.8309799676, -0.000275999095705167, -1.90701461464436e-07, 8.9782645604675e-10 ],
[ -12.09470, 0, 15.0090883756549, 7737.59009066127, -1.87138080908276e-07, 6.96095483337072e-08, -3.2894608263282e-10 ],
[ -1.26433, 0, 18.2648988423978, 24604.5224069229, -0.000118971338089556, 5.97096529654504e-08, -2.88512621628285e-10 ],
[ 2.41389, 0, 17.7106604009496, 22861.5918914683, -0.0004872450217203, -3.77878327467206e-07, 1.77543618159123e-09 ],
[ 6.57962, 0, 16.8104058324725, 14323.351002162, -0.000211433064096042, -1.17567317669063e-07, 5.48663642911662e-10 ],
[ 2.99850, 0, 20.0662162992154, 31190.2833184237, -0.000330217264104689, -1.27467213037319e-07, 5.89097103916197e-10 ],
[ 3.67449, 0, 19.1659617307383, 22652.0424291174, -5.4405306480431e-05, 1.32843796760824e-07, -6.37675434763373e-10 ],
[ 1.19188, 0, 22.4217721974812, 39518.974745379, -0.000173189506489078, 1.22943901392567e-07, -5.97241973758837e-10 ],
// where is this comming from now? x05[NUM05] and x17[NUM17]
// [ 8.04508, 3.14160504542748, 3.81034443058831, 8399.70959833595, -2.85472839847728e-05, 3.20170955004738e-08, -1.53637455543612e-10 ],
// [ 1.37497, 4.80196381545309, 6.9519370841781, 8399.6847317742, -2.85472839847728e-05, 3.20170955004738e-08, -1.55091896586941e-10 ],
],
],
[ // error 39.50782
[
[ 385000.52719, 1.5707963267949 ],
[ -3.14837, 1.5707963267949, 3.25581046674294, 16866.9323162617, -0.000118784200008647, -9.89989536825672e-09, 4.04334610045353e-11 ],
[ 79.66183, 1.5707963267949, -0.900254568477138, -8538.2408893063, 0.000275811957624258, 2.60311009798143e-07, -1.22677253867957e-09 ],
[ -20905.32206, 1.5707963267949, 2.3555558982658, 8328.69142695536, 0.000157027757615611, 2.50411114429886e-07, -1.18633907767503e-09 ],
[ -4.42124, 1.5707963267949, 1.45530132978866, -209.549462350937, 0.000432839715239869, 5.1072212422803e-07, -2.4131116163546e-09 ],
[ -569.92332, 1.5707963267949, 4.7111117965316, 16657.3828539107, 0.000314055515231222, 5.00822228859773e-07, -2.37267815535007e-09 ],
[ -23.21032, 1.5707963267949, 7.0666676947974, 24986.0742808661, 0.000471083272846833, 7.51233343289659e-07, -3.5590172330251e-09 ],
[ -1.11693, 1.5707963267949, 9.42222359306319, 33314.7657078214, 0.000628111030462444, 1.00164445771955e-06, -4.74535631070014e-09 ],
[ -7.00293, 1.5707963267949, 1.52894833043986, -16029.0808987427, -0.000316736050074076, -5.00109552748542e-07, 2.37267815535007e-09 ],
[ -129.62476, 1.5707963267949, 3.88450422870566, -7700.38947178736, -0.000159708292458466, -2.49698438318655e-07, 1.18633907767503e-09 ],
[ 48.89010, 1.5707963267949, 6.24006012697146, 628.301955168003, -2.68053484285462e-06, 7.12676111231018e-10 ],
[ 104.75896, 1.5707963267949, 8.59561602523726, 8956.99338212336, 0.000154347222772756, 2.51123790541117e-07, -1.18633907767503e-09 ],
[ 5.75105, 1.5707963267949, 10.9511719235031, 17285.6848090787, 0.000311374980388367, 5.01534904971004e-07, -2.37267815535007e-09 ],
[ -2.11728, 1.5707963267949, 10.1245643556771, -7072.08751661936, -0.00016238882730132, -2.48985762207424e-07, 1.18633907767503e-09 ],
[ 1.06575, 1.5707963267949, 12.4801202539429, 1256.60391033601, -5.36106968570925e-06, 1.42535222246204e-09 ],
[ 1.16562, 1.5707963267949, 14.8356761522087, 9585.29533729137, 0.000151666687929902, 2.51836466652349e-07, -1.18633907767503e-09 ],
[ -1.73852, 1.5707963267949, 0.487354944495847, -8886.00570709867, -0.000342504866852411, -4.68848766590599e-07, 2.21831347928479e-09 ],
[ -8.37909, 1.5707963267949, 2.84291084276165, -557.314280143312, -0.0001854771092368, -2.18437652160713e-07, 1.03197440160976e-09 ],
[ 108.74265, 1.5707963267949, 5.19846674102744, 7771.37714681205, -2.84493516211887e-05, 3.19734622691739e-08, -1.54364676065276e-10 ],
[ 6.32199, 1.5707963267949, 7.55402263929324, 16100.0685737674, 0.000128578405994422, 2.8238457669906e-07, -1.34070375374031e-09 ],
[ -16.67533, 1.5707963267949, 11.4385268679989, 8399.67910198005, -3.11298864640433e-05, 3.26861383804049e-08, -1.54364676065276e-10 ],
[ -4.95049, 1.5707963267949, -4.43874267015383, 5957.45895633273, -0.000208565391172279, -1.87889542114001e-07, 8.77609725544482e-10 ],
[ -9.88519, 1.5707963267949, -2.08318677188803, 14286.1503832881, -5.15376335566681e-05, 6.25215723158857e-08, -3.08729352130553e-10 ],
[ 10.05654, 1.5707963267949, -0.55423844144817, -1742.93051545463, -0.000368273683630745, -4.37587980432656e-07, 2.06394880321952e-09 ],
[ -152.14314, 1.5707963267949, 1.80131745681763, 6585.76091150073, -0.000211245926015134, -1.8717686600277e-07, 8.77609725544482e-10 ],
[ -204.59357, 1.5707963267949, 4.15687335508343, 14914.4523384561, -5.42181683995227e-05, 6.32342484271168e-08, -3.08729352130553e-10 ],
[ -12.83185, 1.5707963267949, 6.51242925334923, 23243.1437654115, 0.000102809589216088, 3.13645362857003e-07, -1.49506842980559e-09 ],
[ 14.40262, 1.5707963267949, 3.33026578725749, -9443.31998724199, -0.00052798197608921, -6.87286418751312e-07, 3.25028788089455e-09 ],
[ 246.15768, 1.5707963267949, 5.68582168552329, -1114.62856028662, -0.000370954218473599, -4.36875304321425e-07, 2.06394880321952e-09 ],
[ 8.75170, 1.5707963267949, 4.78556711704615, -9652.86944959292, -9.51422608493409e-05, -1.76564294523282e-07, 8.37176264539947e-10 ],
[ -3699.10468, 1.5707963267949, 8.04137758378909, 7214.06286666874, -0.000213926460857988, -1.86464189891539e-07, 8.77609725544482e-10 ],
[ 10.32129, 1.5707963267949, 7.14112301531195, -1324.17802263756, 6.18854967662701e-05, 7.38468199066045e-08, -3.49162813135088e-10 ],
[ -2955.96651, 1.5707963267949, 10.3969334820549, 15542.7542936241, -5.68987032423774e-05, 6.39469245383478e-08, -3.08729352130553e-10 ],
[ 4.13118, 1.5707963267949, 9.49667891357775, 7004.5134043178, 0.000218913254381881, 3.24257934336491e-07, -1.53550189081012e-09 ],
[ -170.73274, 1.5707963267949, 12.7524893803207, 23871.4457205795, 0.000100129054373234, 3.14358038968234e-07, -1.49506842980559e-09 ],
[ -10.44472, 1.5707963267949, 15.1080452785865, 32200.1371475348, 0.000257156811988845, 5.64769153398121e-07, -2.68140750748062e-09 ],
[ 24.20935, 1.5707963267949, 14.2814377107605, 7842.36482183674, -0.000216606995700843, -1.85751513780308e-07, 8.77609725544482e-10 ],
[ 30.82498, 1.5707963267949, 16.6369936090263, 16171.0562487921, -5.9579238085232e-05, 6.46596006495788e-08, -3.08729352130553e-10 ],
[ 2.61650, 1.5707963267949, 18.9925495072921, 24499.7476757475, 9.7448519530379e-05, 3.15070715079465e-07, -1.49506842980559e-09 ],
[ 2.35380, 1.5707963267949, 20.521497837732, 8470.66677700474, -0.000219287530543698, -1.85038837669077e-07, 8.77609725544482e-10 ],
[ 3.25823, 1.5707963267949, 13.2398443248165, 14985.4400134808, -0.000242375812479177, -1.54490727622365e-07, 7.23245049479206e-10 ],
[ -1.41893, 1.5707963267949, 15.5954002230823, 23314.1314404361, -8.5348054863566e-05, 9.59203868075217e-08, -4.63094028195829e-10 ],
[ -1.89710, 1.5707963267949, 9.84269504060672, 13799.8237781695, -0.000425172386873122, -3.73641055894308e-07, 1.75521945108896e-09 ],
[ -3.95812, 1.5707963267949, 12.1982509388725, 22128.5152051248, -0.000268144629257511, -1.23229941464422e-07, 5.68880373413929e-10 ],
[ -1.57145, 1.5707963267949, 14.5538068371383, 30457.2066320802, -0.0001111168716419, 1.27181172965465e-07, -6.17458704261105e-10 ],
[ -21.63627, 1.5707963267949, 16.0827551675782, 14428.1257333375, -0.000427852921715977, -3.72928379783077e-07, 1.75521945108896e-09 ],
[ -34.78245, 1.5707963267949, 18.438311065844, 22756.8171602928, -0.000270825164100366, -1.22517265353191e-07, 5.68880373413929e-10 ],
[ -11.64993, 1.5707963267949, 20.7938669641098, 31085.5085872482, -0.000113797406484755, 1.27893849076696e-07, -6.17458704261105e-10 ],
[ -1.42255, 1.5707963267949, 23.1494228623756, 39414.2000142036, 4.32303511308562e-05, 3.78304963506582e-07, -1.80379778193614e-09 ],
// where is this coming from now? x12[NUM12]
// [ 1.05870, 1.57288531137661, 10.3492252753131, 8364.7398435741, -0.000214122325585157, -1.86376923428939e-07, 8.76155284501153e-10 ],
],
],
];
function elp2000xyz(jy2k)
{
// Using julian centuries
var t = jy2k / 100;
var rp = [];
// Main problem (elp1 - elp3)
for(var coord = 0; coord < 3; coord++) {
var tdeg = 1;
var sum = 0;
for(var deg = 0; deg < elp82[coord].length; deg++) {
var terms = elp82[coord][deg], deg_sum = 0;
for(var i = 0; i < terms.length; i++) {
var term = terms[i];
var alpha = term[1];
var tj = 1;
for(var j = 2; j < term.length; j++) {
alpha += term[j] * tj;
tj *= t;
}
deg_sum += term[0] * Math.sin(alpha);
}
sum += tdeg * deg_sum;
tdeg *= t;
}
rp[coord] = sum;
}
var w1 = 0;
var tdeg = 1;
for(var deg = 0; deg < elp82_w1.length; deg++) {
w1 += elp82_w1[deg] * tdeg;
tdeg *= t;
}
rp[0] *= Math.PI / (180 * 3600);
rp[1] *= Math.PI / (180 * 3600);
rp[0] += w1;
var rv = {
x: rp[2] * Math.cos(rp[1]) * Math.cos(rp[0]) * 6.68459e-9,
y: rp[2] * Math.cos(rp[1]) * Math.sin(rp[0]) * 6.68459e-9,
z: rp[2] * Math.sin(rp[1]) * 6.68459e-9,
epoch: jy2k
};
return rv;
}