ootk 1.0.4 → 1.0.6

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +19 -33
  2. package/LICENSE.MD +21 -21
  3. package/README.md +128 -128
  4. package/asc/asconfig.json +22 -0
  5. package/asc/assembly/index.ts +1143 -0
  6. package/asc/ex/asconfig.json +22 -0
  7. package/asc/ex/assembly/index.ts +5 -0
  8. package/asc/ex/index.html +10 -0
  9. package/asc/ex/package.json +19 -0
  10. package/asc/ex/tests/index.js +4 -0
  11. package/asc/package.json +19 -0
  12. package/asc/tests/index.js +4 -0
  13. package/dist/ootk.js +1 -3850
  14. package/lib/ootk.d.ts +3 -4
  15. package/lib/ootk.js +3 -4
  16. package/lib/ootk.js.map +1 -1
  17. package/lib/{ootk-sgp4.d.ts → sgp4.d.ts} +6 -140
  18. package/lib/{ootk-sgp4.js → sgp4.js} +545 -555
  19. package/lib/sgp4.js.map +1 -0
  20. package/lib/transforms.d.ts +58 -0
  21. package/lib/{ootk-transforms.js → transforms.js} +3 -4
  22. package/lib/transforms.js.map +1 -0
  23. package/lib/{ootk-utils.d.ts → utils/constants.d.ts} +6 -11
  24. package/lib/utils/constants.js +31 -0
  25. package/lib/utils/constants.js.map +1 -0
  26. package/lib/utils/types.d.ts +164 -0
  27. package/lib/utils/types.js +2 -0
  28. package/lib/utils/types.js.map +1 -0
  29. package/lib/utils.d.ts +33 -0
  30. package/lib/{ootk-utils.js → utils.js} +12 -6
  31. package/lib/utils.js.map +1 -0
  32. package/package.json +15 -16
  33. package/sandbox.html +8 -0
  34. package/dist/ootk-sgp4.js +0 -3471
  35. package/dist/ootk-sgp4.min.js +0 -34
  36. package/dist/ootk-transforms.js +0 -340
  37. package/dist/ootk-transforms.min.js +0 -1
  38. package/dist/ootk-utils.js +0 -149
  39. package/dist/ootk-utils.min.js +0 -1
  40. package/dist/ootk.min.js +0 -60
  41. package/lib/ootk-sgp4.js.map +0 -1
  42. package/lib/ootk-transforms.d.ts +0 -141
  43. package/lib/ootk-transforms.js.map +0 -1
  44. package/lib/ootk-utils.js.map +0 -1
