ootk 2.0.1 → 3.0.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.
Files changed (62) hide show
  1. package/.eslintrc.json +4 -4
  2. package/.prettierrc +17 -0
  3. package/babel.config.js +16 -0
  4. package/dist/objects/detailed-sat.d.ts +3 -3
  5. package/dist/objects/sat.d.ts +4 -4
  6. package/dist/objects/sensor.d.ts +8 -2
  7. package/dist/objects/star.d.ts +8 -8
  8. package/dist/ootk.d.ts +0 -1
  9. package/dist/ootk.js +1 -1
  10. package/dist/sgp4/sgp4.d.ts +9 -9
  11. package/dist/tle/tle.d.ts +25 -24
  12. package/dist/transforms/transforms.d.ts +40 -1
  13. package/dist/types/types.d.ts +417 -92
  14. package/dist/utils/moon-math.d.ts +18 -18
  15. package/dist/utils/sun-math.d.ts +118 -118
  16. package/dist/utils/utils.d.ts +6 -6
  17. package/jest.config.ts +30 -0
  18. package/lib/objects/base-object.js +33 -63
  19. package/lib/objects/base-object.js.map +1 -1
  20. package/lib/objects/detailed-sat.d.ts +3 -3
  21. package/lib/objects/detailed-sat.js.map +1 -1
  22. package/lib/objects/sat.d.ts +4 -4
  23. package/lib/objects/sat.js +1 -1
  24. package/lib/objects/sat.js.map +1 -1
  25. package/lib/objects/sensor.d.ts +8 -2
  26. package/lib/objects/sensor.js +51 -33
  27. package/lib/objects/sensor.js.map +1 -1
  28. package/lib/objects/space-object.js.map +1 -1
  29. package/lib/objects/star.d.ts +8 -8
  30. package/lib/objects/star.js +4 -4
  31. package/lib/objects/star.js.map +1 -1
  32. package/lib/ootk.d.ts +0 -1
  33. package/lib/ootk.js +0 -1
  34. package/lib/ootk.js.map +1 -1
  35. package/lib/sgp4/sgp4.d.ts +9 -9
  36. package/lib/sgp4/sgp4.js +15 -27
  37. package/lib/sgp4/sgp4.js.map +1 -1
  38. package/lib/tle/tle.d.ts +25 -24
  39. package/lib/tle/tle.js +4 -4
  40. package/lib/tle/tle.js.map +1 -1
  41. package/lib/transforms/transforms.d.ts +40 -1
  42. package/lib/transforms/transforms.js +100 -1
  43. package/lib/transforms/transforms.js.map +1 -1
  44. package/lib/types/types.d.ts +417 -92
  45. package/lib/types/types.js +3 -1
  46. package/lib/types/types.js.map +1 -1
  47. package/lib/utils/moon-math.d.ts +18 -18
  48. package/lib/utils/moon-math.js +45 -45
  49. package/lib/utils/moon-math.js.map +1 -1
  50. package/lib/utils/sun-math.d.ts +118 -118
  51. package/lib/utils/sun-math.js +237 -237
  52. package/lib/utils/sun-math.js.map +1 -1
  53. package/lib/utils/utils.d.ts +6 -6
  54. package/lib/utils/utils.js +17 -15
  55. package/lib/utils/utils.js.map +1 -1
  56. package/package.json +19 -35
  57. package/tsconfig.base.json +31 -0
  58. package/tsconfig.build.json +14 -0
  59. package/dist/sgp4/Sgp4Assembly.d.ts +0 -5
  60. package/lib/sgp4/Sgp4Assembly.d.ts +0 -5
  61. package/lib/sgp4/Sgp4Assembly.js +0 -75
  62. package/lib/sgp4/Sgp4Assembly.js.map +0 -1
package/.eslintrc.json CHANGED
@@ -58,7 +58,7 @@
58
58
  "id-denylist": "error",
59
59
  "id-length": "off",
60
60
  "id-match": "error",
61
- "implicit-arrow-linebreak": "error",
61
+ "implicit-arrow-linebreak": "off",
62
62
  "indent": ["error", 2, { "SwitchCase": 1 }],
63
63
  "indent-legacy": ["error", 2, { "SwitchCase": 1 }],
64
64
  "init-declarations": "error",
@@ -166,7 +166,7 @@
166
166
  "no-trailing-spaces": "error",
167
167
  "no-undef-init": "error",
168
168
  "no-undefined": "error",
169
- "no-underscore-dangle": "error",
169
+ "no-underscore-dangle": "off",
170
170
  "no-unmodified-loop-condition": "error",
171
171
  "no-unneeded-ternary": "error",
172
172
  "no-unreachable-loop": "error",
@@ -219,7 +219,7 @@
219
219
  "semi": "error",
220
220
  "semi-spacing": "error",
221
221
  "semi-style": "error",
222
- "sort-imports": "error",
222
+ "sort-imports": "off",
223
223
  "sort-keys": "off",
224
224
  "sort-vars": "error",
225
225
  "space-before-blocks": "error",
@@ -234,7 +234,7 @@
234
234
  "template-curly-spacing": "error",
235
235
  "template-tag-spacing": "error",
236
236
  "unicode-bom": "error",
237
- "valid-jsdoc": "error",
237
+ "valid-jsdoc": "off",
238
238
  "vars-on-top": "error",
239
239
  "wrap-iife": "error",
240
240
  "wrap-regex": "error",
package/.prettierrc ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "printWidth": 120,
3
+ "tabWidth": 2,
4
+ "useTabs": false,
5
+ "semi": true,
6
+ "singleQuote": true,
7
+ "quoteProps": "consistent",
8
+ "trailingComma": "all",
9
+ "bracketSpacing": true,
10
+ "arrowParens": "always",
11
+ "requirePragma": false,
12
+ "insertPragma": false,
13
+ "proseWrap": "never",
14
+ "htmlWhitespaceSensitivity": "ignore",
15
+ "endOfLine": "lf",
16
+ "embeddedLanguageFormatting": "off"
17
+ }
@@ -0,0 +1,16 @@
1
+ // eslint-disable-next-line no-undef
2
+ module.exports = {
3
+ presets: [
4
+ [
5
+ '@babel/preset-env',
6
+ {
7
+ targets: {
8
+ esmodules: true,
9
+ },
10
+ // modules: "umd", -- THIS IS FOR DOING THE LIB VERSION OF KEEPTRACK
11
+ },
12
+ ],
13
+ '@babel/preset-typescript',
14
+ ],
15
+ compact: 'auto',
16
+ };
@@ -20,15 +20,15 @@
20
20
  * You should have received a copy of the GNU Affero General Public License along with
21
21
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
22
  */
23
- import { LaunchDetails, OperationsDetails, SpaceCraftDetails, SpaceObjectType } from '../types/types';
23
+ import { LaunchDetails, OperationsDetails, SpaceCraftDetails, SpaceObjectType, TleLine1, TleLine2 } from '../types/types';
24
24
  import { Sat } from './sat';
25
25
  interface ObjectInfo {
26
26
  name?: string;
27
27
  type?: SpaceObjectType;
28
28
  rcs?: number;
29
29
  vmag?: number;
30
- tle1: string;
31
- tle2: string;
30
+ tle1: TleLine1;
31
+ tle2: TleLine2;
32
32
  }
