ootk 1.0.6 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.json ADDED
@@ -0,0 +1,244 @@
1
+ {
2
+ "env": {
3
+ "browser": true,
4
+ "es2021": true,
5
+ "node": true,
6
+ "jest": true
7
+ },
8
+ "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
9
+ "parser": "@typescript-eslint/parser",
10
+ "parserOptions": {
11
+ "ecmaVersion": 12,
12
+ "sourceType": "module"
13
+ },
14
+ "plugins": ["@typescript-eslint"],
15
+ "rules": {
16
+ "accessor-pairs": "error",
17
+ "array-bracket-newline": "error",
18
+ "array-bracket-spacing": "error",
19
+ "array-callback-return": "error",
20
+ "array-element-newline": "off",
21
+ "arrow-body-style": "error",
22
+ "arrow-parens": "error",
23
+ "arrow-spacing": "error",
24
+ "block-scoped-var": "error",
25
+ "block-spacing": "error",
26
+ "brace-style": "error",
27
+ "callback-return": "error",
28
+ "camelcase": "error",
29
+ "capitalized-comments": "error",
30
+ "class-methods-use-this": "error",
31
+ "comma-dangle": ["error", "always-multiline"],
32
+ "comma-spacing": "error",
33
+ "comma-style": "error",
34
+ "complexity": "error",
35
+ "computed-property-spacing": "error",
36
+ "consistent-return": "error",
37
+ "consistent-this": "error",
38
+ "curly": "error",
39
+ "default-case": "error",
40
+ "default-case-last": "error",
41
+ "default-param-last": "error",
42
+ "dot-location": "error",
43
+ "dot-notation": "error",
44
+ "eol-last": "error",
45
+ "eqeqeq": "error",
46
+ "func-call-spacing": "error",
47
+ "func-name-matching": "error",
48
+ "func-names": "error",
49
+ "func-style": "error",
50
+ "function-call-argument-newline": "off",
51
+ "function-paren-newline": "off",
52
+ "generator-star-spacing": "error",
53
+ "global-require": "error",
54
+ "grouped-accessor-pairs": "error",
55
+ "guard-for-in": "error",
56
+ "handle-callback-err": "error",
57
+ "id-blacklist": "error",
58
+ "id-denylist": "error",
59
+ "id-length": "off",
60
+ "id-match": "error",
61
+ "implicit-arrow-linebreak": "error",
62
+ "indent": ["error", 2, { "SwitchCase": 1 }],
63
+ "indent-legacy": ["error", 2, { "SwitchCase": 1 }],
64
+ "init-declarations": "error",
65
+ "jsx-quotes": "error",
66
+ "key-spacing": "error",
67
+ "keyword-spacing": "error",
68
+ "line-comment-position": "off",
69
+ "linebreak-style": ["error", "unix"],
70
+ "lines-around-comment": "off",
71
+ "lines-around-directive": "error",
72
+ "lines-between-class-members": "error",
73
+ "max-classes-per-file": "error",
74
+ "max-depth": "error",
75
+ "max-len": ["error", { "code": 120 }],
76
+ "max-lines": ["error", { "max": 1000 }],
77
+ "max-lines-per-function": ["error", { "max": 300 }],
78
+ "max-nested-callbacks": "error",
79
+ "max-params": "error",
80
+ "max-statements": ["error", { "max": 25 }],
81
+ "max-statements-per-line": "error",
82
+ "multiline-comment-style": "error",
83
+ "multiline-ternary": "off",
84
+ "new-cap": "error",
85
+ "new-parens": "error",
86
+ "newline-after-var": "error",
87
+ "newline-before-return": "error",
88
+ "newline-per-chained-call": "error",
89
+ "no-alert": "error",
90
+ "no-array-constructor": "error",
91
+ "no-await-in-loop": "error",
92
+ "no-bitwise": "error",
93
+ "no-buffer-constructor": "error",
94
+ "no-caller": "error",
95
+ "no-catch-shadow": "error",
96
+ "no-confusing-arrow": "error",
97
+ "no-console": "error",
98
+ "no-constructor-return": "error",
99
+ "no-continue": "error",
100
+ "no-div-regex": "error",
101
+ "no-duplicate-imports": "error",
102
+ "no-else-return": "error",
103
+ "no-empty-function": "error",
104
+ "no-eq-null": "error",
105
+ "no-eval": "error",
106
+ "no-extend-native": "error",
107
+ "no-extra-bind": "error",
108
+ "no-extra-label": "error",
109
+ "no-extra-parens": "off",
110
+ "no-floating-decimal": "error",
111
+ "no-implicit-coercion": "error",
112
+ "no-implicit-globals": "error",
113
+ "no-implied-eval": "error",
114
+ "no-inline-comments": "off",
115
+ "no-invalid-this": "error",
116
+ "no-iterator": "error",
117
+ "no-label-var": "error",
118
+ "no-labels": "error",
119
+ "no-lone-blocks": "error",
120
+ "no-lonely-if": "error",
121
+ "no-loop-func": "error",
122
+ "no-loss-of-precision": "off",
123
+ "no-magic-numbers": "off",
124
+ "no-mixed-operators": "off",
125
+ "no-mixed-requires": "error",
126
+ "no-multi-assign": "error",
127
+ "no-multi-spaces": "error",
128
+ "no-multi-str": "error",
129
+ "no-multiple-empty-lines": "error",
130
+ "no-native-reassign": "error",
131
+ "no-negated-condition": "off",
132
+ "no-negated-in-lhs": "error",
133
+ "no-nested-ternary": "error",
134
+ "no-new": "error",
135
+ "no-new-func": "error",
136
+ "no-new-object": "error",
137
+ "no-new-require": "error",
138
+ "no-new-wrappers": "error",
139
+ "no-nonoctal-decimal-escape": "error",
140
+ "no-octal-escape": "error",
141
+ "no-param-reassign": "error",
142
+ "no-path-concat": "error",
143
+ "no-plusplus": "off",
144
+ "no-process-env": "error",
145
+ "no-process-exit": "error",
146
+ "no-promise-executor-return": "error",
147
+ "no-proto": "error",
148
+ "no-restricted-exports": "error",
149
+ "no-restricted-globals": "error",
150
+ "no-restricted-imports": "error",
151
+ "no-restricted-modules": "error",
152
+ "no-restricted-properties": "error",
153
+ "no-restricted-syntax": "error",
154
+ "no-return-assign": "error",
155
+ "no-return-await": "error",
156
+ "no-script-url": "error",
157
+ "no-self-compare": "error",
158
+ "no-sequences": "error",
159
+ "no-shadow": "error",
160
+ "no-spaced-func": "error",
161
+ "no-sync": "error",
162
+ "no-tabs": "error",
163
+ "no-template-curly-in-string": "error",
164
+ "no-ternary": "off",
165
+ "no-throw-literal": "error",
166
+ "no-trailing-spaces": "error",
167
+ "no-undef-init": "error",
168
+ "no-undefined": "error",
169
+ "no-underscore-dangle": "error",
170
+ "no-unmodified-loop-condition": "error",
171
+ "no-unneeded-ternary": "error",
172
+ "no-unreachable-loop": "error",
173
+ "no-unsafe-optional-chaining": "error",
174
+ "no-unused-expressions": "error",
175
+ "no-use-before-define": "error",
176
+ "no-useless-backreference": "error",
177
+ "no-useless-call": "error",
178
+ "no-useless-computed-key": "error",
179
+ "no-useless-concat": "error",
180
+ "no-useless-constructor": "error",
181
+ "no-useless-rename": "error",
182
+ "no-useless-return": "error",
183
+ "no-var": "error",
184
+ "no-void": "error",
185
+ "no-warning-comments": "error",
186
+ "no-whitespace-before-property": "error",
187
+ "nonblock-statement-body-position": "error",
188
+ "object-curly-newline": "error",
189
+ "object-curly-spacing": "off",
190
+ "object-property-newline": "off",
191
+ "object-shorthand": "error",
192
+ "one-var": "off",
193
+ "one-var-declaration-per-line": "error",
194
+ "operator-assignment": "error",
195
+ "operator-linebreak": "error",
196
+ "padded-blocks": "off",
197
+ "padding-line-between-statements": "error",
198
+ "prefer-arrow-callback": "error",
199
+ "prefer-const": "error",
200
+ "prefer-destructuring": "error",
201
+ "prefer-exponentiation-operator": "error",
202
+ "prefer-named-capture-group": "error",
203
+ "prefer-numeric-literals": "error",
204
+ "prefer-object-spread": "error",
205
+ "prefer-promise-reject-errors": "error",
206
+ "prefer-reflect": "off",
207
+ "prefer-regex-literals": "error",
208
+ "prefer-rest-params": "error",
209
+ "prefer-spread": "error",
210
+ "prefer-template": "error",
211
+ "quote-props": "off",
212
+ "quotes": ["error", "single"],
213
+ "radix": "off",
214
+ "require-atomic-updates": "error",
215
+ "require-await": "error",
216
+ "require-jsdoc": "error",
217
+ "require-unicode-regexp": "error",
218
+ "rest-spread-spacing": "error",
219
+ "semi": "error",
220
+ "semi-spacing": "error",
221
+ "semi-style": "error",
222
+ "sort-imports": "error",
223
+ "sort-keys": "off",
224
+ "sort-vars": "error",
225
+ "space-before-blocks": "error",
226
+ "space-before-function-paren": "off",
227
+ "space-in-parens": "error",
228
+ "space-infix-ops": "error",
229
+ "space-unary-ops": "error",
230
+ "spaced-comment": "error",
231
+ "strict": "error",
232
+ "switch-colon-spacing": "error",
233
+ "symbol-description": "error",
234
+ "template-curly-spacing": "error",
235
+ "template-tag-spacing": "error",
236
+ "unicode-bom": "error",
237
+ "valid-jsdoc": "error",
238
+ "vars-on-top": "error",
239
+ "wrap-iife": "error",
240
+ "wrap-regex": "error",
241
+ "yield-star-spacing": "error",
242
+ "yoda": "error"
243
+ }
244
+ }
package/CHANGELOG.md CHANGED
@@ -4,7 +4,27 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- #### [v1.0.5](https://github.com/thkruz/ootk/compare/v1.0.4...v1.0.5)
7
+ #### [v1.1.0](https://github.com/thkruz/ootk/compare/v1.0.8...v1.1.0)
8
+
9
+ > 25 July 2022
10
+
11
+ - feat: :sparkles: add TLE parsing utility [`e9acd7c`](https://github.com/thkruz/ootk/commit/e9acd7cda738ef501733808b011d4496bddf05cf)
12
+
13
+ #### [v1.0.8](https://github.com/thkruz/ootk/compare/v1.0.7...v1.0.8)
14
+
15
+ > 20 July 2022
16
+
17
+ - refactor: :label: export types [`12ce662`](https://github.com/thkruz/ootk/commit/12ce66207406330a27fe3791effd7660ef61349b)
18
+
19
+ #### [v1.0.7](https://github.com/thkruz/ootk/compare/v1.0.6...v1.0.7)
20
+
21
+ > 20 July 2022
22
+
23
+ - build: :label: include type definition in dist folder [`4114ccd`](https://github.com/thkruz/ootk/commit/4114ccdabe4b1c7d957d017179d7700129643f83)
24
+
25
+ #### [v1.0.6](https://github.com/thkruz/ootk/compare/v1.0.4...v1.0.6)
26
+
27
+ > 20 July 2022
8
28
 
9
29
  - build(umd.js): renamed es modules to be .es.js files [`#17`](https://github.com/thkruz/ootk/pull/17)
10
30
  - Rebase [`#16`](https://github.com/thkruz/ootk/pull/16)
package/dist/ootk.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @author Theodore Kruczek.
3
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
+ * with satellites and other orbital objects.
5
+ *
6
+ * @copyright MIT License.
7
+ * Copyright (c) 2020-2021 Theodore Kruczek
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ */
27
+ export { Sgp4 } from './sgp4';
28
+ export { Transforms } from './transforms';
29
+ export { Utils } from './utils';
30
+ export { Tle } from './tle';
31
+ export { Sat } from './sat';
32
+ export * from './types';
package/dist/ootk.js CHANGED
@@ -1 +1 @@
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={407:(o,t,n)=>{n.r(t),n.d(t,{Sgp4:()=>d,Transforms:()=>i,Utils:()=>c});var a=Math.PI,s=2*a,e=a/180,r=2/3,l=15e-13,d=function(){function o(){}return o.dpper=function(o,t){var n=o.e3,e=o.ee2,r=o.peo,l=o.pgho,d=o.pho,i=o.PInco,c=o.plo,h=o.se2,u=o.se3,m=o.sgh2,p=o.sgh3,M=o.sgh4,x=o.sh2,g=o.sh3,f=o.si2,z=o.si3,v=o.sl2,y=o.sl3,b=o.sl4,j=o.t,w=o.xgh2,q=o.xgh3,k=o.xgh4,P=o.xh2,I=o.xh3,F=o.xi2,L=o.xi3,O=o.xl2,S=o.xl3,E=o.xl4,R=o.zmol,T=o.zmos,C=t.ep,D=t.inclp,N=t.nodep,_=t.argpp,A=t.mp,U=t.opsmode,V=void 0===U?"i":U,B=t.init,G=T+119459e-10*j;"y"===B&&(G=T);var H=G+.0335*Math.sin(G),J=Math.sin(H),K=.5*J*J-.25,Q=-.5*J*Math.cos(H),W=h*K+u*Q,X=f*K+z*Q,Y=v*K+y*Q+b*J,Z=m*K+p*Q+M*J,$=x*K+g*Q;G=R+.00015835218*j,"y"===B&&(G=R),H=G+.1098*Math.sin(G);var oo=W+(e*(K=.5*(J=Math.sin(H))*J-.25)+n*(Q=-.5*J*Math.cos(H))),to=X+(F*K+L*Q),no=Y+(O*K+S*Q+E*J),ao=Z+(w*K+q*Q+k*J),so=$+(P*K+I*Q);if("n"===B){no-=c,ao-=l,so-=d,D+=to-=i,C+=oo-=r;var eo=Math.sin(D),ro=Math.cos(D);if(D>=.2)_+=ao-=ro*(so/=eo),N+=so,A+=no;else{var lo=Math.sin(N),io=Math.cos(N),co=eo*lo,ho=eo*io;co+=so*io+to*ro*lo,ho+=-so*lo+to*ro*io,(N%=s)<0&&"a"===V&&(N+=s);var uo=A+_+ro*N;uo+=no+ao-to*N*eo;var mo=N;(N=Math.atan2(co,ho))<0&&"a"===V&&(N+=s),Math.abs(mo-N)>a&&(N<mo?N+=s:N-=s),_=uo-(A+=no)-ro*N}}return{ep:C,inclp:D,nodep:N,argpp:_,mp:A}},o.dscom=function(o){var t,n,a,s,e,r,l,d,i,c,h,u,m,p,M,x,g,f,z,v,y,b,j,w,q,k,P,I,F,L,O,S,E,R,T,C,D,N,_=o.epoch,A=o.ep,U=o.argpp,V=o.tc,B=o.inclp,G=o.nodep,H=o.np,J=.01675,K=.0549,Q=2*Math.PI,W=H,X=A,Y=Math.sin(G),Z=Math.cos(G),$=Math.sin(U),oo=Math.cos(U),to=Math.sin(B),no=Math.cos(B),ao=X*X,so=1-ao,eo=Math.sqrt(so),ro=_+18261.5+V/1440,lo=(4.523602-.00092422029*ro)%Q,io=Math.sin(lo),co=Math.cos(lo),ho=.91375164-.03568096*co,uo=Math.sqrt(1-ho*ho),mo=.089683511*io/uo,po=Math.sqrt(1-mo*mo),Mo=5.8351514+.001944368*ro,xo=.39785416*io/uo,go=po*co+.91744867*mo*io;xo=Math.atan2(xo,go),xo+=Mo-lo;for(var fo=Math.cos(xo),zo=Math.sin(xo),vo=.1945905,yo=-.98088458,bo=.91744867,jo=.39785416,wo=Z,qo=Y,ko=29864797e-13,Po=1/W,Io=1;Io<=2;Io++){var Fo=vo*wo+yo*bo*qo,Lo=-yo*wo+vo*bo*qo,Oo=-vo*qo+yo*bo*wo,So=yo*jo,Eo=yo*qo+vo*bo*wo,Ro=vo*jo,To=no*Oo+to*So,Co=no*Eo+to*Ro,Do=-to*Oo+no*So,No=-to*Eo+no*Ro,_o=Fo*oo+To*$,Ao=Lo*oo+Co*$,Uo=-Fo*$+To*oo,Vo=-Lo*$+Co*oo,Bo=Do*$,Go=No*$,Ho=Do*oo,Jo=No*oo;E=-6*Fo*Do+ao*(-24*_o*Ho-6*Uo*Bo),R=-6*(Fo*No+Lo*Do)+ao*(-24*(Ao*Ho+_o*Jo)+-6*(Uo*Go+Vo*Bo)),T=-6*Lo*No+ao*(-24*Ao*Jo-6*Vo*Go),C=6*To*Do+ao*(24*_o*Bo-6*Uo*Ho),D=6*(Co*Do+To*No)+ao*(24*(Ao*Bo+_o*Go)-6*(Vo*Ho+Uo*Jo)),N=6*Co*No+ao*(24*Ao*Go-6*Vo*Jo),L=(L=3*(Fo*Fo+To*To)+(P=12*_o*_o-3*Uo*Uo)*ao)+L+so*P,O=(O=6*(Fo*Lo+To*Co)+(I=24*_o*Ao-6*Uo*Vo)*ao)+O+so*I,S=(S=3*(Lo*Lo+Co*Co)+(F=12*Ao*Ao-3*Vo*Vo)*ao)+S+so*F,n=-.5*(a=ko*Po)/eo,t=-15*X*(s=a*eo),e=_o*Uo+Ao*Vo,r=Ao*Uo+_o*Vo,l=Ao*Vo-_o*Uo,1===Io&&(d=t,i=n,c=a,h=s,u=e,m=r,p=l,M=L,x=O,g=S,f=E,z=R,v=T,y=C,b=D,j=N,w=P,q=I,k=F,vo=fo,yo=zo,bo=ho,jo=uo,wo=po*Z+mo*Y,qo=Y*po-Z*mo,ko=4.7968065e-7)}return{snodm:Y,cnodm:Z,sinim:to,cosim:no,sinomm:$,cosomm:oo,day:ro,e3:2*t*l,ee2:2*t*r,em:X,emsq:ao,gam:Mo,peo:0,pgho:0,pho:0,PInco:0,plo:0,rtemsq:eo,se2:2*d*m,se3:2*d*p,sgh2:2*h*q,sgh3:2*h*(k-w),sgh4:-18*h*J,sh2:-2*i*b,sh3:-2*i*(j-y),si2:2*i*z,si3:2*i*(v-f),sl2:-2*c*x,sl3:-2*c*(g-M),sl4:-2*c*(-21-9*ao)*J,s1:t,s2:n,s3:a,s4:s,s5:e,s6:r,s7:l,ss1:d,ss2:i,ss3:c,ss4:h,ss5:u,ss6:m,ss7:p,sz1:M,sz2:x,sz3:g,sz11:f,sz12:z,sz13:v,sz21:y,sz22:b,sz23:j,sz31:w,sz32:q,sz33:k,xgh2:2*s*I,xgh3:2*s*(F-P),xgh4:-18*s*K,xh2:-2*n*D,xh3:-2*n*(N-C),xi2:2*n*R,xi3:2*n*(T-E),xl2:-2*a*O,xl3:-2*a*(S-L),xl4:-2*a*(-21-9*ao)*K,nm:W,z1:L,z2:O,z3:S,z11:E,z12:R,z13:T,z21:C,z22:D,z23:N,z31:P,z32:I,z33:F,zmol:(.2299715*ro-Mo+4.7199672)%Q,zmos:(6.2565837+.017201977*ro)%Q}},o.dsinit=function(o){var t=o.xke,n=o.cosim,e=o.argpo,r=o.s1,l=o.s2,d=o.s3,i=o.s4,c=o.s5,h=o.sinim,u=o.ss1,m=o.ss2,p=o.ss3,M=o.ss4,x=o.ss5,g=o.sz1,f=o.sz3,z=o.sz11,v=o.sz13,y=o.sz21,b=o.sz23,j=o.sz31,w=o.sz33,q=o.t,k=o.tc,P=o.gsto,I=o.mo,F=o.mdot,L=o.no,O=o.nodeo,S=o.nodedot,E=o.xPIdot,R=o.z1,T=o.z3,C=o.z11,D=o.z13,N=o.z21,_=o.z23,A=o.z31,U=o.z33,V=o.ecco,B=o.eccsq,G=o.emsq,H=o.em,J=o.argpm,K=o.inclm,Q=o.mm,W=o.nm,X=o.nodem,Y=o.irez,Z=o.atime,$=o.d2201,oo=o.d2211,to=o.d3210,no=o.d3222,ao=o.d4410,so=o.d4422,eo=o.d5220,ro=o.d5232,lo=o.d5421,io=o.d5433,co=o.dedt,ho=o.didt,uo=o.dmdt,mo=o.dnodt,po=o.domdt,Mo=o.del1,xo=o.del2,go=o.del3,fo=o.xfact,zo=o.xlamo,vo=o.xli,yo=o.xni,bo=.0043752690880113,jo=.00015835218,wo=119459e-10;Y=0,W<.0052359877&&W>.0034906585&&(Y=1),W>=.00826&&W<=.00924&&H>=.5&&(Y=2);var qo=-wo*m*(y+b);(K<.052359877||K>a-.052359877)&&(qo=0),0!==h&&(qo/=h);var ko=-jo*l*(N+_);(K<.052359877||K>a-.052359877)&&(ko=0),po=M*wo*(j+w-6)-n*qo+i*jo*(A+U-6),mo=qo,0!==h&&(po-=n/h*ko,mo+=ko/h);var Po=(P+k*bo)%s;if(H+=(co=u*wo*x+r*jo*c)*q,K+=(ho=m*wo*(z+v)+l*jo*(C+D))*q,J+=po*q,X+=mo*q,Q+=(uo=-wo*p*(g+f-14-6*G)-jo*d*(R+T-14-6*G))*q,0!==Y){var Io=Math.pow(W/t,2/3);if(2===Y){var Fo=n*n,Lo=H,Oo=G,So=(H=V)*(G=B),Eo=void 0,Ro=void 0,To=void 0,Co=void 0,Do=void 0,No=void 0,_o=void 0,Ao=void 0,Uo=void 0;H<=.65?(Eo=3.616-13.247*H+16.29*G,Ro=117.39*H-19.302-228.419*G+156.591*So,To=109.7927*H-18.9068-214.6334*G+146.5816*So,Co=242.694*H-41.122-471.094*G+313.953*So,Do=841.88*H-146.407-1629.014*G+1083.435*So,No=3017.977*H-532.114-5740.032*G+3708.276*So):(Eo=331.819*H-72.099-508.738*G+266.724*So,Ro=1582.851*H-346.844-2415.925*G+1246.113*So,To=1554.908*H-342.585-2366.899*G+1215.972*So,Co=4758.686*H-1052.797-7193.992*G+3651.957*So,Do=16178.11*H-3581.69-24462.77*G+12422.52*So,No=H>.715?29936.92*H-5149.66-54087.36*G+31324.56*So:1464.74-4664.75*H+3763.64*G),H<.7?(_o=4988.61*H-919.2277-9064.77*G+5542.21*So,Ao=4568.6173*H-822.71072-8491.4146*G+5337.524*So,Uo=4690.25*H-853.666-8624.77*G+5341.4*So):(_o=161616.52*H-37995.78-229838.2*G+109377.94*So,Ao=218913.95*H-51752.104-309468.16*G+146349.42*So,Uo=170470.89*H-40023.88-242699.48*G+115605.82*So);var Vo=h*h,Bo=W*W*3*(Io*Io),Go=17891679e-13*Bo;$=Go*(Ho=.75*(1+2*n+Fo))*(-.306-.44*(H-.64)),oo=Go*(1.5*Vo)*Eo,to=(Go=3.7393792e-7*(Bo*=Io))*(1.875*h*(1-2*n-3*Fo))*Ro,no=Go*(-1.875*h*(1+2*n-3*Fo))*To,ao=(Go=2*(Bo*=Io)*7.3636953e-9)*(35*Vo*Ho)*Co,so=Go*(39.375*Vo*Vo)*Do,eo=(Go=1.1428639e-7*(Bo*=Io))*(9.84375*h*(Vo*(1-2*n-5*Fo)+.33333333*(4*n-2+6*Fo)))*No,ro=Go*(h*(4.92187512*Vo*(-2-4*n+10*Fo)+6.56250012*(1+2*n-3*Fo)))*Uo,lo=(Go=2*Bo*2.1765803e-9)*(29.53125*h*(2-8*n+Fo*(8*n-12+10*Fo)))*Ao,io=Go*(29.53125*h*(-2-8*n+Fo*(12+8*n-10*Fo)))*_o,zo=(I+O+O-(Po+Po))%s,fo=F+uo+2*(S+mo-bo)-L,H=Lo,G=Oo}if(1===Y){var Ho,Jo=1+n;xo=2*(Mo=3*W*W*Io*Io)*(Ho=.75*(1+n)*(1+n))*(1+G*(.8125*G-2.5))*17891679e-13,go=3*Mo*(Jo*=1.875*Jo*Jo)*(1+G*(6.60937*G-6))*2.2123015e-7*Io,Mo=Mo*(.9375*h*h*(1+3*n)-.75*(1+n))*(Ro=1+2*G)*21460748e-13*Io,zo=(I+O+e-Po)%s,fo=F+E+uo+po+mo-(L+bo)}vo=zo,yo=L,Z=0,W=L+0}return{em:H,argpm:J,inclm:K,mm:Q,nm:W,nodem:X,irez:Y,atime:Z,d2201:$,d2211:oo,d3210:to,d3222:no,d4410:ao,d4422:so,d5220:eo,d5232:ro,d5421:lo,d5433:io,dedt:co,didt:ho,dmdt:uo,dndt:0,dnodt:mo,domdt:po,del1:Mo,del2:xo,del3:go,xfact:fo,xlamo:zo,xli:vo,xni:yo}},o.dspace=function(o,t,n,a,e,r,l,d,i,c,h,u,m,p,M,x,g,f,z,v,y,b,j,w,q,k,P,I,F,L,O,S,E,R,T,C){var D=.13130908,N=2.8843198,_=.37448087,A=5.7686396,U=.95240898,V=1.8014998,B=1.050833,G=4.4108898,H=259200,J=0,K=(w+.0043752690880113*j)%s;if(F+=u*b,O+=x*b,L+=z*b,T+=f*b,E+=g*b,0!==o){(0===I||b*I<=0||Math.abs(b)<Math.abs(I))&&(I=0,R=P,S=k);var Q;Q=b>0?720:-720;for(var W=void 0,X=void 0,Y=void 0,Z=void 0,$=void 0,oo=void 0,to=void 0,no=381;381===no;)2!==o?(W=m*Math.sin(S-D)+p*Math.sin(2*(S-N))+M*Math.sin(3*(S-_)),X=R+q,Y=m*Math.cos(S-D)+2*p*Math.cos(2*(S-N))+3*M*Math.cos(3*(S-_)),Y*=X):($=(Z=v+y*I)+Z,oo=S+S,W=t*Math.sin($+S-A)+n*Math.sin(S-A)+a*Math.sin(Z+S-U)+e*Math.sin(-Z+S-U)+r*Math.sin($+oo-V)+l*Math.sin(oo-V)+d*Math.sin(Z+S-B)+i*Math.sin(-Z+S-B)+c*Math.sin(Z+oo-G)+h*Math.sin(-Z+oo-G),X=R+q,Y=t*Math.cos($+S-A)+n*Math.cos(S-A)+a*Math.cos(Z+S-U)+e*Math.cos(-Z+S-U)+d*Math.cos(Z+S-B)+i*Math.cos(-Z+S-B)+2*r*Math.cos($+oo-V)+l*Math.cos(oo-V)+c*Math.cos(Z+oo-G)+h*Math.cos(-Z+oo-G),Y*=X),Math.abs(b-I)>=720?no=381:(to=b-I,no=0),381===no&&(S+=X*Q+W*H,R+=W*Q+Y*H,I+=Q);C=R+W*to+Y*to*to*.5;var ao=S+X*to+W*to*to*.5;1!==o?(E=ao-2*T+2*K,J=C-P):(E=ao-T-L+K,J=C-P),C=P+J}return[F,L,O,E,T,C]},o.initl=function(t){var n=t.opsmode,a=t.ecco,s=t.epoch,e=t.inclo,r=t.xke,l=t.j2,d=t.no,i=2*Math.PI,c=2/3,h=a*a,u=1-h,m=Math.sqrt(u),p=Math.cos(e),M=p*p,x=Math.pow(r/d,c),g=.75*l*(3*M-1)/(m*u),f=g/(x*x),z=x*(1-f*f-f*(1/3+134*f*f/81));d/=1+(f=g/(z*z));var v,y=Math.pow(r/d,c),b=Math.sin(e),j=y*u,w=1-5*M,q=-w-M-M,k=1/y,P=j*j,I=y*(1-a);if("a"==n){var F=s-7305,L=Math.floor(F+1e-8),O=.017202791694070362;(v=(1.7321343856509375+O*L+(O+i)*(F-L)+F*F*5075514194322695e-30)%i)<0&&(v+=i)}else v=o.gstime(s+2433281.5);return{no:d,method:"n",ainv:k,ao:y,con41:q,con42:w,cosio:p,cosio2:M,eccsq:h,omeosq:u,posq:P,rp:I,rteosq:m,sinio:b,gsto:v}},o.sgp4init=function(t,n){var a=n.whichconst,e=void 0===a?"wgs72":a,d=n.opsmode,i=void 0===d?"i":d,c=n.satn,h=void 0===c?t.satnum:c,u=n.epoch,m=n.xbstar,p=n.xecco,M=n.xargpo,x=n.xinclo,g=n.xndot,f=n.xnddot,z=n.xmo,v=n.xno,y=n.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 b=o.getgravconst(e);t.tumin=b.tumin,t.mus=b.mus,t.radiusearthkm=b.radiusearthkm,t.xke=b.xke,t.j2=b.j2,t.j3=b.j3,t.j4=b.j4,t.j3oj2=b.j3oj2;var j=b.j2,w=b.j4,q=b.xke,k=b.j3oj2;t.error=0,t.operationmode=i;var P=h.split("")[0].toLowerCase();isNaN(parseInt(P))?t.satnum=parseInt(P.charCodeAt(0)-96+9+t.satnum.slice(1,5)).toString():t.satnum=h,t.bstar=m,t.ndot=g,t.nddot=f,t.ecco=p,t.argpo=M,t.inclo=x,t.mo=z,t.no=v,t.nodeo=y;var I=78/t.radiusearthkm+1,F=42/t.radiusearthkm,L=F*F*F*F;t.init="y",t.t=0;var O={ecco:t.ecco,epoch:u,inclo:t.inclo,no:t.no,method:t.method,opsmode:t.operationmode,xke:t.xke,j2:t.j2},S=o.initl(O),E=S.ao,R=S.con42,T=S.cosio,C=S.cosio2,D=S.eccsq,N=S.omeosq,_=S.posq,A=S.rp,U=S.rteosq,V=S.sinio;if(t.no=S.no,t.con41=S.con41,t.gsto=S.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,N>=0||t.no>=0){t.isimp=0,A<220/t.radiusearthkm+1&&(t.isimp=1);var B=I,G=L,H=(A-1)*t.radiusearthkm;if(H<156){B=H-78,H<98&&(B=20);var J=(120-B)/t.radiusearthkm;G=J*J*J*J,B=B/t.radiusearthkm+1}var K=1/_,Q=1/(E-B);t.eta=E*t.ecco*Q;var W=t.eta*t.eta,X=t.ecco*t.eta,Y=Math.abs(1-W),Z=G*Math.pow(Q,4),$=Z/Math.pow(Y,3.5),oo=$*t.no*(E*(1+1.5*W+X*(4+W))+.375*j*Q/Y*t.con41*(8+3*W*(8+W)));t.cc1=t.bstar*oo;var to=0;t.ecco>1e-4&&(to=-2*Z*Q*k*t.no*V/t.ecco),t.x1mth2=1-C,t.cc4=2*t.no*$*E*N*(t.eta*(2+.5*W)+t.ecco*(.5+2*W)-j*Q/(E*Y)*(-3*t.con41*(1-2*X+W*(1.5-.5*X))+.75*t.x1mth2*(2*W-X*(1+W))*Math.cos(2*t.argpo))),t.cc5=2*$*E*N*(1+2.75*(W+X)+X*W);var no=C*C,ao=1.5*j*K*t.no,so=.5*ao*j*K,eo=-.46875*w*K*K*t.no;t.mdot=t.no+.5*ao*U*t.con41+.0625*so*U*(13-78*C+137*no),t.argpdot=-.5*ao*R+.0625*so*(7-114*C+395*no)+eo*(3-36*C+49*no);var ro=-ao*T;t.nodedot=ro+(.5*so*(4-19*C)+2*eo*(3-7*C))*T;var lo=t.argpdot+t.nodedot;t.omgcof=t.bstar*to*Math.cos(t.argpo),t.xmcof=0,t.ecco>1e-4&&(t.xmcof=-r*Z*t.bstar/X),t.nodecf=3.5*N*ro*t.cc1,t.t2cof=1.5*t.cc1,Math.abs(T+1)>15e-13?t.xlcof=-.25*k*V*(3+5*T)/(1+T):t.xlcof=-.25*k*V*(3+5*T)/l,t.aycof=-.5*k*V;var io=1+t.eta*Math.cos(t.mo);if(t.delmo=io*io*io,t.sinmao=Math.sin(t.mo),t.x7thm1=7*C-1,s/t.no>=225){t.method="d",t.isimp=1;var co=t.inclo,ho={epoch:u,ep:t.ecco,argpp:t.argpo,tc:0,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},uo=o.dscom(ho);t.e3=uo.e3,t.ee2=uo.ee2,t.peo=uo.peo,t.pgho=uo.pgho,t.pho=uo.pho,t.PInco=uo.PInco,t.plo=uo.plo,t.se2=uo.se2,t.se3=uo.se3,t.sgh2=uo.sgh2,t.sgh3=uo.sgh3,t.sgh4=uo.sgh4,t.sh2=uo.sh2,t.sh3=uo.sh3,t.si2=uo.si2,t.si3=uo.si3,t.sl2=uo.sl2,t.sl3=uo.sl3,t.sl4=uo.sl4;var mo=uo.sinim,po=uo.cosim,Mo=uo.em,xo=uo.emsq,go=uo.s1,fo=uo.s2,zo=uo.s3,vo=uo.s4,yo=uo.s5,bo=uo.ss1,jo=uo.ss2,wo=uo.ss3,qo=uo.ss4,ko=uo.ss5,Po=uo.sz1,Io=uo.sz3,Fo=uo.sz11,Lo=uo.sz13,Oo=uo.sz21,So=uo.sz23,Eo=uo.sz31,Ro=uo.sz33;t.xgh2=uo.xgh2,t.xgh3=uo.xgh3,t.xgh4=uo.xgh4,t.xh2=uo.xh2,t.xh3=uo.xh3,t.xi2=uo.xi2,t.xi3=uo.xi3,t.xl2=uo.xl2,t.xl3=uo.xl3,t.xl4=uo.xl4,t.zmol=uo.zmol,t.zmos=uo.zmos;var To=uo.nm,Co=uo.z1,Do=uo.z3,No=uo.z11,_o=uo.z13,Ao=uo.z21,Uo=uo.z23,Vo=uo.z31,Bo=uo.z33,Go={inclo:co,init:t.init,ep:t.ecco,inclp:t.inclo,nodep:t.nodeo,argpp:t.argpo,mp:t.mo,opsmode:t.operationmode},Ho=o.dpper(t,Go);t.ecco=Ho.ep,t.inclo=Ho.inclp,t.nodeo=Ho.nodep,t.argpo=Ho.argpp,t.mo=Ho.mp;var Jo={xke:q,cosim:po,emsq:xo,argpo:t.argpo,s1:go,s2:fo,s3:zo,s4:vo,s5:yo,sinim:mo,ss1:bo,ss2:jo,ss3:wo,ss4:qo,ss5:ko,sz1:Po,sz3:Io,sz11:Fo,sz13:Lo,sz21:Oo,sz23:So,sz31:Eo,sz33:Ro,t:t.t,tc:0,gsto:t.gsto,mo:t.mo,mdot:t.mdot,no:t.no,nodeo:t.nodeo,nodedot:t.nodedot,xPIdot:lo,z1:Co,z3:Do,z11:No,z13:_o,z21:Ao,z23:Uo,z31:Vo,z33:Bo,ecco:t.ecco,eccsq:D,em:Mo,argpm:0,inclm:co,mm:0,nm:To,nodem:0,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},Ko=o.dsinit(Jo);t.irez=Ko.irez,t.atime=Ko.atime,t.d2201=Ko.d2201,t.d2211=Ko.d2211,t.d3210=Ko.d3210,t.d3222=Ko.d3222,t.d4410=Ko.d4410,t.d4422=Ko.d4422,t.d5220=Ko.d5220,t.d5232=Ko.d5232,t.d5421=Ko.d5421,t.d5433=Ko.d5433,t.dedt=Ko.dedt,t.didt=Ko.didt,t.dmdt=Ko.dmdt,t.dnodt=Ko.dnodt,t.domdt=Ko.domdt,t.del1=Ko.del1,t.del2=Ko.del2,t.del3=Ko.del3,t.xfact=Ko.xfact,t.xlamo=Ko.xlamo,t.xli=Ko.xli,t.xni=Ko.xni}if(1!==t.isimp){var Qo=t.cc1*t.cc1;t.d2=4*E*Q*Qo;var Wo=t.d2*Q*t.cc1/3;t.d3=(17*E+B)*Wo,t.d4=.5*Wo*E*Q*(221*E+31*B)*t.cc1,t.t3cof=t.d2+2*Qo,t.t4cof=.25*(3*t.d3+t.cc1*(12*t.d2+10*Qo)),t.t5cof=.2*(3*t.d4+12*t.cc1*t.d3+6*t.d2*t.d2+15*Qo*(2*t.d2+Qo))}}o.propagate(t,0),t.init="n"},o.propagate=function(t,n){var e=t.xke,d=t.j2,i=t.j3oj2,c=t.radiusearthkm*t.xke/60;t.t=n,t.error=0;var h=t.mo+t.mdot*t.t,u=t.argpo+t.argpdot*t.t,m=t.nodeo+t.nodedot*t.t,p=u,M=h,x=t.t*t.t,g=m+t.nodecf*x,f=1-t.cc1*t.t,z=t.bstar*t.cc4*t.t,v=t.t2cof*x;if(1!==t.isimp){var y=t.omgcof*t.t,b=1+t.eta*Math.cos(h),j=y+t.xmcof*(b*b*b-t.delmo);M=h+j,p=u-j;var w=x*t.t,q=w*t.t;f=f-t.d2*x-t.d3*w-t.d4*q,z+=t.bstar*t.cc5*(Math.sin(M)-t.sinmao),v=v+t.t3cof*w+q*(t.t4cof+t.t*t.t5cof)}var k=t.no,P=t.ecco,I=t.inclo;if("d"===t.method){var F=t.t,L=o.dspace(t.irez,t.d2201,t.d2211,t.d3210,t.d3222,t.d4410,t.d4422,t.d5220,t.d5232,t.d5421,t.d5433,t.dedt,t.del1,t.del2,t.del3,t.didt,t.dmdt,t.dnodt,t.domdt,t.argpo,t.argpdot,t.t,F,t.gsto,t.xfact,t.xlamo,t.no,t.atime,P,p,I,t.xli,M,t.xni,g,k);P=L[0],p=L[1],I=L[2],M=L[3],g=L[4],k=L[5]}if(k<=0)return t.error=2,{position:!1,velocity:!1};var O=Math.pow(e/k,r)*f*f;if(k=e/Math.pow(O,1.5),(P-=z)>=1||P<-.001)return t.error=1,{position:!1,velocity:!1};P<1e-6&&(P=1e-6);var S=(M+=t.no*v)+p+g,E=P,R=I,T=p%=s,C=g%=s,D=M=((S%=s)-p-g)%s,N=Math.sin(I),_=Math.cos(I);if("d"===t.method){var A={inclo:t.inclo,init:"n",ep:E,inclp:R,nodep:C,argpp:T,mp:D,opsmode:t.operationmode},U=o.dpper(t,A);if(E=U.ep,C=U.nodep,T=U.argpp,D=U.mp,(R=U.inclp)<0&&(R=-R,C+=a,T-=a),E<0||E>1)return t.error=3,{position:!1,velocity:!1}}"d"===t.method&&(N=Math.sin(R),_=Math.cos(R),t.aycof=-.5*i*N,Math.abs(_+1)>15e-13?t.xlcof=-.25*i*N*(3+5*_)/(1+_):t.xlcof=-.25*i*N*(3+5*_)/l);for(var V,B,G=E*Math.cos(T),H=1/(O*(1-E*E)),J=E*Math.sin(T)+H*t.aycof,K=(D+T+C+H*t.xlcof*G-C)%s,Q=K,W=9999.9,X=1;Math.abs(W)>=1e-12&&X<=10;)V=Math.sin(Q),W=(K-J*(B=Math.cos(Q))+G*V-Q)/(W=1-B*G-V*J),Math.abs(W)>=.95&&(W=W>0?.95:-.95),Q+=W,X+=1;var Y=G*B+J*V,Z=G*V-J*B,$=G*G+J*J,oo=O*(1-$);if(oo<0)return t.error=4,{position:!1,velocity:!1};var to=O*(1-Y),no=Math.sqrt(O)*Z/to,ao=Math.sqrt(oo)/to,so=Math.sqrt(1-$),eo=O/to*(V-J-G*(H=Z/(1+so))),ro=O/to*(B-G+J*H),lo=Math.atan2(eo,ro),io=(ro+ro)*eo,co=1-2*eo*eo,ho=.5*d*(H=1/oo),uo=ho*H;if("d"===t.method){var mo=_*_;t.con41=3*mo-1,t.x1mth2=1-mo,t.x7thm1=7*mo-1}var po=to*(1-1.5*uo*so*t.con41)+.5*ho*t.x1mth2*co;if(po<1)return t.error=6,{position:!1,velocity:!1};lo-=.25*uo*t.x7thm1*io;var Mo=C+1.5*uo*_*io,xo=R+1.5*uo*_*N*co,go=no-k*ho*t.x1mth2*io/e,fo=ao+k*ho*(t.x1mth2*co+1.5*t.con41)/e,zo=Math.sin(lo),vo=Math.cos(lo),yo=Math.sin(Mo),bo=Math.cos(Mo),jo=Math.sin(xo),wo=Math.cos(xo),qo=-yo*wo,ko=bo*wo,Po=qo*zo+bo*vo,Io=ko*zo+yo*vo,Fo=jo*zo,Lo=qo*vo-bo*zo,Oo=ko*vo-yo*zo,So=jo*vo;return{position:{x:po*Po*t.radiusearthkm,y:po*Io*t.radiusearthkm,z:po*Fo*t.radiusearthkm},velocity:{x:(go*Po+fo*Lo)*c,y:(go*Io+fo*Oo)*c,z:(go*Fo+fo*So)*c}}},o.getgravconst=function(o){var t,n,a,s,e,r,l,d;switch(o){case"wgs72old":n=398600.79964,a=6378.135,t=1/(s=.0743669161),l=-165597e-11,d=(r=-253881e-11)/(e=.001082616);break;case"wgs72":n=398600.8,a=6378.135,t=1/(s=60/Math.sqrt(a*a*a/n)),l=-165597e-11,d=(r=-253881e-11)/(e=.001082616);break;case"wgs84":n=398600.5,a=6378.137,t=1/(s=60/Math.sqrt(a*a*a/n)),l=-161098761e-14,d=(r=-253215306e-14)/(e=.00108262998905);break;default:throw new Error("unknown gravity option ".concat(o))}return{tumin:t,mus:n,radiusearthkm:a,xke:s,j2:e,j3:r,j4:l,j3oj2:d}},o.createSatrec=function(t,n,s,r){void 0===s&&(s="wgs72"),void 0===r&&(r="i");var l,d={a:null,am:null,alta:null,altp:null,argpdot:null,argpo:null,aycof:null,bstar:null,cc1:null,cc4:null,cc5:null,con41:null,d2:null,d3:null,d4:null,d5232:null,d5421:null,d5433:null,dedt:null,delmo:null,del1:null,ecco:null,em:null,epochdays:null,epochyr:null,error:null,eta:null,gsto:null,im:null,inclo:null,init:null,isimp:null,jdsatepoch:null,mdot:null,method:null,mo:null,mm:null,nddot:null,ndot:null,no:null,nodecf:null,nodedot:null,nodeo:null,om:null,Om:null,omgcof:null,operationmode:null,satnum:null,sinmao:null,t:null,t2cof:null,t3cof:null,t4cof:null,t5cof:null,x1mth2:null,x7thm1:null,xlcof:null,xmcof:null,xfact:null,xlamo:null,xli:null,xgh4:null,xgh3:null,xh2:null,xi2:null,xi3:null,xl2:null,xl3:null,xl4:null,zmol:null,zmos:null,dmdt:null,dnodt:null,domdt:null,e3:null,ee2:null,peo:null,pgho:null,pho:null,PInco:null,plo:null,se2:null,se3:null,sgh2:null,sgh3:null,sgh4:null,sh2:null,sh3:null,si2:null,si3:null,sl2:null,sl3:null,sl4:null,xgh2:null,xh3:null,tumin:null,radiusearthkm:null,irez:null,d3210:null,d3222:null,d4410:null,d4422:null,d5220:null,del2:null,del3:null,didt:null,atime:null,j2:null,j3:null,j4:null,mus:null,xke:null,j3oj2:null,xni:null,d2201:null,d2211:null,nm:null},i=1440/(2*a);d.error=0,d.satnum=t.substring(2,7),d.epochyr=parseInt(t.substring(18,20)),d.epochdays=parseFloat(t.substring(20,32)),d.ndot=parseFloat(t.substring(33,43)),d.nddot=parseFloat("".concat(t.substring(44,45),".").concat(t.substring(45,50),"E").concat(t.substring(50,52))),d.bstar=parseFloat("".concat(t.substring(53,54),".").concat(t.substring(54,59),"E").concat(t.substring(59,61))),d.inclo=parseFloat(n.substring(8,16)),d.nodeo=parseFloat(n.substring(17,25)),d.ecco=parseFloat(".".concat(n.substring(26,33))),d.argpo=parseFloat(n.substring(34,42)),d.mo=parseFloat(n.substring(43,51)),d.no=parseFloat(n.substring(52,63)),d.no/=i,d.inclo*=e,d.nodeo*=e,d.argpo*=e,d.mo*=e,l=d.epochyr<57?d.epochyr+2e3:d.epochyr+1900;var c=o.days2mdhms(l,d.epochdays),h=c.mon,u=c.day,m=c.hr,p=c.minute,M=c.sec,x=o.jday(l,h,u,m,p,M);return d.jdsatepoch=x.jd+x.jdFrac,o.sgp4init(d,{whichconst:s,opsmode:r,satn:d.satnum,epoch:d.jdsatepoch-2433281.5,xbstar:d.bstar,xecco:d.ecco,xargpo:d.argpo,xinclo:d.inclo,xndot:d.ndot,xnddot:d.nddot,xmo:d.mo,xno:d.no,xnodeo:d.nodeo}),d},o.gstime=function(o){var t=(o-2451545)/36525,n=-62e-7*t*t*t+.093104*t*t+3164400184.812866*t+67310.54841;return(n=n*e/240%s)<0&&(n+=s),n},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 n=[0,0,0];return n[0]=o[1]*t[2]-o[2]*t[1],n[1]=o[2]*t[0]-o[0]*t[2],n[2]=o[0]*t[1]-o[1]*t[0],n},o.dot=function(o,t){return o[0]*t[0]+o[1]*t[1]+o[2]*t[2]},o.angle=function(t,n){var a=o.mag(t),s=o.mag(n);if(a*s>1e-8*1e-8){var e=o.dot(t,n)/(a*s);return Math.abs(e)>1&&(e=1*o.sgn(e)),Math.acos(e)}return 999999.1},o.asinh=function(o){return Math.log(o+Math.sqrt(o*o+1))},o.newtonnu=function(t,n){var s=999999.9,e=999999.9,r=1e-8;if(Math.abs(t)<r)e=n,s=n;else if(t<1-r){var l=Math.sqrt(1-t*t)*Math.sin(n)/(1+t*Math.cos(n)),d=(t+Math.cos(n))/(1+t*Math.cos(n));e=(s=Math.atan2(l,d))-t*Math.sin(s)}else t>1+r?t>1&&Math.abs(n)+1e-5<a-Math.acos(1/t)&&(l=Math.sqrt(t*t-1)*Math.sin(n)/(1+t*Math.cos(n)),s=o.asinh(l),e=t*o.sinh(s)-s):Math.abs(n)<168*a/180&&(e=(s=Math.tan(.5*n))+s*s*s/3);return t<1&&((e%=2*a)<0&&(e+=2*a),s%=2*a),{e0:s,m:e}},o.sinh=function(o){return(Math.exp(o)-Math.exp(-o))/2},o.rv2coe=function(t,n,e){var r,l,d,i,c,h,u,m,p,M,x,g,f,z,v,y,b,j=[0,0,0],w=[0,0,0],q=.5*a,k=1e-8,P=999999.1,I=o.mag(t),F=o.mag(n),L=o.cross(t,n),O=o.mag(L);if(O>k){j[0]=-L[1],j[1]=L[0],j[2]=0,f=o.mag(j);var S=F*F-e/I;for(g=o.dot(t,n),y=0;y<=2;y++)w[y]=(S*t[y]-g*n[y])/e;if(d=o.mag(w),v=F*F*.5-e/I,l=Math.abs(v)>k?-e/(2*v):999999.9,r=O*O/e,z=L[2]/O,i=Math.acos(z),b=1,d<k?b=i<k||Math.abs(i-a)<k?2:3:(i<k||Math.abs(i-a)<k)&&(b=4),f>k){var E=j[0]/f;Math.abs(E)>1&&(E=o.sgn(E)),c=Math.acos(E),j[1]<0&&(c=s-c)}else c=P;1==b?(h=o.angle(j,w),w[2]<0&&(h=s-h)):h=P,1==b||4==b?(u=o.angle(w,t),g<0&&(u=s-u)):u=P,3==b?(p=o.angle(j,t),t[2]<0&&(p=s-p),m=p):p=P,d>k&&4==b?(E=w[0]/d,Math.abs(E)>1&&(E=o.sgn(E)),x=Math.acos(E),w[1]<0&&(x=s-x),i>q&&(x=s-x)):x=P,I>k&&2==b?(E=t[0]/I,Math.abs(E)>1&&(E=o.sgn(E)),M=Math.acos(E),t[1]<0&&(M=s-M),i>q&&(M=s-M),m=M):M=P,1!=b&&4!=b||(m=o.newtonnu(d,u).m)}else r=P,l=P,d=P,i=P,c=P,h=P,u=P,m=P,p=P,M=P,x=P;return{p:r,a:l,ecc:d,incl:i,omega:c,argp:h,nu:u,m,arglat:p,truelon:M,lonper:x}},o.jday=function(o,t,n,a,s,e){var r=367*o-Math.floor(7*(o+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+n+1721013.5,l=(e+60*s+3600*a)/86400;if(Math.abs(l)>1){var d=Math.floor(l);r+=d,l-=d}return{jd:r,jdFrac:l}},o.days2mdhms=function(o,t){for(var n=[31,o%4==0?29:28,31,30,31,30,31,31,30,31,30,31],a=Math.floor(t),s=1,e=0;a>e+n[s-1]&&s<12;)e+=n[s-1],s+=1;var r=s,l=a-e,d=24*(t-a),i=Math.floor(d);d=60*(d-i);var c=Math.floor(d);return{mon:r,day:l,hr:i,minute:c,sec:60*(d-c)}},o.invjday=function(t,n){var a,s;Math.abs(n)>=1&&(t+=Math.floor(n),n-=Math.floor(n));var e=t-Math.floor(t)-.5;Math.abs(e)>1e-8&&(t-=e,n+=e);var r=t-2415019.5,l=r/365.25,d=1900+Math.floor(l);a=Math.floor(.25*(d-1901)),(s=Math.floor(r-(365*(d-1900)+a)))+n<1&&(d-=1,a=Math.floor(.25*(d-1901)),s=Math.floor(r-(365*(d-1900)+a)));var i=o.days2mdhms(d,s+n);return{year:d,mon:i.mon,day:i.day,hr:i.hr,minute:i.minute,sec:i.sec}},o}(),i=function(){function o(){}return o.getDegLat=function(t){if(t<-a/2||t>a/2)throw new RangeError("Latitude radians must be in range [-PI/2; PI/2].");return o.rad2deg(t)},o.getDegLon=function(t){if(t<-a||t>a)throw new RangeError("Longitude radians must be in range [-PI; PI].");return o.rad2deg(t)},o.getRadLat=function(t){if(t<-90||t>90)throw new RangeError("Latitude degrees must be in range [-90; 90].");return o.deg2rad(t)},o.getRadLon=function(t){if(t<-180||t>180)throw new RangeError("Longitude degrees must be in range [-180; 180].");return o.deg2rad(t)},o.rad2deg=function(o){return 180*o/a},o.deg2rad=function(o){return o*a/180},o.ecf2eci=function(o,t){return{x:o.x*Math.cos(t)-o.y*Math.sin(t),y:o.x*Math.sin(t)+o.y*Math.cos(t),z:o.z}},o.ecf2rae=function(t,n){var a=o.lla2sez(t,n);return o.sez2rae(a)},o.eci2lla=function(o,t){for(var n=6378.137,e=Math.sqrt(o.x*o.x+o.y*o.y),r=(n-6356.7523142)/n,l=2*r-r*r,d=Math.atan2(o.y,o.x)-t;d<-a;)d+=s;for(;d>a;)d-=s;for(var i,c=0,h=Math.atan2(o.z,Math.sqrt(o.x*o.x+o.y*o.y));c<20;)i=1/Math.sqrt(1-l*(Math.sin(h)*Math.sin(h))),h=Math.atan2(o.z+n*i*l*Math.sin(h),e),c+=1;return{lon:d,lat:h,alt:e/Math.cos(h)-n*i}},o.eci2ecf=function(o,t){return{x:o.x*Math.cos(t)+o.y*Math.sin(t),y:o.x*-Math.sin(t)+o.y*Math.cos(t),z:o.z}},o.lla2ecf=function(o){var t=o.lon,n=o.lat,a=o.alt,s=6378.137,e=(s-6356.7523142)/s,r=2*e-e*e,l=s/Math.sqrt(1-r*(Math.sin(n)*Math.sin(n)));return{x:(l+a)*Math.cos(n)*Math.cos(t),y:(l+a)*Math.cos(n)*Math.sin(t),z:(l*(1-r)+a)*Math.sin(n)}},o.lla2sez=function(t,n){var a=t.lon,s=t.lat,e=o.lla2ecf(t),r=n.x-e.x,l=n.y-e.y,d=n.z-e.z;return{s:Math.sin(s)*Math.cos(a)*r+Math.sin(s)*Math.sin(a)*l-Math.cos(s)*d,e:-Math.sin(a)*r+Math.cos(a)*l,z:Math.cos(s)*Math.cos(a)*r+Math.cos(s)*Math.sin(a)*l+Math.sin(s)*d}},o.rae2sez=function(o){return{s:-o.rng*Math.cos(o.el)*Math.cos(o.az),e:o.rng*Math.cos(o.el)*Math.sin(o.az),z:o.rng*Math.sin(o.el)}},o.rae2ecf=function(t,n){var a=o.lla2ecf(n),s=o.rae2sez(t),e=Math.sin(n.lat),r=Math.sin(n.lon),l=Math.cos(n.lat),d=Math.cos(n.lon);return{x:e*d*s.s+-r*s.e+l*d*s.z+a.x,y:e*r*s.s+d*s.e+l*r*s.z+a.y,z:-l*s.s+e*s.z+a.z}},o.sez2rae=function(o){var t=Math.sqrt(o.s*o.s+o.e*o.e+o.z*o.z),n=Math.asin(o.z/t);return{rng:t,az:Math.atan2(-o.e,o.s)+a,el:n}},o}(),c=function(){function o(){}return o.distance=function(o,t){return Math.sqrt(Math.pow(o.x-t.x,2)+Math.pow(o.y-t.y,2)+Math.pow(o.z-t.z,2))},o.dopplerFactor=function(t,n,a){var s=7292115e-11,e={x:n.x-t.x,y:n.y-t.y,z:n.z-t.z},r=Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2)+Math.pow(e.z,2)),l=a.x+s*t.y,d=a.y-s*t.x,i=a.z,c=(e.x*l+e.y*d+e.z*i)/r;return 1+c/299792.458*o.sign(c)},o.createVec=function(o,t,n){for(var a=[],s=o;s<=t;s+=n)a.push(s);return a},o.sign=function(o){return o>=0?1:-1},o}()}},t={};function n(a){if(t[a])return t[a].exports;var s=t[a]={exports:{}};return o[a](s,s.exports,n),s.exports}return n.d=(o,t)=>{for(var a in t)n.o(t,a)&&!n.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:t[a]})},n.o=(o,t)=>Object.prototype.hasOwnProperty.call(o,t),n.r=o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n(407)})()}));
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={409:(t,e,n)=>{n.r(e),n.d(e,{Sat:()=>f,Sgp4:()=>u,Tle:()=>g,Transforms:()=>h,Utils:()=>d});var o={};n.r(o);var a=Math.PI,s=2*a,r=a/180,i=2/3,l=15e-13,c=1.15741e-8,u=function(){function t(){}return t.dpper=function(t,e){var n=t.e3,o=t.ee2,r=t.peo,i=t.pgho,l=t.pho,c=t.PInco,u=t.plo,h=t.se2,d=t.se3,m=t.sgh2,p=t.sgh3,g=t.sgh4,f=t.sh2,M=t.sh3,x=t.si2,v=t.si3,b=t.sl2,z=t.sl3,y=t.sl4,w=t.t,N=t.xgh2,D=t.xgh3,I=t.xgh4,j=t.xh2,P=t.xh3,E=t.xi2,k=t.xi3,T=t.xl2,q=t.xl3,L=t.xl4,F=t.zmol,R=t.zmos,S=e.ep,Y=e.inclp,A=e.nodep,O=e.argpp,C=e.mp,U=e.opsmode,V=void 0===U?"i":U,B=e.init,_=R+119459e-10*w;"y"===B&&(_=R);var H=_+.0335*Math.sin(_),G=Math.sin(H),J=.5*G*G-.25,K=-.5*G*Math.cos(H),Q=h*J+d*K,W=x*J+v*K,X=b*J+z*K+y*G,Z=m*J+p*K+g*G,$=f*J+M*K;_=F+.00015835218*w,"y"===B&&(_=F),H=_+.1098*Math.sin(_);var tt=Q+(o*(J=.5*(G=Math.sin(H))*G-.25)+n*(K=-.5*G*Math.cos(H))),et=W+(E*J+k*K),nt=X+(T*J+q*K+L*G),ot=Z+(N*J+D*K+I*G),at=$+(j*J+P*K);if("n"===B){nt-=u,ot-=i,at-=l,Y+=et-=c,S+=tt-=r;var st=Math.sin(Y),rt=Math.cos(Y);if(Y>=.2)O+=ot-=rt*(at/=st),A+=at,C+=nt;else{var it=Math.sin(A),lt=Math.cos(A),ct=st*it,ut=st*lt;ct+=at*lt+et*rt*it,ut+=-at*it+et*rt*lt,(A%=s)<0&&"a"===V&&(A+=s);var ht=C+O+rt*A;ht+=nt+ot-et*A*st;var dt=A;(A=Math.atan2(ct,ut))<0&&"a"===V&&(A+=s),Math.abs(dt-A)>a&&(A<dt?A+=s:A-=s),O=ht-(C+=nt)-rt*A}}return{ep:S,inclp:Y,nodep:A,argpp:O,mp:C}},t.dscom=function(t){var e,n,o,a,s,r,i,l,c,u,h,d,m,p,g,f,M,x,v,b,z,y,w,N,D,I,j,P,E,k,T,q,L,F,R,S,Y,A,O=t.epoch,C=t.ep,U=t.argpp,V=t.tc,B=t.inclp,_=t.nodep,H=t.np,G=.01675,J=.0549,K=2*Math.PI,Q=H,W=C,X=Math.sin(_),Z=Math.cos(_),$=Math.sin(U),tt=Math.cos(U),et=Math.sin(B),nt=Math.cos(B),ot=W*W,at=1-ot,st=Math.sqrt(at),rt=O+18261.5+V/1440,it=(4.523602-.00092422029*rt)%K,lt=Math.sin(it),ct=Math.cos(it),ut=.91375164-.03568096*ct,ht=Math.sqrt(1-ut*ut),dt=.089683511*lt/ht,mt=Math.sqrt(1-dt*dt),pt=5.8351514+.001944368*rt,gt=.39785416*lt/ht,ft=mt*ct+.91744867*dt*lt;gt=Math.atan2(gt,ft),gt+=pt-it;for(var Mt=Math.cos(gt),xt=Math.sin(gt),vt=.1945905,bt=-.98088458,zt=.91744867,yt=.39785416,wt=Z,Nt=X,Dt=29864797e-13,It=1/Q,jt=1;jt<=2;jt++){var Pt=vt*wt+bt*zt*Nt,Et=-bt*wt+vt*zt*Nt,kt=-vt*Nt+bt*zt*wt,Tt=bt*yt,qt=bt*Nt+vt*zt*wt,Lt=vt*yt,Ft=nt*kt+et*Tt,Rt=nt*qt+et*Lt,St=-et*kt+nt*Tt,Yt=-et*qt+nt*Lt,At=Pt*tt+Ft*$,Ot=Et*tt+Rt*$,Ct=-Pt*$+Ft*tt,Ut=-Et*$+Rt*tt,Vt=St*$,Bt=Yt*$,_t=St*tt,Ht=Yt*tt;P=-6*Pt*St+ot*(-24*At*_t-6*Ct*Vt),E=-6*(Pt*Yt+Et*St)+ot*(-24*(Ot*_t+At*Ht)+-6*(Ct*Bt+Ut*Vt)),k=-6*Et*Yt+ot*(-24*Ot*Ht-6*Ut*Bt),q=6*Ft*St+ot*(24*At*Vt-6*Ct*_t),L=6*(Rt*St+Ft*Yt)+ot*(24*(Ot*Vt+At*Bt)-6*(Ut*_t+Ct*Ht)),F=6*Rt*Yt+ot*(24*Ot*Bt-6*Ut*Ht),j=(j=3*(Pt*Pt+Ft*Ft)+(S=12*At*At-3*Ct*Ct)*ot)+j+at*S,T=(T=6*(Pt*Et+Ft*Rt)+(Y=24*At*Ot-6*Ct*Ut)*ot)+T+at*Y,R=(R=3*(Et*Et+Rt*Rt)+(A=12*Ot*Ot-3*Ut*Ut)*ot)+R+at*A,n=-.5*(o=Dt*It)/st,e=-15*W*(a=o*st),s=At*Ct+Ot*Ut,r=Ot*Ct+At*Ut,i=Ot*Ut-At*Ct,1===jt&&(l=e,c=n,u=o,h=a,d=s,m=r,p=i,g=j,v=T,w=R,f=P,M=E,x=k,b=q,z=L,y=F,N=S,D=Y,I=A,vt=Mt,bt=xt,zt=ut,yt=ht,wt=mt*Z+dt*X,Nt=X*mt-Z*dt,Dt=4.7968065e-7)}return{snodm:X,cnodm:Z,sinim:et,cosim:nt,sinomm:$,cosomm:tt,day:rt,e3:2*e*i,ee2:2*e*r,em:W,emsq:ot,gam:pt,peo:0,pgho:0,pho:0,PInco:0,plo:0,rtemsq:st,se2:2*l*m,se3:2*l*p,sgh2:2*h*D,sgh3:2*h*(I-N),sgh4:-18*h*G,sh2:-2*c*z,sh3:-2*c*(y-b),si2:2*c*M,si3:2*c*(x-f),sl2:-2*u*v,sl3:-2*u*(w-g),sl4:-2*u*(-21-9*ot)*G,s1:e,s2:n,s3:o,s4:a,s5:s,s6:r,s7:i,ss1:l,ss2:c,ss3:u,ss4:h,ss5:d,ss6:m,ss7:p,sz1:g,sz2:v,sz3:w,sz11:f,sz12:M,sz13:x,sz21:b,sz22:z,sz23:y,sz31:N,sz32:D,sz33:I,xgh2:2*a*Y,xgh3:2*a*(A-S),xgh4:-18*a*J,xh2:-2*n*L,xh3:-2*n*(F-q),xi2:2*n*E,xi3:2*n*(k-P),xl2:-2*o*T,xl3:-2*o*(R-j),xl4:-2*o*(-21-9*ot)*J,nm:Q,z1:j,z2:T,z3:R,z11:P,z12:E,z13:k,z21:q,z22:L,z23:F,z31:S,z32:Y,z33:A,zmol:(.2299715*rt-pt+4.7199672)%K,zmos:(6.2565837+.017201977*rt)%K}},t.dsinit=function(t){var e=t.xke,n=t.cosim,o=t.argpo,r=t.s1,i=t.s2,l=t.s3,c=t.s4,u=t.s5,h=t.sinim,d=t.ss1,m=t.ss2,p=t.ss3,g=t.ss4,f=t.ss5,M=t.sz1,x=t.sz3,v=t.sz11,b=t.sz13,z=t.sz21,y=t.sz23,w=t.sz31,N=t.sz33,D=t.t,I=t.tc,j=t.gsto,P=t.mo,E=t.mdot,k=t.no,T=t.nodeo,q=t.nodedot,L=t.xPIdot,F=t.z1,R=t.z3,S=t.z11,Y=t.z13,A=t.z21,O=t.z23,C=t.z31,U=t.z33,V=t.ecco,B=t.eccsq,_=t.emsq,H=t.em,G=t.argpm,J=t.inclm,K=t.mm,Q=t.nm,W=t.nodem,X=t.irez,Z=t.atime,$=t.d2201,tt=t.d2211,et=t.d3210,nt=t.d3222,ot=t.d4410,at=t.d4422,st=t.d5220,rt=t.d5232,it=t.d5421,lt=t.d5433,ct=t.dedt,ut=t.didt,ht=t.dmdt,dt=t.dnodt,mt=t.domdt,pt=t.del1,gt=t.del2,ft=t.del3,Mt=t.xfact,xt=t.xlamo,vt=t.xli,bt=t.xni,zt=.0043752690880113,yt=.00015835218,wt=119459e-10;X=0,Q<.0052359877&&Q>.0034906585&&(X=1),Q>=.00826&&Q<=.00924&&H>=.5&&(X=2);var Nt=-wt*m*(z+y);(J<.052359877||J>a-.052359877)&&(Nt=0),0!==h&&(Nt/=h);var Dt=-yt*i*(A+O);(J<.052359877||J>a-.052359877)&&(Dt=0),mt=g*wt*(w+N-6)-n*Nt+c*yt*(C+U-6),dt=Nt,0!==h&&(mt-=n/h*Dt,dt+=Dt/h);var It=(j+I*zt)%s;if(H+=(ct=d*wt*f+r*yt*u)*D,J+=(ut=m*wt*(v+b)+i*yt*(S+Y))*D,G+=mt*D,W+=dt*D,K+=(ht=-wt*p*(M+x-14-6*_)-yt*l*(F+R-14-6*_))*D,0!==X){var jt=Math.pow(Q/e,2/3);if(2===X){var Pt=n*n,Et=H,kt=_,Tt=(H=V)*(_=B),qt=void 0,Lt=void 0,Ft=void 0,Rt=void 0,St=void 0,Yt=void 0,At=void 0,Ot=void 0,Ct=void 0;H<=.65?(qt=3.616-13.247*H+16.29*_,Lt=117.39*H-19.302-228.419*_+156.591*Tt,Ft=109.7927*H-18.9068-214.6334*_+146.5816*Tt,Rt=242.694*H-41.122-471.094*_+313.953*Tt,St=841.88*H-146.407-1629.014*_+1083.435*Tt,Yt=3017.977*H-532.114-5740.032*_+3708.276*Tt):(qt=331.819*H-72.099-508.738*_+266.724*Tt,Lt=1582.851*H-346.844-2415.925*_+1246.113*Tt,Ft=1554.908*H-342.585-2366.899*_+1215.972*Tt,Rt=4758.686*H-1052.797-7193.992*_+3651.957*Tt,St=16178.11*H-3581.69-24462.77*_+12422.52*Tt,Yt=H>.715?29936.92*H-5149.66-54087.36*_+31324.56*Tt:1464.74-4664.75*H+3763.64*_),H<.7?(Ct=4988.61*H-919.2277-9064.77*_+5542.21*Tt,At=4568.6173*H-822.71072-8491.4146*_+5337.524*Tt,Ot=4690.25*H-853.666-8624.77*_+5341.4*Tt):(Ct=161616.52*H-37995.78-229838.2*_+109377.94*Tt,At=218913.95*H-51752.104-309468.16*_+146349.42*Tt,Ot=170470.89*H-40023.88-242699.48*_+115605.82*Tt);var Ut=h*h,Vt=Q*Q*3*(jt*jt),Bt=17891679e-13*Vt;$=Bt*(_t=.75*(1+2*n+Pt))*(-.306-.44*(H-.64)),tt=Bt*(1.5*Ut)*qt,et=(Bt=3.7393792e-7*(Vt*=jt))*(1.875*h*(1-2*n-3*Pt))*Lt,nt=Bt*(-1.875*h*(1+2*n-3*Pt))*Ft,ot=(Bt=2*(Vt*=jt)*7.3636953e-9)*(35*Ut*_t)*Rt,at=Bt*(39.375*Ut*Ut)*St,st=(Bt=1.1428639e-7*(Vt*=jt))*(9.84375*h*(Ut*(1-2*n-5*Pt)+.33333333*(4*n-2+6*Pt)))*Yt,rt=Bt*(h*(4.92187512*Ut*(-2-4*n+10*Pt)+6.56250012*(1+2*n-3*Pt)))*Ot,it=(Bt=2*Vt*2.1765803e-9)*(29.53125*h*(2-8*n+Pt*(8*n-12+10*Pt)))*At,lt=Bt*(29.53125*h*(-2-8*n+Pt*(12+8*n-10*Pt)))*Ct,xt=(P+T+T-(It+It))%s,Mt=E+ht+2*(q+dt-zt)-k,H=Et,_=kt}if(1===X){var _t,Ht=1+n;gt=2*(pt=3*Q*Q*jt*jt)*(_t=.75*(1+n)*(1+n))*(1+_*(.8125*_-2.5))*17891679e-13,ft=3*pt*(Ht*=1.875*Ht*Ht)*(1+_*(6.60937*_-6))*2.2123015e-7*jt,pt=pt*(.9375*h*h*(1+3*n)-.75*(1+n))*(Lt=1+2*_)*21460748e-13*jt,xt=(P+T+o-It)%s,Mt=E+L+ht+mt+dt-(k+zt)}vt=xt,bt=k,Z=0,Q=k+0}return{em:H,argpm:G,inclm:J,mm:K,nm:Q,nodem:W,irez:X,atime:Z,d2201:$,d2211:tt,d3210:et,d3222:nt,d4410:ot,d4422:at,d5220:st,d5232:rt,d5421:it,d5433:lt,dedt:ct,didt:ut,dmdt:ht,dndt:0,dnodt:dt,domdt:mt,del1:pt,del2:gt,del3:ft,xfact:Mt,xlamo:xt,xli:vt,xni:bt}},t.dspace=function(t,e,n,o,a,r,i,l,c,u,h,d,m,p,g,f,M,x,v,b,z,y,w,N,D,I,j,P,E,k,T,q,L,F,R,S){var Y=.13130908,A=2.8843198,O=.37448087,C=5.7686396,U=.95240898,V=1.8014998,B=1.050833,_=4.4108898,H=259200,G=0,J=(N+.0043752690880113*w)%s;if(E+=d*y,T+=f*y,k+=v*y,R+=x*y,L+=M*y,0!==t){(0===P||y*P<=0||Math.abs(y)<Math.abs(P))&&(P=0,F=j,q=I);var K;K=y>0?720:-720;for(var Q=void 0,W=void 0,X=void 0,Z=void 0,$=void 0,tt=void 0,et=void 0,nt=381;381===nt;)2!==t?(tt=m*Math.sin(q-Y)+p*Math.sin(2*(q-A))+g*Math.sin(3*(q-O)),Z=F+D,$=m*Math.cos(q-Y)+2*p*Math.cos(2*(q-A))+3*g*Math.cos(3*(q-O)),$*=Z):(X=(et=b+z*P)+et,W=q+q,tt=e*Math.sin(X+q-C)+n*Math.sin(q-C)+o*Math.sin(et+q-U)+a*Math.sin(-et+q-U)+r*Math.sin(X+W-V)+i*Math.sin(W-V)+l*Math.sin(et+q-B)+c*Math.sin(-et+q-B)+u*Math.sin(et+W-_)+h*Math.sin(-et+W-_),Z=F+D,$=e*Math.cos(X+q-C)+n*Math.cos(q-C)+o*Math.cos(et+q-U)+a*Math.cos(-et+q-U)+l*Math.cos(et+q-B)+c*Math.cos(-et+q-B)+2*r*Math.cos(X+W-V)+i*Math.cos(W-V)+u*Math.cos(et+W-_)+h*Math.cos(-et+W-_),$*=Z),Math.abs(y-P)>=720?nt=381:(Q=y-P,nt=0),381===nt&&(q+=Z*K+tt*H,F+=tt*K+$*H,P+=K);S=F+tt*Q+$*Q*Q*.5;var ot=q+Z*Q+tt*Q*Q*.5;1!==t?(L=ot-2*R+2*J,G=S-j):(L=ot-R-k+J,G=S-j),S=j+G}return[E,k,T,L,R,S]},t.initl=function(e){var n=e.opsmode,o=e.ecco,a=e.epoch,s=e.inclo,r=e.xke,i=e.j2,l=e.no,c=2*Math.PI,u=2/3,h=o*o,d=1-h,m=Math.sqrt(d),p=Math.cos(s),g=p*p,f=Math.pow(r/l,u),M=.75*i*(3*g-1)/(m*d),x=M/(f*f),v=f*(1-x*x-x*(1/3+134*x*x/81));l/=1+(x=M/(v*v));var b,z=Math.pow(r/l,u),y=Math.sin(s),w=z*d,N=1-5*g,D=-N-g-g,I=1/z,j=w*w,P=z*(1-o);if("a"===n){var E=a-7305,k=Math.floor(E+1e-8),T=.017202791694070362;(b=(1.7321343856509375+T*k+(T+c)*(E-k)+E*E*5075514194322695e-30)%c)<0&&(b+=c)}else b=t.gstime(a+2433281.5);return{no:l,method:"n",ainv:I,ao:z,con41:D,con42:N,cosio:p,cosio2:g,eccsq:h,omeosq:d,posq:j,rp:P,rteosq:m,sinio:y,gsto:b}},t.sgp4init=function(e,n){var o=n.whichconst,a=void 0===o?"wgs72":o,r=n.opsmode,c=void 0===r?"i":r,u=n.satn,h=void 0===u?e.satnum:u,d=n.epoch,m=n.xbstar,p=n.xecco,g=n.xargpo,f=n.xinclo,M=n.xndot,x=n.xnddot,v=n.xmo,b=n.xno,z=n.xnodeo;e.isimp=0,e.method="n",e.aycof=0,e.con41=0,e.cc1=0,e.cc4=0,e.cc5=0,e.d2=0,e.d3=0,e.d4=0,e.delmo=0,e.eta=0,e.argpdot=0,e.omgcof=0,e.sinmao=0,e.t=0,e.t2cof=0,e.t3cof=0,e.t4cof=0,e.t5cof=0,e.x1mth2=0,e.x7thm1=0,e.mdot=0,e.nodedot=0,e.xlcof=0,e.xmcof=0,e.nodecf=0,e.irez=0,e.d2201=0,e.d2211=0,e.d3210=0,e.d3222=0,e.d4410=0,e.d4422=0,e.d5220=0,e.d5232=0,e.d5421=0,e.d5433=0,e.dedt=0,e.del1=0,e.del2=0,e.del3=0,e.didt=0,e.dmdt=0,e.dnodt=0,e.domdt=0,e.e3=0,e.ee2=0,e.peo=0,e.pgho=0,e.pho=0,e.PInco=0,e.plo=0,e.se2=0,e.se3=0,e.sgh2=0,e.sgh3=0,e.sgh4=0,e.sh2=0,e.sh3=0,e.si2=0,e.si3=0,e.sl2=0,e.sl3=0,e.sl4=0,e.gsto=0,e.xfact=0,e.xgh2=0,e.xgh3=0,e.xgh4=0,e.xh2=0,e.xh3=0,e.xi2=0,e.xi3=0,e.xl2=0,e.xl3=0,e.xl4=0,e.xlamo=0,e.zmol=0,e.zmos=0,e.atime=0,e.xli=0,e.xni=0;var y=t.getgravconst(a);e.tumin=y.tumin,e.mus=y.mus,e.radiusearthkm=y.radiusearthkm,e.xke=y.xke,e.j2=y.j2,e.j3=y.j3,e.j4=y.j4,e.j3oj2=y.j3oj2;var w=y.j2,N=y.j4,D=y.xke,I=y.j3oj2;e.error=0,e.operationmode=c;var j=h.split("")[0].toLowerCase();isNaN(parseInt(j))?e.satnum=parseInt(j.charCodeAt(0)-96+9+e.satnum.slice(1,5)).toString():e.satnum=h,e.bstar=m,e.ndot=M,e.nddot=x,e.ecco=p,e.argpo=g,e.inclo=f,e.mo=v,e.no=b,e.nodeo=z;var P=78/e.radiusearthkm+1,E=42/e.radiusearthkm,k=E*E*E*E;e.init="y",e.t=0;var T={ecco:e.ecco,epoch:d,inclo:e.inclo,no:e.no,method:e.method,opsmode:e.operationmode,xke:e.xke,j2:e.j2},q=t.initl(T),L=q.ao,F=q.con42,R=q.cosio,S=q.cosio2,Y=q.eccsq,A=q.omeosq,O=q.posq,C=q.rp,U=q.rteosq,V=q.sinio;if(e.no=q.no,e.con41=q.con41,e.gsto=q.gsto,e.a=Math.pow(e.no*e.tumin,-2/3),e.alta=e.a*(1+e.ecco)-1,e.altp=e.a*(1-e.ecco)-1,e.error=0,A>=0||e.no>=0){e.isimp=0,C<220/e.radiusearthkm+1&&(e.isimp=1);var B=P,_=k,H=(C-1)*e.radiusearthkm;if(H<156){B=H-78,H<98&&(B=20);var G=(120-B)/e.radiusearthkm;_=G*G*G*G,B=B/e.radiusearthkm+1}var J=1/O,K=1/(L-B);e.eta=L*e.ecco*K;var Q=e.eta*e.eta,W=e.ecco*e.eta,X=Math.abs(1-Q),Z=_*Math.pow(K,4),$=Z/Math.pow(X,3.5),tt=$*e.no*(L*(1+1.5*Q+W*(4+Q))+.375*w*K/X*e.con41*(8+3*Q*(8+Q)));e.cc1=e.bstar*tt;var et=0;e.ecco>1e-4&&(et=-2*Z*K*I*e.no*V/e.ecco),e.x1mth2=1-S,e.cc4=2*e.no*$*L*A*(e.eta*(2+.5*Q)+e.ecco*(.5+2*Q)-w*K/(L*X)*(-3*e.con41*(1-2*W+Q*(1.5-.5*W))+.75*e.x1mth2*(2*Q-W*(1+Q))*Math.cos(2*e.argpo))),e.cc5=2*$*L*A*(1+2.75*(Q+W)+W*Q);var nt=S*S,ot=1.5*w*J*e.no,at=.5*ot*w*J,st=-.46875*N*J*J*e.no;e.mdot=e.no+.5*ot*U*e.con41+.0625*at*U*(13-78*S+137*nt),e.argpdot=-.5*ot*F+.0625*at*(7-114*S+395*nt)+st*(3-36*S+49*nt);var rt=-ot*R;e.nodedot=rt+(.5*at*(4-19*S)+2*st*(3-7*S))*R;var it=e.argpdot+e.nodedot;e.omgcof=e.bstar*et*Math.cos(e.argpo),e.xmcof=0,e.ecco>1e-4&&(e.xmcof=-i*Z*e.bstar/W),e.nodecf=3.5*A*rt*e.cc1,e.t2cof=1.5*e.cc1,Math.abs(R+1)>15e-13?e.xlcof=-.25*I*V*(3+5*R)/(1+R):e.xlcof=-.25*I*V*(3+5*R)/l,e.aycof=-.5*I*V;var lt=1+e.eta*Math.cos(e.mo);if(e.delmo=lt*lt*lt,e.sinmao=Math.sin(e.mo),e.x7thm1=7*S-1,s/e.no>=225){e.method="d",e.isimp=1;var ct=e.inclo,ut={epoch:d,ep:e.ecco,argpp:e.argpo,tc:0,inclp:e.inclo,nodep:e.nodeo,np:e.no,e3:e.e3,ee2:e.ee2,peo:e.peo,pgho:e.pgho,pho:e.pho,PInco:e.PInco,plo:e.plo,se2:e.se2,se3:e.se3,sgh2:e.sgh2,sgh3:e.sgh3,sgh4:e.sgh4,sh2:e.sh2,sh3:e.sh3,si2:e.si2,si3:e.si3,sl2:e.sl2,sl3:e.sl3,sl4:e.sl4,xgh2:e.xgh2,xgh3:e.xgh3,xgh4:e.xgh4,xh2:e.xh2,xh3:e.xh3,xi2:e.xi2,xi3:e.xi3,xl2:e.xl2,xl3:e.xl3,xl4:e.xl4,zmol:e.zmol,zmos:e.zmos},ht=t.dscom(ut);e.e3=ht.e3,e.ee2=ht.ee2,e.peo=ht.peo,e.pgho=ht.pgho,e.pho=ht.pho,e.PInco=ht.PInco,e.plo=ht.plo,e.se2=ht.se2,e.se3=ht.se3,e.sgh2=ht.sgh2,e.sgh3=ht.sgh3,e.sgh4=ht.sgh4,e.sh2=ht.sh2,e.sh3=ht.sh3,e.si2=ht.si2,e.si3=ht.si3,e.sl2=ht.sl2,e.sl3=ht.sl3,e.sl4=ht.sl4;var dt=ht.sinim,mt=ht.cosim,pt=ht.em,gt=ht.emsq,ft=ht.s1,Mt=ht.s2,xt=ht.s3,vt=ht.s4,bt=ht.s5,zt=ht.ss1,yt=ht.ss2,wt=ht.ss3,Nt=ht.ss4,Dt=ht.ss5,It=ht.sz1,jt=ht.sz3,Pt=ht.sz11,Et=ht.sz13,kt=ht.sz21,Tt=ht.sz23,qt=ht.sz31,Lt=ht.sz33;e.xgh2=ht.xgh2,e.xgh3=ht.xgh3,e.xgh4=ht.xgh4,e.xh2=ht.xh2,e.xh3=ht.xh3,e.xi2=ht.xi2,e.xi3=ht.xi3,e.xl2=ht.xl2,e.xl3=ht.xl3,e.xl4=ht.xl4,e.zmol=ht.zmol,e.zmos=ht.zmos;var Ft=ht.nm,Rt=ht.z1,St=ht.z3,Yt=ht.z11,At=ht.z13,Ot=ht.z21,Ct=ht.z23,Ut=ht.z31,Vt=ht.z33,Bt={inclo:ct,init:e.init,ep:e.ecco,inclp:e.inclo,nodep:e.nodeo,argpp:e.argpo,mp:e.mo,opsmode:e.operationmode},_t=t.dpper(e,Bt);e.ecco=_t.ep,e.inclo=_t.inclp,e.nodeo=_t.nodep,e.argpo=_t.argpp,e.mo=_t.mp;var Ht={xke:D,cosim:mt,emsq:gt,argpo:e.argpo,s1:ft,s2:Mt,s3:xt,s4:vt,s5:bt,sinim:dt,ss1:zt,ss2:yt,ss3:wt,ss4:Nt,ss5:Dt,sz1:It,sz3:jt,sz11:Pt,sz13:Et,sz21:kt,sz23:Tt,sz31:qt,sz33:Lt,t:e.t,tc:0,gsto:e.gsto,mo:e.mo,mdot:e.mdot,no:e.no,nodeo:e.nodeo,nodedot:e.nodedot,xPIdot:it,z1:Rt,z3:St,z11:Yt,z13:At,z21:Ot,z23:Ct,z31:Ut,z33:Vt,ecco:e.ecco,eccsq:Y,em:pt,argpm:0,inclm:ct,mm:0,nm:Ft,nodem:0,irez:e.irez,atime:e.atime,d2201:e.d2201,d2211:e.d2211,d3210:e.d3210,d3222:e.d3222,d4410:e.d4410,d4422:e.d4422,d5220:e.d5220,d5232:e.d5232,d5421:e.d5421,d5433:e.d5433,dedt:e.dedt,didt:e.didt,dmdt:e.dmdt,dnodt:e.dnodt,domdt:e.domdt,del1:e.del1,del2:e.del2,del3:e.del3,xfact:e.xfact,xlamo:e.xlamo,xli:e.xli,xni:e.xni},Gt=t.dsinit(Ht);e.irez=Gt.irez,e.atime=Gt.atime,e.d2201=Gt.d2201,e.d2211=Gt.d2211,e.d3210=Gt.d3210,e.d3222=Gt.d3222,e.d4410=Gt.d4410,e.d4422=Gt.d4422,e.d5220=Gt.d5220,e.d5232=Gt.d5232,e.d5421=Gt.d5421,e.d5433=Gt.d5433,e.dedt=Gt.dedt,e.didt=Gt.didt,e.dmdt=Gt.dmdt,e.dnodt=Gt.dnodt,e.domdt=Gt.domdt,e.del1=Gt.del1,e.del2=Gt.del2,e.del3=Gt.del3,e.xfact=Gt.xfact,e.xlamo=Gt.xlamo,e.xli=Gt.xli,e.xni=Gt.xni}if(1!==e.isimp){var Jt=e.cc1*e.cc1;e.d2=4*L*K*Jt;var Kt=e.d2*K*e.cc1/3;e.d3=(17*L+B)*Kt,e.d4=.5*Kt*L*K*(221*L+31*B)*e.cc1,e.t3cof=e.d2+2*Jt,e.t4cof=.25*(3*e.d3+e.cc1*(12*e.d2+10*Jt)),e.t5cof=.2*(3*e.d4+12*e.cc1*e.d3+6*e.d2*e.d2+15*Jt*(2*e.d2+Jt))}}t.propagate(e,0),e.init="n"},t.propagate=function(e,n){var o=e.xke,r=e.j2,c=e.j3oj2,u=e.radiusearthkm*e.xke/60;e.t=n,e.error=0;var h=e.mo+e.mdot*e.t,d=e.argpo+e.argpdot*e.t,m=e.nodeo+e.nodedot*e.t,p=d,g=h,f=e.t*e.t,M=m+e.nodecf*f,x=1-e.cc1*e.t,v=e.bstar*e.cc4*e.t,b=e.t2cof*f;if(1!==e.isimp){var z=e.omgcof*e.t,y=1+e.eta*Math.cos(h),w=z+e.xmcof*(y*y*y-e.delmo);g=h+w,p=d-w;var N=f*e.t,D=N*e.t;x=x-e.d2*f-e.d3*N-e.d4*D,v+=e.bstar*e.cc5*(Math.sin(g)-e.sinmao),b=b+e.t3cof*N+D*(e.t4cof+e.t*e.t5cof)}var I=e.no,j=e.ecco,P=e.inclo;if("d"===e.method){var E=e.t,k=t.dspace(e.irez,e.d2201,e.d2211,e.d3210,e.d3222,e.d4410,e.d4422,e.d5220,e.d5232,e.d5421,e.d5433,e.dedt,e.del1,e.del2,e.del3,e.didt,e.dmdt,e.dnodt,e.domdt,e.argpo,e.argpdot,e.t,E,e.gsto,e.xfact,e.xlamo,e.no,e.atime,j,p,P,e.xli,g,e.xni,M,I);j=k[0],p=k[1],P=k[2],g=k[3],M=k[4],I=k[5]}if(I<=0)return e.error=2,{position:!1,velocity:!1};var T=Math.pow(o/I,i)*x*x;if(I=o/Math.pow(T,1.5),(j-=v)>=1||j<-.001)return e.error=1,{position:!1,velocity:!1};j<1e-6&&(j=1e-6);var q=(g+=e.no*b)+p+M,L=j,F=P,R=p%=s,S=M%=s,Y=g=((q%=s)-p-M)%s,A=Math.sin(P),O=Math.cos(P);if("d"===e.method){var C={inclo:e.inclo,init:"n",ep:L,inclp:F,nodep:S,argpp:R,mp:Y,opsmode:e.operationmode},U=t.dpper(e,C);if(L=U.ep,S=U.nodep,R=U.argpp,Y=U.mp,(F=U.inclp)<0&&(F=-F,S+=a,R-=a),L<0||L>1)return e.error=3,{position:!1,velocity:!1}}"d"===e.method&&(A=Math.sin(F),O=Math.cos(F),e.aycof=-.5*c*A,Math.abs(O+1)>15e-13?e.xlcof=-.25*c*A*(3+5*O)/(1+O):e.xlcof=-.25*c*A*(3+5*O)/l);for(var V,B,_=L*Math.cos(R),H=1/(T*(1-L*L)),G=L*Math.sin(R)+H*e.aycof,J=(Y+R+S+H*e.xlcof*_-S)%s,K=J,Q=9999.9,W=1;Math.abs(Q)>=1e-12&&W<=10;)B=Math.sin(K),Q=(J-G*(V=Math.cos(K))+_*B-K)/(Q=1-V*_-B*G),Math.abs(Q)>=.95&&(Q=Q>0?.95:-.95),K+=Q,W+=1;var X=_*V+G*B,Z=_*B-G*V,$=_*_+G*G,tt=T*(1-$);if(tt<0)return e.error=4,{position:!1,velocity:!1};var et=T*(1-X),nt=Math.sqrt(T)*Z/et,ot=Math.sqrt(tt)/et,at=Math.sqrt(1-$),st=T/et*(B-G-_*(H=Z/(1+at))),rt=T/et*(V-_+G*H),it=Math.atan2(st,rt),lt=(rt+rt)*st,ct=1-2*st*st,ut=.5*r*(H=1/tt),ht=ut*H;if("d"===e.method){var dt=O*O;e.con41=3*dt-1,e.x1mth2=1-dt,e.x7thm1=7*dt-1}var mt=et*(1-1.5*ht*at*e.con41)+.5*ut*e.x1mth2*ct;if(mt<1)return e.error=6,{position:!1,velocity:!1};it-=.25*ht*e.x7thm1*lt;var pt=S+1.5*ht*O*lt,gt=F+1.5*ht*O*A*ct,ft=nt-I*ut*e.x1mth2*lt/o,Mt=ot+I*ut*(e.x1mth2*ct+1.5*e.con41)/o,xt=Math.sin(it),vt=Math.cos(it),bt=Math.sin(pt),zt=Math.cos(pt),yt=Math.sin(gt),wt=Math.cos(gt),Nt=-bt*wt,Dt=zt*wt,It=Nt*xt+zt*vt,jt=Dt*xt+bt*vt,Pt=yt*xt,Et=Nt*vt-zt*xt,kt=Dt*vt-bt*xt,Tt=yt*vt;return{position:{x:mt*It*e.radiusearthkm,y:mt*jt*e.radiusearthkm,z:mt*Pt*e.radiusearthkm},velocity:{x:(ft*It+Mt*Et)*u,y:(ft*jt+Mt*kt)*u,z:(ft*Pt+Mt*Tt)*u}}},t.getgravconst=function(t){var e,n,o,a,s,r,i,l;switch(t){case"wgs72old":s=398600.79964,r=6378.135,i=1/(l=.0743669161),a=-165597e-11,o=(n=-253881e-11)/(e=.001082616);break;case"wgs72":s=398600.8,r=6378.135,i=1/(l=60/Math.sqrt(r*r*r/s)),a=-165597e-11,o=(n=-253881e-11)/(e=.001082616);break;case"wgs84":s=398600.5,r=6378.137,i=1/(l=60/Math.sqrt(r*r*r/s)),a=-161098761e-14,o=(n=-253215306e-14)/(e=.00108262998905);break;default:throw new Error("unknown gravity option ".concat(t))}return{tumin:i,mus:s,radiusearthkm:r,xke:l,j2:e,j3:n,j4:a,j3oj2:o}},t.createSatrec=function(e,n,o,s){void 0===o&&(o="wgs72"),void 0===s&&(s="i");var i,l={a:null,am:null,alta:null,altp:null,argpdot:null,argpo:null,aycof:null,bstar:null,cc1:null,cc4:null,cc5:null,con41:null,d2:null,d3:null,d4:null,d5232:null,d5421:null,d5433:null,dedt:null,delmo:null,del1:null,ecco:null,em:null,epochdays:null,epochyr:null,error:null,eta:null,gsto:null,im:null,inclo:null,init:null,isimp:null,jdsatepoch:null,mdot:null,method:null,mo:null,mm:null,nddot:null,ndot:null,no:null,nodecf:null,nodedot:null,nodeo:null,om:null,Om:null,omgcof:null,operationmode:null,satnum:null,sinmao:null,t:null,t2cof:null,t3cof:null,t4cof:null,t5cof:null,x1mth2:null,x7thm1:null,xlcof:null,xmcof:null,xfact:null,xlamo:null,xli:null,xgh4:null,xgh3:null,xh2:null,xi2:null,xi3:null,xl2:null,xl3:null,xl4:null,zmol:null,zmos:null,dmdt:null,dnodt:null,domdt:null,e3:null,ee2:null,peo:null,pgho:null,pho:null,PInco:null,plo:null,se2:null,se3:null,sgh2:null,sgh3:null,sgh4:null,sh2:null,sh3:null,si2:null,si3:null,sl2:null,sl3:null,sl4:null,xgh2:null,xh3:null,tumin:null,radiusearthkm:null,irez:null,d3210:null,d3222:null,d4410:null,d4422:null,d5220:null,del2:null,del3:null,didt:null,atime:null,j2:null,j3:null,j4:null,mus:null,xke:null,j3oj2:null,xni:null,d2201:null,d2211:null,nm:null},c=1440/(2*a);l.error=0,l.satnum=e.substring(2,7),l.epochyr=parseInt(e.substring(18,20)),l.epochdays=parseFloat(e.substring(20,32)),l.ndot=parseFloat(e.substring(33,43)),l.nddot=parseFloat("".concat(e.substring(44,45),".").concat(e.substring(45,50),"E").concat(e.substring(50,52))),l.bstar=parseFloat("".concat(e.substring(53,54),".").concat(e.substring(54,59),"E").concat(e.substring(59,61))),l.inclo=parseFloat(n.substring(8,16)),l.nodeo=parseFloat(n.substring(17,25)),l.ecco=parseFloat(".".concat(n.substring(26,33))),l.argpo=parseFloat(n.substring(34,42)),l.mo=parseFloat(n.substring(43,51)),l.no=parseFloat(n.substring(52,63)),l.no/=c,l.inclo*=r,l.nodeo*=r,l.argpo*=r,l.mo*=r,i=l.epochyr<57?l.epochyr+2e3:l.epochyr+1900;var u=t.days2mdhms(i,l.epochdays),h=u.mon,d=u.day,m=u.hr,p=u.minute,g=u.sec,f=t.jday(i,h,d,m,p,g);return l.jdsatepoch=f.jd+f.jdFrac,t.sgp4init(l,{whichconst:o,opsmode:s,satn:l.satnum,epoch:l.jdsatepoch-2433281.5,xbstar:l.bstar,xecco:l.ecco,xargpo:l.argpo,xinclo:l.inclo,xndot:l.ndot,xnddot:l.nddot,xmo:l.mo,xno:l.no,xnodeo:l.nodeo}),l},t.gstime=function(t){var e=(t-2451545)/36525,n=-62e-7*e*e*e+.093104*e*e+3164400184.812866*e+67310.54841;return(n=n*r/240%s)<0&&(n+=s),n},t.sgn=function(t){return t<0?-1:1},t.mag=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])},t.cross=function(t,e){var n=[0,0,0];return n[0]=t[1]*e[2]-t[2]*e[1],n[1]=t[2]*e[0]-t[0]*e[2],n[2]=t[0]*e[1]-t[1]*e[0],n},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.angle=function(e,n){var o=t.mag(e),a=t.mag(n);if(o*a>1e-8*1e-8){var s=t.dot(e,n)/(o*a);return Math.abs(s)>1&&(s=Number(t.sgn(s))),Math.acos(s)}return 999999.1},t.asinh=function(t){return Math.log(t+Math.sqrt(t*t+1))},t.newtonnu=function(e,n){var o=999999.9,s=999999.9,r=1e-8;if(Math.abs(e)<r)s=n,o=n;else if(e<1-r){var i=Math.sqrt(1-e*e)*Math.sin(n)/(1+e*Math.cos(n)),l=(e+Math.cos(n))/(1+e*Math.cos(n));s=(o=Math.atan2(i,l))-e*Math.sin(o)}else e>1+r?e>1&&Math.abs(n)+1e-5<a-Math.acos(1/e)&&(i=Math.sqrt(e*e-1)*Math.sin(n)/(1+e*Math.cos(n)),o=t.asinh(i),s=e*t.sinh(o)-o):Math.abs(n)<168*a/180&&(s=(o=Math.tan(.5*n))+o*o*o/3);return e<1&&((s%=2*a)<0&&(s+=2*a),o%=2*a),{e0:o,m:s}},t.sinh=function(t){return(Math.exp(t)-Math.exp(-t))/2},t.rv2coe=function(e,n,o){var r,i,l,c,u,h,d,m,p,g,f,M,x,v,b,z,y,w=[0,0,0],N=[0,0,0],D=.5*a,I=1e-8,j=999999.1,P=t.mag(e),E=t.mag(n),k=t.cross(e,n),T=t.mag(k);if(T>I){w[0]=-k[1],w[1]=k[0],w[2]=0,x=t.mag(w);var q=E*E-o/P;for(M=t.dot(e,n),z=0;z<=2;z++)N[z]=(q*e[z]-M*n[z])/o;if(l=t.mag(N),b=E*E*.5-o/P,i=Math.abs(b)>I?-o/(2*b):999999.9,r=T*T/o,v=k[2]/T,c=Math.acos(v),y=1,l<I?y=c<I||Math.abs(c-a)<I?2:3:(c<I||Math.abs(c-a)<I)&&(y=4),x>I){var L=w[0]/x;Math.abs(L)>1&&(L=t.sgn(L)),u=Math.acos(L),w[1]<0&&(u=s-u)}else u=j;1===y?(h=t.angle(w,N),N[2]<0&&(h=s-h)):h=j,1===y||4===y?(d=t.angle(N,e),M<0&&(d=s-d)):d=j,3===y?(p=t.angle(w,e),e[2]<0&&(p=s-p),m=p):p=j,l>I&&4===y?(L=N[0]/l,Math.abs(L)>1&&(L=t.sgn(L)),f=Math.acos(L),N[1]<0&&(f=s-f),c>D&&(f=s-f)):f=j,P>I&&2===y?(L=e[0]/P,Math.abs(L)>1&&(L=t.sgn(L)),g=Math.acos(L),e[1]<0&&(g=s-g),c>D&&(g=s-g),m=g):g=j,1!==y&&4!==y||(m=t.newtonnu(l,d).m)}else r=j,i=j,l=j,c=j,u=j,h=j,d=j,m=j,p=j,g=j,f=j;return{p:r,a:i,ecc:l,incl:c,omega:u,argp:h,nu:d,m,arglat:p,truelon:g,lonper:f}},t.jday=function(t,e,n,o,a,s){var r=367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5,i=(s+60*a+3600*o)/86400;if(Math.abs(i)>1){var l=Math.floor(i);r+=l,i-=l}return{jd:r,jdFrac:i}},t.days2mdhms=function(t,e){for(var n=[31,t%4==0?29:28,31,30,31,30,31,31,30,31,30,31],o=Math.floor(e),a=1,s=0;o>s+n[a-1]&&a<12;)s+=n[a-1],a+=1;var r=a,i=o-s,l=24*(e-o),c=Math.floor(l);l=60*(l-c);var u=Math.floor(l);return{mon:r,day:i,hr:c,minute:u,sec:60*(l-u)}},t.invjday=function(e,n){var o,a;Math.abs(n)>=1&&(e+=Math.floor(n),n-=Math.floor(n));var s=e-Math.floor(e)-.5;Math.abs(s)>1e-8&&(e-=s,n+=s);var r=e-2415019.5,i=r/365.25,l=1900+Math.floor(i);o=Math.floor(.25*(l-1901)),(a=Math.floor(r-(365*(l-1900)+o)))+n<1&&(l-=1,o=Math.floor(.25*(l-1901)),a=Math.floor(r-(365*(l-1900)+o)));var c=t.days2mdhms(l,a+n);return{year:l,mon:c.mon,day:c.day,hr:c.hr,minute:c.minute,sec:c.sec}},t}(),h=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 o=t.lla2sez(e,n);return t.sez2rae(o)},t.eci2lla=function(t,e){for(var n=6378.137,o=Math.sqrt(t.x*t.x+t.y*t.y),r=(n-6356.7523142)/n,i=2*r-r*r,l=Math.atan2(t.y,t.x)-e;l<-a;)l+=s;for(;l>a;)l-=s;for(var c,u=0,h=Math.atan2(t.z,Math.sqrt(t.x*t.x+t.y*t.y));u<20;)c=1/Math.sqrt(1-i*(Math.sin(h)*Math.sin(h))),h=Math.atan2(t.z+n*c*i*Math.sin(h),o),u+=1;return{lon:l,lat:h,alt:o/Math.cos(h)-n*c}},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,o=t.alt,a=6378.137,s=(a-6356.7523142)/a,r=2*s-s*s,i=a/Math.sqrt(1-r*(Math.sin(n)*Math.sin(n)));return{x:(i+o)*Math.cos(n)*Math.cos(e),y:(i+o)*Math.cos(n)*Math.sin(e),z:(i*(1-r)+o)*Math.sin(n)}},t.lla2sez=function(e,n){var o=e.lon,a=e.lat,s=t.lla2ecf(e),r=n.x-s.x,i=n.y-s.y,l=n.z-s.z;return{s:Math.sin(a)*Math.cos(o)*r+Math.sin(a)*Math.sin(o)*i-Math.cos(a)*l,e:-Math.sin(o)*r+Math.cos(o)*i,z:Math.cos(a)*Math.cos(o)*r+Math.cos(a)*Math.sin(o)*i+Math.sin(a)*l}},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 o=t.lla2ecf(n),a=t.rae2sez(e),s=Math.sin(n.lat),r=Math.sin(n.lon),i=Math.cos(n.lat),l=Math.cos(n.lon);return{x:s*l*a.s+-r*a.e+i*l*a.z+o.x,y:s*r*a.s+l*a.e+i*r*a.z+o.y,z:-i*a.s+s*a.z+o.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}(),d=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(e,n,o){var a=7292115e-11,s={x:n.x-e.x,y:n.y-e.y,z:n.z-e.z},r=Math.sqrt(Math.pow(s.x,2)+Math.pow(s.y,2)+Math.pow(s.z,2)),i=o.x+a*e.y,l=o.y-a*e.x,c=o.z,u=(s.x*i+s.y*l+s.z*c)/r;return 1+u/299792.458*t.sign(u)},t.createVec=function(t,e,n){for(var o=[],a=t;a<=e;a+=n)o.push(a);return o},t.roundToNDecimalPlaces=function(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)},t.Types=o,t.sign=function(t){return t>=0?1:-1},t.jday=function(t,e,n,o,a,s){if(!t){var r=new Date,i=new Date(r.getUTCFullYear(),0,0),l=r.getDate()-i.getDate();return Math.floor(l/c)}return 367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5+((s/60+a)/60+o)/24},t}(),m=function(t,e){this.start=t-1,this.stop=e,this.length=this.stop-this.start},p=function(){return(p=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)},g=function(){function t(){}return t.parseTle=function(e,n){var o=t.parseLine1(e),a=t.parseLine2(n);if(o.satNum!==a.satNum)throw new Error("Satellite numbers do not match");if(o.satNumRaw!==a.satNumRaw)throw new Error("Raw satellite numbers do not match");if(1!==o.lineNumber1)throw new Error("First line number must be 1");if(2!==a.lineNumber2)throw new Error("Second line number must be 2");return{satNum:o.satNum,intlDes:o.intlDes,epochYear:o.epochYear,epochDay:o.epochDay,meanMoDev1:o.meanMoDev1,meanMoDev2:o.meanMoDev2,bstar:o.bstar,inclination:a.inclination,raan:a.raan,eccentricity:a.eccentricity,argOfPerigee:a.argOfPerigee,meanAnomaly:a.meanAnomaly,meanMotion:a.meanMotion}},t.parseTleFull=function(e,n){var o=t.parseLine1(e),a=t.parseLine2(n);if(o.satNum!==a.satNum)throw new Error("Satellite numbers do not match");if(o.satNumRaw!==a.satNumRaw)throw new Error("Raw satellite numbers do not match");if(1!==o.lineNumber1)throw new Error("First line number must be 1");if(2!==a.lineNumber2)throw new Error("Second line number must be 2");return p(p({},o),a)},t.parseLine1=function(e){return{lineNumber1:t.getLineNumber(e),satNum:t.getSatNum(e),satNumRaw:t.getRawSatNum(e),classification:t.getClassification(e),intlDes:t.getIntlDes(e),intlDesYear:t.getIntlDesYear(e),intlDesLaunchNum:t.getIntlDesLaunchNum(e),intlDesLaunchPiece:t.getIntlDesLaunchPiece(e),epochYear:t.getEpochYear(e),epochYearFull:t.getEpochYearFull(e),epochDay:t.getEpochDay(e),meanMoDev1:t.getMeanMoDev1(e),meanMoDev2:t.getMeanMoDev2(e),bstar:t.getBstar(e),ephemerisType:t.getEphemerisType(e),elsetNum:t.getElsetNum(e),checksum1:t.getChecksum(e)}},t.parseLine2=function(e){return{lineNumber2:t.getLineNumber(e),satNum:t.getSatNum(e),satNumRaw:t.getRawSatNum(e),inclination:t.getInclination(e),raan:t.getRaan(e),eccentricity:t.getEccentricity(e),argOfPerigee:t.getArgOfPerigee(e),meanAnomaly:t.getMeanAnomaly(e),meanMotion:t.getMeanMotion(e),revNum:t.getRevNum(e),checksum2:t.getChecksum(e)}},t.getLineNumber=function(e){var n=parseInt(e.substring(t.lineNumber.start,t.lineNumber.stop));if(1!==n&&2!==n)throw new Error("Invalid line number");return n},t.getSatNum=function(e){var n=e.substring(t.satNum.start,t.satNum.stop),o=n.split("")[0].toLowerCase();return isNaN(parseInt(o))?parseInt(o.charCodeAt(0)-96+9+n.slice(1,5)):parseInt(n)},t.getRawSatNum=function(e){return e.substring(t.satNum.start,t.satNum.stop)},t.getClassification=function(e){return e.substring(t.classification.start,t.classification.stop)},t.getIntlDes=function(e){return e.substring(t.intlDes.start,t.intlDes.stop).trim()},t.getIntlDesYear=function(e){return parseInt(e.substring(t.intlDesYear.start,t.intlDesYear.stop))},t.getIntlDesLaunchNum=function(e){return parseInt(e.substring(t.intlDesLaunchNum.start,t.intlDesLaunchNum.stop))},t.getIntlDesLaunchPiece=function(e){return e.substring(t.intlDesLaunchPiece.start,t.intlDesLaunchPiece.stop).trim()},t.getEpochYear=function(e){var n=parseInt(e.substring(t.epochYear.start,t.epochYear.stop));if(n<0||n>99)throw new Error("Invalid epoch year");return n},t.getEpochYearFull=function(e){var n=parseInt(e.substring(t.epochYear.start,t.epochYear.stop));if(n<0||n>99)throw new Error("Invalid epoch year");return n<57?n+2e3:n+1900},t.getEpochDay=function(e){var n=parseFloat(e.substring(t.epochDay.start,t.epochDay.stop));if(n<1||n>365.99999999)throw new Error("Invalid epoch day");return d.roundToNDecimalPlaces(n,8)},t.getMeanMoDev1=function(e){var n=parseFloat(e.substring(t.meanMoDev1.start,t.meanMoDev1.stop));if(isNaN(n))throw new Error("Invalid first derivative of mean motion.");return d.roundToNDecimalPlaces(n,8)},t.getMeanMoDev2=function(e){var n=parseFloat(e.substring(t.meanMoDev2.start,t.meanMoDev2.stop));if(isNaN(n))throw new Error("Invalid second derivative of mean motion.");return n},t.getBstar=function(e){var n=t.bstar.start+1,o=t.bstar.start+6,a=t.bstar.stop-1,s=e.substring(t.bstar.start,n),r=parseFloat("0.".concat(e.substring(n,o))),i=e.substring(o,a),l=parseInt(e.substring(a,t.bstar.stop));if("-"===i)l*=-1;else if("+"!==i)throw new Error("Invalid BSTAR symbol: ".concat(s));if(r*=Math.pow(10,l),"-"===s)r*=-1;else if("+"!==s&&" "!==s)throw new Error("Invalid BSTAR symbol: ".concat(s));return d.roundToNDecimalPlaces(r,14)},t.getEphemerisType=function(e){return parseInt(e.substring(t.ephemerisType.start,t.ephemerisType.stop))},t.getElsetNum=function(e){return parseInt(e.substring(t.elsetNum.start,t.elsetNum.stop))},t.getChecksum=function(e){return parseInt(e.substring(t.checksum.start,t.checksum.stop))},t.getInclination=function(e){var n=parseFloat(e.substring(t.inclination.start,t.inclination.stop));if(n<0||n>180)throw new Error("Invalid inclination: ".concat(n));return d.roundToNDecimalPlaces(n,4)},t.getRaan=function(e){var n=parseFloat(e.substring(t.raan.start,t.raan.stop));if(!(n>=0&&n<=360))throw new Error("Invalid RAAN: ".concat(n));return d.roundToNDecimalPlaces(n,4)},t.getEccentricity=function(e){var n=parseFloat("0.".concat(e.substring(t.eccentricity.start,t.eccentricity.stop)));if(!(n>=0&&n<=1))throw new Error("Invalid eccentricity: ".concat(n));return d.roundToNDecimalPlaces(n,7)},t.getArgOfPerigee=function(e){var n=parseFloat(e.substring(t.argPerigee.start,t.argPerigee.stop));if(!(n>=0&&n<=360))throw new Error("Invalid argument of perigee: ".concat(n));return d.roundToNDecimalPlaces(n,4)},t.getMeanAnomaly=function(e){var n=parseFloat(e.substring(t.meanAnom.start,t.meanAnom.stop));if(!(n>=0&&n<=360))throw new Error("Invalid mean anomaly: ".concat(n));return d.roundToNDecimalPlaces(n,4)},t.getMeanMotion=function(e){var n=parseFloat(e.substring(t.meanMo.start,t.meanMo.stop));if(!(n>=0&&n<=17))throw new Error("Invalid mean motion: ".concat(n));return d.roundToNDecimalPlaces(n,8)},t.getRevNum=function(e){return parseInt(e.substring(t.revNum.start,t.revNum.stop))},t.lineNumber=new m(1,1),t.satNum=new m(3,7),t.classification=new m(8,8),t.intlDes=new m(10,17),t.intlDesYear=new m(10,11),t.intlDesLaunchNum=new m(12,14),t.intlDesLaunchPiece=new m(15,17),t.epochYear=new m(19,20),t.epochDay=new m(21,32),t.meanMoDev1=new m(34,43),t.meanMoDev2=new m(45,52),t.bstar=new m(54,61),t.ephemerisType=new m(63,63),t.elsetNum=new m(65,68),t.checksum=new m(69,69),t.inclination=new m(9,16),t.raan=new m(18,25),t.eccentricity=new m(27,33),t.argPerigee=new m(35,42),t.meanAnom=new m(44,51),t.meanMo=new m(53,63),t.revNum=new m(64,68),t}(),f=function(){function t(t,e,n){var o=g.parseTle(t,e);this.satNum=o.satNum,this.intlDes=o.intlDes,this.epochYear=o.epochYear,this.epochDay=o.epochDay,this.meanMoDev1=o.meanMoDev1,this.meanMoDev2=o.meanMoDev2,this.bstar=o.bstar,this.inclination=o.inclination,this.raan=o.raan,this.eccentricity=o.eccentricity,this.argOfPerigee=o.argOfPerigee,this.meanAnomaly=o.meanAnomaly,this.meanMotion=o.meanMotion,this.period=1440/this.meanMotion,this.satrec=u.createSatrec(t,e),this.options=n}return t.prototype.getStateVec=function(e){var n=t.calculateTimeVariables(e,this.satrec).m;return u.propagate(this.satrec,n)},t.prototype.getEci=function(e){var n=t.calculateTimeVariables(e,this.satrec).m;return u.propagate(this.satrec,n).position||{x:0,y:0,z:0}},t.prototype.getEcf=function(e){var n=t.calculateTimeVariables(e,this.satrec),o=n.m,a=n.gmst,s=u.propagate(this.satrec,o).position||{x:0,y:0,z:0};return h.eci2ecf(s,a)},t.prototype.getLla=function(e){var n=t.calculateTimeVariables(e,this.satrec),o=n.m,a=n.gmst,s=u.propagate(this.satrec,o).position||{x:0,y:0,z:0};return h.eci2lla(s,a)},t.calculateTimeVariables=function(t,e){var n=d.jday(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())+t.getUTCMilliseconds()*c;return{gmst:u.gstime(n),m:e?1440*(n-e.jdsatepoch):null,j:n}},t}()}},e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},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(409)})()}));
package/dist/sat.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ import { EcfVec3, EciVec3, LlaVec3, SatelliteRecord, StateVector, TleLine1, TleLine2 } from './types';
2
+ export declare class Sat {
3
+ satNum: number;
4
+ satrec: SatelliteRecord;
5
+ options: any;
6
+ intlDes: string;
7
+ epochYear: number;
8
+ epochDay: number;
9
+ meanMoDev1: number;
10
+ meanMoDev2: number;
11
+ bstar: number;
12
+ inclination: number;
13
+ raan: number;
14
+ eccentricity: number;
15
+ argOfPerigee: number;
16
+ meanAnomaly: number;
17
+ meanMotion: number;
18
+ period: number;
19
+ constructor(tle1: TleLine1, tle2: TleLine2, options: any);
20
+ /**
21
+ * Calculates position and velocity in ECI coordinates at a given time.
22
+ * @param {Date} date Date to calculate the state vector for
23
+ * @returns {StateVector} State vector for the given date
24
+ */
25
+ getStateVec(date: Date): StateVector;
26
+ /**
27
+ * Calculates ECI position at a given time.
28
+ * @param {Date} date Date to calculate
29
+ * @returns {EciVec3} ECI position vector
30
+ */
31
+ getEci(date: Date): EciVec3;
32
+ /**
33
+ * Calculates ECF position at a given time.
34
+ * @param {Date} date Date to calculate
35
+ * @returns {EcfVec3} ECF position vector
36
+ */
37
+ getEcf(date: Date): EcfVec3;
38
+ /**
39
+ * Calculates LLA position at a given time.
40
+ * @param {Date} date Date to calculate
41
+ * @returns {LlaVec3} LLA position vector
42
+ */
43
+ getLla(date: Date): LlaVec3;
44
+ /**
45
+ * Calculates the time variables for a given date relative to the TLE epoch.
46
+ * @param {Date} date Date to calculate
47
+ * @param {SatelliteRecord} satrec Satellite orbital information
48
+ * @returns {{m: number, gmst: GreenwichMeanSiderealTime, j: number}} Time variables
49
+ */
50
+ private static calculateTimeVariables;
51
+ }
package/dist/sgp4.d.ts ADDED
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @author Theodore Kruczek.
3
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
+ * with satellites and other orbital objects.
5
+ *
6
+ * @file The Sgp4 module contains a TypeScript port of the 2020 version of
7
+ * sgp4unit.cpp from "Fundamentals of Astrodynamics and Applications" by David
8
+ * Vallado. All of the original comments and notes are inserted in the code below
9
+ * in order provide context to the functions and clarify any adjustments made for
10
+ * TypeScript/JavaScript compatibility.
11
+ *
12
+ * @copyright MIT License.
13
+ * Copyright (c) 2020-2021 Theodore Kruczek
14
+ *
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ * of this software and associated documentation files (the "Software"), to deal
17
+ * in the Software without restriction, including without limitation the rights
18
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ * copies of the Software, and to permit persons to whom the Software is
20
+ * furnished to do so, subject to the following conditions:
21
+ *
22
+ * The above copyright notice and this permission notice shall be included in all
23
+ * copies or substantial portions of the Software.
24
+ *
25
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ * SOFTWARE.
32
+ */
33
+ import { SatelliteRecord, StateVector, Vec3Flat } from './types';
34
+ declare class Sgp4 {
35
+ private static dpper;
36
+ private static dscom;
37
+ private static dsinit;
38
+ private static dspace;
39
+ private static initl;
40
+ private static sgp4init;
41
+ static propagate(satrec: SatelliteRecord, tsince: number): StateVector;
42
+ private static getgravconst;
43
+ static createSatrec(tleLine1: string, tleLine2: string, whichconst?: string, opsmode?: string): SatelliteRecord;
44
+ static gstime(jdut1: number): number;
45
+ static sgn(x: number): number;
46
+ static mag(x: Vec3Flat): number;
47
+ static cross(vec1: Vec3Flat, vec2: Vec3Flat): Vec3Flat;
48
+ static dot(x: Vec3Flat, y: Vec3Flat): number;
49
+ static angle(vec1: Vec3Flat, vec2: Vec3Flat): number;
50
+ static asinh(xval: number): number;
51
+ static newtonnu(ecc: number, nu: number): {
52
+ e0: number;
53
+ m: number;
54
+ };
55
+ static sinh(x: number): number;
56
+ static rv2coe(r: Vec3Flat, v: Vec3Flat, mus: number): {
57
+ p: number;
58
+ a: number;
59
+ ecc: number;
60
+ incl: number;
61
+ omega: number;
62
+ argp: number;
63
+ nu: number;
64
+ m: number;
65
+ arglat: number;
66
+ truelon: number;
67
+ lonper: number;
68
+ };
69
+ static jday(year: number, mon: number, day: number, hr: number, minute: number, sec: number): {
70
+ jd: number;
71
+ jdFrac: number;
72
+ };
73
+ static days2mdhms(year: number, days: number): {
74
+ mon: number;
75
+ day: number;
76
+ hr: number;
77
+ minute: number;
78
+ sec: number;
79
+ };
80
+ static invjday(jd: number, jdfrac: number): {
81
+ year: number;
82
+ mon: number;
83
+ day: number;
84
+ hr: number;
85
+ minute: number;
86
+ sec: number;
87
+ };
88
+ }
89
+ export { Sgp4 };