@@ -1,34 +0,0 @@
1
- !function(o,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Ootk=t():o.Ootk=t()}(this,(function(){return(()=>{"use strict";var o={333:(o,t,s)=>{s.r(t),s.d(t,{Sgp4:()=>Ea});
2
- /**
3
- * @author Theodore Kruczek.
4
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
5
- * with satellites and other orbital objects.
6
- *
7
- * @file The Sgp4 module contains a TypeScript port of the 2020 version of
8
- * sgp4unit.cpp from "Fundamentals of Astrodynamics and Applications" by David
9
- * Vallado. All of the original comments and notes are inserted in the code below
10
- * in order provide context to the functions and clarify any adjustments made for
11
- * TypeScript/JavaScript compatibility.
12
- *
13
- * @copyright MIT License.
14
- * Copyright (c) 2020-2021 Theodore Kruczek
15
- *
16
- * Permission is hereby granted, free of charge, to any person obtaining a copy
17
- * of this software and associated documentation files (the "Software"), to deal
18
- * in the Software without restriction, including without limitation the rights
19
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
- * copies of the Software, and to permit persons to whom the Software is
21
- * furnished to do so, subject to the following conditions:
22
- *
23
- * The above copyright notice and this permission notice shall be included in all
24
- * copies or substantial portions of the Software.
25
- *
26
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
- * SOFTWARE.
33
- */
34
- var e,a,d,n,i,r,c,h,m,l,p,x,g,M,f,u,z,b,v,y,j,k,q,w,P,F,I,O,S,E,C,N,T,_,A,L,B,D,G,H,J,K,Q,R,U,V,W,X,Y,Z,$,oo,to,so,eo,ao,no,io,ro,co,ho,mo,lo,po,xo,go,Mo,fo,uo,zo,bo,vo,yo,jo,ko,qo,wo,Po,Fo,Io,Oo,So,Eo,Co,No,To,_o,Ao,Lo,Bo,Do,Go,Ho,Jo,Ko,Qo,Ro,Uo,Vo,Wo,Xo,Yo,Zo,$o,ot,tt,st,et,at,dt,nt,it,rt,ct,ht,mt,lt,pt,xt,gt,Mt,ft,ut,zt,bt,vt,yt,jt,kt,qt,wt,Pt,Ft,It,Ot,St,Et,Ct,Nt,Tt,_t,At,Lt,Bt,Dt,Gt,Ht,Jt,Kt,Qt,Rt,Ut,Vt,Wt,Xt,Yt,Zt,$t,os,ts,ss,es,as,ds,ns,is,rs,cs,hs,ms,ls,ps,xs,gs,Ms,fs,us,zs,bs,vs,ys,js,ks,qs,ws,Ps,Fs,Is,Os,Ss,Es,Cs,Ns,Ts,_s,As,Ls,Bs,Ds,Gs,Hs,Js,Ks,Qs,Rs,Us,Vs,Ws,Xs,Ys,Zs,$s,oe,te,se,ee,ae,de,ne,ie,re,ce,he,me,le,pe,xe,ge,Me,fe,ue,ze,be,ve,ye,je,ke,qe,we,Pe,Fe,Ie,Oe,Se,Ee,Ce,Ne,Te,_e,Ae,Le,Be,De,Ge,He,Je,Ke,Qe,Re,Ue,Ve,We,Xe,Ye,Ze,$e,oa,ta,sa,ea,aa,da,na,ia,ra,ca,ha,ma,la=Math.PI,pa=2*la,xa=la/180,ga=2/3,Ma=1440/(2*la),fa=.01675,ua=.0549,za=.0043752690880113,ba=.00015835218,va=119459e-10,ya=15e-13,ja=.13130908,ka=2.8843198,qa=.37448087,wa=5.7686396,Pa=.95240898,Fa=1.8014998,Ia=1.050833,Oa=4.4108898,Sa=259200,Ea=function(){function o(){}return o.dpper=function(o,t){var s=o.e3,e=o.ee2,a=o.peo,d=o.pgho,n=o.pho,i=o.PInco,r=o.plo,c=o.se2,h=o.se3,m=o.sgh2,p=o.sgh3,x=o.sgh4,g=o.sh2,M=o.sh3,f=o.si2,u=o.si3,z=o.sl2,b=o.sl3,v=o.sl4,k=o.t,q=o.xgh2,w=o.xgh3,P=o.xgh4,F=o.xh2,I=o.xh3,O=o.xi2,S=o.xi3,E=o.xl2,C=o.xl3,N=o.xl4,T=o.zmol,_=o.zmos,A=t.ep,L=t.inclp,B=t.nodep,D=t.argpp,G=t.mp,H=t.opsmode,J=void 0===H?Ks:H,K=t.init;return _e=_+va*k,"y"===K&&(_e=_),Te=_e+2*fa*Math.sin(_e),Ee=Math.sin(Te),we=.5*Ee*Ee-.25,Pe=-.5*Ee*Math.cos(Te),Zs=c*we+h*Pe,$s=f*we+u*Pe,oe=z*we+b*Pe+v*Ee,te=m*we+p*Pe+x*Ee,se=g*we+M*Pe,_e=T+ba*k,"y"===K&&(_e=T),Te=_e+2*ua*Math.sin(_e),Ee=Math.sin(Te),we=.5*Ee*Ee-.25,Pe=-.5*Ee*Math.cos(Te),Fe=Zs+(e*we+s*Pe),Se=$s+(O*we+S*Pe),l=oe+(E*we+C*Pe+N*Ee),Ie=te+(q*we+w*Pe+P*Ee),Oe=se+(F*we+I*Pe),"n"===K&&(l-=r,Ie-=d,Oe-=n,L+=Se-=i,A+=Fe-=a,j=Math.sin(L),y=Math.cos(L),L>=.2?(D+=Ie-=y*(Oe/=j),B+=Oe,G+=l):(qe=Math.sin(B),ke=Math.cos(B),ye=j*qe,je=j*ke,ye+=Oe*ke+Se*y*qe,je+=-Oe*qe+Se*y*ke,(B%=pa)<0&&"a"===J&&(B+=pa),Ce=G+D+y*B,Ce+=l+Ie-Se*B*j,Ne=B,(B=Math.atan2(ye,je))<0&&"a"===J&&(B+=pa),Math.abs(Ne-B)>la&&(B<Ne?B+=pa:B-=pa),D=Ce-(G+=l)-y*B)),{ep:A,inclp:L,nodep:B,argpp:D,mp:G}},o.dscom=function(o){var t=o.epoch,s=o.ep,e=o.argpp,a=o.tc,d=o.inclp,n=o.nodep,i=o.np;G=i,Z=s,yo=Math.sin(n),jo=Math.cos(n),ko=Math.sin(e),qo=Math.cos(e),ao=Math.sin(d),eo=Math.cos(d),wo=1-(Je=Z*Z),Po=Math.sqrt(wo),0,0,0,0,0,ue=(4.523602-.00092422029*(ks=t+18261.5+a/1440))%pa,he=Math.sin(ue),ie=Math.cos(ue),re=.91375164-.03568096*ie,le=Math.sqrt(1-re*re),ce=.089683511*he/le,ge=Math.sqrt(1-ce*ce),pe=5.8351514+.001944368*ks;var r=.39785416*he/le;for(xe=ge*ie+.91744867*ce*he,r=Math.atan2(r,xe),r+=pe-ue,fe=Math.cos(r),me=Math.sin(r),Uo=.1945905,Vo=-.98088458,Yo=.91744867,Zo=.39785416,Wo=jo,Xo=yo,Lo=29864797e-13,Me=1/G,ea=1;ea<=2;ea++)Ft=-6*(Fo=Uo*Wo+Vo*Yo*Xo)*(Eo=-ao*(No=-Uo*Xo+Vo*Yo*Wo)+eo*(To=Vo*Zo))+Je*(-24*(Bo=Fo*qo+(Io=eo*No+ao*To)*ko)*(Qo=Eo*qo)-6*(Go=-Fo*ko+Io*qo)*(Jo=Eo*ko)),It=-6*(Fo*(Co=-ao*(_o=Vo*Xo+Uo*Yo*Wo)+eo*(Ao=Uo*Zo))+(Oo=-Vo*Wo+Uo*Yo*Xo)*Eo)+Je*(-24*((Do=Oo*qo+(So=eo*_o+ao*Ao)*ko)*Qo+Bo*(Ro=Co*qo))+-6*(Go*(Ko=Co*ko)+(Ho=-Oo*ko+So*qo)*Jo)),Ot=-6*Oo*Co+Je*(-24*Do*Ro-6*Ho*Ko),St=6*Io*Eo+Je*(24*Bo*Jo-6*Go*Qo),Et=6*(So*Eo+Io*Co)+Je*(24*(Do*Jo+Bo*Ko)-6*(Ho*Qo+Go*Ro)),Ct=6*So*Co+Je*(24*Do*Ko-6*Ho*Ro),qt=(qt=3*(Fo*Fo+Io*Io)+(Nt=12*Bo*Bo-3*Go*Go)*Je)+qt+wo*Nt,wt=(wt=6*(Fo*Oo+Io*So)+(Tt=24*Bo*Do-6*Go*Ho)*Je)+wt+wo*Tt,Pt=(Pt=3*(Oo*Oo+So*So)+(_t=12*Do*Do-3*Ho*Ho)*Je)+Pt+wo*_t,zt=-.5*(bt=Lo*Me)/Po,ut=-15*Z*(vt=bt*Po),yt=Bo*Go+Do*Ho,jt=Do*Go+Bo*Ho,kt=Do*Ho-Bo*Go,1===ea&&($o=ut,ot=zt,tt=bt,st=vt,et=yt,at=jt,dt=kt,nt=qt,it=wt,rt=Pt,ct=Ft,ht=It,mt=Ot,lt=St,pt=Et,xt=Ct,gt=Nt,Mt=Tt,ft=_t,Uo=fe,Vo=me,Yo=re,Zo=le,Wo=ge*jo+ce*yo,Xo=yo*ge-jo*ce,Lo=4.7968065e-7);return{snodm:yo,cnodm:jo,sinim:ao,cosim:eo,sinomm:ko,cosomm:qo,day:ks,e3:2*ut*kt,ee2:2*ut*jt,em:Z,emsq:Je,gam:pe,peo:0,pgho:0,pho:0,PInco:0,plo:0,rtemsq:Po,se2:2*$o*at,se3:2*$o*dt,sgh2:2*st*Mt,sgh3:2*st*(ft-gt),sgh4:-18*st*fa,sh2:-2*ot*pt,sh3:-2*ot*(xt-lt),si2:2*ot*ht,si3:2*ot*(mt-ct),sl2:-2*tt*it,sl3:-2*tt*(rt-nt),sl4:-2*tt*(-21-9*Je)*fa,s1:ut,s2:zt,s3:bt,s4:vt,s5:yt,s6:jt,s7:kt,ss1:$o,ss2:ot,ss3:tt,ss4:st,ss5:et,ss6:at,ss7:dt,sz1:nt,sz2:it,sz3:rt,sz11:ct,sz12:ht,sz13:mt,sz21:lt,sz22:pt,sz23:xt,sz31:gt,sz32:Mt,sz33:ft,xgh2:2*vt*Tt,xgh3:2*vt*(_t-Nt),xgh4:-18*vt*ua,xh2:-2*zt*Et,xh3:-2*zt*(Ct-St),xi2:2*zt*It,xi3:2*zt*(Ot-Ft),xl2:-2*bt*wt,xl3:-2*bt*(Pt-qt),xl4:-2*bt*(-21-9*Je)*ua,nm:G,z1:qt,z2:wt,z3:Pt,z11:Ft,z12:It,z13:Ot,z21:St,z22:Et,z23:Ct,z31:Nt,z32:Tt,z33:_t,zmol:(.2299715*ks-pe+4.7199672)%pa,zmos:(6.2565837+.017201977*ks)%pa}},o.dsinit=function(o){var t=o.xke,s=o.cosim,e=o.argpo,a=o.s1,d=o.s2,n=o.s3,i=o.s4,r=o.s5,c=o.sinim,h=o.ss1,m=o.ss2,l=o.ss3,p=o.ss4,x=o.ss5,g=o.sz1,M=o.sz3,f=o.sz11,u=o.sz13,z=o.sz21,b=o.sz23,v=o.sz31,y=o.sz33,j=o.t,q=o.tc,w=o.gsto,P=o.mo,F=o.mdot,I=o.no,O=o.nodeo,S=o.nodedot,E=o.xPIdot,C=o.z1,N=o.z3,_=o.z11,A=o.z13,L=o.z21,B=o.z23,D=o.z31,G=o.z33,H=o.ecco,J=o.eccsq,K=o.emsq,Q=o.em,R=o.argpm,U=o.inclm,V=o.mm,W=o.nm,X=o.nodem,Y=o.irez,Z=o.atime,$=o.d2201,oo=o.d2211,to=o.d3210,so=o.d3222,eo=o.d4410,ao=o.d4422,no=o.d5220,io=o.d5232,ro=o.d5421,co=o.d5433,ho=o.dedt,lo=o.didt,po=o.dmdt,xo=o.dnodt,go=o.domdt,Mo=o.del1,fo=o.del2,uo=o.del3,zo=o.xfact,vo=o.xlamo,yo=o.xli,jo=o.xni;Y=0,W<.0052359877&&W>.0034906585&&(Y=1),W>=.00826&&W<=.00924&&Q>=.5&&(Y=2);var ko=-va*m*(z+b);(U<.052359877||U>la-.052359877)&&(ko=0),0!==c&&(ko/=c);var qo=-ba*d*(L+B);return(U<.052359877||U>la-.052359877)&&(qo=0),go=(te=p*va*(v+y-6))-s*ko+i*ba*(D+G-6),xo=ko,0!==c&&(go-=s/c*qo,xo+=qo/c),mo=0,bo=(w+q*za)%pa,Q+=(ho=(Zs=h*va*x)+a*ba*r)*j,U+=(lo=($s=m*va*(f+u))+d*ba*(_+A))*j,R+=go*j,X+=xo*j,V+=(po=(oe=-va*l*(g+M-14-6*K))-ba*n*(C+N-14-6*K))*j,0!==Y&&(Xt=Math.pow(W/t,ga),2===Y&&(ze=Q,be=K,ve=(Q=H)*(K=J),Q<=.65?(Bt=3.616-13.247*Q+16.29*K,Dt=117.39*Q-19.302-228.419*K+156.591*ve,Gt=109.7927*Q-18.9068-214.6334*K+146.5816*ve,Ht=242.694*Q-41.122-471.094*K+313.953*ve,Jt=841.88*Q-146.407-1629.014*K+1083.435*ve,Kt=3017.977*Q-532.114-5740.032*K+3708.276*ve):(Bt=331.819*Q-72.099-508.738*K+266.724*ve,Dt=1582.851*Q-346.844-2415.925*K+1246.113*ve,Gt=1554.908*Q-342.585-2366.899*K+1215.972*ve,Ht=4758.686*Q-1052.797-7193.992*K+3651.957*ve,Jt=16178.11*Q-3581.69-24462.77*K+12422.52*ve,Kt=Q>.715?29936.92*Q-5149.66-54087.36*K+31324.56*ve:1464.74-4664.75*Q+3763.64*K),Q<.7?(Ut=4988.61*Q-919.2277-9064.77*K+5542.21*ve,Qt=4568.6173*Q-822.71072-8491.4146*K+5337.524*ve,Rt=4690.25*Q-853.666-8624.77*K+5341.4*ve):(Ut=161616.52*Q-37995.78-229838.2*K+109377.94*ve,Qt=218913.95*Q-51752.104-309468.16*K+146349.42*ve,Rt=170470.89*Q-40023.88-242699.48*K+115605.82*ve),$=(T=17891679e-13*(Wt=3*(W*W)*(Xt*Xt)))*(At=.75*(1+2*s+(k=s*s)))*(-.306-.44*(Q-.64)),oo=T*(1.5*(Vt=c*c))*Bt,to=(T=3.7393792e-7*(Wt*=Xt))*(1.875*c*(1-2*s-3*k))*Dt,so=T*(-1.875*c*(1+2*s-3*k))*Gt,eo=(T=2*(Wt*=Xt)*7.3636953e-9)*(35*Vt*At)*Ht,ao=T*(39.375*Vt*Vt)*Jt,no=(T=1.1428639e-7*(Wt*=Xt))*(9.84375*c*(Vt*(1-2*s-5*k)+.33333333*(4*s-2+6*k)))*Kt,io=T*(c*(4.92187512*Vt*(-2-4*s+10*k)+6.56250012*(1+2*s-3*k)))*Rt,ro=(T=2*Wt*2.1765803e-9)*(29.53125*c*(2-8*s+k*(8*s-12+10*k)))*Qt,co=T*(29.53125*c*(-2-8*s+k*(12+8*s-10*k)))*Ut,vo=(P+O+O-(bo+bo))%pa,zo=F+po+2*(S+xo-za)-I,Q=ze,K=be),1===Y&&(Lt=1+s,fo=2*(Mo=3*W*W*Xt*Xt)*(At=.75*(1+s)*(1+s))*(1+K*(.8125*K-2.5))*17891679e-13,uo=3*Mo*(Lt*=1.875*Lt*Lt)*(1+K*(6.60937*K-6))*2.2123015e-7*Xt,Mo=Mo*(.9375*c*c*(1+3*s)-.75*(1+s))*(Dt=1+2*K)*21460748e-13*Xt,vo=(P+O+e-bo)%pa,zo=F+E+po+go+xo-(I+za)),yo=vo,jo=I,Z=0,W=I+mo),{em:Q,argpm:R,inclm:U,mm:V,nm:W,nodem:X,irez:Y,atime:Z,d2201:$,d2211:oo,d3210:to,d3222:so,d4410:eo,d4422:ao,d5220:no,d5232:io,d5421:ro,d5433:co,dedt:ho,didt:lo,dmdt:po,dndt:mo,dnodt:xo,domdt:go,del1:Mo,del2:fo,del3:uo,xfact:zo,xlamo:vo,xli:yo,xni:jo}},o.dspace=function(o){var t=o.irez,s=o.d2201,e=o.d2211,a=o.d3210,n=o.d3222,i=o.d4410,r=o.d4422,c=o.d5220,h=o.d5232,m=o.d5421,l=o.d5433,p=o.dedt,x=o.del1,g=o.del2,M=o.del3,f=o.didt,u=o.dmdt,z=o.dnodt,b=o.domdt,v=o.argpo,y=o.argpdot,j=o.t,k=o.tc,q=o.gsto,w=o.xfact,P=o.xlamo,F=o.no,I=o.atime,O=o.em,S=o.argpm,E=o.inclm,C=o.xli,N=o.mm,T=o.xni,_=o.nodem,A=o.nm;if(mo=0,bo=(q+k*za)%pa,O+=p*j,E+=f*j,S+=b*j,_+=z*j,N+=u*j,0!==t){(0===I||j*I<=0||Math.abs(j)<Math.abs(I))&&(I=0,T=F,C=P),po=j>0?720:-720;for(var L=381;381===L;)2!==t?(xo=x*Math.sin(C-ja)+g*Math.sin(2*(C-ka))+M*Math.sin(3*(C-qa)),go=T+w,Mo=x*Math.cos(C-ja)+2*g*Math.cos(2*(C-ka))+3*M*Math.cos(3*(C-qa)),Mo*=go):(fo=(uo=v+y*I)+uo,zo=C+C,xo=s*Math.sin(fo+C-wa)+e*Math.sin(C-wa)+a*Math.sin(uo+C-Pa)+n*Math.sin(-uo+C-Pa)+i*Math.sin(fo+zo-Fa)+r*Math.sin(zo-Fa)+c*Math.sin(uo+C-Ia)+h*Math.sin(-uo+C-Ia)+m*Math.sin(uo+zo-Oa)+l*Math.sin(-uo+zo-Oa),go=T+w,Mo=s*Math.cos(fo+C-wa)+e*Math.cos(C-wa)+a*Math.cos(uo+C-Pa)+n*Math.cos(-uo+C-Pa)+c*Math.cos(uo+C-Ia)+h*Math.cos(-uo+C-Ia)+2*i*Math.cos(fo+zo-Fa)+r*Math.cos(zo-Fa)+m*Math.cos(uo+zo-Oa)+l*Math.cos(-uo+zo-Oa),Mo*=go),Math.abs(j-I)>=720?L=381:(lo=j-I,L=0),381===L&&(C+=go*po+xo*Sa,T+=xo*po+Mo*Sa,I+=po);A=T+xo*lo+Mo*lo*lo*.5,d=C+go*lo+xo*lo*lo*.5,1!==t?(N=d-2*_+2*bo,mo=A-F):(N=d-_-S+bo,mo=A-F),A=F+mo}return{atime:I,em:O,argpm:S,inclm:E,xli:C,mm:N,xni:T,nodem:_,dndt:mo,nm:A}},o.initl=function(t){var s=t.opsmode,e=t.ecco,a=t.epoch,d=t.inclo,n=t.xke,i=t.j2,r=t.no;Rs=1-(Qs=e*e),Us=Math.sqrt(Rs),Es=Math.cos(d),Ds=Es*Es,Vs=Math.pow(n/r,ga);var c=(Ws=.75*i*(3*Ds-1)/(Us*Rs))/(Vs*Vs);return r/=1+(c=Ws/((Xs=Vs*(1-c*c-c*(1/3+134*c*c/81)))*Xs)),ys=Math.pow(n/r,ga),As=Math.sin(d),ee=-(Bs=1-5*Ds)-Ds-Ds,ae=1/ys,de=(Ys=ys*Rs)*Ys,ne=ys*(1-e),"n","a"==s?(ro=a-7305,co=Math.floor(ro+1e-8),1.7321343856509375,5075514194322695e-30,(sa=(1.7321343856509375+(ho=.017202791694070362)*co+(ho+pa)*(ro-co)+ro*ro*5075514194322695e-30)%pa)<0&&(sa+=pa)):sa=o.gstime(a+2433281.5),{no:r,method:"n",ainv:ae,ao:ys,con41:ee,con42:Bs,cosio:Es,cosio2:Ds,eccsq:Qs,omeosq:Rs,posq:de,rp:ne,rteosq:Us,sinio:As,gsto:sa}},o.sgp4init=function(t,s){var e=s.whichconst,a=void 0===e?"wgs72":e,d=s.opsmode,n=void 0===d?Ks:d,i=s.satn,r=void 0===i?t.satnum:i,c=s.epoch,h=s.xbstar,m=s.xecco,l=s.xargpo,p=s.xinclo,x=s.xndot,g=s.xnddot,M=s.xmo,f=s.xno,u=s.xnodeo;t.isimp=0,t.method="n",t.aycof=0,t.con41=0,t.cc1=0,t.cc4=0,t.cc5=0,t.d2=0,t.d3=0,t.d4=0,t.delmo=0,t.eta=0,t.argpdot=0,t.omgcof=0,t.sinmao=0,t.t=0,t.t2cof=0,t.t3cof=0,t.t4cof=0,t.t5cof=0,t.x1mth2=0,t.x7thm1=0,t.mdot=0,t.nodedot=0,t.xlcof=0,t.xmcof=0,t.nodecf=0,t.irez=0,t.d2201=0,t.d2211=0,t.d3210=0,t.d3222=0,t.d4410=0,t.d4422=0,t.d5220=0,t.d5232=0,t.d5421=0,t.d5433=0,t.dedt=0,t.del1=0,t.del2=0,t.del3=0,t.didt=0,t.dmdt=0,t.dnodt=0,t.domdt=0,t.e3=0,t.ee2=0,t.peo=0,t.pgho=0,t.pho=0,t.PInco=0,t.plo=0,t.se2=0,t.se3=0,t.sgh2=0,t.sgh3=0,t.sgh4=0,t.sh2=0,t.sh3=0,t.si2=0,t.si3=0,t.sl2=0,t.sl3=0,t.sl4=0,t.gsto=0,t.xfact=0,t.xgh2=0,t.xgh3=0,t.xgh4=0,t.xh2=0,t.xh3=0,t.xi2=0,t.xi3=0,t.xl2=0,t.xl3=0,t.xl4=0,t.xlamo=0,t.zmol=0,t.zmos=0,t.atime=0,t.xli=0,t.xni=0;var z=o.getgravconst(a);t.tumin=z.tumin,t.mus=z.mus,t.radiusearthkm=z.radiusearthkm,t.xke=z.xke,t.j2=z.j2,t.j3=z.j3,t.j4=z.j4,t.j3oj2=z.j3oj2,t.error=0,t.operationmode=n,ta=r.split("")[0].toLowerCase(),isNaN(ta)?t.satnum=parseInt(ta.charCodeAt(0)-96+9+t.satnum.slice(1,5)).toString():t.satnum=r,t.bstar=h,t.ndot=x,t.nddot=g,t.ecco=m,t.argpo=l,t.inclo=p,t.mo=M,t.no=f,t.nodeo=u,Ps=78/t.radiusearthkm+1,Is=42/t.radiusearthkm,Ls=Is*Is*Is*Is,t.init="y",t.t=0,Os={ecco:t.ecco,epoch:c,inclo:t.inclo,no:t.no,method:t.method,opsmode:t.operationmode,xke:t.xke,j2:t.j2};var b=(Ss=o.initl(Os)).ao,v=Ss.con42,y=Ss.cosio,j=Ss.cosio2,k=Ss.eccsq,q=Ss.omeosq,w=Ss.posq,P=Ss.rp,I=Ss.rteosq,O=Ss.sinio;if(t.no=Ss.no,t.con41=Ss.con41,t.gsto=Ss.gsto,t.a=Math.pow(t.no*t.tumin,-2/3),t.alta=t.a*(1+t.ecco)-1,t.altp=t.a*(1-t.ecco)-1,t.error=0,q>=0||t.no>=0){if(t.isimp=0,P<220/t.radiusearthkm+1&&(t.isimp=1),Xe=Ps,We=Ls,(Re=(P-1)*t.radiusearthkm)<156&&(Xe=Re-78,Re<98&&(Xe=20),Fs=(120-Xe)/t.radiusearthkm,We=Fs*Fs*Fs*Fs,Xe=Xe/t.radiusearthkm+1),Ue=1/w,Ze=1/(b-Xe),t.eta=b*t.ecco*Ze,Qe=t.eta*t.eta,Ke=t.ecco*t.eta,Ve=Math.abs(1-Qe),De=We*Math.pow(Ze,4),Ge=De/Math.pow(Ve,3.5),Le=Ge*t.no*(b*(1+1.5*Qe+Ke*(4+Qe))+.375*aa*Ze/Ve*t.con41*(8+3*Qe*(8+Qe))),t.cc1=t.bstar*Le,Be=0,t.ecco>1e-4&&(Be=-2*De*Ze*na*t.no*O/t.ecco),t.x1mth2=1-j,t.cc4=2*t.no*Ge*b*q*(t.eta*(2+.5*Qe)+t.ecco*(.5+2*Qe)-aa*Ze/(b*Ve)*(-3*t.con41*(1-2*Ke+Qe*(1.5-.5*Ke))+.75*t.x1mth2*(2*Qe-Ke*(1+Qe))*Math.cos(2*t.argpo))),t.cc5=2*Ge*b*q*(1+2.75*(Qe+Ke)+Ke*Qe),He=j*j,Wt=1.5*aa*Ue*t.no,$t=.5*Wt*aa*Ue,Ye=-.46875*ia*Ue*Ue*t.no,t.mdot=t.no+.5*Wt*I*t.con41+.0625*$t*I*(13-78*j+137*He),t.argpdot=-.5*Wt*v+.0625*$t*(7-114*j+395*He)+Ye*(3-36*j+49*He),oa=-Wt*y,t.nodedot=oa+(.5*$t*(4-19*j)+2*Ye*(3-7*j))*y,$e=t.argpdot+t.nodedot,t.omgcof=t.bstar*Be*Math.cos(t.argpo),t.xmcof=0,t.ecco>1e-4&&(t.xmcof=-ga*De*t.bstar/Ke),t.nodecf=3.5*q*oa*t.cc1,t.t2cof=1.5*t.cc1,Math.abs(y+1)>15e-13?t.xlcof=-.25*na*O*(3+5*y)/(1+y):t.xlcof=-.25*na*O*(3+5*y)/ya,t.aycof=-.5*na*O,Cs=1+t.eta*Math.cos(t.mo),t.delmo=Cs*Cs*Cs,t.sinmao=Math.sin(t.mo),t.x7thm1=7*j-1,pa/t.no>=225){t.method="d",t.isimp=1,C=0,B=t.inclo,Ns={epoch:c,ep:t.ecco,argpp:t.argpo,tc:C,inclp:t.inclo,nodep:t.nodeo,np:t.no,e3:t.e3,ee2:t.ee2,peo:t.peo,pgho:t.pgho,pho:t.pho,PInco:t.PInco,plo:t.plo,se2:t.se2,se3:t.se3,sgh2:t.sgh2,sgh3:t.sgh3,sgh4:t.sgh4,sh2:t.sh2,sh3:t.sh3,si2:t.si2,si3:t.si3,sl2:t.sl2,sl3:t.sl3,sl4:t.sl4,xgh2:t.xgh2,xgh3:t.xgh3,xgh4:t.xgh4,xh2:t.xh2,xh3:t.xh3,xi2:t.xi2,xi3:t.xi3,xl2:t.xl2,xl3:t.xl3,xl4:t.xl4,zmol:t.zmol,zmos:t.zmos},Ts=o.dscom(Ns),t.e3=Ts.e3,t.ee2=Ts.ee2,t.peo=Ts.peo,t.pgho=Ts.pgho,t.pho=Ts.pho,t.PInco=Ts.PInco,t.plo=Ts.plo,t.se2=Ts.se2,t.se3=Ts.se3,t.sgh2=Ts.sgh2,t.sgh3=Ts.sgh3,t.sgh4=Ts.sgh4,t.sh2=Ts.sh2,t.sh3=Ts.sh3,t.si2=Ts.si2,t.si3=Ts.si3,t.sl2=Ts.sl2,t.sl3=Ts.sl3,t.sl4=Ts.sl4;var S=Ts.sinim,E=Ts.cosim,N=Ts.em,_=Ts.emsq,A=Ts.s1,L=Ts.s2,J=Ts.s3,K=Ts.s4,Q=Ts.s5,R=Ts.ss1,U=Ts.ss2,V=Ts.ss3,W=Ts.ss4,X=Ts.ss5,Y=Ts.sz1,Z=Ts.sz3,$=Ts.sz11,oo=Ts.sz13,to=Ts.sz21,so=Ts.sz23,eo=Ts.sz31,ao=Ts.sz33;t.xgh2=Ts.xgh2,t.xgh3=Ts.xgh3,t.xgh4=Ts.xgh4,t.xh2=Ts.xh2,t.xh3=Ts.xh3,t.xi2=Ts.xi2,t.xi3=Ts.xi3,t.xl2=Ts.xl2,t.xl3=Ts.xl3,t.xl4=Ts.xl4,t.zmol=Ts.zmol,t.zmos=Ts.zmos,G=Ts.nm,qt=Ts.z1,Pt=Ts.z3,Ft=Ts.z11,Ot=Ts.z13,St=Ts.z21,Ct=Ts.z23,Nt=Ts.z31,_t=Ts.z33,_s={inclo:B,init:t.init,ep:t.ecco,inclp:t.inclo,nodep:t.nodeo,argpp:t.argpo,mp:t.mo,opsmode:t.operationmode},no=o.dpper(t,_s),t.ecco=no.ep,t.inclo=no.inclp,t.nodeo=no.nodep,t.argpo=no.argpp,t.mo=no.mp,F=0,H=0,D=0,vs={xke:ra,cosim:E,emsq:_,argpo:t.argpo,s1:A,s2:L,s3:J,s4:K,s5:Q,sinim:S,ss1:R,ss2:U,ss3:V,ss4:W,ss5:X,sz1:Y,sz3:Z,sz11:$,sz13:oo,sz21:to,sz23:so,sz31:eo,sz33:ao,t:t.t,tc:C,gsto:t.gsto,mo:t.mo,mdot:t.mdot,no:t.no,nodeo:t.nodeo,nodedot:t.nodedot,xPIdot:$e,z1:qt,z3:Pt,z11:Ft,z13:Ot,z21:St,z23:Ct,z31:Nt,z33:_t,ecco:t.ecco,eccsq:k,em:N,argpm:F,inclm:B,mm:D,nm:G,nodem:H,irez:t.irez,atime:t.atime,d2201:t.d2201,d2211:t.d2211,d3210:t.d3210,d3222:t.d3222,d4410:t.d4410,d4422:t.d4422,d5220:t.d5220,d5232:t.d5232,d5421:t.d5421,d5433:t.d5433,dedt:t.dedt,didt:t.didt,dmdt:t.dmdt,dnodt:t.dnodt,domdt:t.domdt,del1:t.del1,del2:t.del2,del3:t.del3,xfact:t.xfact,xlamo:t.xlamo,xli:t.xli,xni:t.xni},bs=o.dsinit(vs),t.irez=bs.irez,t.atime=bs.atime,t.d2201=bs.d2201,t.d2211=bs.d2211,t.d3210=bs.d3210,t.d3222=bs.d3222,t.d4410=bs.d4410,t.d4422=bs.d4422,t.d5220=bs.d5220,t.d5232=bs.d5232,t.d5421=bs.d5421,t.d5433=bs.d5433,t.dedt=bs.dedt,t.didt=bs.didt,t.dmdt=bs.dmdt,t.dnodt=bs.dnodt,t.domdt=bs.domdt,t.del1=bs.del1,t.del2=bs.del2,t.del3=bs.del3,t.xfact=bs.xfact,t.xlamo=bs.xlamo,t.xli=bs.xli,t.xni=bs.xni}1!==t.isimp&&(Ae=t.cc1*t.cc1,t.d2=4*b*Ze*Ae,T=t.d2*Ze*t.cc1/3,t.d3=(17*b+Xe)*T,t.d4=.5*T*b*Ze*(221*b+31*Xe)*t.cc1,t.t3cof=t.d2+2*Ae,t.t4cof=.25*(3*t.d3+t.cc1*(12*t.d2+10*Ae)),t.t5cof=.2*(3*t.d4+12*t.cc1*t.d3+6*t.d2*t.d2+15*Ae*(2*t.d2+Ae)))}o.propagate(t,0),t.init="n"},o.propagate=function(t,s){if(r=t.radiusearthkm*t.xke/60,t.t=s,t.error=0,U=t.mo+t.mdot*t.t,V=t.argpo+t.argpdot*t.t,W=t.nodeo+t.nodedot*t.t,F=V,D=U,X=t.t*t.t,H=W+t.nodecf*X,_=1-t.cc1*t.t,A=t.bstar*t.cc4*t.t,L=t.t2cof*X,1!==t.isimp&&(w=t.omgcof*t.t,Y=1+t.eta*Math.cos(U),q=t.xmcof*(Y*Y*Y-t.delmo),D=U+(T=w+q),F=V-T,S=X*t.t,E=S*t.t,_=_-t.d2*X-t.d3*S-t.d4*E,A+=t.bstar*t.cc5*(Math.sin(D)-t.sinmao),L=L+t.t3cof*S+E*(t.t4cof+t.t*t.t5cof)),G=t.no,Z=t.ecco,B=t.inclo,"d"===t.method&&(C=t.t,$={irez:t.irez,d2201:t.d2201,d2211:t.d2211,d3210:t.d3210,d3222:t.d3222,d4410:t.d4410,d4422:t.d4422,d5220:t.d5220,d5232:t.d5232,d5421:t.d5421,d5433:t.d5433,dedt:t.dedt,del1:t.del1,del2:t.del2,del3:t.del3,didt:t.didt,dmdt:t.dmdt,dnodt:t.dnodt,domdt:t.domdt,argpo:t.argpo,argpdot:t.argpdot,t:t.t,tc:C,gsto:t.gsto,xfact:t.xfact,xlamo:t.xlamo,no:t.no,atime:t.atime,em:Z,argpm:F,inclm:B,xli:t.xli,mm:D,xni:t.xni,nodem:H,nm:G},oo=o.dspace($),Z=oo.em,F=oo.argpm,B=oo.inclm,D=oo.mm,H=oo.nodem,G=oo.nm),G<=0)return t.error=2,{position:!1,velocity:!1};if(to=Math.pow(ra/G,ga)*_*_,G=ra/Math.pow(to,1.5),(Z-=A)>=1||Z<-.001)return t.error=1,{position:!1,velocity:!1};if(Z<1e-6&&(Z=1e-6),D+=t.no*L,K=D+F+H,D=((K%=pa)-(F%=pa)-(H%=pa))%pa,t.am=to,t.em=Z,t.im=B,t.Om=H,t.om=F,t.mm=D,t.nm=G,ao=Math.sin(B),eo=Math.cos(B),so=Z,J=B,I=F,R=H,Q=D,j=ao,y=eo,"d"===t.method&&(io={inclo:t.inclo,init:"n",ep:so,inclp:J,nodep:R,argpp:I,mp:Q,opsmode:t.operationmode},no=o.dpper(t,io),so=no.ep,R=no.nodep,I=no.argpp,Q=no.mp,(J=no.inclp)<0&&(J=-J,R+=la,I-=la),so<0||so>1))return t.error=3,{position:!1,velocity:!1};for("d"===t.method&&(j=Math.sin(J),y=Math.cos(J),t.aycof=-.5*na*j,Math.abs(y+1)>15e-13?t.xlcof=-.25*na*j*(3+5*y)/(1+y):t.xlcof=-.25*na*j*(3+5*y)/ya),e=so*Math.cos(I),T=1/(to*(1-so*so)),a=so*Math.sin(I)+T*t.aycof,d=Q+I+R+T*t.xlcof*e,P=n=(d-R)%pa,N=9999.9,i=1;Math.abs(N)>=1e-12&&i<=10;)v=Math.sin(P),b=Math.cos(P),N=(n-a*b+e*v-P)/(N=1-b*e-v*a),Math.abs(N)>=.95&&(N=N>0?.95:-.95),P+=N,i+=1;return c=e*b+a*v,h=e*v-a*b,(l=to*(1-(m=e*e+a*a)))<0?(t.error=4,{position:!1,velocity:!1}):(p=to*(1-c),x=Math.sqrt(to)*h/p,g=Math.sqrt(l)/p,M=Math.sqrt(1-m),f=to/p*(v-a-e*(T=h/(1+M))),u=to/p*(b-e+a*T),O=Math.atan2(f,u),z=(u+u)*f,Yt=1-2*f*f,$t=(Wt=.5*aa*(T=1/l))*T,"d"===t.method&&(k=y*y,t.con41=3*k-1,t.x1mth2=1-k,t.x7thm1=7*k-1),(Zt=p*(1-1.5*$t*M*t.con41)+.5*Wt*t.x1mth2*Yt)<1?(t.error=6,{position:!1,velocity:!1}):(O-=.25*$t*t.x7thm1*z,os=R+1.5*$t*y*z,ts=J+1.5*$t*y*j*Yt,ss=x-G*Wt*t.x1mth2*z/ra,es=g+G*Wt*(t.x1mth2*Yt+1.5*t.con41)/ra,as=Math.sin(O),ds=Math.cos(O),ns=Math.sin(os),is=Math.cos(os),cs=Math.sin(ts),rs=Math.cos(ts),ps=(ms=is*rs)*as+ns*ds,xs=cs*as,gs=(hs=-ns*rs)*ds-is*as,Ms=ms*ds-ns*as,fs=cs*ds,{position:{x:Zt*(ls=hs*as+is*ds)*t.radiusearthkm,y:Zt*ps*t.radiusearthkm,z:Zt*xs*t.radiusearthkm},velocity:{x:(ss*ls+es*gs)*r,y:(ss*ps+es*Ms)*r,z:(ss*xs+es*fs)*r}}))},o.getgravconst=function(o){switch(o){case"wgs72old":ca=398600.79964,ha=6378.135,ma=1/(ra=.0743669161),ia=-165597e-11,na=(da=-253881e-11)/(aa=.001082616);break;case"wgs72":ca=398600.8,ha=6378.135,ra=60/Math.sqrt(ha*ha*ha/ca),ma=1/ra,ia=-165597e-11,na=(da=-253881e-11)/(aa=.001082616);break;case"wgs84":ca=398600.5,ha=6378.137,ra=60/Math.sqrt(ha*ha*ha/ca),ma=1/ra,ia=-161098761e-14,na=(da=-253215306e-14)/(aa=.00108262998905);break;default:throw new Error("unknown gravity option "+o)}return{tumin:ma,mus:ca,radiusearthkm:ha,xke:ra,j2:aa,j3:da,j4:ia,j3oj2:na}},o.createSatrec=function(t,s,e,a){void 0===e&&(e="wgs72"),void 0===a&&(a="i"),us=0,(zs={}).error=0,zs.satnum=t.substring(2,7),zs.epochyr=parseInt(t.substring(18,20)),zs.epochdays=parseFloat(t.substring(20,32)),zs.ndot=parseFloat(t.substring(33,43)),zs.nddot=parseFloat(t.substring(44,45)+"."+t.substring(45,50)+"E"+t.substring(50,52)),zs.bstar=parseFloat(t.substring(53,54)+"."+t.substring(54,59)+"E"+t.substring(59,61)),zs.inclo=parseFloat(s.substring(8,16)),zs.nodeo=parseFloat(s.substring(17,25)),zs.ecco=parseFloat("."+s.substring(26,33)),zs.argpo=parseFloat(s.substring(34,42)),zs.mo=parseFloat(s.substring(43,51)),zs.no=parseFloat(s.substring(52,63)),zs.no/=Ma,zs.inclo*=xa,zs.nodeo*=xa,zs.argpo*=xa,zs.mo*=xa,us=zs.epochyr<57?zs.epochyr+2e3:zs.epochyr+1900;var d=o.days2mdhms(us,zs.epochdays),n=d.mon,i=d.day,r=d.hr,c=d.minute,h=d.sec,m=o.jday(us,n,i,r,c,h);return zs.jdsatepoch=m.jd+m.jdFrac,o.sgp4init(zs,{whichconst:e,opsmode:a,satn:zs.satnum,epoch:zs.jdsatepoch-2433281.5,xbstar:zs.bstar,xecco:zs.ecco,xargpo:zs.argpo,xinclo:zs.inclo,xndot:zs.ndot,xnddot:zs.nddot,xmo:zs.mo,xno:zs.no,xnodeo:zs.nodeo}),zs},o.gstime=function(o){var t=-62e-7*(vo=(o-2451545)/36525)*vo*vo+.093104*vo*vo+3164400184.812866*vo+67310.54841;return(t=t*xa/240%pa)<0&&(t+=pa),t},o.sgn=function(o){return o<0?-1:1},o.mag=function(o){return Math.sqrt(o[0]*o[0]+o[1]*o[1]+o[2]*o[2])},o.cross=function(o,t){var s=[0,0,0];return s[0]=o[1]*t[2]-o[2]*t[1],s[1]=o[2]*t[0]-o[0]*t[2],s[2]=o[0]*t[1]-o[1]*t[0],s},o.dot=function(o,t){return o[0]*t[0]+o[1]*t[1]+o[2]*t[2]},o.angle=function(t,s){var e=o.mag(t),a=o.mag(s);return e*a>1e-8*1e-8?(T=o.dot(t,s)/(e*a),Math.abs(T)>1&&(T=1*o.sgn(T)),Math.acos(T)):999999.1},o.asinh=function(o){return Math.log(o+Math.sqrt(o*o+1))},o.newtonnu=function(t,s){var e=999999.9,a=999999.9,d=1e-8;if(Math.abs(t)<d)a=s,e=s;else if(t<1-d){var n=Math.sqrt(1-t*t)*Math.sin(s)/(1+t*Math.cos(s)),i=(t+Math.cos(s))/(1+t*Math.cos(s));a=(e=Math.atan2(n,i))-t*Math.sin(e)}else if(t>1+d){if(t>1&&Math.abs(s)+1e-5<la-Math.acos(1/t)){n=Math.sqrt(t*t-1)*Math.sin(s)/(1+t*Math.cos(s));e=o.asinh(n),a=t*o.sinh(e)-e}}else Math.abs(s)<168*la/180&&(a=(e=Math.tan(.5*s))+e*e*e/3);return t<1&&((a%=2*la)<0&&(a+=2*la),e%=2*la),{e0:e,m:a}},o.sinh=function(o){return(Math.exp(o)-Math.exp(-o))/2},o.rv2coe=function(t,s,e){var a,d,n,i,r,c,h,m,l,p,x,g,M,f,u,z,b,v=[0,0,0],y=[0,0,0],j=.5*la,k=1e-8,q=999999.1,w=o.mag(t),P=o.mag(s),F=o.cross(t,s),I=o.mag(F);if(I>k){for(v[0]=-F[1],v[1]=F[0],v[2]=0,M=o.mag(v),ho=P*P-e/w,g=o.dot(t,s),z=0;z<=2;z++)y[z]=(ho*t[z]-g*s[z])/e;n=o.mag(y),u=P*P*.5-e/w,d=Math.abs(u)>k?-e/(2*u):999999.9,a=I*I/e,f=F[2]/I,i=Math.acos(f),b=1,n<k?b=i<k||Math.abs(i-la)<k?2:3:(i<k||Math.abs(i-la)<k)&&(b=4),M>k?(T=v[0]/M,Math.abs(T)>1&&(T=o.sgn(T)),r=Math.acos(T),v[1]<0&&(r=pa-r)):r=q,1==b?(c=o.angle(v,y),y[2]<0&&(c=pa-c)):c=q,1==b||4==b?(h=o.angle(y,t),g<0&&(h=pa-h)):h=q,3==b?(l=o.angle(v,t),t[2]<0&&(l=pa-l),m=l):l=q,n>k&&4==b?(T=y[0]/n,Math.abs(T)>1&&(T=o.sgn(T)),x=Math.acos(T),y[1]<0&&(x=pa-x),i>j&&(x=pa-x)):x=q,w>k&&2==b?(T=t[0]/w,Math.abs(T)>1&&(T=o.sgn(T)),p=Math.acos(T),t[1]<0&&(p=pa-p),i>j&&(p=pa-p),m=p):p=q,1!=b&&4!=b||(m=o.newtonnu(n,h).m)}else a=q,d=q,n=q,i=q,r=q,c=q,h=q,m=q,l=q,p=q,x=q;return{p:a,a:d,ecc:n,incl:i,omega:r,argp:c,nu:h,m,arglat:l,truelon:p,lonper:x}},o.jday=function(o,t,s,e,a,d){var n=367*o-Math.floor(7*(o+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+s+1721013.5,i=(d+60*a+3600*e)/86400;if(Math.abs(i)>1){var r=Math.floor(i);n+=r,i-=r}return{jd:n,jdFrac:i}},o.days2mdhms=function(o,t){for(Gs=[31,o%4==0?29:28,31,30,31,30,31,31,30,31,30,31],Hs=Math.floor(t),Ks=1,Js=0;Hs>Js+Gs[Ks-1]&&Ks<12;)Js+=Gs[Ks-1],Ks+=1;return js=Ks,ks=Hs-Js,T=24*(t-Hs),qs=Math.floor(T),T=60*(T-qs),ws=Math.floor(T),{mon:js,day:ks,hr:qs,minute:ws,sec:60*(T-ws)}},o.invjday=function(t,s){var e,a;Math.abs(s)>=1&&(t+=Math.floor(s),s-=Math.floor(s));var d=t-Math.floor(t)-.5;Math.abs(d)>1e-8&&(t-=d,s+=d);var n=t-2415019.5,i=n/365.25;us=1900+Math.floor(i),e=Math.floor(.25*(us-1901)),(a=Math.floor(n-(365*(us-1900)+e)))+s<1&&(us-=1,e=Math.floor(.25*(us-1901)),a=Math.floor(n-(365*(us-1900)+e)));var r=o.days2mdhms(us,a+s),c=r.mon,h=r.day,m=r.hr,l=r.minute,p=r.sec;return{year:us,mon:c,day:h,hr:m,minute:l,sec:p}},o}()}},t={};function s(e){if(t[e])return t[e].exports;var a=t[e]={exports:{}};return o[e](a,a.exports,s),a.exports}return s.d=(o,t)=>{for(var e in t)s.o(t,e)&&!s.o(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:t[e]})},s.o=(o,t)=>Object.prototype.hasOwnProperty.call(o,t),s.r=o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},s(333)})()}));
@@ -1,340 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define([], factory);
6
- else if(typeof exports === 'object')
7
- exports["Ootk"] = factory();
8
- else
9
- root["Ootk"] = factory();
10
- })(this, function() {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ({
14
-
15
- /***/ 679:
16
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
-
18
- __webpack_require__.r(__webpack_exports__);
19
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20
- /* harmony export */ "Transforms": () => /* binding */ Transforms
21
- /* harmony export */ });
22
- /**
23
- * @author Theodore Kruczek.
24
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
25
- * with satellites and other orbital objects.
26
- *
27
- * @file The Transforms module contains a collection of conversions not contained
28
- * in the original SGP4 library such as ECI to ECF and ECF to RAE. This was based
29
- * on some of the functions in satellite.js.
30
- *
31
- * Permission is hereby granted, free of charge, to any person obtaining a copy
32
- * of this software and associated documentation files (the "Software"), to deal
33
- * in the Software without restriction, including without limitation the rights
34
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
- * copies of the Software, and to permit persons to whom the Software is
36
- * furnished to do so, subject to the following conditions:
37
- *
38
- * The above copyright notice and this permission notice shall be included in all
39
- * copies or substantial portions of the Software.
40
- *
41
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47
- * SOFTWARE.
48
- */
49
- var PI = Math.PI;
50
- var TAU = PI * 2; //https://tauday.com/tau-manifesto
51
-
52
- var Transforms =
53
- /** @class */
54
- function () {
55
- function Transforms() {}
56
-
57
- Transforms.getDegLat = function (radians) {
58
- if (radians < -PI / 2 || radians > PI / 2) {
59
- throw new RangeError('Latitude radians must be in range [-PI/2; PI/2].');
60
- }
61
-
62
- return Transforms.rad2deg(radians);
63
- };
64
-
65
- Transforms.getDegLon = function (radians) {
66
- if (radians < -PI || radians > PI) {
67
- throw new RangeError('Longitude radians must be in range [-PI; PI].');
68
- }
69
-
70
- return Transforms.rad2deg(radians);
71
- };
72
-
73
- Transforms.getRadLat = function (degrees) {
74
- if (degrees < -90 || degrees > 90) {
75
- throw new RangeError('Latitude degrees must be in range [-90; 90].');
76
- }
77
-
78
- return Transforms.deg2rad(degrees);
79
- };
80
-
81
- Transforms.getRadLon = function (degrees) {
82
- if (degrees < -180 || degrees > 180) {
83
- throw new RangeError('Longitude degrees must be in range [-180; 180].');
84
- }
85
-
86
- return Transforms.deg2rad(degrees);
87
- };
88
-
89
- Transforms.rad2deg = function (radians) {
90
- return radians * 180 / PI;
91
- };
92
-
93
- Transforms.deg2rad = function (degrees) {
94
- return degrees * PI / 180.0;
95
- };
96
-
97
- Transforms.ecf2eci = function (ecf, gmst) {
98
- // ccar.colorado.edu/ASEN5070/handouts/coordsys.doc
99
- //
100
- // [X] [C -S 0][X]
101
- // [Y] = [S C 0][Y]
102
- // [Z]eci [0 0 1][Z]ecf
103
- //
104
- var X = ecf.x * Math.cos(gmst) - ecf.y * Math.sin(gmst);
105
- var Y = ecf.x * Math.sin(gmst) + ecf.y * Math.cos(gmst);
106
- var Z = ecf.z;
107
- return {
108
- x: X,
109
- y: Y,
110
- z: Z
111
- };
112
- };
113
-
114
- Transforms.ecf2rae = function (lla, ecf) {
115
- var sezCoords = Transforms.lla2sez(lla, ecf);
116
- return Transforms.sez2rae(sezCoords);
117
- };
118
- /** eciToGeodetic converts eci coordinates to lla coordinates
119
- * @param {{array}} eci takes xyz coordinates
120
- * @param {number} gmst takes a number in gmst time
121
- * @returns {array} array containing lla coordinates
122
- */
123
-
124
-
125
- Transforms.eci2lla = function (eci, gmst) {
126
- // http://www.celestrak.com/columns/v02n03/
127
- var a = 6378.137;
128
- var b = 6356.7523142;
129
- var R = Math.sqrt(eci.x * eci.x + eci.y * eci.y);
130
- var f = (a - b) / a;
131
- var e2 = 2 * f - f * f;
132
- var lon = Math.atan2(eci.y, eci.x) - gmst;
133
-
134
- while (lon < -PI) {
135
- lon += TAU;
136
- }
137
-
138
- while (lon > PI) {
139
- lon -= TAU;
140
- }
141
-
142
- var kmax = 20;
143
- var k = 0;
144
- var lat = Math.atan2(eci.z, Math.sqrt(eci.x * eci.x + eci.y * eci.y));
145
- var C;
146
-
147
- while (k < kmax) {
148
- C = 1 / Math.sqrt(1 - e2 * (Math.sin(lat) * Math.sin(lat)));
149
- lat = Math.atan2(eci.z + a * C * e2 * Math.sin(lat), R);
150
- k += 1;
151
- }
152
-
153
- var alt = R / Math.cos(lat) - a * C;
154
- return {
155
- lon: lon,
156
- lat: lat,
157
- alt: alt
158
- };
159
- };
160
-
161
- Transforms.eci2ecf = function (eci, gmst) {
162
- // ccar.colorado.edu/ASEN5070/handouts/coordsys.doc
163
- //
164
- // [X] [C -S 0][X]
165
- // [Y] = [S C 0][Y]
166
- // [Z]eci [0 0 1][Z]ecf
167
- //
168
- //
169
- // Inverse:
170
- // [X] [C S 0][X]
171
- // [Y] = [-S C 0][Y]
172
- // [Z]ecf [0 0 1][Z]eci
173
- var x = eci.x * Math.cos(gmst) + eci.y * Math.sin(gmst);
174
- var y = eci.x * -Math.sin(gmst) + eci.y * Math.cos(gmst);
175
- var z = eci.z;
176
- return {
177
- x: x,
178
- y: y,
179
- z: z
180
- };
181
- };
182
-
183
- Transforms.lla2ecf = function (lla) {
184
- var lon = lla.lon,
185
- lat = lla.lat,
186
- alt = lla.alt;
187
- var a = 6378.137;
188
- var b = 6356.7523142;
189
- var f = (a - b) / a;
190
- var e2 = 2 * f - f * f;
191
- var normal = a / Math.sqrt(1 - e2 * (Math.sin(lat) * Math.sin(lat)));
192
- var x = (normal + alt) * Math.cos(lat) * Math.cos(lon);
193
- var y = (normal + alt) * Math.cos(lat) * Math.sin(lon);
194
- var z = (normal * (1 - e2) + alt) * Math.sin(lat);
195
- return {
196
- x: x,
197
- y: y,
198
- z: z
199
- };
200
- };
201
-
202
- Transforms.lla2sez = function (lla, ecf) {
203
- // http://www.celestrak.com/columns/v02n02/
204
- // TS Kelso's method, except I'm using ECF frame
205
- // and he uses ECI.
206
- var lon = lla.lon,
207
- lat = lla.lat;
208
- var observerEcf = Transforms.lla2ecf(lla);
209
- var rx = ecf.x - observerEcf.x;
210
- var ry = ecf.y - observerEcf.y;
211
- var rz = ecf.z - observerEcf.z; // top is short for topocentric
212
-
213
- var south = Math.sin(lat) * Math.cos(lon) * rx + Math.sin(lat) * Math.sin(lon) * ry - Math.cos(lat) * rz;
214
- var east = -Math.sin(lon) * rx + Math.cos(lon) * ry;
215
- var zenith = Math.cos(lat) * Math.cos(lon) * rx + Math.cos(lat) * Math.sin(lon) * ry + Math.sin(lat) * rz;
216
- return {
217
- s: south,
218
- e: east,
219
- z: zenith
220
- };
221
- };
222
-
223
- Transforms.rae2sez = function (rae) {
224
- // az,el,range to sez convertion
225
- var south = -rae.rng * Math.cos(rae.el) * Math.cos(rae.az);
226
- var east = rae.rng * Math.cos(rae.el) * Math.sin(rae.az);
227
- var zenith = rae.rng * Math.sin(rae.el);
228
- return {
229
- s: south,
230
- e: east,
231
- z: zenith
232
- };
233
- };
234
-
235
- Transforms.rae2ecf = function (rae, lla) {
236
- var obsEcf = Transforms.lla2ecf(lla);
237
- var sez = Transforms.rae2sez(rae); // some needed calculations
238
-
239
- var slat = Math.sin(lla.lat);
240
- var slon = Math.sin(lla.lon);
241
- var clat = Math.cos(lla.lat);
242
- var clon = Math.cos(lla.lon);
243
- var x = slat * clon * sez.s + -slon * sez.e + clat * clon * sez.z + obsEcf.x;
244
- var y = slat * slon * sez.s + clon * sez.e + clat * slon * sez.z + obsEcf.y;
245
- var z = -clat * sez.s + slat * sez.z + obsEcf.z;
246
- return {
247
- x: x,
248
- y: y,
249
- z: z
250
- };
251
- };
252
- /**
253
- * @param {Object} sez Containing SEZ coordinates
254
- * @param {Number} sez.s Positive horizontal vector S due south.
255
- * @param {Number} sez.e Positive horizontal vector E due east.
256
- * @param {Number} sez.z Vector Z normal to the surface of the earth (up).
257
- * @returns {Object} Rng, Az, El array
258
- */
259
-
260
-
261
- Transforms.sez2rae = function (sez) {
262
- var rng = Math.sqrt(sez.s * sez.s + sez.e * sez.e + sez.z * sez.z);
263
- var el = Math.asin(sez.z / rng);
264
- var az = Math.atan2(-sez.e, sez.s) + PI;
265
- return {
266
- rng: rng,
267
- az: az,
268
- el: el
269
- };
270
- };
271
-
272
- return Transforms;
273
- }();
274
-
275
-
276
-
277
- /***/ })
278
-
279
- /******/ });
280
- /************************************************************************/
281
- /******/ // The module cache
282
- /******/ var __webpack_module_cache__ = {};
283
- /******/
284
- /******/ // The require function
285
- /******/ function __webpack_require__(moduleId) {
286
- /******/ // Check if module is in cache
287
- /******/ if(__webpack_module_cache__[moduleId]) {
288
- /******/ return __webpack_module_cache__[moduleId].exports;
289
- /******/ }
290
- /******/ // Create a new module (and put it into the cache)
291
- /******/ var module = __webpack_module_cache__[moduleId] = {
292
- /******/ // no module.id needed
293
- /******/ // no module.loaded needed
294
- /******/ exports: {}
295
- /******/ };
296
- /******/
297
- /******/ // Execute the module function
298
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
299
- /******/
300
- /******/ // Return the exports of the module
301
- /******/ return module.exports;
302
- /******/ }
303
- /******/
304
- /************************************************************************/
305
- /******/ /* webpack/runtime/define property getters */
306
- /******/ (() => {
307
- /******/ // define getter functions for harmony exports
308
- /******/ __webpack_require__.d = (exports, definition) => {
309
- /******/ for(var key in definition) {
310
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
311
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
312
- /******/ }
313
- /******/ }
314
- /******/ };
315
- /******/ })();
316
- /******/
317
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
318
- /******/ (() => {
319
- /******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
320
- /******/ })();
321
- /******/
322
- /******/ /* webpack/runtime/make namespace object */
323
- /******/ (() => {
324
- /******/ // define __esModule on exports
325
- /******/ __webpack_require__.r = (exports) => {
326
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
327
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
328
- /******/ }
329
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
330
- /******/ };
331
- /******/ })();
332
- /******/
333
- /************************************************************************/
334
- /******/ // module exports must be returned from runtime so entry inlining is disabled
335
- /******/ // startup
336
- /******/ // Load entry module and return exports
337
- /******/ return __webpack_require__(679);
338
- /******/ })()
339
- ;
340
- });
@@ -1 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Ootk=e():t.Ootk=e()}(this,(function(){return(()=>{"use strict";var t={679:(t,e,n)=>{n.r(e),n.d(e,{Transforms:()=>o});var a=Math.PI,r=2*a,o=function(){function t(){}return t.getDegLat=function(e){if(e<-a/2||e>a/2)throw new RangeError("Latitude radians must be in range [-PI/2; PI/2].");return t.rad2deg(e)},t.getDegLon=function(e){if(e<-a||e>a)throw new RangeError("Longitude radians must be in range [-PI; PI].");return t.rad2deg(e)},t.getRadLat=function(e){if(e<-90||e>90)throw new RangeError("Latitude degrees must be in range [-90; 90].");return t.deg2rad(e)},t.getRadLon=function(e){if(e<-180||e>180)throw new RangeError("Longitude degrees must be in range [-180; 180].");return t.deg2rad(e)},t.rad2deg=function(t){return 180*t/a},t.deg2rad=function(t){return t*a/180},t.ecf2eci=function(t,e){return{x:t.x*Math.cos(e)-t.y*Math.sin(e),y:t.x*Math.sin(e)+t.y*Math.cos(e),z:t.z}},t.ecf2rae=function(e,n){var a=t.lla2sez(e,n);return t.sez2rae(a)},t.eci2lla=function(t,e){for(var n=6378.137,o=Math.sqrt(t.x*t.x+t.y*t.y),s=(n-6356.7523142)/n,i=2*s-s*s,c=Math.atan2(t.y,t.x)-e;c<-a;)c+=r;for(;c>a;)c-=r;for(var u,h=0,M=Math.atan2(t.z,Math.sqrt(t.x*t.x+t.y*t.y));h<20;)u=1/Math.sqrt(1-i*(Math.sin(M)*Math.sin(M))),M=Math.atan2(t.z+n*u*i*Math.sin(M),o),h+=1;return{lon:c,lat:M,alt:o/Math.cos(M)-n*u}},t.eci2ecf=function(t,e){return{x:t.x*Math.cos(e)+t.y*Math.sin(e),y:t.x*-Math.sin(e)+t.y*Math.cos(e),z:t.z}},t.lla2ecf=function(t){var e=t.lon,n=t.lat,a=t.alt,r=6378.137,o=(r-6356.7523142)/r,s=2*o-o*o,i=r/Math.sqrt(1-s*(Math.sin(n)*Math.sin(n)));return{x:(i+a)*Math.cos(n)*Math.cos(e),y:(i+a)*Math.cos(n)*Math.sin(e),z:(i*(1-s)+a)*Math.sin(n)}},t.lla2sez=function(e,n){var a=e.lon,r=e.lat,o=t.lla2ecf(e),s=n.x-o.x,i=n.y-o.y,c=n.z-o.z;return{s:Math.sin(r)*Math.cos(a)*s+Math.sin(r)*Math.sin(a)*i-Math.cos(r)*c,e:-Math.sin(a)*s+Math.cos(a)*i,z:Math.cos(r)*Math.cos(a)*s+Math.cos(r)*Math.sin(a)*i+Math.sin(r)*c}},t.rae2sez=function(t){return{s:-t.rng*Math.cos(t.el)*Math.cos(t.az),e:t.rng*Math.cos(t.el)*Math.sin(t.az),z:t.rng*Math.sin(t.el)}},t.rae2ecf=function(e,n){var a=t.lla2ecf(n),r=t.rae2sez(e),o=Math.sin(n.lat),s=Math.sin(n.lon),i=Math.cos(n.lat),c=Math.cos(n.lon);return{x:o*c*r.s+-s*r.e+i*c*r.z+a.x,y:o*s*r.s+c*r.e+i*s*r.z+a.y,z:-i*r.s+o*r.z+a.z}},t.sez2rae=function(t){var e=Math.sqrt(t.s*t.s+t.e*t.e+t.z*t.z),n=Math.asin(t.z/e);return{rng:e,az:Math.atan2(-t.e,t.s)+a,el:n}},t}()}},e={};function n(a){if(e[a])return e[a].exports;var r=e[a]={exports:{}};return t[a](r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(679)})()}));
@@ -1,149 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define([], factory);
6
- else if(typeof exports === 'object')
7
- exports["Ootk"] = factory();
8
- else
9
- root["Ootk"] = factory();
10
- })(this, function() {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ({
14
-
15
- /***/ 2:
16
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
-
18
- __webpack_require__.r(__webpack_exports__);
19
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20
- /* harmony export */ "Utils": () => /* binding */ Utils
21
- /* harmony export */ });
22
- /**
23
- * @author Theodore Kruczek.
24
- * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
25
- * with satellites and other orbital objects.
26
- *
27
- * @file The Utils module.
28
- *
29
- * Permission is hereby granted, free of charge, to any person obtaining a copy
30
- * of this software and associated documentation files (the "Software"), to deal
31
- * in the Software without restriction, including without limitation the rights
32
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33
- * copies of the Software, and to permit persons to whom the Software is
34
- * furnished to do so, subject to the following conditions:
35
- *
36
- * The above copyright notice and this permission notice shall be included in all
37
- * copies or substantial portions of the Software.
38
- *
39
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45
- * SOFTWARE.
46
- */
47
- var Utils =
48
- /** @class */
49
- function () {
50
- function Utils() {}
51
-
52
- Utils.distance = function (pos1, pos2) {
53
- return Math.sqrt(Math.pow(pos1.x - pos2.x, 2) + Math.pow(pos1.y - pos2.y, 2) + Math.pow(pos1.z - pos2.z, 2));
54
- };
55
-
56
- Utils.dopplerFactor = function (location, position, velocity) {
57
- var mfactor = 7.292115e-5;
58
- var c = 299792.458; // Speed of light in km/s
59
-
60
- var range = {
61
- x: position.x - location.x,
62
- y: position.y - location.y,
63
- z: position.z - location.z,
64
- w: 0
65
- };
66
- range.w = Math.sqrt(Math.pow(range.x, 2) + Math.pow(range.y, 2) + Math.pow(range.z, 2));
67
- var rangeVel = {
68
- x: velocity.x + mfactor * location.y,
69
- y: velocity.y - mfactor * location.x,
70
- z: velocity.z
71
- };
72
-
73
- var sign = function sign(value) {
74
- return value >= 0 ? 1 : -1;
75
- };
76
-
77
- var rangeRate = (range.x * rangeVel.x + range.y * rangeVel.y + range.z * rangeVel.z) / range.w;
78
- return 1 + rangeRate / c * sign(rangeRate);
79
- };
80
-
81
- return Utils;
82
- }();
83
-
84
-
85
-
86
- /***/ })
87
-
88
- /******/ });
89
- /************************************************************************/
90
- /******/ // The module cache
91
- /******/ var __webpack_module_cache__ = {};
92
- /******/
93
- /******/ // The require function
94
- /******/ function __webpack_require__(moduleId) {
95
- /******/ // Check if module is in cache
96
- /******/ if(__webpack_module_cache__[moduleId]) {
97
- /******/ return __webpack_module_cache__[moduleId].exports;
98
- /******/ }
99
- /******/ // Create a new module (and put it into the cache)
100
- /******/ var module = __webpack_module_cache__[moduleId] = {
101
- /******/ // no module.id needed
102
- /******/ // no module.loaded needed
103
- /******/ exports: {}
104
- /******/ };
105
- /******/
106
- /******/ // Execute the module function
107
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
108
- /******/
109
- /******/ // Return the exports of the module
110
- /******/ return module.exports;
111
- /******/ }
112
- /******/
113
- /************************************************************************/
114
- /******/ /* webpack/runtime/define property getters */
115
- /******/ (() => {
116
- /******/ // define getter functions for harmony exports
117
- /******/ __webpack_require__.d = (exports, definition) => {
118
- /******/ for(var key in definition) {
119
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
120
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
121
- /******/ }
122
- /******/ }
123
- /******/ };
124
- /******/ })();
125
- /******/
126
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
127
- /******/ (() => {
128
- /******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
129
- /******/ })();
130
- /******/
131
- /******/ /* webpack/runtime/make namespace object */
132
- /******/ (() => {
133
- /******/ // define __esModule on exports
134
- /******/ __webpack_require__.r = (exports) => {
135
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
136
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
137
- /******/ }
138
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
139
- /******/ };
140
- /******/ })();
141
- /******/
142
- /************************************************************************/
143
- /******/ // module exports must be returned from runtime so entry inlining is disabled
144
- /******/ // startup
145
- /******/ // Load entry module and return exports
146
- /******/ return __webpack_require__(2);
147
- /******/ })()
148
- ;
149
- });
@@ -1 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Ootk=e():t.Ootk=e()}(this,(function(){return(()=>{"use strict";var t={2:(t,e,o)=>{o.r(e),o.d(e,{Utils:()=>r});var r=function(){function t(){}return t.distance=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)+Math.pow(t.z-e.z,2))},t.dopplerFactor=function(t,e,o){var r=7292115e-11,n={x:e.x-t.x,y:e.y-t.y,z:e.z-t.z,w:0};n.w=Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2)+Math.pow(n.z,2));var p=o.x+r*t.y,a=o.y-r*t.x,u=o.z,i=(n.x*p+n.y*a+n.z*u)/n.w;return 1+i/299792.458*(i>=0?1:-1)},t}()}},e={};function o(r){if(e[r])return e[r].exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}return o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(2)})()}));