33
33
  export declare class DetailedSat extends Sat {
34
34
  launchDate: string;
@@ -20,7 +20,7 @@
20
20
  * You should have received a copy of the GNU Affero General Public License along with
21
21
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
22
  */
23
- import { EcfVec3, EciVec3, LlaVec3, RaeVec3, SatelliteRecord, SpaceObjectType, StateVector } from '../types/types';
23
+ import { EcfVec3, EciVec3, LlaVec3, RaeVec3, SatelliteRecord, SpaceObjectType, StateVector, TleLine1, TleLine2 } from '../types/types';
24
24
  import { Sensor } from './sensor';
25
25
  import { SpaceObject } from './space-object';
26
26
  interface ObjectInfo {
@@ -28,8 +28,8 @@ interface ObjectInfo {
28
28
  type?: SpaceObjectType;
29
29
  rcs?: number;
30
30
  vmag?: number;
31
- tle1: string;
32
- tle2: string;
31
+ tle1: TleLine1;
32
+ tle2: TleLine2;
33
33
  }
34
34
  export declare class Sat extends SpaceObject {
35
35
  satNum: number;
@@ -50,7 +50,7 @@ export declare class Sat extends SpaceObject {
50
50
  apogee: number;
51
51
  perigee: number;
52
52
  options: any;
53
- constructor(info: ObjectInfo, options: any);
53
+ constructor(info: ObjectInfo, options?: any);
54
54
  propagateTo(date: Date): Sat;
55
55
  /**
56
56
  * Calculates position and velocity in ECI coordinates at a given time.
@@ -76,12 +76,18 @@ export declare class Sensor extends BaseObject {
76
76
  constructor(info: ObjectInfo);
77
77
  private validateInputData;
78
78
  private validateFov;
79
+ private validateMaxRng;
80
+ private validateMinRng;
81
+ private validateMaxEl;
82
+ private validateMinEl;
83
+ private validateMaxAz;
84
+ private validateMinAz;
79
85
  private validateLla;
80
- setTime(date: Date): Sensor;
86
+ setTime(date: Date): this;
81
87
  getRae(sat: Sat, date?: Date): RaeVec3;
82
88
  isRaeInFov(rae: RaeVec3): boolean;
83
89
  isSatInFov(sat: Sat, date?: Date): boolean;
84
90
  calculatePasses(planningInterval: number, sat: Sat, date?: Date): Lookangles[];
85
- private static getPassType;
91
+ private static getPassType_;
86
92
  }
87
93
  export {};
@@ -23,24 +23,24 @@
23
23
  import { EciVec3, LlaVec3, Radians, RaeVec3, SpaceObjectType } from '../types/types';
24
24
  import { SpaceObject } from './space-object';
25
25
  interface ObjectInfo {
26
+ bf?: string;
27
+ dec: Radians;
28
+ h?: string;
26
29
  name?: string;
30
+ pname?: string;
31
+ ra: Radians;
27
32
  type?: SpaceObjectType;
28
33
  vmag?: number;
29
- ra: Radians;
30
- dec: Radians;
31
- pname?: string;
32
- bf?: string;
33
- h?: string;
34
34
  }
35
35
  export declare class Star extends SpaceObject {
36
- pname: string;
37
36
  bf: string;
38
- h: string;
39
37
  dec: Radians;
38
+ h: string;
39
+ pname: string;
40
40
  ra: Radians;
41
41
  constructor(info: ObjectInfo);
42
42
  getEci(lla?: LlaVec3, date?: Date): EciVec3;
43
43
  getRae(lla?: LlaVec3, date?: Date): RaeVec3;
44
- private static calculateTimeVariables;
44
+ private static calculateTimeVariables_;
45
45
  }
46
46
  export {};
package/dist/ootk.d.ts CHANGED
@@ -18,7 +18,6 @@
18
18
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
  export { Sgp4 } from './sgp4/sgp4';
21
- export { Sgp4Assembly } from './sgp4/Sgp4Assembly';
22
21
  export { Transforms } from './transforms/transforms';
23
22
  export { Utils } from './utils/utils';
24
23
  export { Tle } from './tle/tle';
package/dist/ootk.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see ootk.js.LICENSE.txt */
2
- !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={653:(t,e,n)=>{n.r(e),n.d(e,{DetailedSat:()=>O,Sat:()=>z,Sensor:()=>S,Sgp4:()=>m,Sgp4Assembly:()=>p,SpaceObjectType:()=>o,Star:()=>P,Tle:()=>E,Transforms:()=>f,Utils:()=>x});var a={};n.r(a),n.d(a,{SpaceObjectType:()=>o});var o,r=Math.PI,i=2*r,s=r/180,c=2/3,l=15e-13,u=360/i,h=864e5,d=1.15741e-8,m=function(){function t(){}return t.angle=function(e,n){var a=t.mag(e),o=t.mag(n);if(a*o>1e-8*1e-8){var r=t.dot(e,n)/(a*o);return Math.abs(r)>1&&(r=Number(t.sgn(r))),Math.acos(r)}return 999999.1},t.asinh=function(t){return Math.log(t+Math.sqrt(t*t+1))},t.createSatrec=function(e,n,a,o){void 0===a&&(a="wgs72"),void 0===o&&(o="i");var i,c={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},l=1440/(2*r);c.error=0,c.satnum=e.substring(2,7),c.epochyr=parseInt(e.substring(18,20)),c.epochdays=parseFloat(e.substring(20,32)),c.ndot=parseFloat(e.substring(33,43)),c.nddot=parseFloat("".concat(e.substring(44,45),".").concat(e.substring(45,50),"E").concat(e.substring(50,52))),c.bstar=parseFloat("".concat(e.substring(53,54),".").concat(e.substring(54,59),"E").concat(e.substring(59,61))),c.inclo=parseFloat(n.substring(8,16)),c.nodeo=parseFloat(n.substring(17,25)),c.ecco=parseFloat(".".concat(n.substring(26,33))),c.argpo=parseFloat(n.substring(34,42)),c.mo=parseFloat(n.substring(43,51)),c.no=parseFloat(n.substring(52,63)),c.no/=l,c.inclo*=s,c.nodeo*=s,c.argpo*=s,c.mo*=s,i=c.epochyr<57?c.epochyr+2e3:c.epochyr+1900;var u=t.days2mdhms(i,c.epochdays),h=u.mon,d=u.day,m=u.hr,p=u.min,f=u.sec,g=t.jday(i,h,d,m,p,f);return c.jdsatepoch=g.jd+g.jdFrac,t.sgp4init(c,{whichconst:a,opsmode:o,satn:c.satnum,epoch:c.jdsatepoch-2433281.5,xbstar:c.bstar,xecco:c.ecco,xargpo:c.argpo,xinclo:c.inclo,xndot:c.ndot,xnddot:c.nddot,xmo:c.mo,xno:c.no,xnodeo:c.nodeo}),c},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.days2mdhms=function(t,e){for(var n=[31,t%4==0?29:28,31,30,31,30,31,31,30,31,30,31],a=Math.floor(e),o=1,r=0;a>r+n[o-1]&&o<12;)r+=n[o-1],o+=1;var i=o,s=a-r,c=24*(e-a),l=Math.floor(c);c=60*(c-l);var u=Math.floor(c);return{mon:i,day:s,hr:l,min:u,sec:60*(c-u)}},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},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*s/240%i)<0&&(n+=i),n},t.invjday=function(e,n){var a,o;Math.abs(n)>=1&&(e+=Math.floor(n),n-=Math.floor(n));var r=e-Math.floor(e)-.5;Math.abs(r)>1e-8&&(e-=r,n+=r);var i=e-2415019.5,s=i/365.25,c=1900+Math.floor(s);a=Math.floor(.25*(c-1901)),(o=Math.floor(i-(365*(c-1900)+a)))+n<1&&(c-=1,a=Math.floor(.25*(c-1901)),o=Math.floor(i-(365*(c-1900)+a)));var l=t.days2mdhms(c,o+n);return{year:c,mon:l.mon,day:l.day,hr:l.hr,min:l.min,sec:l.sec}},t.jday=function(t,e,n,a,o,r,i){void 0===e&&(e=0),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===i&&(i=0),t instanceof Date&&(e=t.getUTCMonth()+1,n=t.getUTCDate(),a=t.getUTCHours(),o=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds(),t=t.getUTCFullYear());var s=367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5,c=(i/1e3+r+60*o+3600*a)/86400;if(Math.abs(c)>1){var l=Math.floor(c);s+=l,c-=l}return{jd:s,jdFrac:c}},t.mag=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])},t.newtonnu=function(e,n){var a=999999.9,o=999999.9,i=1e-8;if(Math.abs(e)<i)o=n,a=n;else if(e<1-i){var s=Math.sqrt(1-e*e)*Math.sin(n)/(1+e*Math.cos(n)),c=(e+Math.cos(n))/(1+e*Math.cos(n));o=(a=Math.atan2(s,c))-e*Math.sin(a)}else e>1+i?e>1&&Math.abs(n)+1e-5<r-Math.acos(1/e)&&(s=Math.sqrt(e*e-1)*Math.sin(n)/(1+e*Math.cos(n)),a=t.asinh(s),o=e*t.sinh(a)-a):Math.abs(n)<168*r/180&&(o=(a=Math.tan(.5*n))+a*a*a/3);return e<1&&((o%=2*r)<0&&(o+=2*r),a%=2*r),{e0:a,m:o}},t.propagate=function(e,n){var a=e.xke,o=e.j2,s=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,f=h,g=e.t*e.t,M=m+e.nodecf*g,v=1-e.cc1*e.t,w=e.bstar*e.cc4*e.t,y=e.t2cof*g;if(1!==e.isimp){var x=e.omgcof*e.t,A=1+e.eta*Math.cos(h),b=x+e.xmcof*(A*A*A-e.delmo);f=h+b,p=d-b;var E=g*e.t,N=E*e.t;v=v-e.d2*g-e.d3*E-e.d4*N,w+=e.bstar*e.cc5*(Math.sin(f)-e.sinmao),y=y+e.t3cof*E+N*(e.t4cof+e.t*e.t5cof)}var T=e.no,R=e.ecco,D=e.inclo;if("d"===e.method){var z=e.t,I=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,z,e.gsto,e.xfact,e.xlamo,e.no,e.atime,R,p,D,e.xli,f,e.xni,M,T);R=I[0],p=I[1],D=I[2],f=I[3],M=I[4],T=I[5]}if(T<=0)return e.error=2,{position:!1,velocity:!1};var O=Math.pow(a/T,c)*v*v;if(T=a/Math.pow(O,1.5),(R-=w)>=1||R<-.001)return e.error=1,{position:!1,velocity:!1};R<1e-6&&(R=1e-6);var _=(f+=e.no*y)+p+M,C=R,S=D,L=p%=i,P=M%=i,j=f=((_%=i)-p-M)%i,U=Math.sin(D),F=Math.cos(D);if("d"===e.method){var Y={inclo:e.inclo,init:"n",ep:C,inclp:S,nodep:P,argpp:L,mp:j,opsmode:e.operationmode},k=t.dpper(e,Y);if(C=k.ep,P=k.nodep,L=k.argpp,j=k.mp,(S=k.inclp)<0&&(S=-S,P+=r,L-=r),C<0||C>1)return e.error=3,{position:!1,velocity:!1}}"d"===e.method&&(U=Math.sin(S),F=Math.cos(S),e.aycof=-.5*s*U,Math.abs(F+1)>15e-13?e.xlcof=-.25*s*U*(3+5*F)/(1+F):e.xlcof=-.25*s*U*(3+5*F)/l);for(var q,H,V=C*Math.cos(L),B=1/(O*(1-C*C)),G=C*Math.sin(L)+B*e.aycof,J=(j+L+P+B*e.xlcof*V-P)%i,W=J,K=9999.9,Q=1;Math.abs(K)>=1e-12&&Q<=10;)H=Math.sin(W),K=(J-G*(q=Math.cos(W))+V*H-W)/(K=1-q*V-H*G),Math.abs(K)>=.95&&(K=K>0?.95:-.95),W+=K,Q+=1;var X=V*q+G*H,Z=V*H-G*q,$=V*V+G*G,tt=O*(1-$);if(tt<0)return e.error=4,{position:!1,velocity:!1};var et=O*(1-X),nt=Math.sqrt(O)*Z/et,at=Math.sqrt(tt)/et,ot=Math.sqrt(1-$),rt=O/et*(H-G-V*(B=Z/(1+ot))),it=O/et*(q-V+G*B),st=Math.atan2(rt,it),ct=(it+it)*rt,lt=1-2*rt*rt,ut=.5*o*(B=1/tt),ht=ut*B;if("d"===e.method){var dt=F*F;e.con41=3*dt-1,e.x1mth2=1-dt,e.x7thm1=7*dt-1}var mt=et*(1-1.5*ht*ot*e.con41)+.5*ut*e.x1mth2*lt;if(mt<1)return e.error=6,{position:!1,velocity:!1};st-=.25*ht*e.x7thm1*ct;var pt=P+1.5*ht*F*ct,ft=S+1.5*ht*F*U*lt,gt=nt-T*ut*e.x1mth2*ct/a,Mt=at+T*ut*(e.x1mth2*lt+1.5*e.con41)/a,vt=Math.sin(st),wt=Math.cos(st),yt=Math.sin(pt),xt=Math.cos(pt),At=Math.sin(ft),bt=Math.cos(ft),Et=-yt*bt,Nt=xt*bt,Tt=Et*vt+xt*wt,Rt=Nt*vt+yt*wt,Dt=At*vt,zt=Et*wt-xt*vt,It=Nt*wt-yt*vt,Ot=At*wt;return{position:{x:mt*Tt*e.radiusearthkm,y:mt*Rt*e.radiusearthkm,z:mt*Dt*e.radiusearthkm},velocity:{x:(gt*Tt+Mt*zt)*u,y:(gt*Rt+Mt*It)*u,z:(gt*Dt+Mt*Ot)*u}}},t.rv2coe=function(e,n,a){var o,s,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,b=[0,0,0],E=[0,0,0],N=.5*r,T=1e-8,R=999999.1,D=t.mag(e),z=t.mag(n),I=t.cross(e,n),O=t.mag(I);if(O>T){b[0]=-I[1],b[1]=I[0],b[2]=0,v=t.mag(b);var _=z*z-a/D;for(M=t.dot(e,n),x=0;x<=2;x++)E[x]=(_*e[x]-M*n[x])/a;if(c=t.mag(E),y=z*z*.5-a/D,s=Math.abs(y)>T?-a/(2*y):999999.9,o=O*O/a,w=I[2]/O,l=Math.acos(w),A=1,c<T?A=l<T||Math.abs(l-r)<T?2:3:(l<T||Math.abs(l-r)<T)&&(A=4),v>T){var C=b[0]/v;Math.abs(C)>1&&(C=t.sgn(C)),u=Math.acos(C),b[1]<0&&(u=i-u)}else u=R;1===A?(h=t.angle(b,E),E[2]<0&&(h=i-h)):h=R,1===A||4===A?(d=t.angle(E,e),M<0&&(d=i-d)):d=R,3===A?(p=t.angle(b,e),e[2]<0&&(p=i-p),m=p):p=R,c>T&&4===A?(C=E[0]/c,Math.abs(C)>1&&(C=t.sgn(C)),g=Math.acos(C),E[1]<0&&(g=i-g),l>N&&(g=i-g)):g=R,D>T&&2===A?(C=e[0]/D,Math.abs(C)>1&&(C=t.sgn(C)),f=Math.acos(C),e[1]<0&&(f=i-f),l>N&&(f=i-f),m=f):f=R,1!==A&&4!==A||(m=t.newtonnu(c,d).m)}else o=R,s=R,c=R,l=R,u=R,h=R,d=R,m=R,p=R,f=R,g=R;return{p:o,a:s,ecc:c,incl:l,omega:u,argp:h,nu:d,m,arglat:p,truelon:f,lonper:g}},t.sgn=function(t){return t<0?-1:1},t.sinh=function(t){return(Math.exp(t)-Math.exp(-t))/2},t.dpper=function(t,e){var n=t.e3,a=t.ee2,o=t.peo,s=t.pgho,c=t.pho,l=t.PInco,u=t.plo,h=t.se2,d=t.se3,m=t.sgh2,p=t.sgh3,f=t.sgh4,g=t.sh2,M=t.sh3,v=t.si2,w=t.si3,y=t.sl2,x=t.sl3,A=t.sl4,b=t.t,E=t.xgh2,N=t.xgh3,T=t.xgh4,R=t.xh2,D=t.xh3,z=t.xi2,I=t.xi3,O=t.xl2,_=t.xl3,C=t.xl4,S=t.zmol,L=t.zmos,P=e.ep,j=e.inclp,U=e.nodep,F=e.argpp,Y=e.mp,k=e.opsmode,q=void 0===k?"i":k,H=e.init,V=L+119459e-10*b;"y"===H&&(V=L);var B=V+.0335*Math.sin(V),G=Math.sin(B),J=.5*G*G-.25,W=-.5*G*Math.cos(B),K=h*J+d*W,Q=v*J+w*W,X=y*J+x*W+A*G,Z=m*J+p*W+f*G,$=g*J+M*W;V=S+.00015835218*b,"y"===H&&(V=S),B=V+.1098*Math.sin(V);var tt=K+(a*(J=.5*(G=Math.sin(B))*G-.25)+n*(W=-.5*G*Math.cos(B))),et=Q+(z*J+I*W),nt=X+(O*J+_*W+C*G),at=Z+(E*J+N*W+T*G),ot=$+(R*J+D*W);if("n"===H){nt-=u,at-=s,ot-=c,j+=et-=l,P+=tt-=o;var rt=Math.sin(j),it=Math.cos(j);if(j>=.2)F+=at-=it*(ot/=rt),U+=ot,Y+=nt;else{var st=Math.sin(U),ct=Math.cos(U),lt=rt*st,ut=rt*ct;lt+=ot*ct+et*it*st,ut+=-ot*st+et*it*ct,(U%=i)<0&&"a"===q&&(U+=i);var ht=Y+F+it*U;ht+=nt+at-et*U*rt;var dt=U;(U=Math.atan2(lt,ut))<0&&"a"===q&&(U+=i),Math.abs(dt-U)>r&&(U<dt?U+=i:U-=i),F=ht-(Y+=nt)-it*U}}return{ep:P,inclp:j,nodep:U,argpp:F,mp:Y}},t.dscom=function(t){var e,n,a,o,r,i,s,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,b,E,N,T,R,D,z,I,O,_,C,S,L,P,j,U,F=t.epoch,Y=t.ep,k=t.argpp,q=t.tc,H=t.inclp,V=t.nodep,B=t.np,G=.01675,J=.0549,W=2*Math.PI,K=B,Q=Y,X=Math.sin(V),Z=Math.cos(V),$=Math.sin(k),tt=Math.cos(k),et=Math.sin(H),nt=Math.cos(H),at=Q*Q,ot=1-at,rt=Math.sqrt(ot),it=F+18261.5+q/1440,st=(4.523602-.00092422029*it)%W,ct=Math.sin(st),lt=Math.cos(st),ut=.91375164-.03568096*lt,ht=Math.sqrt(1-ut*ut),dt=.089683511*ct/ht,mt=Math.sqrt(1-dt*dt),pt=5.8351514+.001944368*it,ft=.39785416*ct/ht,gt=mt*lt+.91744867*dt*ct;ft=Math.atan2(ft,gt),ft+=pt-st;for(var Mt=Math.cos(ft),vt=Math.sin(ft),wt=.1945905,yt=-.98088458,xt=.91744867,At=.39785416,bt=Z,Et=X,Nt=29864797e-13,Tt=1/K,Rt=1;Rt<=2;Rt++){var Dt=wt*bt+yt*xt*Et,zt=-yt*bt+wt*xt*Et,It=-wt*Et+yt*xt*bt,Ot=yt*At,_t=yt*Et+wt*xt*bt,Ct=wt*At,St=nt*It+et*Ot,Lt=nt*_t+et*Ct,Pt=-et*It+nt*Ot,jt=-et*_t+nt*Ct,Ut=Dt*tt+St*$,Ft=zt*tt+Lt*$,Yt=-Dt*$+St*tt,kt=-zt*$+Lt*tt,qt=Pt*$,Ht=jt*$,Vt=Pt*tt,Bt=jt*tt;D=-6*Dt*Pt+at*(-24*Ut*Vt-6*Yt*qt),z=-6*(Dt*jt+zt*Pt)+at*(-24*(Ft*Vt+Ut*Bt)+-6*(Yt*Ht+kt*qt)),I=-6*zt*jt+at*(-24*Ft*Bt-6*kt*Ht),_=6*St*Pt+at*(24*Ut*qt-6*Yt*Vt),C=6*(Lt*Pt+St*jt)+at*(24*(Ft*qt+Ut*Ht)-6*(kt*Vt+Yt*Bt)),S=6*Lt*jt+at*(24*Ft*Ht-6*kt*Bt),R=(R=3*(Dt*Dt+St*St)+(P=12*Ut*Ut-3*Yt*Yt)*at)+R+ot*P,O=(O=6*(Dt*zt+St*Lt)+(j=24*Ut*Ft-6*Yt*kt)*at)+O+ot*j,L=(L=3*(zt*zt+Lt*Lt)+(U=12*Ft*Ft-3*kt*kt)*at)+L+ot*U,n=-.5*(a=Nt*Tt)/rt,e=-15*Q*(o=a*rt),r=Ut*Yt+Ft*kt,i=Ft*Yt+Ut*kt,s=Ft*kt-Ut*Yt,1===Rt&&(c=e,l=n,u=a,h=o,d=r,m=i,p=s,f=R,w=O,b=L,g=D,M=z,v=I,y=_,x=C,A=S,E=P,N=j,T=U,wt=Mt,yt=vt,xt=ut,At=ht,bt=mt*Z+dt*X,Et=X*mt-Z*dt,Nt=4.7968065e-7)}return{snodm:X,cnodm:Z,sinim:et,cosim:nt,sinomm:$,cosomm:tt,day:it,e3:2*e*s,ee2:2*e*i,em:Q,emsq:at,gam:pt,peo:0,pgho:0,pho:0,PInco:0,plo:0,rtemsq:rt,se2:2*c*m,se3:2*c*p,sgh2:2*h*N,sgh3:2*h*(T-E),sgh4:-18*h*G,sh2:-2*l*x,sh3:-2*l*(A-y),si2:2*l*M,si3:2*l*(v-g),sl2:-2*u*w,sl3:-2*u*(b-f),sl4:-2*u*(-21-9*at)*G,s1:e,s2:n,s3:a,s4:o,s5:r,s6:i,s7:s,ss1:c,ss2:l,ss3:u,ss4:h,ss5:d,ss6:m,ss7:p,sz1:f,sz2:w,sz3:b,sz11:g,sz12:M,sz13:v,sz21:y,sz22:x,sz23:A,sz31:E,sz32:N,sz33:T,xgh2:2*o*j,xgh3:2*o*(U-P),xgh4:-18*o*J,xh2:-2*n*C,xh3:-2*n*(S-_),xi2:2*n*z,xi3:2*n*(I-D),xl2:-2*a*O,xl3:-2*a*(L-R),xl4:-2*a*(-21-9*at)*J,nm:K,z1:R,z2:O,z3:L,z11:D,z12:z,z13:I,z21:_,z22:C,z23:S,z31:P,z32:j,z33:U,zmol:(.2299715*it-pt+4.7199672)%W,zmos:(6.2565837+.017201977*it)%W}},t.dsinit=function(t){var e=t.xke,n=t.cosim,a=t.argpo,o=t.s1,s=t.s2,c=t.s3,l=t.s4,u=t.s5,h=t.sinim,d=t.ss1,m=t.ss2,p=t.ss3,f=t.ss4,g=t.ss5,M=t.sz1,v=t.sz3,w=t.sz11,y=t.sz13,x=t.sz21,A=t.sz23,b=t.sz31,E=t.sz33,N=t.t,T=t.tc,R=t.gsto,D=t.mo,z=t.mdot,I=t.no,O=t.nodeo,_=t.nodedot,C=t.xPIdot,S=t.z1,L=t.z3,P=t.z11,j=t.z13,U=t.z21,F=t.z23,Y=t.z31,k=t.z33,q=t.ecco,H=t.eccsq,V=t.emsq,B=t.em,G=t.argpm,J=t.inclm,W=t.mm,K=t.nm,Q=t.nodem,X=t.irez,Z=t.atime,$=t.d2201,tt=t.d2211,et=t.d3210,nt=t.d3222,at=t.d4410,ot=t.d4422,rt=t.d5220,it=t.d5232,st=t.d5421,ct=t.d5433,lt=t.dedt,ut=t.didt,ht=t.dmdt,dt=t.dnodt,mt=t.domdt,pt=t.del1,ft=t.del2,gt=t.del3,Mt=t.xfact,vt=t.xlamo,wt=t.xli,yt=t.xni,xt=.0043752690880113,At=.00015835218,bt=119459e-10;X=0,K<.0052359877&&K>.0034906585&&(X=1),K>=.00826&&K<=.00924&&B>=.5&&(X=2);var Et=-bt*m*(x+A);(J<.052359877||J>r-.052359877)&&(Et=0),0!==h&&(Et/=h);var Nt=-At*s*(U+F);(J<.052359877||J>r-.052359877)&&(Nt=0),mt=f*bt*(b+E-6)-n*Et+l*At*(Y+k-6),dt=Et,0!==h&&(mt-=n/h*Nt,dt+=Nt/h);var Tt=(R+T*xt)%i;if(B+=(lt=d*bt*g+o*At*u)*N,J+=(ut=m*bt*(w+y)+s*At*(P+j))*N,G+=mt*N,Q+=dt*N,W+=(ht=-bt*p*(M+v-14-6*V)-At*c*(S+L-14-6*V))*N,0!==X){var Rt=Math.pow(K/e,2/3);if(2===X){var Dt=n*n,zt=B,It=V,Ot=(B=q)*(V=H),_t=void 0,Ct=void 0,St=void 0,Lt=void 0,Pt=void 0,jt=void 0,Ut=void 0,Ft=void 0,Yt=void 0;B<=.65?(_t=3.616-13.247*B+16.29*V,Ct=117.39*B-19.302-228.419*V+156.591*Ot,St=109.7927*B-18.9068-214.6334*V+146.5816*Ot,Lt=242.694*B-41.122-471.094*V+313.953*Ot,Pt=841.88*B-146.407-1629.014*V+1083.435*Ot,jt=3017.977*B-532.114-5740.032*V+3708.276*Ot):(_t=331.819*B-72.099-508.738*V+266.724*Ot,Ct=1582.851*B-346.844-2415.925*V+1246.113*Ot,St=1554.908*B-342.585-2366.899*V+1215.972*Ot,Lt=4758.686*B-1052.797-7193.992*V+3651.957*Ot,Pt=16178.11*B-3581.69-24462.77*V+12422.52*Ot,jt=B>.715?29936.92*B-5149.66-54087.36*V+31324.56*Ot:1464.74-4664.75*B+3763.64*V),B<.7?(Yt=4988.61*B-919.2277-9064.77*V+5542.21*Ot,Ut=4568.6173*B-822.71072-8491.4146*V+5337.524*Ot,Ft=4690.25*B-853.666-8624.77*V+5341.4*Ot):(Yt=161616.52*B-37995.78-229838.2*V+109377.94*Ot,Ut=218913.95*B-51752.104-309468.16*V+146349.42*Ot,Ft=170470.89*B-40023.88-242699.48*V+115605.82*Ot);var kt=h*h,qt=K*K*3*(Rt*Rt),Ht=17891679e-13*qt;$=Ht*(Vt=.75*(1+2*n+Dt))*(-.306-.44*(B-.64)),tt=Ht*(1.5*kt)*_t,et=(Ht=3.7393792e-7*(qt*=Rt))*(1.875*h*(1-2*n-3*Dt))*Ct,nt=Ht*(-1.875*h*(1+2*n-3*Dt))*St,at=(Ht=2*(qt*=Rt)*7.3636953e-9)*(35*kt*Vt)*Lt,ot=Ht*(39.375*kt*kt)*Pt,rt=(Ht=1.1428639e-7*(qt*=Rt))*(9.84375*h*(kt*(1-2*n-5*Dt)+.33333333*(4*n-2+6*Dt)))*jt,it=Ht*(h*(4.92187512*kt*(-2-4*n+10*Dt)+6.56250012*(1+2*n-3*Dt)))*Ft,st=(Ht=2*qt*2.1765803e-9)*(29.53125*h*(2-8*n+Dt*(8*n-12+10*Dt)))*Ut,ct=Ht*(29.53125*h*(-2-8*n+Dt*(12+8*n-10*Dt)))*Yt,vt=(D+O+O-(Tt+Tt))%i,Mt=z+ht+2*(_+dt-xt)-I,B=zt,V=It}if(1===X){var Vt,Bt=1+n;ft=2*(pt=3*K*K*Rt*Rt)*(Vt=.75*(1+n)*(1+n))*(1+V*(.8125*V-2.5))*17891679e-13,gt=3*pt*(Bt*=1.875*Bt*Bt)*(1+V*(6.60937*V-6))*2.2123015e-7*Rt,pt=pt*(.9375*h*h*(1+3*n)-.75*(1+n))*(Ct=1+2*V)*21460748e-13*Rt,vt=(D+O+a-Tt)%i,Mt=z+C+ht+mt+dt-(I+xt)}wt=vt,yt=I,Z=0,K=I+0}return{em:B,argpm:G,inclm:J,mm:W,nm:K,nodem:Q,irez:X,atime:Z,d2201:$,d2211:tt,d3210:et,d3222:nt,d4410:at,d4422:ot,d5220:rt,d5232:it,d5421:st,d5433:ct,dedt:lt,didt:ut,dmdt:ht,dndt:0,dnodt:dt,domdt:mt,del1:pt,del2:ft,del3:gt,xfact:Mt,xlamo:vt,xli:wt,xni:yt}},t.dspace=function(t,e,n,a,o,r,s,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,b,E,N,T,R,D,z,I,O,_,C,S,L,P){var j=.13130908,U=2.8843198,F=.37448087,Y=5.7686396,k=.95240898,q=1.8014998,H=1.050833,V=4.4108898,B=259200,G=0,J=(E+.0043752690880113*b)%i;if(z+=d*A,O+=g*A,I+=w*A,L+=v*A,C+=M*A,0!==t){(0===D||A*D<=0||Math.abs(A)<Math.abs(D))&&(D=0,S=R,_=T);var W;W=A>0?720:-720;for(var K=void 0,Q=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(_-j)+p*Math.sin(2*(_-U))+f*Math.sin(3*(_-F)),Z=S+N,$=m*Math.cos(_-j)+2*p*Math.cos(2*(_-U))+3*f*Math.cos(3*(_-F)),$*=Z):(X=(et=y+x*D)+et,Q=_+_,tt=e*Math.sin(X+_-Y)+n*Math.sin(_-Y)+a*Math.sin(et+_-k)+o*Math.sin(-et+_-k)+r*Math.sin(X+Q-q)+s*Math.sin(Q-q)+c*Math.sin(et+_-H)+l*Math.sin(-et+_-H)+u*Math.sin(et+Q-V)+h*Math.sin(-et+Q-V),Z=S+N,$=e*Math.cos(X+_-Y)+n*Math.cos(_-Y)+a*Math.cos(et+_-k)+o*Math.cos(-et+_-k)+c*Math.cos(et+_-H)+l*Math.cos(-et+_-H)+2*(r*Math.cos(X+Q-q)+s*Math.cos(Q-q)+u*Math.cos(et+Q-V)+h*Math.cos(-et+Q-V)),$*=Z),Math.abs(A-D)>=720?nt=381:(K=A-D,nt=0),381===nt&&(_+=Z*W+tt*B,S+=tt*W+$*B,D+=W);P=S+tt*K+$*K*K*.5;var at=_+Z*K+tt*K*K*.5;1!==t?(C=at-2*L+2*J,G=P-R):(C=at-L-I+J,G=P-R),P=R+G}return[z,I,O,C,L,P]},t.getgravconst=function(t){var e,n,a,o,r,i,s,c;switch(t){case"wgs72old":r=398600.79964,i=6378.135,s=1/(c=.0743669161),o=-165597e-11,a=(n=-253881e-11)/(e=.001082616);break;case"wgs72":r=398600.8,i=6378.135,s=1/(c=60/Math.sqrt(i*i*i/r)),o=-165597e-11,a=(n=-253881e-11)/(e=.001082616);break;case"wgs84":r=398600.5,i=6378.137,s=1/(c=60/Math.sqrt(i*i*i/r)),o=-161098761e-14,a=(n=-253215306e-14)/(e=.00108262998905);break;default:throw new Error("unknown gravity option ".concat(t))}return{tumin:s,mus:r,radiusearthkm:i,xke:c,j2:e,j3:n,j4:o,j3oj2:a}},t.initl=function(e){var n=e.opsmode,a=e.ecco,o=e.epoch,r=e.inclo,i=e.xke,s=e.j2,c=e.no,l=2*Math.PI,u=2/3,h=a*a,d=1-h,m=Math.sqrt(d),p=Math.cos(r),f=p*p,g=Math.pow(i/c,u),M=.75*s*(3*f-1)/(m*d),v=M/(g*g),w=g*(1-v*v-v*(1/3+134*v*v/81));c/=1+(v=M/(w*w));var y,x=Math.pow(i/c,u),A=Math.sin(r),b=x*d,E=1-5*f,N=-E-f-f,T=1/x,R=b*b,D=x*(1-a);if("a"===n){var z=o-7305,I=Math.floor(z+1e-8),O=.017202791694070362;(y=(1.7321343856509375+O*I+(O+l)*(z-I)+z*z*5075514194322695e-30)%l)<0&&(y+=l)}else y=t.gstime(o+2433281.5);return{no:c,method:"n",ainv:T,ao:x,con41:N,con42:E,cosio:p,cosio2:f,eccsq:h,omeosq:d,posq:R,rp:D,rteosq:m,sinio:A,gsto:y}},t.sgp4init=function(e,n){var a=n.whichconst,o=void 0===a?"wgs72":a,r=n.opsmode,s=void 0===r?"i":r,u=n.satn,h=void 0===u?e.satnum:u,d=n.epoch,m=n.xbstar,p=n.xecco,f=n.xargpo,g=n.xinclo,M=n.xndot,v=n.xnddot,w=n.xmo,y=n.xno,x=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 A=t.getgravconst(o);e.tumin=A.tumin,e.mus=A.mus,e.radiusearthkm=A.radiusearthkm,e.xke=A.xke,e.j2=A.j2,e.j3=A.j3,e.j4=A.j4,e.j3oj2=A.j3oj2;var b=A.j2,E=A.j4,N=A.xke,T=A.j3oj2;e.error=0,e.operationmode=s;var R=h.split("")[0].toLowerCase();isNaN(parseInt(R))?e.satnum=parseInt(R.charCodeAt(0)-96+9+e.satnum.slice(1,5)).toString():e.satnum=h,e.bstar=m,e.ndot=M,e.nddot=v,e.ecco=p,e.argpo=f,e.inclo=g,e.mo=w,e.no=y,e.nodeo=x;var D=78/e.radiusearthkm+1,z=42/e.radiusearthkm,I=z*z*z*z;e.init="y",e.t=0;var O={ecco:e.ecco,epoch:d,inclo:e.inclo,no:e.no,method:e.method,opsmode:e.operationmode,xke:e.xke,j2:e.j2},_=t.initl(O),C=_.ao,S=_.con42,L=_.cosio,P=_.cosio2,j=_.eccsq,U=_.omeosq,F=_.posq,Y=_.rp,k=_.rteosq,q=_.sinio;if(e.no=_.no,e.con41=_.con41,e.gsto=_.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,U>=0||e.no>=0){e.isimp=0,Y<220/e.radiusearthkm+1&&(e.isimp=1);var H=D,V=I,B=(Y-1)*e.radiusearthkm;if(B<156){H=B-78,B<98&&(H=20);var G=(120-H)/e.radiusearthkm;V=G*G*G*G,H=H/e.radiusearthkm+1}var J=1/F,W=1/(C-H);e.eta=C*e.ecco*W;var K=e.eta*e.eta,Q=e.ecco*e.eta,X=Math.abs(1-K),Z=V*Math.pow(W,4),$=Z/Math.pow(X,3.5),tt=$*e.no*(C*(1+1.5*K+Q*(4+K))+.375*b*W/X*e.con41*(8+3*K*(8+K)));e.cc1=e.bstar*tt;var et=0;e.ecco>1e-4&&(et=-2*Z*W*T*e.no*q/e.ecco),e.x1mth2=1-P,e.cc4=2*e.no*$*C*U*(e.eta*(2+.5*K)+e.ecco*(.5+2*K)-b*W/(C*X)*(-3*e.con41*(1-2*Q+K*(1.5-.5*Q))+.75*e.x1mth2*(2*K-Q*(1+K))*Math.cos(2*e.argpo))),e.cc5=2*$*C*U*(1+2.75*(K+Q)+Q*K);var nt=P*P,at=1.5*b*J*e.no,ot=.5*at*b*J,rt=-.46875*E*J*J*e.no;e.mdot=e.no+.5*at*k*e.con41+.0625*ot*k*(13-78*P+137*nt),e.argpdot=-.5*at*S+.0625*ot*(7-114*P+395*nt)+rt*(3-36*P+49*nt);var it=-at*L;e.nodedot=it+(.5*ot*(4-19*P)+2*rt*(3-7*P))*L;var st=e.argpdot+e.nodedot;e.omgcof=e.bstar*et*Math.cos(e.argpo),e.xmcof=0,e.ecco>1e-4&&(e.xmcof=-c*Z*e.bstar/Q),e.nodecf=3.5*U*it*e.cc1,e.t2cof=1.5*e.cc1,Math.abs(L+1)>15e-13?e.xlcof=-.25*T*q*(3+5*L)/(1+L):e.xlcof=-.25*T*q*(3+5*L)/l,e.aycof=-.5*T*q;var ct=1+e.eta*Math.cos(e.mo);if(e.delmo=ct*ct*ct,e.sinmao=Math.sin(e.mo),e.x7thm1=7*P-1,i/e.no>=225){e.method="d",e.isimp=1;var lt=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,ft=ht.emsq,gt=ht.s1,Mt=ht.s2,vt=ht.s3,wt=ht.s4,yt=ht.s5,xt=ht.ss1,At=ht.ss2,bt=ht.ss3,Et=ht.ss4,Nt=ht.ss5,Tt=ht.sz1,Rt=ht.sz3,Dt=ht.sz11,zt=ht.sz13,It=ht.sz21,Ot=ht.sz23,_t=ht.sz31,Ct=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 St=ht.nm,Lt=ht.z1,Pt=ht.z3,jt=ht.z11,Ut=ht.z13,Ft=ht.z21,Yt=ht.z23,kt=ht.z31,qt=ht.z33,Ht={inclo:lt,init:e.init,ep:e.ecco,inclp:e.inclo,nodep:e.nodeo,argpp:e.argpo,mp:e.mo,opsmode:e.operationmode},Vt=t.dpper(e,Ht);e.ecco=Vt.ep,e.inclo=Vt.inclp,e.nodeo=Vt.nodep,e.argpo=Vt.argpp,e.mo=Vt.mp;var Bt={xke:N,cosim:mt,emsq:ft,argpo:e.argpo,s1:gt,s2:Mt,s3:vt,s4:wt,s5:yt,sinim:dt,ss1:xt,ss2:At,ss3:bt,ss4:Et,ss5:Nt,sz1:Tt,sz3:Rt,sz11:Dt,sz13:zt,sz21:It,sz23:Ot,sz31:_t,sz33:Ct,t:e.t,tc:0,gsto:e.gsto,mo:e.mo,mdot:e.mdot,no:e.no,nodeo:e.nodeo,nodedot:e.nodedot,xPIdot:st,z1:Lt,z3:Pt,z11:jt,z13:Ut,z21:Ft,z23:Yt,z31:kt,z33:qt,ecco:e.ecco,eccsq:j,em:pt,argpm:0,inclm:lt,mm:0,nm:St,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(Bt);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*C*W*Jt;var Wt=e.d2*W*e.cc1/3;e.d3=(17*C+H)*Wt,e.d4=.5*Wt*C*W*(221*C+31*H)*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}(),p=function(){function t(){}return t.prototype.propagateWasm=function(){var t=m.createSatrec("1 25544U 98067A 21284.51782528 .00016738 00000-0 10270-3 0 9033","2 25544 51.6443 82.9991 0004256 95.9687 15.0739 15.48978733306954"),e=this.module.instance.exports.propagate;console.log(e(t.a,t.am,t.alta,t.altp,t.argpdot,t.argpo,t.aycof,t.bstar,t.cc1,t.cc4,t.cc5,t.con41,t.d2,t.d3,t.d4,t.d5232,t.d5421,t.d5433,t.dedt,t.delmo,t.del1,t.ecco,t.em,t.epochdays,t.epochyr,t.error,t.eta,t.gsto,t.im,t.inclo,t.init,t.isimp,t.jdsatepoch,t.mdot,t.method,t.mo,t.mm,t.nddot,t.ndot,t.no,t.nodecf,t.nodedot,t.nodeo,t.om,t.Om,t.omgcof,t.operationmode,t.satnum,t.sinmao,t.t,t.t2cof,t.t3cof,t.t4cof,t.t5cof,t.x1mth2,t.x7thm1,t.xlcof,t.xmcof,t.xfact,t.xlamo,t.xli,t.xgh4,t.xgh3,t.xh2,t.xi2,t.xi3,t.xl2,t.xl3,t.xl4,t.zmol,t.zmos,t.dmdt,t.dnodt,t.domdt,t.e3,t.ee2,t.peo,t.pgho,t.pho,t.PInco,t.plo,t.se2,t.se3,t.sgh2,t.sgh3,t.sgh4,t.sh2,t.sh3,t.si2,t.si3,t.sl2,t.sl3,t.sl4,t.xgh2,t.xh3,t.tumin,t.radiusearthkm,t.irez,t.d3210,t.d3222,t.d4410,t.d4422,t.d5220,t.del2,t.del3,t.didt,t.atime,t.j2,t.j3,t.j4,t.mus,t.xke,t.j3oj2,t.xni,t.d2201,t.d2211,t.nm,30))},t.prototype.loadWasm=function(t){return e=this,n=void 0,o=function(){var e,n;return function(t,e){var n,a,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(i=0)),i;)try{if(n=1,a&&(o=2&s[0]?a.return:s[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,s[1])).done)return o;switch(a=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],a=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,(function(a){switch(a.label){case 0:return e={env:{abort:function(t,e,n,a){throw Error("abort called at ".concat(n,":").concat(a))}}},n=this,[4,WebAssembly.instantiateStreaming(fetch(t),e)];case 1:return n.module=a.sent(),[2]}}))},new((a=void 0)||(a=Promise))((function(t,r){function i(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a((function(t){t(n)}))).then(i,s)}c((o=o.apply(e,n||[])).next())}));var e,n,a,o},t}(),f=function(){function t(){}return t.getDegLat=function(e){if(e<-r/2||e>r/2)throw new RangeError("Latitude radians must be in range [-PI/2; PI/2].");return t.rad2deg(e)},t.getDegLon=function(e){if(e<-r||e>r)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/r},t.deg2rad=function(t){return t*r/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,a=Math.sqrt(t.x*t.x+t.y*t.y),o=(n-6356.7523142)/n,s=2*o-o*o,c=Math.atan2(t.y,t.x)-e;c<-r;)c+=i;for(;c>r;)c-=i;for(var l,u=0,h=Math.atan2(t.z,Math.sqrt(t.x*t.x+t.y*t.y));u<20;)l=1/Math.sqrt(1-s*(Math.sin(h)*Math.sin(h))),h=Math.atan2(t.z+n*l*s*Math.sin(h),a),u+=1;return{lon:c,lat:h,alt:a/Math.cos(h)-n*l}},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,o=6378.137,r=(o-6356.7523142)/o,i=2*r-r*r,s=o/Math.sqrt(1-i*(Math.sin(n)*Math.sin(n)));return{x:(s+a)*Math.cos(n)*Math.cos(e),y:(s+a)*Math.cos(n)*Math.sin(e),z:(s*(1-i)+a)*Math.sin(n)}},t.lla2sez=function(e,n){var a=e.lon,o=e.lat,r=t.lla2ecf(e),i=n.x-r.x,s=n.y-r.y,c=n.z-r.z;return{s:Math.sin(o)*Math.cos(a)*i+Math.sin(o)*Math.sin(a)*s-Math.cos(o)*c,e:-Math.sin(a)*i+Math.cos(a)*s,z:Math.cos(o)*Math.cos(a)*i+Math.cos(o)*Math.sin(a)*s+Math.sin(o)*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),o=t.rae2sez(e),r=Math.sin(n.lat),i=Math.sin(n.lon),s=Math.cos(n.lat),c=Math.cos(n.lon);return{x:r*c*o.s+-i*o.e+s*c*o.z+a.x,y:r*i*o.s+c*o.e+s*i*o.z+a.y,z:-s*o.s+r*o.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)+r,el:n}},t}();!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.PAYLOAD=1]="PAYLOAD",t[t.ROCKET_BODY=2]="ROCKET_BODY",t[t.DEBRIS=3]="DEBRIS",t[t.SPECIAL=4]="SPECIAL",t[t.RADAR_MEASUREMENT=5]="RADAR_MEASUREMENT",t[t.RADAR_TRACK=6]="RADAR_TRACK",t[t.RADAR_OBJECT=7]="RADAR_OBJECT",t[t.BALLISTIC_MISSILE=8]="BALLISTIC_MISSILE",t[t.STAR=9]="STAR",t[t.INTERGOVERNMENTAL_ORGANIZATION=10]="INTERGOVERNMENTAL_ORGANIZATION",t[t.SUBORBITAL_PAYLOAD_OPERATOR=11]="SUBORBITAL_PAYLOAD_OPERATOR",t[t.PAYLOAD_OWNER=12]="PAYLOAD_OWNER",t[t.METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER=13]="METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER",t[t.PAYLOAD_MANUFACTURER=14]="PAYLOAD_MANUFACTURER",t[t.LAUNCH_AGENCY=15]="LAUNCH_AGENCY",t[t.LAUNCH_SITE=16]="LAUNCH_SITE",t[t.LAUNCH_POSITION=17]="LAUNCH_POSITION",t[t.LAUNCH_FACILITY=18]="LAUNCH_FACILITY",t[t.CONTROL_FACILITY=19]="CONTROL_FACILITY",t[t.GROUND_SENSOR_STATION=20]="GROUND_SENSOR_STATION",t[t.OPTICAL=21]="OPTICAL",t[t.MECHANICAL=22]="MECHANICAL",t[t.PHASED_ARRAY_RADAR=23]="PHASED_ARRAY_RADAR",t[t.OBSERVER=24]="OBSERVER",t[t.BISTATIC_RADIO_TELESCOPE=25]="BISTATIC_RADIO_TELESCOPE",t[t.COUNTRY=26]="COUNTRY",t[t.LAUNCH_VEHICLE_MANUFACTURER=27]="LAUNCH_VEHICLE_MANUFACTURER",t[t.ENGINE_MANUFACTURER=28]="ENGINE_MANUFACTURER"}(o||(o={}));var g,M,v=2*Math.PI,w=function(){function t(){}return t.julianCycle=function(e,n){var a=n/v;return Math.round(e-t.J0-a)},t.observerAngle=function(t){return-2.076*Math.sqrt(t)/60},t.solarMeanAnomaly=function(t){return s*(357.5291+.98560028*t)},t.julian2date=function(e){return new Date((e-t.J1970)*h)},t.date2jSince2000=function(e){return e.getTime()/h+t.J1970-t.J2000},t.rightAscension=function(e,n){return Math.atan2(Math.sin(e)*Math.cos(t.e)-Math.tan(n)*Math.sin(t.e),Math.cos(e))},t.declination=function(e,n){return Math.asin(Math.sin(n)*Math.cos(t.e)+Math.cos(n)*Math.sin(t.e)*Math.sin(e))},t.azimuth=function(t,e,n){return Math.PI+Math.atan2(Math.sin(t),Math.cos(t)*Math.sin(e)-Math.tan(n)*Math.cos(e))},t.elevation=function(t,e,n){return Math.asin(Math.sin(e)*Math.sin(n)+Math.cos(e)*Math.cos(n)*Math.cos(t))},t.siderealTime=function(t,e){return s*(280.16+360.9856235*t)-e},t.astroRefraction=function(t){return t<0&&(t=0),2967e-7/Math.tan(t+.00312536/(t+.08901179))},t.eclipticLongitude=function(t){return t+s*(1.9148*Math.sin(t)+.02*Math.sin(2*t)+3e-4*Math.sin(3*t))+102.9372*s+Math.PI},t.eclipticLatitude=function(t){var e=v/360,n=t-.00569-.00478*Math.sin(e*t);return v*(n+3e-4*Math.sin(2*e*n))},t.julianCyle=function(e,n){return Math.round(e-t.J0-n/(2*v/2))},t.approxTransit=function(e,n,a){return t.J0+(e+n)/v+a},t.solarTransitJulian=function(e,n,a){return t.J2000+e+.0053*Math.sin(n)-.0069*Math.sin(2*a)},t.hourAngle=function(t,e,n){return Math.acos((Math.sin(t)-Math.sin(e)*Math.sin(n))/(Math.cos(e)*Math.cos(n)))},t.getSetJulian=function(e,n,a,o,r,i,s){var c=t.hourAngle(e,a,o),l=t.approxTransit(c,n,r);return t.solarTransitJulian(l,i,s)},t.getSetJ=function(e,n,a,o,r,i,s){var c=t.hourAngle(e,a,o),l=t.approxTransit(c,n,r);return t.solarTransitJulian(l,i,s)},t.getTimes=function(e,n,a,o,r){if(void 0===o&&(o=0),void 0===r&&(r=!1),isNaN(n))throw new Error("latitude missing");if(isNaN(a))throw new Error("longitude missing");var i=new Date(e);r?i.setUTCHours(12,0,0,0):i.setHours(12,0,0,0);var c,l=0,u=[],h=0,d=0,m=0,p=t.calculateJnoon(a,n,o,i),f=p.Jnoon,g=p.dh,M=p.lw,v=p.phi,w=p.dec,y=p.n,x=p.M,A=p.L,b={solarNoon:t.julian2date(f),nadir:t.julian2date(f+.5)};for(l=0,c=t.times.length;l<c;l+=1)h=((u=t.times[l])[0]+g)*s,m=f-((d=t.getSetJ(h,M,v,w,y,x,A))-f),b[u[1]]=t.julian2date(m),b[u[2]]=t.julian2date(d);return b},t.calculateJnoon=function(e,n,a,o){var r=s*-e,i=s*n,c=t.observerAngle(a),l=t.date2jSince2000(o),u=t.julianCycle(l,r),h=t.approxTransit(0,r,u),d=t.solarMeanAnomaly(h),m=t.eclipticLongitude(d),p=t.declination(m,0);return{Jnoon:t.solarTransitJulian(h,d,m),dh:c,lw:r,phi:i,dec:p,n:u,M:d,L:m}},t.getSunTimeByAzimuth=function(e,n,a,o,r){if(void 0===r&&(r=!1),isNaN(o))throw new Error("azimuth missing");if(isNaN(n))throw new Error("latitude missing");if(isNaN(a))throw new Error("longitude missing");r&&(o*=s);var i=new Date(e),c=s*-a,l=s*n,u=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0).getTime(),d=h;for(u+=d;d>200;){var m=t.date2jSince2000(new Date(u)),p=t.getSunRaDec(m),f=t.siderealTime(m,c)-p.ra;d/=2,t.getAzimuth(f,l,p.dec)<o?u+=d:u-=d}return new Date(Math.floor(u))},t.getAzimuth=function(t,e,n){return Math.atan2(Math.sin(t),Math.cos(t)*Math.sin(e)-Math.tan(n)*Math.cos(e))+Math.PI},t.getSolarTime=function(t,e,n){var a=new Date;a.setUTCFullYear(t.getUTCFullYear(),0,1),a.setUTCHours(0,0,0,0);var o=t.getTime()-a.getTime(),r=360/365*(Math.floor(o/h)-81)*s,i=9.87*Math.sin(2*r)-7.53*Math.cos(r)-1.5*Math.sin(r)+4*(n-15*e);return new Date(t.getTime()+60*i*1e3)},t.getStarAzEl=function(e,n,a,o,r){var i=-a*s,c=n*s,l=t.date2jSince2000(e),u=t.siderealTime(l,i)-o,h=t.elevation(u,c,r);return{az:t.azimuth(u,c,r),el:h+=t.astroRefraction(h)}},t.getSunAzEl=function(e,n,a){var o=-a*s,r=n*s,i=t.date2jSince2000(e),c=t.getSunRaDec(i),l=t.siderealTime(i,o)-c.ra;return{az:t.azimuth(l,r,c.dec),el:t.elevation(l,r,c.dec)}},t.getSunRaDec=function(e){var n=t.solarMeanAnomaly(e),a=t.eclipticLongitude(n);return{dec:t.declination(a,0),ra:t.rightAscension(a,0)}},t.J1970=2440587.5,t.J2000=2451545,t.J0=9e-4,t.e=23.4397*s,t.times=[[6,"goldenHourDawnEnd","goldenHourDuskStart"],[-.3,"sunriseEnd","sunsetStart"],[-.833,"sunriseStart","sunsetEnd"],[-1,"goldenHourDawnStart","goldenHourDuskEnd"],[-4,"blueHourDawnEnd","blueHourDuskStart"],[-6,"civilDawn","civilDusk"],[-8,"blueHourDawnStart","blueHourDuskEnd"],[-12,"nauticalDawn","nauticalDusk"],[-15,"amateurDawn","amateurDusk"],[-18,"astronomicalDawn","astronomicalDusk"]],t}(),y=function(){function t(){}return t.moonCoords=function(t){var e=s*(134.963+13.064993*t),n=s*(93.272+13.22935*t),a=s*(218.316+13.176396*t)+6.289*s*Math.sin(e),o=5.128*s*Math.sin(n),r=385001-20905*Math.cos(e);return{ra:w.rightAscension(a,o),dec:w.declination(a,o),dist:r}},t.hoursLater=function(t,e){return new Date(t.getTime()+e*h/24)},t.getMoonPosition=function(e,n,a){var o=s*-a,r=s*n,i=w.date2jSince2000(e),c=t.moonCoords(i),l=w.siderealTime(i,o)-c.ra,u=w.elevation(l,r,c.dec),h=Math.atan2(Math.sin(l),Math.tan(r)*Math.cos(c.dec)-Math.sin(c.dec)*Math.cos(l));return u+=w.astroRefraction(u),{az:w.azimuth(l,r,c.dec),el:u,rng:c.dist,parallacticAngle:h}},t.getMoonIllumination=function(e){var n=e instanceof Date?e.getTime():e,a=2551442778,o=w.date2jSince2000(new Date(n)),r=w.getSunRaDec(o),i=t.moonCoords(o),s=149598e3,c=Math.acos(Math.sin(r.dec)*Math.sin(i.dec)+Math.cos(r.dec)*Math.cos(i.dec)*Math.cos(r.ra-i.ra)),l=Math.atan2(s*Math.sin(c),i.dist-s*Math.cos(c)),u=Math.atan2(Math.cos(r.dec)*Math.sin(r.ra-i.ra),Math.sin(r.dec)*Math.cos(i.dec)-Math.cos(r.dec)*Math.sin(i.dec)*Math.cos(r.ra-i.ra)),h=.5+.5*l*(u<0?-1:1)/Math.PI,d=(n-94717884e4)%a;d<0&&(d+=a);var m=a-d+n,p=1275721389-d+n;p<n&&(p+=a);var f=637860694.5-d+n;f<n&&(f+=a);var g=1913582083.5-d+n;g<n&&(g+=a);for(var M,v=Math.min(m,f,p,g),y=0;y<t.moonCycles.length;y++){var x=t.moonCycles[y];if(h>=x.from&&h<=x.to){M=x;break}}var A;return A=v===m?"newMoon":v===f?"firstQuarter":v===p?"fullMoon":"thirdQuarter",{fraction:(1+Math.cos(l))/2,phase:M,phaseValue:h,angle:u,next:{value:v,date:new Date(v).toISOString(),type:A,newMoon:{value:m,date:new Date(m).toISOString()},fullMoon:{value:p,date:new Date(p).toISOString()},firstQuarter:{value:f,date:new Date(f).toISOString()},thirdQuarter:{value:g,date:new Date(g).toISOString()}}}},t.getMoonTimes=function(e,n,a,o){void 0===o&&(o=!1);var r=new Date(e);o?r.setUTCHours(0,0,0,0):r.setHours(0,0,0,0);var i=t.calculateRiseSetTimes(r,n,a),s=i.rise,c=i.set,l=i.ye,u={rise:null,set:null,ye:null,alwaysUp:null,alwaysDown:null,highest:null};return u.rise=s?new Date(t.hoursLater(e,s)):NaN,u.set=c?new Date(t.hoursLater(e,c)):NaN,s||c?s&&c?(u.alwaysUp=!1,u.alwaysDown=!1,u.highest=new Date(t.hoursLater(e,Math.min(s,c)+Math.abs(c-s)/2))):(u.alwaysUp=!1,u.alwaysDown=!1):l>0?(u.alwaysUp=!0,u.alwaysDown=!1):(u.alwaysUp=!1,u.alwaysDown=!0),u},t.calculateRiseSetTimes=function(e,n,a){for(var o=.133*s,r=t.getMoonPosition(e,n,a).el-o,i=0,c=0,l=0,u=0,h=0,d=0,m=0,p=0,f=0,g=0,M=0,v=0,w=0,y=1;y<=24&&(i=t.getMoonPosition(t.hoursLater(e,y),n,a).el-o,p=((h=(r+(c=t.getMoonPosition(t.hoursLater(e,y+1),n,a).el-o))/2-i)*(m=-(d=(c-r)/2)/(2*h))+d)*m+i,g=0,(f=d*d-4*h*i)>=0&&(M=m-(w=Math.sqrt(f)/(2*Math.abs(h))),v=m+w,Math.abs(M)<=1&&g++,Math.abs(v)<=1&&g++,M<-1&&(M=v)),1===g?r<0?l=y+M:u=y+M:2===g&&(l=y+(p<0?v:M),u=y+(p<0?M:v)),!l||!u);y+=2)r=c;return{rise:l,set:u,ye:p}},t.moonCycles=[{from:0,to:.033863193308711,id:"newMoon",emoji:"🌚",code:":new_moon_with_face:",name:"New Moon",weight:1,css:"wi-moon-new"},{from:.033863193308711,to:.216136806691289,id:"waxingCrescentMoon",emoji:"🌒",code:":waxing_crescent_moon:",name:"Waxing Crescent",weight:6.3825,css:"wi-moon-wax-cres"},{from:.216136806691289,to:.283863193308711,id:"firstQuarterMoon",emoji:"🌓",code:":first_quarter_moon:",name:"First Quarter",weight:1,css:"wi-moon-first-quart"},{from:.283863193308711,to:.466136806691289,id:"waxingGibbousMoon",emoji:"🌔",code:":waxing_gibbous_moon:",name:"Waxing Gibbous",weight:6.3825,css:"wi-moon-wax-gibb"},{from:.466136806691289,to:.533863193308711,id:"fullMoon",emoji:"🌝",code:":full_moon_with_face:",name:"Full Moon",weight:1,css:"wi-moon-full"},{from:.533863193308711,to:.716136806691289,id:"waningGibbousMoon",emoji:"🌖",code:":waning_gibbous_moon:",name:"Waning Gibbous",weight:6.3825,css:"wi-moon-wan-gibb"},{from:.716136806691289,to:.783863193308711,id:"thirdQuarterMoon",emoji:"🌗",code:":last_quarter_moon:",name:"third Quarter",weight:1,css:"wi-moon-third-quart"},{from:.783863193308711,to:.966136806691289,id:"waningCrescentMoon",emoji:"🌘",code:":waning_crescent_moon:",name:"Waning Crescent",weight:6.3825,css:"wi-moon-wan-cres"},{from:.966136806691289,to:1,id:"newMoon",emoji:"🌚",code:":new_moon_with_face:",name:"New Moon",weight:1,css:"wi-moon-new"}],t}(),x=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,a){var o=7292115e-11,r={x:n.x-e.x,y:n.y-e.y,z:n.z-e.z},i=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)+Math.pow(r.z,2)),s=a.x+o*e.y,c=a.y-o*e.x,l=a.z,u=(r.x*s+r.y*c+r.z*l)/i;return 1+u/299792.458*t.sign(u)},t.createVec=function(t,e,n){for(var a=[],o=t;o<=e;o+=n)a.push(o);return a},t.getDayOfYear=function(e){var n=(e=e||new Date).getMonth(),a=e.getUTCDate(),o=[0,31,59,90,120,151,181,212,243,273,304,334][n]+a;return n>1&&t.isLeapYear(e)&&o++,o},t.isLeapYear=function(t){var e=t.getUTCFullYear();return 0==(3&e)&&(e%100!=0||e%400==0)},t.roundToNDecimalPlaces=function(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)},t.Types=a,t.sign=function(t){return t>=0?1:-1},t.jday=function(t,e,n,a,o,r){if(!t){var i=new Date,s=new Date(i.getUTCFullYear(),0,0),c=i.getDate()-s.getDate();return Math.floor(c/d)}return 367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5+((r/60+o)/60+a)/24},t.SunMath=w,t.MoonMath=y,t}(),A=function(t,e){this.start=t-1,this.stop=e,this.length=this.stop-this.start},b=function(){return b=Object.assign||function(t){for(var e,n=1,a=arguments.length;n<a;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},b.apply(this,arguments)},E=function(){function t(){}return t.parseTle=function(e,n){var a=t.parseLine1(e),o=t.parseLine2(n);if(a.satNum!==o.satNum)throw new Error("Satellite numbers do not match");if(a.satNumRaw!==o.satNumRaw)throw new Error("Raw satellite numbers do not match");if(1!==a.lineNumber1)throw new Error("First line number must be 1");if(2!==o.lineNumber2)throw new Error("Second line number must be 2");return{satNum:a.satNum,intlDes:a.intlDes,epochYear:a.epochYear,epochDay:a.epochDay,meanMoDev1:a.meanMoDev1,meanMoDev2:a.meanMoDev2,bstar:a.bstar,inclination:o.inclination,raan:o.raan,eccentricity:o.eccentricity,argOfPerigee:o.argOfPerigee,meanAnomaly:o.meanAnomaly,meanMotion:o.meanMotion}},t.parseTleFull=function(e,n){var a=t.parseLine1(e),o=t.parseLine2(n);if(a.satNum!==o.satNum)throw new Error("Satellite numbers do not match");if(a.satNumRaw!==o.satNumRaw)throw new Error("Raw satellite numbers do not match");if(1!==a.lineNumber1)throw new Error("First line number must be 1");if(2!==o.lineNumber2)throw new Error("Second line number must be 2");return b(b({},a),o)},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),a=n.split("")[0].toLowerCase();return isNaN(parseInt(a))?parseInt(a.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 x.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 x.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,a=t.bstar.start+6,o=t.bstar.stop-1,r=e.substring(t.bstar.start,n),i=parseFloat("0.".concat(e.substring(n,a))),s=e.substring(a,o),c=parseInt(e.substring(o,t.bstar.stop));if("-"===s)c*=-1;else if("+"!==s)throw new Error("Invalid BSTAR symbol: ".concat(r));if(i*=Math.pow(10,c),"-"===r)i*=-1;else if("+"!==r&&" "!==r)throw new Error("Invalid BSTAR symbol: ".concat(r));return x.roundToNDecimalPlaces(i,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 x.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 x.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 x.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 x.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 x.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 x.roundToNDecimalPlaces(n,8)},t.getRevNum=function(e){return parseInt(e.substring(t.revNum.start,t.revNum.stop))},t.lineNumber=new A(1,1),t.satNum=new A(3,7),t.classification=new A(8,8),t.intlDes=new A(10,17),t.intlDesYear=new A(10,11),t.intlDesLaunchNum=new A(12,14),t.intlDesLaunchPiece=new A(15,17),t.epochYear=new A(19,20),t.epochDay=new A(21,32),t.meanMoDev1=new A(34,43),t.meanMoDev2=new A(45,52),t.bstar=new A(54,61),t.ephemerisType=new A(63,63),t.elsetNum=new A(65,68),t.checksum=new A(69,69),t.inclination=new A(9,16),t.raan=new A(18,25),t.eccentricity=new A(27,33),t.argPerigee=new A(35,42),t.meanAnom=new A(44,51),t.meanMo=new A(53,63),t.revNum=new A(64,68),t}(),N=function(){function t(t){this.type=t.type||o.UNKNOWN,this.name=t.name||"Unknown",this.position=t.position||{x:0,y:0,z:0},this.time=t.time||new Date}return t.prototype.getName=function(){return this.name},t.prototype.getType=function(){return this.type},t.prototype.getTypeString=function(){switch(this.type){case o.UNKNOWN:return"Unknown";case o.PAYLOAD:return"Payload";case o.ROCKET_BODY:return"Rocket Body";case o.DEBRIS:return"Debris";case o.SPECIAL:return"Special";case o.RADAR_MEASUREMENT:return"Radar Measurement";case o.RADAR_TRACK:return"Radar Track";case o.RADAR_OBJECT:return"Radar Object";case o.BALLISTIC_MISSILE:return"Ballistic Missile";case o.STAR:return"Star";case o.INTERGOVERNMENTAL_ORGANIZATION:return"Intergovernmental Organization";case o.SUBORBITAL_PAYLOAD_OPERATOR:return"Suborbital Payload Operator";case o.PAYLOAD_OWNER:return"Payload Owner";case o.METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER:return"Meteorological Rocket Launch Agency or Manufacturer";case o.PAYLOAD_MANUFACTURER:return"Payload Manufacturer";case o.LAUNCH_AGENCY:return"Launch Agency";case o.LAUNCH_SITE:return"Launch Site";case o.LAUNCH_POSITION:return"Launch Position";case o.LAUNCH_FACILITY:return"Launch Facility";case o.CONTROL_FACILITY:return"Control Facility";case o.GROUND_SENSOR_STATION:return"Ground Sensor Station";case o.OPTICAL:return"Optical";case o.MECHANICAL:return"Mechanical";case o.PHASED_ARRAY_RADAR:return"Phased Array Radar";case o.OBSERVER:return"Observer";case o.BISTATIC_RADIO_TELESCOPE:return"Bistatic Radio Telescope";case o.COUNTRY:return"Country";case o.LAUNCH_VEHICLE_MANUFACTURER:return"Launch Vehicle Manufacturer";case o.ENGINE_MANUFACTURER:return"Engine Manufacturer";default:return"Unknown"}},t}(),T=(g=function(t,e){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},g(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),R=function(t){function e(e){var n=t.call(this,e)||this;return e.rcs&&(n.rcs=e.rcs),e.vmag&&(n.vmag=e.vmag),n}return T(e,t),e.prototype.getRcs=function(){return this.rcs},e.prototype.getVmag=function(){return this.vmag},e}(N),D=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),z=function(t){function e(e,n){var a=t.call(this,e)||this,o=E.parseTle(e.tle1,e.tle2);return a.satNum=o.satNum,a.intlDes=o.intlDes,a.epochYear=o.epochYear,a.epochDay=o.epochDay,a.meanMoDev1=o.meanMoDev1,a.meanMoDev2=o.meanMoDev2,a.bstar=o.bstar,a.inclination=o.inclination,a.raan=o.raan,a.eccentricity=o.eccentricity,a.argOfPerigee=o.argOfPerigee,a.meanAnomaly=o.meanAnomaly,a.meanMotion=o.meanMotion,a.period=1440/a.meanMotion,a.satrec=m.createSatrec(e.tle1,e.tle2),a.options=n,a}return D(e,t),e.prototype.propagateTo=function(t){var n=e.calculateTimeVariables(t,this.satrec).m,a=m.propagate(this.satrec,n).position||{x:0,y:0,z:0};return this.position=a,this.time=t,this},e.prototype.getStateVec=function(t){void 0===t&&(t=this.time);var n=e.calculateTimeVariables(t,this.satrec).m;return m.propagate(this.satrec,n)},e.prototype.getEci=function(t){void 0===t&&(t=this.time);var n=e.calculateTimeVariables(t,this.satrec).m;return m.propagate(this.satrec,n).position||{x:0,y:0,z:0}},e.prototype.getEcf=function(t){void 0===t&&(t=this.time);var n=e.calculateTimeVariables(t,this.satrec),a=n.m,o=n.gmst,r=m.propagate(this.satrec,a).position||{x:0,y:0,z:0};return f.eci2ecf(r,o)},e.prototype.getLla=function(t){void 0===t&&(t=this.time);var n=e.calculateTimeVariables(t,this.satrec),a=n.m,o=n.gmst,r=m.propagate(this.satrec,a).position||{x:0,y:0,z:0};return f.eci2lla(r,o)},e.prototype.getRae=function(t,n){void 0===n&&(n=this.time);var a=e.calculateTimeVariables(n,this.satrec),o=a.m,r=a.gmst,i=m.propagate(this.satrec,o).position||{x:0,y:0,z:0},s=f.eci2ecf(i,r);return f.ecf2rae({lat:t.lat,lon:t.lon,alt:t.alt},s)},e.prototype.getAzimuth=function(t,e){return void 0===e&&(e=this.time),this.getRae(t,e).az},e.prototype.getElevation=function(t,e){return void 0===e&&(e=this.time),this.getRae(t,e).el},e.prototype.getRange=function(t,e){return void 0===e&&(e=this.time),this.getRae(t,e).rng},e.calculateTimeVariables=function(t,e){var n=x.jday(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())+t.getUTCMilliseconds()*d;return{gmst:m.gstime(n),m:e?1440*(n-e.jdsatepoch):null,j:n}},e.checkSatrec=function(t){return!(isNaN(t.a)||isNaN(t.am)||isNaN(t.alta)||isNaN(t.em)||isNaN(t.mo)||isNaN(t.ecco)||isNaN(t.no))},e}(R),I=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),O=function(t){function e(e,n,a){var o=t.call(this,e,n)||this;return o.setLaunchDetails(a.launchDetails),o.setSpaceCraftDetails(a.spaceCraftDetails),o.setOperationsDetails(a.operationsDetails),o}return I(e,t),e.prototype.setLaunchDetails=function(t){t.launchDate&&(this.launchDate=t.launchDate),t.launchMass&&(this.launchMass=t.launchMass),t.launchSite&&(this.launchSite=t.launchSite),t.launchVehicle&&(this.launchVehicle=t.launchVehicle)},e.prototype.getLaunchDetails=function(){return{launchDate:this.launchDate,launchMass:this.launchMass,launchSite:this.launchSite,launchVehicle:this.launchVehicle}},e.prototype.setSpaceCraftDetails=function(t){t.lifetime&&(this.lifetime=t.lifetime),t.maneuver&&(this.maneuver=t.maneuver),t.manufacturer&&(this.manufacturer=t.manufacturer),t.motor&&(this.motor=t.motor),t.power&&(this.power=t.power),t.payload&&(this.payload=t.payload),t.purpose&&(this.purpose=t.purpose),t.shape&&(this.shape=t.shape),t.span&&(this.span=t.span),t.configuration&&(this.configuration=t.configuration),t.equipment&&(this.equipment=t.equipment),t.dryMass&&(this.dryMass=t.dryMass)},e.prototype.getSpaceCraftDetails=function(){return{lifetime:this.lifetime,maneuver:this.maneuver,manufacturer:this.manufacturer,motor:this.motor,power:this.power,payload:this.payload,purpose:this.purpose,shape:this.shape,span:this.span,configuration:this.configuration,equipment:this.equipment,dryMass:this.dryMass}},e.prototype.setOperationsDetails=function(t){t.user&&(this.user=t.user),t.mission&&(this.mission=t.mission),t.owner&&(this.owner=t.owner),t.country&&(this.country=t.country)},e.prototype.getOperationsDetails=function(){return{user:this.user,mission:this.mission,owner:this.owner,country:this.country}},e}(z),_=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();!function(t){t[t.OUT_OF_VIEW=-1]="OUT_OF_VIEW",t[t.ENTER=0]="ENTER",t[t.IN_VIEW=1]="IN_VIEW",t[t.EXIT=2]="EXIT"}(M||(M={}));var C=2*Math.PI,S=function(t){function e(e){var n=this;if(e.type)switch(e.type){case o.OPTICAL:case o.MECHANICAL:case o.PHASED_ARRAY_RADAR:case o.OBSERVER:case o.BISTATIC_RADIO_TELESCOPE:break;default:throw new Error("Invalid sensor type")}return(n=t.call(this,e)||this).validateInputData(e),n}return _(e,t),e.prototype.validateInputData=function(t){this.validateLla(t),this.validateFov(t)},e.prototype.validateFov=function(t){if(t.minAz>=0&&t.minAz<=360)this.minAz=t.minAz;else{if(void 0!==t.minAz)throw new Error("Invalid minimum azimuth - must be between 0 and 360");this.minAz=0}if(t.maxAz>=0&&t.maxAz<=360)this.maxAz=t.maxAz;else{if(void 0!==t.maxAz)throw new Error("Invalid maximum azimuth - must be between 0 and 360");this.maxAz=360}if(t.minEl>=0&&t.minEl<=90)this.minEl=t.minEl;else{if(void 0!==t.minEl)throw new Error("Invalid minimum elevation - must be between 0 and 90");this.minEl=0}if(t.maxEl>=0&&t.maxEl<=180)this.maxEl=t.maxEl;else{if(void 0!==t.maxEl)throw new Error("Invalid maximum elevation - must be between 0 and 180");this.maxEl=90}if(t.minRng>=0)this.minRng=t.minRng;else{if(void 0!==t.minRng)throw new Error("Invalid minimum range - must be greater than 0");this.minRng=0}if(t.maxRng>=0)this.maxRng=t.maxRng;else{if(void 0!==t.maxRng)throw new Error("Invalid maximum range - must be greater than 0");this.maxRng=5e4}},e.prototype.validateLla=function(t){if(!(t.lat>=-90&&t.lat<=90))throw new Error("Invalid latitude");if(this.lat=t.lat,!(t.lon>=-180&&t.lon<=180))throw new Error("Invalid longitude");if(this.lon=t.lon,!(t.alt>=0))throw new Error("Invalid altitude");this.alt=t.alt},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.getRae=function(t,e){return void 0===e&&(e=this.time),t.getRae(this,e)},e.prototype.isRaeInFov=function(t){if(t.el*u<this.minEl||t.el*u>this.maxEl)return!1;if(t.rng<this.minRng||t.rng>this.maxRng)return!1;if(this.minAz*u>this.maxAz){if(t.az*u<this.minAz&&t.az*u>this.maxAz)return!1}else if(t.az*u<this.minAz||t.az*u>this.maxAz)return!1;return!0},e.prototype.isSatInFov=function(t,e){return void 0===e&&(e=this.time),this.isRaeInFov(this.getRae(t,e))},e.prototype.calculatePasses=function(t,n,a){void 0===a&&(a=this.time);for(var o=!1,r=0,i=[],s=a.getTime(),c=0;c<t;c++){var l=new Date(s+1e3*c),u=this.getRae(n,l),h=360*u.az/C,d=360*u.el/C,m=this.isRaeInFov(u);if(0===c){var p=this.getRae(n,new Date(Date.now()-1e3));o=this.isRaeInFov(p)}var f=e.getPassType(m,o);if(r=Math.max(r,u.el),f===M.ENTER||f===M.EXIT){var g={type:f,time:l,az:h,el:d,rng:u.rng};f===M.EXIT&&(g.maxElPass=r),i.push(g),r=0}o=m}return i},e.getPassType=function(t,e){var n=M.OUT_OF_VIEW;return t&&!e?n=M.ENTER:!t&&e?n=M.EXIT:t&&e&&(n=M.IN_VIEW),n},e}(N),L=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),P=function(t){function e(e){var n=this;if(e.type&&e.type!==o.STAR)throw new Error("Invalid object type");return e.type=o.STAR,(n=t.call(this,e)||this).ra=e.ra,n.dec=e.dec,e.pname&&(n.pname=e.pname),e.bf&&(n.bf=e.bf),e.h&&(n.h=e.h),n}return L(e,t),e.prototype.getEci=function(t,n){void 0===t&&(t={lat:180*s,lon:0,alt:0}),void 0===n&&(n=this.time);var a=this.getRae(t,n),o=e.calculateTimeVariables(n).gmst;return f.ecf2eci(f.rae2ecf(a,{lat:0,lon:0,alt:0}),o)},e.prototype.getRae=function(t,e){void 0===t&&(t={lat:180*s,lon:0,alt:0}),void 0===e&&(e=this.time);var n=x.SunMath.getStarAzEl(e,t.lat*u,t.lon*u,this.ra,this.dec);return{az:n.az,el:n.el,rng:25e4}},e.calculateTimeVariables=function(t){var e=x.jday(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())+t.getUTCMilliseconds()*d;return{gmst:m.gstime(e),j:e}},e}(R)}},e={};function n(a){if(e[a])return e[a].exports;var o=e[a]={exports:{}};return t[a](o,o.exports,n),o.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(653)})()}));
2
+ !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,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{DetailedSat:()=>R,Sat:()=>z,Sensor:()=>O,Sgp4:()=>d,SpaceObjectType:()=>a,Star:()=>S,Tle:()=>A,Transforms:()=>m,Utils:()=>w});var n={};t.r(n),t.d(n,{SpaceObjectType:()=>a});var a,o=Math.PI,r=2*o,i=o/180,s=2/3,c=15e-13,l=360/r,u=864e5,h=1.15741e-8,d=function(){function t(){}return t.angle=function(e,n){var a=t.mag(e),o=t.mag(n);if(a*o>1e-8*1e-8){var r=t.dot(e,n)/(a*o);return Math.abs(r)>1&&(r=Number(t.sgn(r))),Math.acos(r)}return 999999.1},t.asinh=function(t){return Math.log(t+Math.sqrt(t*t+1))},t.createSatrec=function(e,n,a,r){void 0===a&&(a="wgs72"),void 0===r&&(r="i");var s,c={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},l=1440/(2*o);c.error=0,c.satnum=e.substring(2,7),c.epochyr=parseInt(e.substring(18,20)),c.epochdays=parseFloat(e.substring(20,32)),c.ndot=parseFloat(e.substring(33,43)),c.nddot=parseFloat("".concat(e.substring(44,45),".").concat(e.substring(45,50),"E").concat(e.substring(50,52))),c.bstar=parseFloat("".concat(e.substring(53,54),".").concat(e.substring(54,59),"E").concat(e.substring(59,61))),c.inclo=parseFloat(n.substring(8,16)),c.nodeo=parseFloat(n.substring(17,25)),c.ecco=parseFloat(".".concat(n.substring(26,33))),c.argpo=parseFloat(n.substring(34,42)),c.mo=parseFloat(n.substring(43,51)),c.no=parseFloat(n.substring(52,63)),c.no/=l,c.inclo*=i,c.nodeo*=i,c.argpo*=i,c.mo*=i,s=c.epochyr<57?c.epochyr+2e3:c.epochyr+1900;var u=t.days2mdhms(s,c.epochdays),h=u.mon,d=u.day,m=u.hr,p=u.min,f=u.sec,g=t.jday(s,h,d,m,p,f);return c.jdsatepoch=g.jd+g.jdFrac,t.sgp4init_(c,{whichconst:a,opsmode:r,satn:c.satnum,epoch:c.jdsatepoch-2433281.5,xbstar:c.bstar,xecco:c.ecco,xargpo:c.argpo,xinclo:c.inclo,xndot:c.ndot,xnddot:c.nddot,xmo:c.mo,xno:c.no,xnodeo:c.nodeo}),c},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.days2mdhms=function(t,e){for(var n=[31,t%4==0?29:28,31,30,31,30,31,31,30,31,30,31],a=Math.floor(e),o=1,r=0;a>r+n[o-1]&&o<12;)r+=n[o-1],o+=1;var i=o,s=a-r,c=24*(e-a),l=Math.floor(c);c=60*(c-l);var u=Math.floor(c);return{mon:i,day:s,hr:l,min:u,sec:60*(c-u)}},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},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*i/240%r)<0&&(n+=r),n},t.invjday=function(e,n){var a,o;Math.abs(n)>=1&&(e+=Math.floor(n),n-=Math.floor(n));var r=e-Math.floor(e)-.5;Math.abs(r)>1e-8&&(e-=r,n+=r);var i=e-2415019.5,s=i/365.25,c=1900+Math.floor(s);a=Math.floor(.25*(c-1901)),(o=Math.floor(i-(365*(c-1900)+a)))+n<1&&(c-=1,a=Math.floor(.25*(c-1901)),o=Math.floor(i-(365*(c-1900)+a)));var l=t.days2mdhms(c,o+n);return{year:c,mon:l.mon,day:l.day,hr:l.hr,min:l.min,sec:l.sec}},t.jday=function(t,e,n,a,o,r,i){void 0===e&&(e=0),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===i&&(i=0),t instanceof Date&&(e=t.getUTCMonth()+1,n=t.getUTCDate(),a=t.getUTCHours(),o=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds(),t=t.getUTCFullYear());var s=367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5,c=(i/1e3+r+60*o+3600*a)/86400;if(Math.abs(c)>1){var l=Math.floor(c);s+=l,c-=l}return{jd:s,jdFrac:c}},t.mag=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])},t.newtonnu=function(e,n){var a=999999.9,r=999999.9,i=1e-8;if(Math.abs(e)<i)r=n,a=n;else if(e<1-i){var s=Math.sqrt(1-e*e)*Math.sin(n)/(1+e*Math.cos(n)),c=(e+Math.cos(n))/(1+e*Math.cos(n));r=(a=Math.atan2(s,c))-e*Math.sin(a)}else e>1+i?e>1&&Math.abs(n)+1e-5<o-Math.acos(1/e)&&(s=Math.sqrt(e*e-1)*Math.sin(n)/(1+e*Math.cos(n)),a=t.asinh(s),r=e*t.sinh(a)-a):Math.abs(n)<168*o/180&&(r=(a=Math.tan(.5*n))+a*a*a/3);return e<1&&((r%=2*o)<0&&(r+=2*o),a%=2*o),{e0:a,m:r}},t.propagate=function(e,n){var a=e.xke,i=e.j2,l=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,f=h,g=e.t*e.t,M=m+e.nodecf*g,v=1-e.cc1*e.t,w=e.bstar*e.cc4*e.t,y=e.t2cof*g;if(1!==e.isimp){var x=e.omgcof*e.t,A=1+e.eta*Math.cos(h),E=x+e.xmcof*(A*A*A-e.delmo);f=h+E,p=d-E;var _=g*e.t,b=_*e.t;v=v-e.d2*g-e.d3*_-e.d4*b,w+=e.bstar*e.cc5*(Math.sin(f)-e.sinmao),y=y+e.t3cof*_+b*(e.t4cof+e.t*e.t5cof)}var N=e.no,z=e.ecco,T=e.inclo;if("d"===e.method){var R=e.t,D=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,R,e.gsto,e.xfact,e.xlamo,e.no,e.atime,z,p,T,e.xli,f,e.xni,M,N);z=D[0],p=D[1],T=D[2],f=D[3],M=D[4],N=D[5]}if(N<=0)return e.error=2,{position:!1,velocity:!1};var I=Math.pow(a/N,s)*v*v;if(N=a/Math.pow(I,1.5),(z-=w)>=1||z<-.001)return e.error=1,{position:!1,velocity:!1};z<1e-6&&(z=1e-6);var O=(f+=e.no*y)+p+M,C=z,S=T,L=p%=r,P=M%=r,j=f=((O%=r)-p-M)%r,U=Math.sin(T),F=Math.cos(T);if("d"===e.method){var Y={inclo:e.inclo,init:"n",ep:C,inclp:S,nodep:P,argpp:L,mp:j,opsmode:e.operationmode},k=t.dpper_(e,Y);if(C=k.ep,P=k.nodep,L=k.argpp,j=k.mp,(S=k.inclp)<0&&(S=-S,P+=o,L-=o),C<0||C>1)return e.error=3,{position:!1,velocity:!1}}"d"===e.method&&(U=Math.sin(S),F=Math.cos(S),e.aycof=-.5*l*U,Math.abs(F+1)>15e-13?e.xlcof=-.25*l*U*(3+5*F)/(1+F):e.xlcof=-.25*l*U*(3+5*F)/c);for(var q,H,B=C*Math.cos(L),V=1/(I*(1-C*C)),G=C*Math.sin(L)+V*e.aycof,J=(j+L+P+V*e.xlcof*B-P)%r,W=J,K=9999.9,Q=1;Math.abs(K)>=1e-12&&Q<=10;)H=Math.sin(W),K=(J-G*(q=Math.cos(W))+B*H-W)/(K=1-q*B-H*G),Math.abs(K)>=.95&&(K=K>0?.95:-.95),W+=K,Q+=1;var X=B*q+G*H,Z=B*H-G*q,$=B*B+G*G,tt=I*(1-$);if(tt<0)return e.error=4,{position:!1,velocity:!1};var et=I*(1-X),nt=Math.sqrt(I)*Z/et,at=Math.sqrt(tt)/et,ot=Math.sqrt(1-$),rt=I/et*(H-G-B*(V=Z/(1+ot))),it=I/et*(q-B+G*V),st=Math.atan2(rt,it),ct=(it+it)*rt,lt=1-2*rt*rt,ut=.5*i*(V=1/tt),ht=ut*V;if("d"===e.method){var dt=F*F;e.con41=3*dt-1,e.x1mth2=1-dt,e.x7thm1=7*dt-1}var mt=et*(1-1.5*ht*ot*e.con41)+.5*ut*e.x1mth2*lt;if(mt<1)return e.error=6,{position:!1,velocity:!1};st-=.25*ht*e.x7thm1*ct;var pt=P+1.5*ht*F*ct,ft=S+1.5*ht*F*U*lt,gt=nt-N*ut*e.x1mth2*ct/a,Mt=at+N*ut*(e.x1mth2*lt+1.5*e.con41)/a,vt=Math.sin(st),wt=Math.cos(st),yt=Math.sin(pt),xt=Math.cos(pt),At=Math.sin(ft),Et=Math.cos(ft),_t=-yt*Et,bt=xt*Et,Nt=_t*vt+xt*wt,zt=bt*vt+yt*wt,Tt=At*vt,Rt=_t*wt-xt*vt,Dt=bt*wt-yt*vt,It=At*wt;return{position:{x:mt*Nt*e.radiusearthkm,y:mt*zt*e.radiusearthkm,z:mt*Tt*e.radiusearthkm},velocity:{x:(gt*Nt+Mt*Rt)*u,y:(gt*zt+Mt*Dt)*u,z:(gt*Tt+Mt*It)*u}}},t.rv2coe=function(e,n,a){var i,s,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,E=[0,0,0],_=[0,0,0],b=.5*o,N=1e-8,z=999999.1,T=t.mag(e),R=t.mag(n),D=t.cross(e,n),I=t.mag(D);if(I>N){E[0]=-D[1],E[1]=D[0],E[2]=0,v=t.mag(E);var O=R*R-a/T;for(M=t.dot(e,n),x=0;x<=2;x++)_[x]=(O*e[x]-M*n[x])/a;if(c=t.mag(_),y=R*R*.5-a/T,s=Math.abs(y)>N?-a/(2*y):999999.9,i=I*I/a,w=D[2]/I,l=Math.acos(w),A=1,c<N?A=l<N||Math.abs(l-o)<N?2:3:(l<N||Math.abs(l-o)<N)&&(A=4),v>N){var C=E[0]/v;Math.abs(C)>1&&(C=t.sgn(C)),u=Math.acos(C),E[1]<0&&(u=r-u)}else u=z;1===A?(h=t.angle(E,_),_[2]<0&&(h=r-h)):h=z,1===A||4===A?(d=t.angle(_,e),M<0&&(d=r-d)):d=z,3===A?(p=t.angle(E,e),e[2]<0&&(p=r-p),m=p):p=z,c>N&&4===A?(C=_[0]/c,Math.abs(C)>1&&(C=t.sgn(C)),g=Math.acos(C),_[1]<0&&(g=r-g),l>b&&(g=r-g)):g=z,T>N&&2===A?(C=e[0]/T,Math.abs(C)>1&&(C=t.sgn(C)),f=Math.acos(C),e[1]<0&&(f=r-f),l>b&&(f=r-f),m=f):f=z,1!==A&&4!==A||(m=t.newtonnu(c,d).m)}else i=z,s=z,c=z,l=z,u=z,h=z,d=z,m=z,p=z,f=z,g=z;return{p:i,a:s,ecc:c,incl:l,omega:u,argp:h,nu:d,m,arglat:p,truelon:f,lonper:g}},t.sgn=function(t){return t<0?-1:1},t.sinh=function(t){return(Math.exp(t)-Math.exp(-t))/2},t.dpper_=function(t,e){var n=t.e3,a=t.ee2,i=t.peo,s=t.pgho,c=t.pho,l=t.PInco,u=t.plo,h=t.se2,d=t.se3,m=t.sgh2,p=t.sgh3,f=t.sgh4,g=t.sh2,M=t.sh3,v=t.si2,w=t.si3,y=t.sl2,x=t.sl3,A=t.sl4,E=t.t,_=t.xgh2,b=t.xgh3,N=t.xgh4,z=t.xh2,T=t.xh3,R=t.xi2,D=t.xi3,I=t.xl2,O=t.xl3,C=t.xl4,S=t.zmol,L=t.zmos,P=e.ep,j=e.inclp,U=e.nodep,F=e.argpp,Y=e.mp,k=e.opsmode,q=void 0===k?"i":k,H=e.init,B=L+119459e-10*E;"y"===H&&(B=L);var V=B+.0335*Math.sin(B),G=Math.sin(V),J=.5*G*G-.25,W=-.5*G*Math.cos(V),K=h*J+d*W,Q=v*J+w*W,X=y*J+x*W+A*G,Z=m*J+p*W+f*G,$=g*J+M*W;B=S+.00015835218*E,"y"===H&&(B=S),V=B+.1098*Math.sin(B);var tt=K+(a*(J=.5*(G=Math.sin(V))*G-.25)+n*(W=-.5*G*Math.cos(V))),et=Q+(R*J+D*W),nt=X+(I*J+O*W+C*G),at=Z+(_*J+b*W+N*G),ot=$+(z*J+T*W);if("n"===H){nt-=u,at-=s,ot-=c,j+=et-=l,P+=tt-=i;var rt=Math.sin(j),it=Math.cos(j);if(j>=.2)F+=at-=it*(ot/=rt),U+=ot,Y+=nt;else{var st=Math.sin(U),ct=Math.cos(U),lt=rt*st,ut=rt*ct;lt+=ot*ct+et*it*st,ut+=-ot*st+et*it*ct,(U%=r)<0&&"a"===q&&(U+=r);var ht=Y+F+it*U;ht+=nt+at-et*U*rt;var dt=U;(U=Math.atan2(lt,ut))<0&&"a"===q&&(U+=r),Math.abs(dt-U)>o&&(U<dt?U+=r:U-=r),F=ht-(Y+=nt)-it*U}}return{ep:P,inclp:j,nodep:U,argpp:F,mp:Y}},t.dscom_=function(t){var e,n,a,o,r,i,s,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,E,_,b,N,z,T,R,D,I,O,C,S,L,P,j,U,F=t.epoch,Y=t.ep,k=t.argpp,q=t.tc,H=t.inclp,B=t.nodep,V=t.np,G=.01675,J=.0549,W=2*Math.PI,K=V,Q=Y,X=Math.sin(B),Z=Math.cos(B),$=Math.sin(k),tt=Math.cos(k),et=Math.sin(H),nt=Math.cos(H),at=Q*Q,ot=1-at,rt=Math.sqrt(ot),it=F+18261.5+q/1440,st=(4.523602-.00092422029*it)%W,ct=Math.sin(st),lt=Math.cos(st),ut=.91375164-.03568096*lt,ht=Math.sqrt(1-ut*ut),dt=.089683511*ct/ht,mt=Math.sqrt(1-dt*dt),pt=5.8351514+.001944368*it,ft=.39785416*ct/ht,gt=mt*lt+.91744867*dt*ct;ft=Math.atan2(ft,gt),ft+=pt-st;for(var Mt=Math.cos(ft),vt=Math.sin(ft),wt=.1945905,yt=-.98088458,xt=.91744867,At=.39785416,Et=Z,_t=X,bt=29864797e-13,Nt=1/K,zt=1;zt<=2;zt++){var Tt=wt*Et+yt*xt*_t,Rt=-yt*Et+wt*xt*_t,Dt=-wt*_t+yt*xt*Et,It=yt*At,Ot=yt*_t+wt*xt*Et,Ct=wt*At,St=nt*Dt+et*It,Lt=nt*Ot+et*Ct,Pt=-et*Dt+nt*It,jt=-et*Ot+nt*Ct,Ut=Tt*tt+St*$,Ft=Rt*tt+Lt*$,Yt=-Tt*$+St*tt,kt=-Rt*$+Lt*tt,qt=Pt*$,Ht=jt*$,Bt=Pt*tt,Vt=jt*tt;T=-6*Tt*Pt+at*(-24*Ut*Bt-6*Yt*qt),R=-6*(Tt*jt+Rt*Pt)+at*(-24*(Ft*Bt+Ut*Vt)+-6*(Yt*Ht+kt*qt)),D=-6*Rt*jt+at*(-24*Ft*Vt-6*kt*Ht),O=6*St*Pt+at*(24*Ut*qt-6*Yt*Bt),C=6*(Lt*Pt+St*jt)+at*(24*(Ft*qt+Ut*Ht)-6*(kt*Bt+Yt*Vt)),S=6*Lt*jt+at*(24*Ft*Ht-6*kt*Vt),z=(z=3*(Tt*Tt+St*St)+(P=12*Ut*Ut-3*Yt*Yt)*at)+z+ot*P,I=(I=6*(Tt*Rt+St*Lt)+(j=24*Ut*Ft-6*Yt*kt)*at)+I+ot*j,L=(L=3*(Rt*Rt+Lt*Lt)+(U=12*Ft*Ft-3*kt*kt)*at)+L+ot*U,n=-.5*(a=bt*Nt)/rt,e=-15*Q*(o=a*rt),r=Ut*Yt+Ft*kt,i=Ft*Yt+Ut*kt,s=Ft*kt-Ut*Yt,1===zt&&(c=e,l=n,u=a,h=o,d=r,m=i,p=s,f=z,w=I,E=L,g=T,M=R,v=D,y=O,x=C,A=S,_=P,b=j,N=U,wt=Mt,yt=vt,xt=ut,At=ht,Et=mt*Z+dt*X,_t=X*mt-Z*dt,bt=4.7968065e-7)}return{snodm:X,cnodm:Z,sinim:et,cosim:nt,sinomm:$,cosomm:tt,day:it,e3:2*e*s,ee2:2*e*i,em:Q,emsq:at,gam:pt,peo:0,pgho:0,pho:0,PInco:0,plo:0,rtemsq:rt,se2:2*c*m,se3:2*c*p,sgh2:2*h*b,sgh3:2*h*(N-_),sgh4:-18*h*G,sh2:-2*l*x,sh3:-2*l*(A-y),si2:2*l*M,si3:2*l*(v-g),sl2:-2*u*w,sl3:-2*u*(E-f),sl4:-2*u*(-21-9*at)*G,s1:e,s2:n,s3:a,s4:o,s5:r,s6:i,s7:s,ss1:c,ss2:l,ss3:u,ss4:h,ss5:d,ss6:m,ss7:p,sz1:f,sz2:w,sz3:E,sz11:g,sz12:M,sz13:v,sz21:y,sz22:x,sz23:A,sz31:_,sz32:b,sz33:N,xgh2:2*o*j,xgh3:2*o*(U-P),xgh4:-18*o*J,xh2:-2*n*C,xh3:-2*n*(S-O),xi2:2*n*R,xi3:2*n*(D-T),xl2:-2*a*I,xl3:-2*a*(L-z),xl4:-2*a*(-21-9*at)*J,nm:K,z1:z,z2:I,z3:L,z11:T,z12:R,z13:D,z21:O,z22:C,z23:S,z31:P,z32:j,z33:U,zmol:(.2299715*it-pt+4.7199672)%W,zmos:(6.2565837+.017201977*it)%W}},t.dsinit_=function(t){var e=t.xke,n=t.cosim,a=t.argpo,i=t.s1,s=t.s2,c=t.s3,l=t.s4,u=t.s5,h=t.sinim,d=t.ss1,m=t.ss2,p=t.ss3,f=t.ss4,g=t.ss5,M=t.sz1,v=t.sz3,w=t.sz11,y=t.sz13,x=t.sz21,A=t.sz23,E=t.sz31,_=t.sz33,b=t.t,N=t.tc,z=t.gsto,T=t.mo,R=t.mdot,D=t.no,I=t.nodeo,O=t.nodedot,C=t.xPIdot,S=t.z1,L=t.z3,P=t.z11,j=t.z13,U=t.z21,F=t.z23,Y=t.z31,k=t.z33,q=t.ecco,H=t.eccsq,B=t.emsq,V=t.em,G=t.argpm,J=t.inclm,W=t.mm,K=t.nm,Q=t.nodem,X=t.irez,Z=t.atime,$=t.d2201,tt=t.d2211,et=t.d3210,nt=t.d3222,at=t.d4410,ot=t.d4422,rt=t.d5220,it=t.d5232,st=t.d5421,ct=t.d5433,lt=t.dedt,ut=t.didt,ht=t.dmdt,dt=t.dnodt,mt=t.domdt,pt=t.del1,ft=t.del2,gt=t.del3,Mt=t.xfact,vt=t.xlamo,wt=t.xli,yt=t.xni,xt=.0043752690880113,At=.00015835218,Et=119459e-10;X=0,K<.0052359877&&K>.0034906585&&(X=1),K>=.00826&&K<=.00924&&V>=.5&&(X=2);var _t=-Et*m*(x+A);(J<.052359877||J>o-.052359877)&&(_t=0),0!==h&&(_t/=h);var bt=-At*s*(U+F);(J<.052359877||J>o-.052359877)&&(bt=0),mt=f*Et*(E+_-6)-n*_t+l*At*(Y+k-6),dt=_t,0!==h&&(mt-=n/h*bt,dt+=bt/h);var Nt=(z+N*xt)%r;if(V+=(lt=d*Et*g+i*At*u)*b,J+=(ut=m*Et*(w+y)+s*At*(P+j))*b,G+=mt*b,Q+=dt*b,W+=(ht=-Et*p*(M+v-14-6*B)-At*c*(S+L-14-6*B))*b,0!==X){var zt=Math.pow(K/e,2/3);if(2===X){var Tt=n*n,Rt=V,Dt=B,It=(V=q)*(B=H),Ot=void 0,Ct=void 0,St=void 0,Lt=void 0,Pt=void 0,jt=void 0,Ut=void 0,Ft=void 0,Yt=void 0;V<=.65?(Ot=3.616-13.247*V+16.29*B,Ct=117.39*V-19.302-228.419*B+156.591*It,St=109.7927*V-18.9068-214.6334*B+146.5816*It,Lt=242.694*V-41.122-471.094*B+313.953*It,Pt=841.88*V-146.407-1629.014*B+1083.435*It,jt=3017.977*V-532.114-5740.032*B+3708.276*It):(Ot=331.819*V-72.099-508.738*B+266.724*It,Ct=1582.851*V-346.844-2415.925*B+1246.113*It,St=1554.908*V-342.585-2366.899*B+1215.972*It,Lt=4758.686*V-1052.797-7193.992*B+3651.957*It,Pt=16178.11*V-3581.69-24462.77*B+12422.52*It,jt=V>.715?29936.92*V-5149.66-54087.36*B+31324.56*It:1464.74-4664.75*V+3763.64*B),V<.7?(Yt=4988.61*V-919.2277-9064.77*B+5542.21*It,Ut=4568.6173*V-822.71072-8491.4146*B+5337.524*It,Ft=4690.25*V-853.666-8624.77*B+5341.4*It):(Yt=161616.52*V-37995.78-229838.2*B+109377.94*It,Ut=218913.95*V-51752.104-309468.16*B+146349.42*It,Ft=170470.89*V-40023.88-242699.48*B+115605.82*It);var kt=h*h,qt=K*K*3*(zt*zt),Ht=17891679e-13*qt;$=Ht*(Bt=.75*(1+2*n+Tt))*(-.306-.44*(V-.64)),tt=Ht*(1.5*kt)*Ot,et=(Ht=3.7393792e-7*(qt*=zt))*(1.875*h*(1-2*n-3*Tt))*Ct,nt=Ht*(-1.875*h*(1+2*n-3*Tt))*St,at=(Ht=2*(qt*=zt)*7.3636953e-9)*(35*kt*Bt)*Lt,ot=Ht*(39.375*kt*kt)*Pt,rt=(Ht=1.1428639e-7*(qt*=zt))*(9.84375*h*(kt*(1-2*n-5*Tt)+.33333333*(4*n-2+6*Tt)))*jt,it=Ht*(h*(4.92187512*kt*(-2-4*n+10*Tt)+6.56250012*(1+2*n-3*Tt)))*Ft,st=(Ht=2*qt*2.1765803e-9)*(29.53125*h*(2-8*n+Tt*(8*n-12+10*Tt)))*Ut,ct=Ht*(29.53125*h*(-2-8*n+Tt*(12+8*n-10*Tt)))*Yt,vt=(T+I+I-(Nt+Nt))%r,Mt=R+ht+2*(O+dt-xt)-D,V=Rt,B=Dt}if(1===X){var Bt,Vt=1+n;ft=2*(pt=3*K*K*zt*zt)*(Bt=.75*(1+n)*(1+n))*(1+B*(.8125*B-2.5))*17891679e-13,gt=3*pt*(Vt*=1.875*Vt*Vt)*(1+B*(6.60937*B-6))*2.2123015e-7*zt,pt=pt*(.9375*h*h*(1+3*n)-.75*(1+n))*(Ct=1+2*B)*21460748e-13*zt,vt=(T+I+a-Nt)%r,Mt=R+C+ht+mt+dt-(D+xt)}wt=vt,yt=D,Z=0,K=D+0}return{em:V,argpm:G,inclm:J,mm:W,nm:K,nodem:Q,irez:X,atime:Z,d2201:$,d2211:tt,d3210:et,d3222:nt,d4410:at,d4422:ot,d5220:rt,d5232:it,d5421:st,d5433:ct,dedt:lt,didt:ut,dmdt:ht,dndt:0,dnodt:dt,domdt:mt,del1:pt,del2:ft,del3:gt,xfact:Mt,xlamo:vt,xli:wt,xni:yt}},t.dspace_=function(t,e,n,a,o,i,s,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,E,_,b,N,z,T,R,D,I,O,C,S,L,P){var j=.13130908,U=2.8843198,F=.37448087,Y=5.7686396,k=.95240898,q=1.8014998,H=1.050833,B=4.4108898,V=259200,G=0,J=(_+.0043752690880113*E)%r;if(R+=d*A,I+=g*A,D+=w*A,L+=v*A,C+=M*A,0!==t){(0===T||A*T<=0||Math.abs(A)<Math.abs(T))&&(T=0,S=z,O=N);var W;W=A>0?720:-720;for(var K=void 0,Q=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(O-j)+p*Math.sin(2*(O-U))+f*Math.sin(3*(O-F)),Z=S+b,$=m*Math.cos(O-j)+2*p*Math.cos(2*(O-U))+3*f*Math.cos(3*(O-F)),$*=Z):(X=(et=y+x*T)+et,Q=O+O,tt=e*Math.sin(X+O-Y)+n*Math.sin(O-Y)+a*Math.sin(et+O-k)+o*Math.sin(-et+O-k)+i*Math.sin(X+Q-q)+s*Math.sin(Q-q)+c*Math.sin(et+O-H)+l*Math.sin(-et+O-H)+u*Math.sin(et+Q-B)+h*Math.sin(-et+Q-B),Z=S+b,$=e*Math.cos(X+O-Y)+n*Math.cos(O-Y)+a*Math.cos(et+O-k)+o*Math.cos(-et+O-k)+c*Math.cos(et+O-H)+l*Math.cos(-et+O-H)+2*(i*Math.cos(X+Q-q)+s*Math.cos(Q-q)+u*Math.cos(et+Q-B)+h*Math.cos(-et+Q-B)),$*=Z),Math.abs(A-T)>=720?nt=381:(K=A-T,nt=0),381===nt&&(O+=Z*W+tt*V,S+=tt*W+$*V,T+=W);P=S+tt*K+$*K*K*.5;var at=O+Z*K+tt*K*K*.5;1!==t?(C=at-2*L+2*J,G=P-z):(C=at-L-D+J,G=P-z),P=z+G}return[R,D,I,C,L,P]},t.getgravconst_=function(t){var e,n,a,o,r,i,s,c;switch(t){case"wgs72old":r=398600.79964,i=6378.135,s=1/(c=.0743669161),o=-165597e-11,a=(n=-253881e-11)/(e=.001082616);break;case"wgs72":r=398600.8,i=6378.135,s=1/(c=60/Math.sqrt(i*i*i/r)),o=-165597e-11,a=(n=-253881e-11)/(e=.001082616);break;case"wgs84":r=398600.5,i=6378.137,s=1/(c=60/Math.sqrt(i*i*i/r)),o=-161098761e-14,a=(n=-253215306e-14)/(e=.00108262998905);break;default:throw new Error("unknown gravity option ".concat(t))}return{tumin:s,mus:r,radiusearthkm:i,xke:c,j2:e,j3:n,j4:o,j3oj2:a}},t.initl_=function(e){var n=e.opsmode,a=e.ecco,o=e.epoch,r=e.inclo,i=e.xke,s=e.j2,c=e.no,l=2*Math.PI,u=2/3,h=a*a,d=1-h,m=Math.sqrt(d),p=Math.cos(r),f=p*p,g=Math.pow(i/c,u),M=.75*s*(3*f-1)/(m*d),v=M/(g*g),w=g*(1-v*v-v*(1/3+134*v*v/81));c/=1+(v=M/(w*w));var y,x=Math.pow(i/c,u),A=Math.sin(r),E=x*d,_=1-5*f,b=-_-f-f,N=1/x,z=E*E,T=x*(1-a);if("a"===n){var R=o-7305,D=Math.floor(R+1e-8),I=.017202791694070362;(y=(1.7321343856509375+I*D+(I+l)*(R-D)+R*R*5075514194322695e-30)%l)<0&&(y+=l)}else y=t.gstime(o+2433281.5);return{no:c,method:"n",ainv:N,ao:x,con41:b,con42:_,cosio:p,cosio2:f,eccsq:h,omeosq:d,posq:z,rp:T,rteosq:m,sinio:A,gsto:y}},t.sgp4init_=function(e,n){var a=n.whichconst,o=void 0===a?"wgs72":a,i=n.opsmode,l=void 0===i?"i":i,u=n.satn,h=void 0===u?e.satnum:u,d=n.epoch,m=n.xbstar,p=n.xecco,f=n.xargpo,g=n.xinclo,M=n.xndot,v=n.xnddot,w=n.xmo,y=n.xno,x=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 A=t.getgravconst_(o);e.tumin=A.tumin,e.mus=A.mus,e.radiusearthkm=A.radiusearthkm,e.xke=A.xke,e.j2=A.j2,e.j3=A.j3,e.j4=A.j4,e.j3oj2=A.j3oj2;var E=A.j2,_=A.j4,b=A.xke,N=A.j3oj2;e.error=0,e.operationmode=l;var z=h.split("")[0].toLowerCase();isNaN(parseInt(z))?e.satnum=parseInt(z.charCodeAt(0)-96+9+e.satnum.slice(1,5)).toString():e.satnum=h,e.bstar=m,e.ndot=M,e.nddot=v,e.ecco=p,e.argpo=f,e.inclo=g,e.mo=w,e.no=y,e.nodeo=x;var T=78/e.radiusearthkm+1,R=42/e.radiusearthkm,D=R*R*R*R;e.init="y",e.t=0;var I={ecco:e.ecco,epoch:d,inclo:e.inclo,no:e.no,method:e.method,opsmode:e.operationmode,xke:e.xke,j2:e.j2},O=t.initl_(I),C=O.ao,S=O.con42,L=O.cosio,P=O.cosio2,j=O.eccsq,U=O.omeosq,F=O.posq,Y=O.rp,k=O.rteosq,q=O.sinio;if(e.no=O.no,e.con41=O.con41,e.gsto=O.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,U>=0||e.no>=0){e.isimp=0,Y<220/e.radiusearthkm+1&&(e.isimp=1);var H=T,B=D,V=(Y-1)*e.radiusearthkm;if(V<156){H=V-78,V<98&&(H=20);var G=(120-H)/e.radiusearthkm;B=G*G*G*G,H=H/e.radiusearthkm+1}var J=1/F,W=1/(C-H);e.eta=C*e.ecco*W;var K=e.eta*e.eta,Q=e.ecco*e.eta,X=Math.abs(1-K),Z=B*Math.pow(W,4),$=Z/Math.pow(X,3.5),tt=$*e.no*(C*(1+1.5*K+Q*(4+K))+.375*E*W/X*e.con41*(8+3*K*(8+K)));e.cc1=e.bstar*tt;var et=0;e.ecco>1e-4&&(et=-2*Z*W*N*e.no*q/e.ecco),e.x1mth2=1-P,e.cc4=2*e.no*$*C*U*(e.eta*(2+.5*K)+e.ecco*(.5+2*K)-E*W/(C*X)*(-3*e.con41*(1-2*Q+K*(1.5-.5*Q))+.75*e.x1mth2*(2*K-Q*(1+K))*Math.cos(2*e.argpo))),e.cc5=2*$*C*U*(1+2.75*(K+Q)+Q*K);var nt=P*P,at=1.5*E*J*e.no,ot=.5*at*E*J,rt=-.46875*_*J*J*e.no;e.mdot=e.no+.5*at*k*e.con41+.0625*ot*k*(13-78*P+137*nt),e.argpdot=-.5*at*S+.0625*ot*(7-114*P+395*nt)+rt*(3-36*P+49*nt);var it=-at*L;e.nodedot=it+(.5*ot*(4-19*P)+2*rt*(3-7*P))*L;var st=e.argpdot+e.nodedot;e.omgcof=e.bstar*et*Math.cos(e.argpo),e.xmcof=0,e.ecco>1e-4&&(e.xmcof=-s*Z*e.bstar/Q),e.nodecf=3.5*U*it*e.cc1,e.t2cof=1.5*e.cc1,Math.abs(L+1)>15e-13?e.xlcof=-.25*N*q*(3+5*L)/(1+L):e.xlcof=-.25*N*q*(3+5*L)/c,e.aycof=-.5*N*q;var ct=1+e.eta*Math.cos(e.mo);if(e.delmo=ct*ct*ct,e.sinmao=Math.sin(e.mo),e.x7thm1=7*P-1,r/e.no>=225){e.method="d",e.isimp=1;var lt=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,ft=ht.emsq,gt=ht.s1,Mt=ht.s2,vt=ht.s3,wt=ht.s4,yt=ht.s5,xt=ht.ss1,At=ht.ss2,Et=ht.ss3,_t=ht.ss4,bt=ht.ss5,Nt=ht.sz1,zt=ht.sz3,Tt=ht.sz11,Rt=ht.sz13,Dt=ht.sz21,It=ht.sz23,Ot=ht.sz31,Ct=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 St=ht.nm,Lt=ht.z1,Pt=ht.z3,jt=ht.z11,Ut=ht.z13,Ft=ht.z21,Yt=ht.z23,kt=ht.z31,qt=ht.z33,Ht={inclo:lt,init:e.init,ep:e.ecco,inclp:e.inclo,nodep:e.nodeo,argpp:e.argpo,mp:e.mo,opsmode:e.operationmode},Bt=t.dpper_(e,Ht);e.ecco=Bt.ep,e.inclo=Bt.inclp,e.nodeo=Bt.nodep,e.argpo=Bt.argpp,e.mo=Bt.mp;var Vt={xke:b,cosim:mt,emsq:ft,argpo:e.argpo,s1:gt,s2:Mt,s3:vt,s4:wt,s5:yt,sinim:dt,ss1:xt,ss2:At,ss3:Et,ss4:_t,ss5:bt,sz1:Nt,sz3:zt,sz11:Tt,sz13:Rt,sz21:Dt,sz23:It,sz31:Ot,sz33:Ct,t:e.t,tc:0,gsto:e.gsto,mo:e.mo,mdot:e.mdot,no:e.no,nodeo:e.nodeo,nodedot:e.nodedot,xPIdot:st,z1:Lt,z3:Pt,z11:jt,z13:Ut,z21:Ft,z23:Yt,z31:kt,z33:qt,ecco:e.ecco,eccsq:j,em:pt,argpm:0,inclm:lt,mm:0,nm:St,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_(Vt);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*C*W*Jt;var Wt=e.d2*W*e.cc1/3;e.d3=(17*C+H)*Wt,e.d4=.5*Wt*C*W*(221*C+31*H)*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}(),m=function(){function t(){}return t.getDegLat=function(e){if(e<-o/2||e>o/2)throw new RangeError("Latitude radians must be in range [-PI/2; PI/2].");return t.rad2deg(e)},t.getDegLon=function(e){if(e<-o||e>o)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/o},t.deg2rad=function(t){return t*o/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,a=Math.sqrt(t.x*t.x+t.y*t.y),i=(n-6356.7523142)/n,s=2*i-i*i,c=Math.atan2(t.y,t.x)-e;c<-o;)c+=r;for(;c>o;)c-=r;for(var l,u=0,h=Math.atan2(t.z,Math.sqrt(t.x*t.x+t.y*t.y));u<20;)l=1/Math.sqrt(1-s*(Math.sin(h)*Math.sin(h))),h=Math.atan2(t.z+n*l*s*Math.sin(h),a),u+=1;return{lon:c,lat:h,alt:a/Math.cos(h)-n*l}},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,o=6378.137,r=(o-6356.7523142)/o,i=2*r-r*r,s=o/Math.sqrt(1-i*(Math.sin(n)*Math.sin(n)));return{x:(s+a)*Math.cos(n)*Math.cos(e),y:(s+a)*Math.cos(n)*Math.sin(e),z:(s*(1-i)+a)*Math.sin(n)}},t.lla2sez=function(e,n){var a=e.lon,o=e.lat,r=t.lla2ecf(e),i=n.x-r.x,s=n.y-r.y,c=n.z-r.z;return{s:Math.sin(o)*Math.cos(a)*i+Math.sin(o)*Math.sin(a)*s-Math.cos(o)*c,e:-Math.sin(a)*i+Math.cos(a)*s,z:Math.cos(o)*Math.cos(a)*i+Math.cos(o)*Math.sin(a)*s+Math.sin(o)*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),o=t.rae2sez(e),r=Math.sin(n.lat),i=Math.sin(n.lon),s=Math.cos(n.lat),c=Math.cos(n.lon);return{x:r*c*o.s+-i*o.e+s*c*o.z+a.x,y:r*i*o.s+c*o.e+s*i*o.z+a.y,z:-s*o.s+r*o.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)+o,el:n}},t.lla2ecef=function(t){var e=t.lat,n=t.lon,a=t.alt,o=6378.137,r=Math.sqrt(1-Math.pow(6356.752314245,2)/Math.pow(o,2)),i=o/Math.sqrt(1-Math.pow(r,2)*Math.pow(Math.sin(e),2));return{x:(i+a)*Math.cos(e)*Math.cos(n),y:(i+a)*Math.cos(e)*Math.sin(n),z:(i*(1-Math.pow(r,2))+a)*Math.sin(e)}},t.ecf2enu=function(t,e){var n=e.lat,a=e.lon,o=t.x,r=t.y,i=t.z;return{x:-Math.sin(a)*o+Math.cos(a)*r,y:-Math.sin(n)*Math.cos(a)*o-Math.sin(n)*Math.sin(a)*r+Math.cos(n)*i,z:Math.cos(n)*Math.cos(a)*o+Math.cos(n)*Math.sin(a)*r+Math.sin(n)*i}},t.rae2enu=function(t){return{x:t.rng*Math.cos(t.el)*Math.sin(t.az),y:t.rng*Math.cos(t.el)*Math.cos(t.az),z:t.rng*Math.sin(t.el)}},t.enu2rf=function(t,e,n){var a=t.x,o=t.y,r=t.z;return{x:Math.cos(n)*Math.cos(e)*a-Math.sin(e)*o+Math.sin(n)*Math.cos(e)*r,y:Math.cos(n)*Math.sin(e)*a+Math.cos(e)*o+Math.sin(n)*Math.sin(e)*r,z:-Math.sin(n)*a+Math.cos(n)*r}},t.azel2uv=function(t,e,n){if(t>n&&t<n)throw new RangeError("Azimuth is out of bounds: ".concat(t));if(e>n&&e<n)throw new RangeError("Elevation is out of bounds: ".concat(e));var a=t/(n*l)*90,o=e/(n*l)*90,r=Math.sin(a),i=-Math.sin(o);return{u:r,v:i=Object.is(i,-0)?0:i}},t.uv2azel=function(t,e,n){if(t>1||t<-1)throw new RangeError("u is out of bounds: ".concat(t));if(e>1||e<-1)throw new RangeError("v is out of bounds: ".concat(e));var a=Math.asin(t),o=Math.asin(e);return{az:a/90*(n*l),el:o/90*(n*l)}},t.rae2ruv=function(t,e,n){var a=this.rae2raeOffBoresight(t,e,n),o=a.az,r=a.el,i=this.azel2uv(o,r,e.coneHalfAngle),s=i.u,c=i.v;return{rng:t.rng,u:s,v:c}},t.rae2raeOffBoresight=function(t,e,n){return t.az=t.az>n*i?t.az-r:t.az,{az:t.az-e.boresight.az,el:t.el-e.boresight.el}},t}();!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.PAYLOAD=1]="PAYLOAD",t[t.ROCKET_BODY=2]="ROCKET_BODY",t[t.DEBRIS=3]="DEBRIS",t[t.SPECIAL=4]="SPECIAL",t[t.RADAR_MEASUREMENT=5]="RADAR_MEASUREMENT",t[t.RADAR_TRACK=6]="RADAR_TRACK",t[t.RADAR_OBJECT=7]="RADAR_OBJECT",t[t.BALLISTIC_MISSILE=8]="BALLISTIC_MISSILE",t[t.STAR=9]="STAR",t[t.INTERGOVERNMENTAL_ORGANIZATION=10]="INTERGOVERNMENTAL_ORGANIZATION",t[t.SUBORBITAL_PAYLOAD_OPERATOR=11]="SUBORBITAL_PAYLOAD_OPERATOR",t[t.PAYLOAD_OWNER=12]="PAYLOAD_OWNER",t[t.METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER=13]="METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER",t[t.PAYLOAD_MANUFACTURER=14]="PAYLOAD_MANUFACTURER",t[t.LAUNCH_AGENCY=15]="LAUNCH_AGENCY",t[t.LAUNCH_SITE=16]="LAUNCH_SITE",t[t.LAUNCH_POSITION=17]="LAUNCH_POSITION",t[t.LAUNCH_FACILITY=18]="LAUNCH_FACILITY",t[t.CONTROL_FACILITY=19]="CONTROL_FACILITY",t[t.GROUND_SENSOR_STATION=20]="GROUND_SENSOR_STATION",t[t.OPTICAL=21]="OPTICAL",t[t.MECHANICAL=22]="MECHANICAL",t[t.PHASED_ARRAY_RADAR=23]="PHASED_ARRAY_RADAR",t[t.OBSERVER=24]="OBSERVER",t[t.BISTATIC_RADIO_TELESCOPE=25]="BISTATIC_RADIO_TELESCOPE",t[t.COUNTRY=26]="COUNTRY",t[t.LAUNCH_VEHICLE_MANUFACTURER=27]="LAUNCH_VEHICLE_MANUFACTURER",t[t.ENGINE_MANUFACTURER=28]="ENGINE_MANUFACTURER"}(a||(a={}));var p,f,g=2*Math.PI,M=function(){function t(){}return t.approxTransit=function(e,n,a){return t.J0_+(e+n)/g+a},t.astroRefraction=function(t){return t<0&&(t=0),2967e-7/Math.tan(t+.00312536/(t+.08901179))},t.azimuth=function(t,e,n){return Math.PI+Math.atan2(Math.sin(t),Math.cos(t)*Math.sin(e)-Math.tan(n)*Math.cos(e))},t.date2jSince2000=function(e){return e.getTime()/u+t.J1970_-t.J2000_},t.declination=function(e,n){return Math.asin(Math.sin(n)*Math.cos(t.e_)+Math.cos(n)*Math.sin(t.e_)*Math.sin(e))},t.eclipticLatitude=function(t){var e=g/360,n=t-.00569-.00478*Math.sin(e*t);return g*(n+3e-4*Math.sin(2*e*n))},t.eclipticLongitude=function(t){return t+i*(1.9148*Math.sin(t)+.02*Math.sin(2*t)+3e-4*Math.sin(3*t))+102.9372*i+Math.PI},t.elevation=function(t,e,n){return Math.asin(Math.sin(e)*Math.sin(n)+Math.cos(e)*Math.cos(n)*Math.cos(t))},t.getSetJulian=function(e,n,a,o,r,i,s){var c=t.hourAngle(e,a,o),l=t.approxTransit(c,n,r);return t.solarTransitJulian(l,i,s)},t.getSolarTime=function(t,e,n){var a=new Date;a.setUTCFullYear(t.getUTCFullYear(),0,1),a.setUTCHours(0,0,0,0);var o=t.getTime()-a.getTime(),r=360/365*(Math.floor(o/u)-81)*i,s=9.87*Math.sin(2*r)-7.53*Math.cos(r)-1.5*Math.sin(r)+4*(n-15*e);return new Date(t.getTime()+60*s*1e3)},t.getStarAzEl=function(e,n,a,o,r){var s=-a*i,c=n*i,l=t.date2jSince2000(e),u=t.siderealTime(l,s)-o,h=t.elevation(u,c,r);return{az:t.azimuth(u,c,r),el:h+=t.astroRefraction(h)}},t.getSunAzEl=function(e,n,a){var o=-a*i,r=n*i,s=t.date2jSince2000(e),c=t.getSunRaDec(s),l=t.siderealTime(s,o)-c.ra;return{az:t.azimuth(l,r,c.dec),el:t.elevation(l,r,c.dec)}},t.getSunRaDec=function(e){var n=t.solarMeanAnomaly_(e),a=t.eclipticLongitude(n);return{dec:t.declination(a,0),ra:t.rightAscension(a,0)}},t.getSunTimeByAzimuth=function(e,n,a,o,r){if(void 0===r&&(r=!1),isNaN(o))throw new Error("azimuth missing");if(isNaN(n))throw new Error("latitude missing");if(isNaN(a))throw new Error("longitude missing");r&&(o*=i);var s=new Date(e),c=i*-a,l=i*n,h=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0).getTime(),d=u;for(h+=d;d>200;){var m=t.date2jSince2000(new Date(h)),p=t.getSunRaDec(m),f=t.siderealTime(m,c)-p.ra;d/=2,t.getAzimuth_(f,l,p.dec)<o?h+=d:h-=d}return new Date(Math.floor(h))},t.getTimes=function(e,n,a,o,r){if(void 0===o&&(o=0),void 0===r&&(r=!1),isNaN(n))throw new Error("latitude missing");if(isNaN(a))throw new Error("longitude missing");var s=new Date(e);r?s.setUTCHours(12,0,0,0):s.setHours(12,0,0,0);var c,l=0,u=[],h=0,d=0,m=0,p=t.calculateJnoon_(a,n,o,s),f=p.Jnoon,g=p.dh,M=p.lw,v=p.phi,w=p.dec,y=p.n,x=p.M,A=p.L,E={solarNoon:t.julian2date(f),nadir:t.julian2date(f+.5)};for(l=0,c=t.times_.length;l<c;l+=1)h=((u=t.times_[l])[0]+g)*i,m=f-((d=t.getSetJ_(h,M,v,w,y,x,A))-f),E[u[1]]=t.julian2date(m),E[u[2]]=t.julian2date(d);return E},t.hourAngle=function(t,e,n){return Math.acos((Math.sin(t)-Math.sin(e)*Math.sin(n))/(Math.cos(e)*Math.cos(n)))},t.julian2date=function(e){return new Date((e-t.J1970_)*u)},t.julianCyle=function(e,n){return Math.round(e-t.J0_-n/(2*g/2))},t.rightAscension=function(e,n){return Math.atan2(Math.sin(e)*Math.cos(t.e_)-Math.tan(n)*Math.sin(t.e_),Math.cos(e))},t.siderealTime=function(t,e){return i*(280.16+360.9856235*t)-e},t.solarTransitJulian=function(e,n,a){return t.J2000_+e+.0053*Math.sin(n)-.0069*Math.sin(2*a)},t.calculateJnoon_=function(e,n,a,o){var r=i*-e,s=i*n,c=t.observerAngle_(a),l=t.date2jSince2000(o),u=t.julianCycle_(l,r),h=t.approxTransit(0,r,u),d=t.solarMeanAnomaly_(h),m=t.eclipticLongitude(d),p=t.declination(m,0);return{Jnoon:t.solarTransitJulian(h,d,m),dh:c,lw:r,phi:s,dec:p,n:u,M:d,L:m}},t.getAzimuth_=function(t,e,n){return Math.atan2(Math.sin(t),Math.cos(t)*Math.sin(e)-Math.tan(n)*Math.cos(e))+Math.PI},t.getSetJ_=function(e,n,a,o,r,i,s){var c=t.hourAngle(e,a,o),l=t.approxTransit(c,n,r);return t.solarTransitJulian(l,i,s)},t.julianCycle_=function(e,n){var a=n/g;return Math.round(e-t.J0_-a)},t.observerAngle_=function(t){return-2.076*Math.sqrt(t)/60},t.solarMeanAnomaly_=function(t){return i*(357.5291+.98560028*t)},t.J0_=9e-4,t.J1970_=2440587.5,t.J2000_=2451545,t.e_=23.4397*i,t.times_=[[6,"goldenHourDawnEnd","goldenHourDuskStart"],[-.3,"sunriseEnd","sunsetStart"],[-.833,"sunriseStart","sunsetEnd"],[-1,"goldenHourDawnStart","goldenHourDuskEnd"],[-4,"blueHourDawnEnd","blueHourDuskStart"],[-6,"civilDawn","civilDusk"],[-8,"blueHourDawnStart","blueHourDuskEnd"],[-12,"nauticalDawn","nauticalDusk"],[-15,"amateurDawn","amateurDusk"],[-18,"astronomicalDawn","astronomicalDusk"]],t}(),v=function(){function t(){}return t.getMoonIllumination=function(e){var n=e instanceof Date?e.getTime():e,a=2551442778,o=M.date2jSince2000(new Date(n)),r=M.getSunRaDec(o),i=t.moonCoords(o),s=149598e3,c=Math.acos(Math.sin(r.dec)*Math.sin(i.dec)+Math.cos(r.dec)*Math.cos(i.dec)*Math.cos(r.ra-i.ra)),l=Math.atan2(s*Math.sin(c),i.dist-s*Math.cos(c)),u=Math.atan2(Math.cos(r.dec)*Math.sin(r.ra-i.ra),Math.sin(r.dec)*Math.cos(i.dec)-Math.cos(r.dec)*Math.sin(i.dec)*Math.cos(r.ra-i.ra)),h=.5+.5*l*(u<0?-1:1)/Math.PI,d=(n-94717884e4)%a;d<0&&(d+=a);var m=a-d+n,p=1275721389-d+n;p<n&&(p+=a);var f=637860694.5-d+n;f<n&&(f+=a);var g=1913582083.5-d+n;g<n&&(g+=a);for(var v,w=Math.min(m,f,p,g),y=0;y<t.moonCycles_.length;y++){var x=t.moonCycles_[y];if(h>=x.from&&h<=x.to){v=x;break}}var A;return A=w===m?"newMoon":w===f?"firstQuarter":w===p?"fullMoon":"thirdQuarter",{fraction:(1+Math.cos(l))/2,phase:v,phaseValue:h,angle:u,next:{value:w,date:new Date(w).toISOString(),type:A,newMoon:{value:m,date:new Date(m).toISOString()},fullMoon:{value:p,date:new Date(p).toISOString()},firstQuarter:{value:f,date:new Date(f).toISOString()},thirdQuarter:{value:g,date:new Date(g).toISOString()}}}},t.getMoonPosition=function(e,n,a){var o=i*-a,r=i*n,s=M.date2jSince2000(e),c=t.moonCoords(s),l=M.siderealTime(s,o)-c.ra,u=M.elevation(l,r,c.dec),h=Math.atan2(Math.sin(l),Math.tan(r)*Math.cos(c.dec)-Math.sin(c.dec)*Math.cos(l));return u+=M.astroRefraction(u),{az:M.azimuth(l,r,c.dec),el:u,rng:c.dist,parallacticAngle:h}},t.getMoonTimes=function(e,n,a,o){void 0===o&&(o=!1);var r=new Date(e);o?r.setUTCHours(0,0,0,0):r.setHours(0,0,0,0);var i=t.calculateRiseSetTimes_(r,n,a),s=i.rise,c=i.set,l=i.ye,u={rise:null,set:null,ye:null,alwaysUp:null,alwaysDown:null,highest:null};return u.rise=s?new Date(t.hoursLater(r,s)):NaN,u.set=c?new Date(t.hoursLater(r,c)):NaN,s||c?s&&c?(u.alwaysUp=!1,u.alwaysDown=!1,u.highest=new Date(t.hoursLater(r,Math.min(s,c)+Math.abs(c-s)/2))):(u.alwaysUp=!1,u.alwaysDown=!1):l>0?(u.alwaysUp=!0,u.alwaysDown=!1):(u.alwaysUp=!1,u.alwaysDown=!0),u},t.hoursLater=function(t,e){return new Date(t.getTime()+e*u/24)},t.moonCoords=function(t){var e=i*(134.963+13.064993*t),n=i*(93.272+13.22935*t),a=i*(218.316+13.176396*t)+6.289*i*Math.sin(e),o=5.128*i*Math.sin(n),r=385001-20905*Math.cos(e);return{ra:M.rightAscension(a,o),dec:M.declination(a,o),dist:r}},t.calculateRiseSetTimes_=function(e,n,a){for(var o=.133*i,r=t.getMoonPosition(e,n,a).el-o,s=0,c=0,l=0,u=0,h=0,d=0,m=0,p=0,f=0,g=0,M=0,v=0,w=0,y=1;y<=24&&(s=t.getMoonPosition(t.hoursLater(e,y),n,a).el-o,p=((h=(r+(c=t.getMoonPosition(t.hoursLater(e,y+1),n,a).el-o))/2-s)*(m=-(d=(c-r)/2)/(2*h))+d)*m+s,g=0,(f=d*d-4*h*s)>=0&&(M=m-(w=Math.sqrt(f)/(2*Math.abs(h))),v=m+w,Math.abs(M)<=1&&g++,Math.abs(v)<=1&&g++,M<-1&&(M=v)),1===g?r<0?l=y+M:u=y+M:2===g&&(l=y+(p<0?v:M),u=y+(p<0?M:v)),!l||!u);y+=2)r=c;return{rise:l,set:u,ye:p}},t.moonCycles_=[{from:0,to:.033863193308711,id:"newMoon",emoji:"🌚",code:":new_moon_with_face:",name:"New Moon",weight:1,css:"wi-moon-new"},{from:.033863193308711,to:.216136806691289,id:"waxingCrescentMoon",emoji:"🌒",code:":waxing_crescent_moon:",name:"Waxing Crescent",weight:6.3825,css:"wi-moon-wax-cres"},{from:.216136806691289,to:.283863193308711,id:"firstQuarterMoon",emoji:"🌓",code:":first_quarter_moon:",name:"First Quarter",weight:1,css:"wi-moon-first-quart"},{from:.283863193308711,to:.466136806691289,id:"waxingGibbousMoon",emoji:"🌔",code:":waxing_gibbous_moon:",name:"Waxing Gibbous",weight:6.3825,css:"wi-moon-wax-gibb"},{from:.466136806691289,to:.533863193308711,id:"fullMoon",emoji:"🌝",code:":full_moon_with_face:",name:"Full Moon",weight:1,css:"wi-moon-full"},{from:.533863193308711,to:.716136806691289,id:"waningGibbousMoon",emoji:"🌖",code:":waning_gibbous_moon:",name:"Waning Gibbous",weight:6.3825,css:"wi-moon-wan-gibb"},{from:.716136806691289,to:.783863193308711,id:"thirdQuarterMoon",emoji:"🌗",code:":last_quarter_moon:",name:"third Quarter",weight:1,css:"wi-moon-third-quart"},{from:.783863193308711,to:.966136806691289,id:"waningCrescentMoon",emoji:"🌘",code:":waning_crescent_moon:",name:"Waning Crescent",weight:6.3825,css:"wi-moon-wan-cres"},{from:.966136806691289,to:1,id:"newMoon",emoji:"🌚",code:":new_moon_with_face:",name:"New Moon",weight:1,css:"wi-moon-new"}],t}(),w=function(){function t(){}return t.createVec=function(t,e,n){for(var a=[],o=t;o<=e;o+=n)a.push(o);return a},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,a){var o=7292115e-11,r={x:n.x-e.x,y:n.y-e.y,z:n.z-e.z},i=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)+Math.pow(r.z,2)),s=a.x+o*e.y,c=a.y-o*e.x,l=a.z,u=(r.x*s+r.y*c+r.z*l)/i;return 1+u/299792.458*t.sign_(u)},t.getDayOfYear=function(e){var n=(e=e||new Date).getMonth(),a=e.getUTCDate(),o=[0,31,59,90,120,151,181,212,243,273,304,334][n]+a;return n>1&&t.isLeapYear_(e)&&o++,o},t.roundToNDecimalPlaces=function(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)},t.isLeapYear_=function(t){var e=t.getUTCFullYear();return 0==(3&e)&&(e%100!=0||e%400==0)},t.sign_=function(t){return t>=0?1:-1},t.MoonMath=v,t.SunMath=M,t.Types=n,t.jday=function(t,e,n,a,o,r){if(!t){var i=new Date,s=new Date(i.getUTCFullYear(),0,0),c=i.getDate()-s.getDate();return Math.floor(c/h)}return 367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5+((r/60+o)/60+a)/24},t}(),y=function(t,e){this.start=t-1,this.stop=e,this.length=this.stop-this.start},x=function(){return x=Object.assign||function(t){for(var e,n=1,a=arguments.length;n<a;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},x.apply(this,arguments)},A=function(){function t(){}return t.parseTle=function(e,n){var a=t.parseLine1(e),o=t.parseLine2(n);if(a.satNum!==o.satNum)throw new Error("Satellite numbers do not match");if(a.satNumRaw!==o.satNumRaw)throw new Error("Raw satellite numbers do not match");if(1!==a.lineNumber1)throw new Error("First line number must be 1");if(2!==o.lineNumber2)throw new Error("Second line number must be 2");return{satNum:a.satNum,intlDes:a.intlDes,epochYear:a.epochYear,epochDay:a.epochDay,meanMoDev1:a.meanMoDev1,meanMoDev2:a.meanMoDev2,bstar:a.bstar,inclination:o.inclination,raan:o.raan,eccentricity:o.eccentricity,argOfPerigee:o.argOfPerigee,meanAnomaly:o.meanAnomaly,meanMotion:o.meanMotion}},t.parseTleFull=function(e,n){var a=t.parseLine1(e),o=t.parseLine2(n);if(a.satNum!==o.satNum)throw new Error("Satellite numbers do not match");if(a.satNumRaw!==o.satNumRaw)throw new Error("Raw satellite numbers do not match");if(1!==a.lineNumber1)throw new Error("First line number must be 1");if(2!==o.lineNumber2)throw new Error("Second line number must be 2");return x(x({},a),o)},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),a=n.split("")[0].toLowerCase();return isNaN(parseInt(a))?parseInt(a.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 w.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 w.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,a=t.bstar.start+6,o=t.bstar.stop-1,r=e.substring(t.bstar.start,n),i=parseFloat("0.".concat(e.substring(n,a))),s=e.substring(a,o),c=parseInt(e.substring(o,t.bstar.stop));if("-"===s)c*=-1;else if("+"!==s)throw new Error("Invalid BSTAR symbol: ".concat(r));if(i*=Math.pow(10,c),"-"===r)i*=-1;else if("+"!==r&&" "!==r)throw new Error("Invalid BSTAR symbol: ".concat(r));return w.roundToNDecimalPlaces(i,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 w.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 w.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 w.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 w.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 w.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 w.roundToNDecimalPlaces(n,8)},t.getRevNum=function(e){return parseInt(e.substring(t.revNum.start,t.revNum.stop))},t.lineNumber=new y(1,1),t.satNum=new y(3,7),t.classification=new y(8,8),t.intlDes=new y(10,17),t.intlDesYear=new y(10,11),t.intlDesLaunchNum=new y(12,14),t.intlDesLaunchPiece=new y(15,17),t.epochYear=new y(19,20),t.epochDay=new y(21,32),t.meanMoDev1=new y(34,43),t.meanMoDev2=new y(45,52),t.bstar=new y(54,61),t.ephemerisType=new y(63,63),t.elsetNum=new y(65,68),t.checksum=new y(69,69),t.inclination=new y(9,16),t.raan=new y(18,25),t.eccentricity=new y(27,33),t.argPerigee=new y(35,42),t.meanAnom=new y(44,51),t.meanMo=new y(53,63),t.revNum=new y(64,68),t}(),E=function(){function t(t){this.type=t.type||a.UNKNOWN,this.name=t.name||"Unknown",this.position=t.position||{x:0,y:0,z:0},this.time=t.time||new Date}return t.prototype.getName=function(){return this.name},t.prototype.getType=function(){return this.type},t.prototype.getTypeString=function(){var t;return((t={})[a.UNKNOWN]="Unknown",t[a.PAYLOAD]="Payload",t[a.ROCKET_BODY]="Rocket Body",t[a.DEBRIS]="Debris",t[a.SPECIAL]="Special",t[a.RADAR_MEASUREMENT]="Radar Measurement",t[a.RADAR_TRACK]="Radar Track",t[a.RADAR_OBJECT]="Radar Object",t[a.BALLISTIC_MISSILE]="Ballistic Missile",t[a.STAR]="Star",t[a.INTERGOVERNMENTAL_ORGANIZATION]="Intergovernmental Organization",t[a.SUBORBITAL_PAYLOAD_OPERATOR]="Suborbital Payload Operator",t[a.PAYLOAD_OWNER]="Payload Owner",t[a.METEOROLOGICAL_ROCKET_LAUNCH_AGENCY_OR_MANUFACTURER]="Meteorological Rocket Launch Agency or Manufacturer",t[a.PAYLOAD_MANUFACTURER]="Payload Manufacturer",t[a.LAUNCH_AGENCY]="Launch Agency",t[a.LAUNCH_SITE]="Launch Site",t[a.LAUNCH_POSITION]="Launch Position",t[a.LAUNCH_FACILITY]="Launch Facility",t[a.CONTROL_FACILITY]="Control Facility",t[a.GROUND_SENSOR_STATION]="Ground Sensor Station",t[a.OPTICAL]="Optical",t[a.MECHANICAL]="Mechanical",t[a.PHASED_ARRAY_RADAR]="Phased Array Radar",t[a.OBSERVER]="Observer",t[a.BISTATIC_RADIO_TELESCOPE]="Bistatic Radio Telescope",t[a.COUNTRY]="Country",t[a.LAUNCH_VEHICLE_MANUFACTURER]="Launch Vehicle Manufacturer",t[a.ENGINE_MANUFACTURER]="Engine Manufacturer",t)[this.type]||"Unknown"},t}(),_=(p=function(t,e){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},p(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),b=function(t){function e(e){var n=t.call(this,e)||this;return e.rcs&&(n.rcs=e.rcs),e.vmag&&(n.vmag=e.vmag),n}return _(e,t),e.prototype.getRcs=function(){return this.rcs},e.prototype.getVmag=function(){return this.vmag},e}(E),N=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),z=function(t){function e(e,n){var a=t.call(this,e)||this,o=A.parseTle(e.tle1,e.tle2);return a.satNum=o.satNum,a.intlDes=o.intlDes,a.epochYear=o.epochYear,a.epochDay=o.epochDay,a.meanMoDev1=o.meanMoDev1,a.meanMoDev2=o.meanMoDev2,a.bstar=o.bstar,a.inclination=o.inclination,a.raan=o.raan,a.eccentricity=o.eccentricity,a.argOfPerigee=o.argOfPerigee,a.meanAnomaly=o.meanAnomaly,a.meanMotion=o.meanMotion,a.period=1440/a.meanMotion,a.satrec=d.createSatrec(e.tle1,e.tle2),a.options=n||{},a}return N(e,t),e.prototype.propagateTo=function(t){var n=e.calculateTimeVariables(t,this.satrec).m,a=d.propagate(this.satrec,n).position||{x:0,y:0,z:0};return this.position=a,this.time=t,this},e.prototype.getStateVec=function(t){void 0===t&&(t=this.time);var n=e.calculateTimeVariables(t,this.satrec).m;return d.propagate(this.satrec,n)},e.prototype.getEci=function(t){void 0===t&&(t=this.time);var n=e.calculateTimeVariables(t,this.satrec).m;return d.propagate(this.satrec,n).position||{x:0,y:0,z:0}},e.prototype.getEcf=function(t){void 0===t&&(t=this.time);var n=e.calculateTimeVariables(t,this.satrec),a=n.m,o=n.gmst,r=d.propagate(this.satrec,a).position||{x:0,y:0,z:0};return m.eci2ecf(r,o)},e.prototype.getLla=function(t){void 0===t&&(t=this.time);var n=e.calculateTimeVariables(t,this.satrec),a=n.m,o=n.gmst,r=d.propagate(this.satrec,a).position||{x:0,y:0,z:0};return m.eci2lla(r,o)},e.prototype.getRae=function(t,n){void 0===n&&(n=this.time);var a=e.calculateTimeVariables(n,this.satrec),o=a.m,r=a.gmst,i=d.propagate(this.satrec,o).position||{x:0,y:0,z:0},s=m.eci2ecf(i,r);return m.ecf2rae({lat:t.lat,lon:t.lon,alt:t.alt},s)},e.prototype.getAzimuth=function(t,e){return void 0===e&&(e=this.time),this.getRae(t,e).az},e.prototype.getElevation=function(t,e){return void 0===e&&(e=this.time),this.getRae(t,e).el},e.prototype.getRange=function(t,e){return void 0===e&&(e=this.time),this.getRae(t,e).rng},e.calculateTimeVariables=function(t,e){var n=w.jday(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())+t.getUTCMilliseconds()*h;return{gmst:d.gstime(n),m:e?1440*(n-e.jdsatepoch):null,j:n}},e.checkSatrec=function(t){return!(isNaN(t.a)||isNaN(t.am)||isNaN(t.alta)||isNaN(t.em)||isNaN(t.mo)||isNaN(t.ecco)||isNaN(t.no))},e}(b),T=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),R=function(t){function e(e,n,a){var o=t.call(this,e,n)||this;return o.setLaunchDetails(a.launchDetails),o.setSpaceCraftDetails(a.spaceCraftDetails),o.setOperationsDetails(a.operationsDetails),o}return T(e,t),e.prototype.setLaunchDetails=function(t){t.launchDate&&(this.launchDate=t.launchDate),t.launchMass&&(this.launchMass=t.launchMass),t.launchSite&&(this.launchSite=t.launchSite),t.launchVehicle&&(this.launchVehicle=t.launchVehicle)},e.prototype.getLaunchDetails=function(){return{launchDate:this.launchDate,launchMass:this.launchMass,launchSite:this.launchSite,launchVehicle:this.launchVehicle}},e.prototype.setSpaceCraftDetails=function(t){t.lifetime&&(this.lifetime=t.lifetime),t.maneuver&&(this.maneuver=t.maneuver),t.manufacturer&&(this.manufacturer=t.manufacturer),t.motor&&(this.motor=t.motor),t.power&&(this.power=t.power),t.payload&&(this.payload=t.payload),t.purpose&&(this.purpose=t.purpose),t.shape&&(this.shape=t.shape),t.span&&(this.span=t.span),t.configuration&&(this.configuration=t.configuration),t.equipment&&(this.equipment=t.equipment),t.dryMass&&(this.dryMass=t.dryMass)},e.prototype.getSpaceCraftDetails=function(){return{lifetime:this.lifetime,maneuver:this.maneuver,manufacturer:this.manufacturer,motor:this.motor,power:this.power,payload:this.payload,purpose:this.purpose,shape:this.shape,span:this.span,configuration:this.configuration,equipment:this.equipment,dryMass:this.dryMass}},e.prototype.setOperationsDetails=function(t){t.user&&(this.user=t.user),t.mission&&(this.mission=t.mission),t.owner&&(this.owner=t.owner),t.country&&(this.country=t.country)},e.prototype.getOperationsDetails=function(){return{user:this.user,mission:this.mission,owner:this.owner,country:this.country}},e}(z),D=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}();!function(t){t[t.OUT_OF_VIEW=-1]="OUT_OF_VIEW",t[t.ENTER=0]="ENTER",t[t.IN_VIEW=1]="IN_VIEW",t[t.EXIT=2]="EXIT"}(f||(f={}));var I=2*Math.PI,O=function(t){function e(e){var n=this;if(e.type)switch(e.type){case a.OPTICAL:case a.MECHANICAL:case a.PHASED_ARRAY_RADAR:case a.OBSERVER:case a.BISTATIC_RADIO_TELESCOPE:break;default:throw new Error("Invalid sensor type")}return(n=t.call(this,e)||this).validateInputData(e),n}return D(e,t),e.prototype.validateInputData=function(t){this.validateLla(t),this.validateFov(t)},e.prototype.validateFov=function(t){this.validateMinAz(t),this.validateMaxAz(t),this.validateMinEl(t),this.validateMaxEl(t),this.validateMinRng(t),this.validateMaxRng(t)},e.prototype.validateMaxRng=function(t){if(t.maxRng>=0)this.maxRng=t.maxRng;else{if(void 0!==t.maxRng)throw new Error("Invalid maximum range - must be greater than 0");this.maxRng=5e4}},e.prototype.validateMinRng=function(t){if(t.minRng>=0)this.minRng=t.minRng;else{if(void 0!==t.minRng)throw new Error("Invalid minimum range - must be greater than 0");this.minRng=0}},e.prototype.validateMaxEl=function(t){if(t.maxEl>=0&&t.maxEl<=180)this.maxEl=t.maxEl;else{if(void 0!==t.maxEl)throw new Error("Invalid maximum elevation - must be between 0 and 180");this.maxEl=90}},e.prototype.validateMinEl=function(t){if(t.minEl>=0&&t.minEl<=90)this.minEl=t.minEl;else{if(void 0!==t.minEl)throw new Error("Invalid minimum elevation - must be between 0 and 90");this.minEl=0}},e.prototype.validateMaxAz=function(t){if(t.maxAz>=0&&t.maxAz<=360)this.maxAz=t.maxAz;else{if(void 0!==t.maxAz)throw new Error("Invalid maximum azimuth - must be between 0 and 360");this.maxAz=360}},e.prototype.validateMinAz=function(t){if(t.minAz>=0&&t.minAz<=360)this.minAz=t.minAz;else{if(void 0!==t.minAz)throw new Error("Invalid minimum azimuth - must be between 0 and 360");this.minAz=0}},e.prototype.validateLla=function(t){if(!(t.lat>=-90&&t.lat<=90))throw new Error("Invalid latitude");if(this.lat=t.lat,!(t.lon>=-180&&t.lon<=180))throw new Error("Invalid longitude");if(this.lon=t.lon,!(t.alt>=0))throw new Error("Invalid altitude");this.alt=t.alt},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.getRae=function(t,e){return void 0===e&&(e=this.time),t.getRae(this,e)},e.prototype.isRaeInFov=function(t){if(t.el*l<this.minEl||t.el*l>this.maxEl)return!1;if(t.rng<this.minRng||t.rng>this.maxRng)return!1;if(this.minAz*l>this.maxAz){if(t.az*l<this.minAz&&t.az*l>this.maxAz)return!1}else if(t.az*l<this.minAz||t.az*l>this.maxAz)return!1;return!0},e.prototype.isSatInFov=function(t,e){return void 0===e&&(e=this.time),this.isRaeInFov(this.getRae(t,e))},e.prototype.calculatePasses=function(t,n,a){void 0===a&&(a=this.time);for(var o=!1,r=0,i=[],s=a.getTime(),c=0;c<t;c++){var l=new Date(s+1e3*c),u=this.getRae(n,l),h=360*u.az/I,d=360*u.el/I,m=this.isRaeInFov(u);if(0===c){var p=this.getRae(n,new Date(Date.now()-1e3));o=this.isRaeInFov(p)}var g=e.getPassType_(m,o);if(r=Math.max(r,u.el),g===f.ENTER||g===f.EXIT){var M={type:g,time:l,az:h,el:d,rng:u.rng};g===f.EXIT&&(M.maxElPass=r),i.push(M),r=0}o=m}return i},e.getPassType_=function(t,e){var n=f.OUT_OF_VIEW;return t&&!e?n=f.ENTER:!t&&e?n=f.EXIT:t&&e&&(n=f.IN_VIEW),n},e}(E),C=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),S=function(t){function e(e){var n=this;if(e.type&&e.type!==a.STAR)throw new Error("Invalid object type");return e.type=a.STAR,(n=t.call(this,e)||this).ra=e.ra,n.dec=e.dec,e.pname&&(n.pname=e.pname),e.bf&&(n.bf=e.bf),e.h&&(n.h=e.h),n}return C(e,t),e.prototype.getEci=function(t,n){void 0===t&&(t={lat:180*i,lon:0,alt:0}),void 0===n&&(n=this.time);var a=this.getRae(t,n),o=e.calculateTimeVariables_(n).gmst;return m.ecf2eci(m.rae2ecf(a,{lat:0,lon:0,alt:0}),o)},e.prototype.getRae=function(t,e){void 0===t&&(t={lat:180*i,lon:0,alt:0}),void 0===e&&(e=this.time);var n=w.SunMath.getStarAzEl(e,t.lat*l,t.lon*l,this.ra,this.dec);return{az:n.az,el:n.el,rng:25e4}},e.calculateTimeVariables_=function(t){var e=w.jday(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())+t.getUTCMilliseconds()*h;return{gmst:d.gstime(e),j:e}},e}(b);return e})()));
@@ -23,7 +23,7 @@
23
23
  * You should have received a copy of the GNU Affero General Public License along with
