-
Notifications
You must be signed in to change notification settings - Fork 4
/
martians.sat.js
33 lines (32 loc) · 14.3 KB
/
martians.sat.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
/* autogenerated by webmerge (compile context) */
;
(function(){(function(x){function t(h,e,c,d,l,a,b){b=b||0;c=c||0;d=d||[];h(e,c,d,l,a,b);e.givesMeanMotion&&(h=d[b+0]*e.givesMeanMotion,d[b+0]=Math.cbrt(e.GM/h/h));if(toVSOP=e.toVSOP)e=new Orbit({a:d[b+0],L:d[b+1],k:d[b+2],h:d[b+3],q:d[b+4],p:d[b+5],GM:e.GM,epoch:c}),e=e.state(c),"function"==typeof toVSOP&&(g=g||new THREE.Matrix3,toVSOP(c,g),toVSOP=g),e.r.applyMatrix3(toVSOP),e.v.applyMatrix3(toVSOP),e=new Orbit(e),d[b++]=e._a,d[b++]=e.L(),d[b++]=e.k(),d[b++]=e.h(),d[b++]=e.q(),d[b++]=e.p();return d}
function u(h,e,c,d,l,a,b){b=b||0;c=c||0;d=d||[];t(h,e,c,d,l,a,b);return{a:d[b++],L:d[b++],k:d[b++],h:d[b++],q:d[b++],p:d[b++],GM:e.GM,epoch:c}}function w(h,e,c,d,l,a,b){b=b||0;c=c||0;d=d||[];t(h,e,c,d,l,a,b);h=(new Orbit({a:d[b+0],L:d[b+1],k:d[b+2],h:d[b+3],q:d[b+4],p:d[b+5],GM:e.GM,epoch:c})).state(c);d[b++]=h.r.x;d[b++]=h.r.y;d[b++]=h.r.z;d[b++]=h.v.x;d[b++]=h.v.y;d[b++]=h.v.z;return d}var g;x.VSOP=x.VSOP||function(h,e,c,d,l,a){var b={raw:function(m,f,k,p,n){return h(b,m,f,k,p,n)},vsop:function(m,
f,k,p,n){return t(h,b,m,f,k,p,n)},state:function(m,f,k,p,n){return w(h,b,m,f,k,p,n)},position:function(m,f,k,p,n){n=n||0;m=m||0;f=f||[];w(h,b,m,f,k,p,n);return{x:f[n++],y:f[n++],z:f[n++],vx:f[n++],vy:f[n++],vz:f[n++],GM:b.GM,epoch:m}},orbital:function(m,f,k,p,n){return u(h,b,m,f,k,p,n)},orbit:function(m,f,k,p,n){return new Orbit(u(h,b,m,f,k,p,n))}};b.givesMeanMotion=a;b.toVSOP=l;b.coeffs=d;b.GM=c;b.name=e;return b}})(this);(function(x){function t(g,h,e,c,d,l,a){a=a||0;e=e||0;c=c||[];g(h,e,c,d,l,a);
if(toVSOP=h.toVSOP)g=new Orbit({a:c[a+0],L:c[a+1],k:c[a+2],h:c[a+3],q:c[a+4],p:c[a+5],GM:h.GM,epoch:e}),g=g.state(e),"function"==typeof toVSOP&&(toVSOP(e,mat3),toVSOP=mat3),g.r.applyMatrix3(toVSOP),g.v.applyMatrix3(toVSOP),g=new Orbit(g),c[a++]=g._a,c[a++]=g.L(),c[a++]=g.k(),c[a++]=g.h(),c[a++]=g.q(),c[a++]=g.p();return c}function u(g,h,e,c,d,l,a){a=a||0;e=e||0;c=c||[];t(g,h,e,c,d,l,a);return{a:c[a++],L:c[a++],k:c[a++],h:c[a++],q:c[a++],p:c[a++],GM:h.GM,epoch:e}}function w(g,h,e,c,d,l,a){a=a||0;e=
e||0;c=c||[];t(g,h,e,c,d,l,a);g=(new Orbit({a:c[a+0],L:c[a+1],k:c[a+2],h:c[a+3],q:c[a+4],p:c[a+5],GM:h.GM,epoch:e})).state(e);c[a++]=g.r.x;c[a++]=g.r.y;c[a++]=g.r.z;c[a++]=g.v.x;c[a++]=g.v.y;c[a++]=g.v.z;return c}x.SATELLITE=function(g,h,e,c,d){var l={raw:function(a,b,m,f,k){return g(l,a,b,m,f,k)},vsop:function(a,b,m,f,k){return t(g,l,a,b,m,f,k)},state:function(a,b,m,f,k){return w(g,l,a,b,m,f,k)},position:function(a,b,m,f,k){k=k||0;a=a||0;b=b||[];w(g,l,a,b,m,f,k);return{x:b[k++],y:b[k++],z:b[k++],
vx:b[k++],vy:b[k++],vz:b[k++],GM:l.GM,epoch:a}},orbital:function(a,b,m,f,k){return u(g,l,a,b,m,f,k)},orbit:function(a,b,m,f,k){return new Orbit(u(g,l,a,b,m,f,k))}};l.toVSOP=d;l.coeffs=c;l.GM=e;l.name=h;return l}})(this);(function(x){function t(d,l,a,b,m,f){f=f||0;l=l||0;a=a||[];var k=365.25*l+6491.5,p=d.coeffs,n=p[0],A=p[1],q=p[2];p=p[3];for(var r=0;6>r;r+=1)a[f+r]=q[r];for(q=0;2>q;++q){var y=p[q];for(r=y.length-1;-1!=r;r--){var v=y[r],z=v[0]+k*v[1];a[f+q]+=v[2]*c(z)}}for(q=2;4>q;++q)for(y=p[q],r=
y.length-1;-1!=r;r--)v=y[r],z=v[0]+k*v[1],a[f+2*q-2]+=v[2]*c(z),a[f+2*q-1]+=v[2]*e(z);a[f+1]+=(n+A*k)*k;f+=6;b&&(a[f++]=d.GM);m&&(a[f++]=l);return a}function u(d,l){var a=h/180*(47.68143+-.1061*d/100),b=h/180*(37.1135+.0609*d/100);d=c(a);a=e(a);var m=c(b);b=e(b);l.set(d,-m*a,b*a,a,m*d,-b*d,0,b,m);l.multiplyMatrices(w,l)}var w={elements:[.9999999999998848,4.403598133110236E-7,-1.90919246107775E-7,-4.799655442984222E-7,.9174821370868568,-.3977769829016049,0,.3977769829016507,.9174821370869625]},g=[[19.7020556283139,
1.657852042683113E-10,[6.26916188E-5,2.09129739264173,-5.774003141E-7,6.18505279E-7,-5.75018919826E-5,-5.40676493351E-5],[[[5.013490350126586,27.15567382195733,4.537539999999999E-9],[.683991059078,19.69446151585829,7.312E-10],[4.514031245592586,40.73350897245015,7.785599999999993E-10],[5.531351678889586,13.57783661756435,3.529399999999985E-10],[5.700307292822586,46.85013393001369,2.094599999999994E-10],[4.228062220664587,54.31134764391466,9.139999999999999E-11],[1.1679075830175,7.461211875946264,
6.204E-11],[5.197274703601086,60.42797388545593,5.295999999999951E-11],[5.160045430868086,39.38582310889583,1.811999999999999E-11],[2.2232772299005,57.77452001970681,1.563999999999897E-11],[.6921616240615,21.03904892768837,1.535999999999999E-11],[6.215802752555586,33.27229783044108,1.304E-11],[1.368231494011,39.3889217970823,1.661999999999999E-11],[.2601539199675,7.446011234647927,1.328E-11],[.059038456871,39.41932465627423,8.559999999999978E-12],[6.179310844209586,59.11910805492755,7.24E-12]],[[5.334169568271586,
.009145914066599032,5.01684813E-5],[5.334169148295587,.009145914113327495,5.01684813E-5],[.380534526596,.001540952541904328,3.35026497E-5],[.380533948496,.00154095261310426,3.350264903E-5],[5.288363718535586,.01829243888046791,2.827839093E-5],[5.288363809359586,.01829243887034939,2.827839093E-5],[3.412685718051586,.007604696023359408,1.578862428E-5],[3.412685998796586,.007604695992157328,1.578862427E-5],[3.448999855869586,27.1556761692721,3.00884432E-5],[.919444544403,.003101144183892481,8.17856317E-6],
[.919444319278,.003101144208596499,8.17856334E-6],[5.387625479307586,19.6944627504927,2.044327843999999E-5],[2.84899673989,.02743829098982358,6.51695172E-6],[2.848996748767,.02743829098862537,6.51695172E-6],[3.954411167839586,13.57783808463605,1.013316988E-5],[2.912659283736,40.73351425390815,7.48346875999974E-6],[4.067858164824586,.02589727369338346,2.58935939E-6],[4.067857973471586,.02589727371473152,2.58935939E-6],[.377627161385,.0365841782885365,1.12514742E-6],[.377626798556,.03658417832900902,
1.12514742E-6],[4.121936540919586,46.85014091671,1.523532599999976E-6],[1.231836210236,.01674957754399965,4.9765123E-7],[1.231836585135,.01674957750247454,4.9765123E-7],[2.488083095032,.0152038620787535,6.8419668E-7],[2.488083105051,.0152038620772819,6.8419668E-7],[1.5761418806595,.03504321962396548,1.12486858E-6],[6.145328698142587,6.116624841770791,7.873411399999999E-7],[2.6267561051145,54.3113523385442,1.04064572E-6],[2.759579551372,7.461213382164448,7.166789399999994E-7],[6.005673273380586,1.314187651672942,
6.022022799999936E-7],[.093530900566,7.53211563854622E-4,1.9649769E-7],[.093432654525,7.532237916966188E-4,1.9649645E-7],[.4302928383505,39.385825577776,4.9873078E-7],[3.587439959397586,60.42797969706294,4.804827999999994E-7],[4.183547650369587,.04572998195120822,1.7471331E-7],[4.183547815926586,.04572998193123842,1.7471331E-7],[5.589444380180586,.006068411018120026,1.7930767E-7],[5.589445119118587,.006068410936124942,1.7930768E-7],[6.062696336024086,39.38892673561993,2.653755199999908E-7],[4.628882088425586,
33.27230135427769,2.5392728E-7],[4.736462571780586,.01224558395734566,1.2547154E-7],[4.736462588777586,.01224558396211886,1.2547155E-7]],[[1.404382124885,.007595588511174286,.01514110912521],[2.088385523034,19.70205682773437,3.8496208674E-4],[3.895377361148586,.0106967028026819,6.903413242E-5],[.498957209475,-.007605272825959576,4.946101994E-5],[.821521022172,46.85772969905357,3.671320788E-5],[3.378076387479586,-7.453616316894914,3.267983782E-5],[2.772375719698,39.3965187319472,8.75048305E-6],[2.839303414769,
6.12422038837152,6.17093881E-6],[.318450317043,60.43556479692822,6.95700594E-6],[1.410329121503,.01984322681200531,5.73408896E-6],[1.336796551701,33.27989343110183,3.43157786E-6],[3.853646745987586,-21.03145308554279,4.03740951E-6],[.254706736621,.00154966559422109,2.11529622E-6],[1.508224230072,-59.11151611514718,1.90482762E-6],[.034626075514,-51.65030141480156,8.6960947E-7],[3.198655314207586,.009152774292423818,6.3298682E-7],[5.163954670916587,.01674080796065678,6.1303178E-7],[.780393743699,-.001550610622055567,
5.7372171E-7],[3.264588234538586,27.16326950857758,8.1810883E-7],[5.211329429707586,.02898903518276566,7.4341453E-7],[2.69171676349,-27.1480776901214,5.4416478E-7],[1.001733960626,-45.53367734785991,5.044515E-7],[3.212149602842586,-19.68376490094933,4.2845991E-7],[4.145658249560586,-34.6092893218734,4.2249373E-7],[5.063879137454586,.02589097180762378,3.5819498E-7],[2.558639707373,.006064928432880783,3.8088812E-7],[5.292499025555586,.003075065445597794,4.0557392E-7]],[[2.058107128488,-.007604861328578004,
.00940860518312],[3.248856489376586,-.009145863467943084,5.699538102E-5],[4.557280987272586,.01829238959116374,2.474369483E-5],[6.113423353213586,.007595702278066188,2.062715397E-5],[2.067112903892,.02743825478464904,5.94557416E-6],[1.700689207004,.009145729527513899,3.9201902E-6],[3.577059353926586,-.01829259493439447,2.16779197E-6],[4.940284891770586,-7.453616316894914,2.76976375E-6],[2.117885747855,39.4117189242592,1.81353917E-6],[.517605536523,19.70205682773437,1.08342918E-6],[5.864248782211586,
.03658425999636452,1.06665701E-6],[3.240692168340586,.02589639535977297,7.9098533E-7],[.757075199434,-1.321790869500707,8.8808851E-7],[.660891079606,6.12422038837152,5.5207589E-7],[5.519669134088586,46.85772969905357,4.397886E-7],[5.844000094873587,-.0274382573344411,4.5836091E-7],[4.602755395228586,-.01675516082048598,3.5331311E-7],[2.685649467156,.001542518910643103,3.5029885E-7],[3.353176877809586,12.2560458183911,3.8288517E-7],[2.556761413073,.01068971473943851,2.7112473E-7],[4.622369718415587,
-.02589682634097252,1.9917454E-7],[.749769089433,.03504362063026418,2.0368977E-7],[3.965205602751586,27.14806830611846,1.7267796E-7],[4.743858488241586,-21.03145308554279,1.5744728E-7],[3.405870070134586,.04572380100924578,1.6985677E-7],[.374238084921,33.27989343110183,1.0150045E-7],[1.374678754422,-19.70206671243377,8.259149E-8],[1.140160118874,-.006108652383295211,8.504923E-8]]]],[4.9770138896523,-2.331793571572226E-14,[1.5681340867E-4,-1.91675378107402,-2.39579419518E-5,2.57893300229E-5,-.0056443721379635,
-.005312180697856],[[[6.146803530569087,2.294413036846356,5.39836E-9],[3.432805186019586,9.935735425667586,7.095199999999997E-10],[4.356581106602587,3.441619555269535,3.7378E-10],[5.915601483397086,9.926589650598594,2.3374E-10],[1.6152431614465,1.147206518423178,1.697E-10],[2.114704906116,9.917443791162608,5.314E-11],[.9393388277920001,9.954027953247621,7.046E-11],[3.949494792732586,9.944881541450725,4.233999999999998E-11],[2.0893223919695,2.29409760669131,2.813999999999983E-11],[.7795571756865,2.294728469946876,
2.549999999999971E-11],[2.3618516696645,4.588826073692712,1.676E-11],[2.7700268835785,9.95465877310633,9.719999999999976E-12],[4.733522308629587,9.963173826265681,9.519999999999998E-12],[3.258781379519086,14.72506551307767,9.73999999999999E-12],[4.596299836113586,9.90829789432185,1.027999999999982E-11],[3.0576884433465,2.682916339604879,6.679999999999999E-12],[5.453932177963086,2.682285947505377,6.879999999999995E-12],[4.328499239462586,9.936050924435195,6.199999999999996E-12],[2.168321380562,4.976699000854042,
5.359999999999916E-12],[2.516818588675,9.935420104041299,3.359999999999995E-12],[.2997827070725,3.441304123224338,2.919999999999998E-12],[2.1431434204625,2.682600911813873,2.979999999999999E-12],[5.271781540988586,3.441934988580561,2.64E-12],[.538228720593,9.926905039305762,2.039999999999966E-12],[3.629187963751586,2.303558945733479,1.09E-12]],[[2.488175621789,3.153377646687549E-4,.00248303166019],[2.488175634463,3.153377641537758E-4,.00248303165949],[5.336889264964586,.009145915158660612,2.0234269782E-4],
[5.336889346905586,.009145915155199243,2.0234269782E-4],[5.281538321363586,.01829244561727392,1.0431675642E-4],[5.281537958522586,.01829244563271799,1.0431675643E-4],[1.4334900188355,2.294413045224799,1.637133774599998E-4],[2.8520077883375,.02743818628432718,4.82067142E-5],[3.147176604035586,.01860783561096842,1.497066023E-5],[3.147176307034586,.01860783562364318,1.497066034E-5],[3.182516662993086,1.147206709032795,1.137028858E-5],[5.917181875408586,3.44162012081455,8.35060986E-6],[3.544871659744586,
6.190897763118658E-4,4.3832545E-6],[3.544871649035586,6.190897769462623E-4,4.3832545E-6],[.461419338359,.03657933964533806,8.31617642E-6],[.675422268593,.02775277029221846,6.447587580000001E-6],[5.001640850015586,9.9357355827835,7.9266874E-6],[4.485218623803586,.008828439970895009,3.90506421E-6],[.222101391798,.00946472172302809,3.11780183E-6],[4.485218622895586,.008828439971019056,3.90506421E-6],[.222101394466,.009464721722885516,3.11780183E-6]],[[2.198649419514,3.148401892560942E-4,2.7441315346E-4],
[4.366636518977586,4.977013897776327,6.015912711E-5],[1.46381621037,-3.153164045300449E-4,3.614585349E-5],[1.362467588064,2.682600831640474,2.577157903E-5],[.933679289332,-4.958721582505435,6.80199783E-6],[3.152432010349586,1.535394310272536,4.45297914E-6],[4.734051493918586,-4.949575691510945,2.23848292E-6],[5.736642853342587,2.32752464933439E-4,1.47874757E-6],[5.084945958505586,3.912335403634271E-4,1.45772004E-6],[4.232770650771586,7.271426904652134,1.34703031E-6],[1.516439412109,14.912749476923,
7.5381791E-7],[3.100618466711,.01797748798526167,8.7162297E-7],[5.155432690964586,.3881877876517008,1.01564888E-6],[2.250768124831,-4.940429834739583,5.0909893E-7],[3.422251338868586,-4.977013897776327,6.5370775E-7]],[[2.981506933511,-3.154811355556041E-4,.01562693319959],[4.557500894366586,.01829233626168517,1.3218186311E-4],[3.248124065112586,-.009145934570587952,3.833652719E-5],[1.70155133871,.00914566598660177,2.660211842E-5],[2.067662003165,.02743821959085702,2.882438535E-5],[4.805327222478586,
3.158564952832469E-4,2.713213911E-5],[2.318788380092,.01860776219134252,9.29632495E-6],[3.613580709014586,-.01829261290520875,4.46096029E-6],[5.867810550672586,.03658405181871115,4.90415603E-6],[5.496515547817586,-.009461294099629817,2.36688115E-6],[6.120362957845586,.0277536106462592,2.05755285E-6],[3.612389208841586,.00883017862740799,2.36575014E-6],[5.554163001934587,-.01860800990265229,1.22881444E-6],[3.561485983136586,.01797648948023003,1.21518946E-6],[1.941975361869,-6.259843043363501E-4,9.602857E-7],
[5.845244776759587,-.02743819348074506,1.17447177E-6],[1.821048365911,.009460829229838182,1.05844105E-6],[.758713545461,1.682177864988152E-4,2.38314749E-6],[3.292891638604586,.04573365667404765,7.6563038E-7],[3.766016108380586,.0368314021517197,4.0758243E-7],[5.747244956219586,9.954342722363187,4.9623409E-7],[1.724062868741,-.02774017744689255,3.0030779E-7],[4.429747729642586,-.008904754331211824,2.6134164E-7],[.865916190901,.02718340176462802,2.8919452E-7],[2.259603352363,-.03660152378331885,2.2137882E-7],
[1.108725025984,9.935732440466172,2.4499503E-7],[1.680391963791,.009076040299352415,1.6524166E-7]]]]],h=Math.PI,e=Math.sin,c=Math.cos;x.martian={phobos:VSOP(t,"phobos",1.2739818871093024E-5,g[0],u),deimos:VSOP(t,"deimos",1.2739818713311643E-5,g[1],u)}})(this)}).call(this);
/* crc: C12338442FADE30AC82782F1C48A0136 */