24
24
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
25
25
  */
26
- import { SatelliteRecord, StateVector, Vec3Flat } from '../types/types';
26
+ import { GreenwichMeanSiderealTime, SatelliteRecord, StateVector, Vec3Flat } from '../types/types';
27
27
  declare class Sgp4 {
28
28
  static angle(vec1: Vec3Flat, vec2: Vec3Flat): number;
29
29
  static asinh(xval: number): number;
@@ -37,7 +37,7 @@ declare class Sgp4 {
37
37
  sec: number;
38
38
  };
39
39
  static dot(x: Vec3Flat, y: Vec3Flat): number;
40
- static gstime(jdut1: number): number;
40
+ static gstime(jdut1: number): GreenwichMeanSiderealTime;
41
41
  static invjday(jd: number, jdfrac: number): {
42
42
  year: number;
43
43
  mon: number;
@@ -71,12 +71,12 @@ declare class Sgp4 {
71
71
  };
72
72
  static sgn(x: number): number;
73
73
  static sinh(x: number): number;
74
- private static dpper;
75
- private static dscom;
76
- private static dsinit;
77
- private static dspace;
78
- private static getgravconst;
79
- private static initl;
80
- private static sgp4init;
74
+ private static dpper_;
75
+ private static dscom_;
76
+ private static dsinit_;
77
+ private static dspace_;
78
+ private static getgravconst_;
79
+ private static initl_;
80
+ private static sgp4init_;
81
81
  }
82
82
  export { Sgp4 };
package/dist/tle/tle.d.ts CHANGED
@@ -20,6 +20,7 @@
20
20
  * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
21
21
  */
22
22
  import { Line1Data, Line2Data, TleLine1, TleLine2 } from '../types/types';
23
+ import { TleFormatData } from './tle-format-data';
23
24
  type TleData = {
24
25
  satNum: number;
25
26
  intlDes: string;
@@ -37,28 +38,28 @@ type TleData = {
37
38
  };
38
39
  type TleDataFull = Line1Data & Line2Data;
39
40
  export declare class Tle {
40
- private static lineNumber;
41
- private static satNum;
42
- private static classification;
43
- private static intlDes;
44
- private static intlDesYear;
45
- private static intlDesLaunchNum;
46
- private static intlDesLaunchPiece;
47
- private static epochYear;
48
- private static epochDay;
49
- private static meanMoDev1;
50
- private static meanMoDev2;
51
- private static bstar;
52
- private static ephemerisType;
53
- private static elsetNum;
54
- private static checksum;
55
- private static inclination;
56
- private static raan;
57
- private static eccentricity;
58
- private static argPerigee;
59
- private static meanAnom;
60
- private static meanMo;
61
- private static revNum;
41
+ static readonly lineNumber: TleFormatData;
42
+ static readonly satNum: TleFormatData;
43
+ static readonly classification: TleFormatData;
44
+ static readonly intlDes: TleFormatData;
45
+ static readonly intlDesYear: TleFormatData;
46
+ static readonly intlDesLaunchNum: TleFormatData;
47
+ static readonly intlDesLaunchPiece: TleFormatData;
48
+ static readonly epochYear: TleFormatData;
49
+ static readonly epochDay: TleFormatData;
50
+ static readonly meanMoDev1: TleFormatData;
51
+ static readonly meanMoDev2: TleFormatData;
52
+ static readonly bstar: TleFormatData;
53
+ static readonly ephemerisType: TleFormatData;
54
+ static readonly elsetNum: TleFormatData;
55
+ static readonly checksum: TleFormatData;
56
+ static readonly inclination: TleFormatData;
57
+ static readonly raan: TleFormatData;
58
+ static readonly eccentricity: TleFormatData;
59
+ static readonly argPerigee: TleFormatData;
60
+ static readonly meanAnom: TleFormatData;
61
+ static readonly meanMo: TleFormatData;
62
+ static readonly revNum: TleFormatData;
62
63
  /**
63
64
  * Parses the TLE into orbital data.
64
65
  *
@@ -275,10 +276,10 @@ export declare class Tle {
275
276
  * Range: 0 to 9
276
277
  * Example: 3
277
278
  *
278
- * @param {string} tleLine1 The first line of the TLE to parse.
279
+ * @param {string} tleLine The first line of the TLE to parse.
279
280
  * @returns {number} The checksum value.
280
281
  */
281
- static getChecksum(tleLine1: TleLine1): number;
282
+ static getChecksum(tleLine: TleLine1 | TleLine2): number;
282
283
  /**
283
284
  * Inclination relative to the Earth's equatorial plane in degrees. 0 to 90 degrees is a
284
285
  * prograde orbit and 90 to 180 degrees is a retrograde orbit.