ootk 1.2.0 → 1.5.2

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 (96) hide show
  1. package/{asc → .asc}/asconfig.json +0 -0
  2. package/{asc → .asc}/assembly/index.ts +0 -0
  3. package/{asc → .asc}/ex/asconfig.json +0 -0
  4. package/{asc → .asc}/ex/assembly/index.ts +0 -0
  5. package/{asc → .asc}/ex/index.html +0 -0
  6. package/{asc → .asc}/ex/package.json +0 -0
  7. package/{asc → .asc}/ex/tests/index.js +0 -0
  8. package/{asc → .asc}/package.json +0 -0
  9. package/{asc → .asc}/tests/index.js +0 -0
  10. package/.eslintrc.json +5 -5
  11. package/LICENSE.MD +299 -21
  12. package/README.md +17 -22
  13. package/dist/objects/base-object.d.ts +40 -0
  14. package/dist/objects/detailed-sat.d.ts +66 -0
  15. package/dist/objects/index.d.ts +4 -0
  16. package/dist/objects/sat.d.ts +88 -0
  17. package/dist/objects/sensor.d.ts +40 -0
  18. package/dist/objects/space-object.d.ts +38 -0
  19. package/dist/objects/star.d.ts +46 -0
  20. package/dist/ootk.d.ts +16 -23
  21. package/dist/ootk.js +2 -1
  22. package/dist/ootk.js.LICENSE.txt +77 -0
  23. package/dist/{sgp4.d.ts → sgp4/sgp4.d.ts} +14 -21
  24. package/{lib/utils/TleFormatData.d.ts → dist/tle/tle-format-data.d.ts} +0 -0
  25. package/dist/{tle.d.ts → tle/tle.d.ts} +12 -16
  26. package/{lib → dist/transforms}/transforms.d.ts +12 -16
  27. package/dist/{types.d.ts → types/types.d.ts} +68 -0
  28. package/dist/utils/constants.d.ts +34 -0
  29. package/dist/utils/moon-math.d.ts +104 -0
  30. package/dist/utils/sun-math.d.ts +230 -0
  31. package/dist/utils/utils.d.ts +36 -0
  32. package/lib/objects/base-object.d.ts +40 -0
  33. package/lib/objects/base-object.js +109 -0
  34. package/lib/objects/base-object.js.map +1 -0
  35. package/lib/objects/detailed-sat.d.ts +66 -0
  36. package/lib/objects/detailed-sat.js +149 -0
  37. package/lib/objects/detailed-sat.js.map +1 -0
  38. package/lib/objects/index.d.ts +4 -0
  39. package/lib/objects/index.js +5 -0
  40. package/lib/objects/index.js.map +1 -0
  41. package/lib/objects/sat.d.ts +88 -0
  42. package/lib/objects/sat.js +141 -0
  43. package/lib/objects/sat.js.map +1 -0
  44. package/lib/objects/sensor.d.ts +40 -0
  45. package/lib/objects/sensor.js +88 -0
  46. package/lib/objects/sensor.js.map +1 -0
  47. package/lib/objects/space-object.d.ts +38 -0
  48. package/lib/objects/space-object.js +60 -0
  49. package/lib/objects/space-object.js.map +1 -0
  50. package/lib/objects/star.d.ts +46 -0
  51. package/lib/objects/star.js +91 -0
  52. package/lib/objects/star.js.map +1 -0
  53. package/lib/ootk.d.ts +16 -23
  54. package/lib/ootk.js +16 -23
  55. package/lib/ootk.js.map +1 -1
  56. package/lib/{sgp4.d.ts → sgp4/sgp4.d.ts} +14 -21
  57. package/lib/{sgp4.js → sgp4/sgp4.js} +35 -27
  58. package/lib/sgp4/sgp4.js.map +1 -0
  59. package/lib/tle/tle-format-data.d.ts +6 -0
  60. package/lib/{utils/TleFormatData.js → tle/tle-format-data.js} +1 -1
  61. package/lib/tle/tle-format-data.js.map +1 -0
  62. package/lib/{tle.d.ts → tle/tle.d.ts} +12 -16
  63. package/lib/{tle.js → tle/tle.js} +13 -17
  64. package/lib/tle/tle.js.map +1 -0
  65. package/{dist → lib/transforms}/transforms.d.ts +12 -16
  66. package/lib/{transforms.js → transforms/transforms.js} +12 -16
  67. package/lib/transforms/transforms.js.map +1 -0
  68. package/lib/{types.d.ts → types/types.d.ts} +68 -0
  69. package/lib/types/types.js +34 -0
  70. package/lib/types/types.js.map +1 -0
  71. package/lib/utils/constants.d.ts +13 -16
  72. package/lib/utils/constants.js +13 -16
  73. package/lib/utils/constants.js.map +1 -1
  74. package/lib/utils/moon-math.d.ts +104 -0
  75. package/lib/utils/moon-math.js +387 -0
  76. package/lib/utils/moon-math.js.map +1 -0
  77. package/lib/utils/sun-math.d.ts +230 -0
  78. package/lib/utils/sun-math.js +421 -0
  79. package/lib/utils/sun-math.js.map +1 -0
  80. package/lib/utils/utils.d.ts +36 -0
  81. package/lib/{utils.js → utils/utils.js} +18 -18
  82. package/lib/utils/utils.js.map +1 -0
  83. package/package.json +2 -1
  84. package/dist/sat.d.ts +0 -51
  85. package/dist/utils.d.ts +0 -36
  86. package/lib/sat.d.ts +0 -51
  87. package/lib/sat.js +0 -81
  88. package/lib/sat.js.map +0 -1
  89. package/lib/sgp4.js.map +0 -1
  90. package/lib/tle.js.map +0 -1
  91. package/lib/transforms.js.map +0 -1
  92. package/lib/types.js +0 -2
  93. package/lib/types.js.map +0 -1
  94. package/lib/utils/TleFormatData.js.map +0 -1
  95. package/lib/utils.d.ts +0 -36
  96. package/lib/utils.js.map +0 -1
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @author Theodore Kruczek.
3
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
+ * with satellites and other orbital objects.
5
+ *
6
+ * @file The Sat class provides functions for calculating satellites positions relative
7
+ * to earth based sensors and other orbital objects.
8
+ *
9
+ * @license AGPL-3.0-or-later
10
+ * @Copyright (c) 2020-2022 Theodore Kruczek
11
+ *
12
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
+ * terms of the GNU Affero General Public License as published by the Free Software
14
+ * Foundation, either version 3 of the License, or (at your option) any later version.
15
+ *
16
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
+ * See the GNU Affero General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Affero General Public License along with
21
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
+ */
23
+ import { EcfVec3, EciVec3, LlaVec3, RaeVec3, SatelliteRecord, SpaceObjectType, StateVector } from '../types/types';
24
+ import { Sensor } from './sensor';
25
+ import { SpaceObject } from './space-object';
26
+ interface ObjectInfo {
27
+ name?: string;
28
+ type?: SpaceObjectType;
29
+ rcs?: number;
30
+ vmag?: number;
31
+ tle1: string;
32
+ tle2: string;
33
+ }
34
+ export declare class Sat extends SpaceObject {
35
+ satNum: number;
36
+ satrec: SatelliteRecord;
37
+ intlDes: string;
38
+ epochYear: number;
39
+ epochDay: number;
40
+ meanMoDev1: number;
41
+ meanMoDev2: number;
42
+ bstar: number;
43
+ inclination: number;
44
+ raan: number;
45
+ eccentricity: number;
46
+ argOfPerigee: number;
47
+ meanAnomaly: number;
48
+ meanMotion: number;
49
+ period: number;
50
+ apogee: number;
51
+ perigee: number;
52
+ options: any;
53
+ constructor(info: ObjectInfo, options: any);
54
+ propagateTo(date: Date): Sat;
55
+ /**
56
+ * Calculates position and velocity in ECI coordinates at a given time.
57
+ * @param {Date} date Date to calculate the state vector for
58
+ * @returns {StateVector} State vector for the given date
59
+ */
60
+ getStateVec(date?: Date): StateVector;
61
+ /**
62
+ * Calculates ECI position at a given time.
63
+ * @param {Date} date Date to calculate
64
+ * @returns {EciVec3} ECI position vector
65
+ */
66
+ getEci(date?: Date): EciVec3;
67
+ /**
68
+ * Calculates ECF position at a given time.
69
+ * @param {Date} date Date to calculate
70
+ * @returns {EcfVec3} ECF position vector
71
+ */
72
+ getEcf(date?: Date): EcfVec3;
73
+ /**
74
+ * Calculates LLA position at a given time.
75
+ * @param {Date} date Date to calculate
76
+ * @returns {LlaVec3} LLA position vector
77
+ */
78
+ getLla(date?: Date): LlaVec3;
79
+ getRae(sensor: Sensor, date?: Date): RaeVec3;
80
+ /**
81
+ * Calculates the time variables for a given date relative to the TLE epoch.
82
+ * @param {Date} date Date to calculate
83
+ * @param {SatelliteRecord} satrec Satellite orbital information
84
+ * @returns {{m: number, gmst: GreenwichMeanSiderealTime, j: number}} Time variables
85
+ */
86
+ private static calculateTimeVariables;
87
+ }
88
+ export {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @author Theodore Kruczek.
3
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
+ * with satellites and other orbital objects.
5
+ *
6
+ * @file The Sensor class is used for creating ground based observers.
7
+ *
8
+ * @license AGPL-3.0-or-later
9
+ * @Copyright (c) 2020-2022 Theodore Kruczek
10
+ *
11
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
12
+ * terms of the GNU Affero General Public License as published by the Free Software
13
+ * Foundation, either version 3 of the License, or (at your option) any later version.
14
+ *
15
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
+ * See the GNU Affero General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public License along with
20
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import { RaeVec3, SpaceObjectType } from '../types/types';
23
+ import { BaseObject } from './base-object';
24
+ import { Sat } from './sat';
25
+ interface ObjectInfo {
26
+ name?: string;
27
+ type?: SpaceObjectType;
28
+ lat: number;
29
+ lon: number;
30
+ alt: number;
31
+ }
32
+ export declare class Sensor extends BaseObject {
33
+ lat: number;
34
+ lon: number;
35
+ alt: number;
36
+ constructor(info: ObjectInfo);
37
+ setTime(date: Date): Sensor;
38
+ getRae(sat: Sat, date?: Date): RaeVec3;
39
+ }
40
+ export {};
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @author Theodore Kruczek.
3
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
+ * with satellites and other orbital objects.
5
+ *
6
+ * @file The SpaceObject class is meant to provide properties to satellites/stars that
7
+ * do not apply to ground based objects.
8
+ *
9
+ * @license AGPL-3.0-or-later
10
+ * @Copyright (c) 2020-2022 Theodore Kruczek
11
+ *
12
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
+ * terms of the GNU Affero General Public License as published by the Free Software
14
+ * Foundation, either version 3 of the License, or (at your option) any later version.
15
+ *
16
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
+ * See the GNU Affero General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Affero General Public License along with
21
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
+ */
23
+ import { BaseObject } from './base-object';
24
+ import { SpaceObjectType } from '../types/types';
25
+ interface ObjectInfo {
26
+ name?: string;
27
+ type?: SpaceObjectType;
28
+ rcs?: number;
29
+ vmag?: number;
30
+ }
31
+ export declare class SpaceObject extends BaseObject {
32
+ rcs: number;
33
+ vmag: number;
34
+ constructor(info: ObjectInfo);
35
+ getRcs(): number;
36
+ getVmag(): number;
37
+ }
38
+ export {};
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @author Theodore Kruczek.
3
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
+ * with satellites and other orbital objects.
5
+ *
6
+ * @file The Star class is meant to help with cacluating star positions relative to
7
+ * satellites and earth based sensors.
8
+ *
9
+ * @license AGPL-3.0-or-later
10
+ * @Copyright (c) 2020-2022 Theodore Kruczek
11
+ *
12
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
13
+ * terms of the GNU Affero General Public License as published by the Free Software
14
+ * Foundation, either version 3 of the License, or (at your option) any later version.
15
+ *
16
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
17
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
+ * See the GNU Affero General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Affero General Public License along with
21
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
22
+ */
23
+ import { EciVec3, LlaVec3, RaeVec3, SpaceObjectType } from '../types/types';
24
+ import { SpaceObject } from './space-object';
25
+ interface ObjectInfo {
26
+ name?: string;
27
+ type?: SpaceObjectType;
28
+ vmag?: number;
29
+ ra: number;
30
+ dec: number;
31
+ pname?: string;
32
+ bf?: string;
33
+ h?: string;
34
+ }
35
+ export declare class Star extends SpaceObject {
36
+ pname: string;
37
+ bf: string;
38
+ h: string;
39
+ dec: number;
40
+ ra: number;
41
+ constructor(info: ObjectInfo);
42
+ getEci(lla?: LlaVec3, date?: Date): EciVec3;
43
+ getRae(lla?: LlaVec3, date?: Date): RaeVec3;
44
+ private static calculateTimeVariables;
45
+ }
46
+ export {};
package/dist/ootk.d.ts CHANGED
@@ -3,30 +3,23 @@
3
3
  * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
4
  * with satellites and other orbital objects.
5
5
  *
6
- * @copyright MIT License.
7
- * Copyright (c) 2020-2021 Theodore Kruczek
6
+ * @license AGPL-3.0-or-later
7
+ * @Copyright (c) 2020-2022 Theodore Kruczek
8
8
  *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
9
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
10
+ * terms of the GNU Affero General Public License as published by the Free Software
11
+ * Foundation, either version 3 of the License, or (at your option) any later version.
15
12
  *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
13
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
14
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ * See the GNU Affero General Public License for more details.
18
16
  *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
17
+ * You should have received a copy of the GNU Affero General Public License along with
18
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
26
19
  */
27
- export { Sgp4 } from './sgp4';
28
- export { Transforms } from './transforms';
29
- export { Utils } from './utils';
30
- export { Tle } from './tle';
31
- export { Sat } from './sat';
32
- export * from './types';
20
+ export { Sgp4 } from './sgp4/sgp4';
21
+ export { Transforms } from './transforms/transforms';
22
+ export { Utils } from './utils/utils';
23
+ export { Tle } from './tle/tle';
24
+ export * from './objects/index';
25
+ export * from './types/types';
package/dist/ootk.js CHANGED
@@ -1 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Ootk=e():t.Ootk=e()}(this,(function(){return(()=>{"use strict";var t={409:(t,e,n)=>{n.r(e),n.d(e,{Sat:()=>f,Sgp4:()=>u,Tle:()=>g,Transforms:()=>h,Utils:()=>d});var o={};n.r(o);var a=Math.PI,s=2*a,r=a/180,i=2/3,l=15e-13,c=1.15741e-8,u=function(){function t(){}return t.dpper=function(t,e){var n=t.e3,o=t.ee2,r=t.peo,i=t.pgho,l=t.pho,c=t.PInco,u=t.plo,h=t.se2,d=t.se3,m=t.sgh2,p=t.sgh3,g=t.sgh4,f=t.sh2,M=t.sh3,x=t.si2,v=t.si3,b=t.sl2,z=t.sl3,y=t.sl4,w=t.t,N=t.xgh2,D=t.xgh3,I=t.xgh4,j=t.xh2,P=t.xh3,E=t.xi2,k=t.xi3,T=t.xl2,q=t.xl3,L=t.xl4,F=t.zmol,R=t.zmos,S=e.ep,Y=e.inclp,A=e.nodep,O=e.argpp,C=e.mp,U=e.opsmode,V=void 0===U?"i":U,B=e.init,_=R+119459e-10*w;"y"===B&&(_=R);var H=_+.0335*Math.sin(_),G=Math.sin(H),J=.5*G*G-.25,K=-.5*G*Math.cos(H),Q=h*J+d*K,W=x*J+v*K,X=b*J+z*K+y*G,Z=m*J+p*K+g*G,$=f*J+M*K;_=F+.00015835218*w,"y"===B&&(_=F),H=_+.1098*Math.sin(_);var tt=Q+(o*(J=.5*(G=Math.sin(H))*G-.25)+n*(K=-.5*G*Math.cos(H))),et=W+(E*J+k*K),nt=X+(T*J+q*K+L*G),ot=Z+(N*J+D*K+I*G),at=$+(j*J+P*K);if("n"===B){nt-=u,ot-=i,at-=l,Y+=et-=c,S+=tt-=r;var st=Math.sin(Y),rt=Math.cos(Y);if(Y>=.2)O+=ot-=rt*(at/=st),A+=at,C+=nt;else{var it=Math.sin(A),lt=Math.cos(A),ct=st*it,ut=st*lt;ct+=at*lt+et*rt*it,ut+=-at*it+et*rt*lt,(A%=s)<0&&"a"===V&&(A+=s);var ht=C+O+rt*A;ht+=nt+ot-et*A*st;var dt=A;(A=Math.atan2(ct,ut))<0&&"a"===V&&(A+=s),Math.abs(dt-A)>a&&(A<dt?A+=s:A-=s),O=ht-(C+=nt)-rt*A}}return{ep:S,inclp:Y,nodep:A,argpp:O,mp:C}},t.dscom=function(t){var e,n,o,a,s,r,i,l,c,u,h,d,m,p,g,f,M,x,v,b,z,y,w,N,D,I,j,P,E,k,T,q,L,F,R,S,Y,A,O=t.epoch,C=t.ep,U=t.argpp,V=t.tc,B=t.inclp,_=t.nodep,H=t.np,G=.01675,J=.0549,K=2*Math.PI,Q=H,W=C,X=Math.sin(_),Z=Math.cos(_),$=Math.sin(U),tt=Math.cos(U),et=Math.sin(B),nt=Math.cos(B),ot=W*W,at=1-ot,st=Math.sqrt(at),rt=O+18261.5+V/1440,it=(4.523602-.00092422029*rt)%K,lt=Math.sin(it),ct=Math.cos(it),ut=.91375164-.03568096*ct,ht=Math.sqrt(1-ut*ut),dt=.089683511*lt/ht,mt=Math.sqrt(1-dt*dt),pt=5.8351514+.001944368*rt,gt=.39785416*lt/ht,ft=mt*ct+.91744867*dt*lt;gt=Math.atan2(gt,ft),gt+=pt-it;for(var Mt=Math.cos(gt),xt=Math.sin(gt),vt=.1945905,bt=-.98088458,zt=.91744867,yt=.39785416,wt=Z,Nt=X,Dt=29864797e-13,It=1/Q,jt=1;jt<=2;jt++){var Pt=vt*wt+bt*zt*Nt,Et=-bt*wt+vt*zt*Nt,kt=-vt*Nt+bt*zt*wt,Tt=bt*yt,qt=bt*Nt+vt*zt*wt,Lt=vt*yt,Ft=nt*kt+et*Tt,Rt=nt*qt+et*Lt,St=-et*kt+nt*Tt,Yt=-et*qt+nt*Lt,At=Pt*tt+Ft*$,Ot=Et*tt+Rt*$,Ct=-Pt*$+Ft*tt,Ut=-Et*$+Rt*tt,Vt=St*$,Bt=Yt*$,_t=St*tt,Ht=Yt*tt;P=-6*Pt*St+ot*(-24*At*_t-6*Ct*Vt),E=-6*(Pt*Yt+Et*St)+ot*(-24*(Ot*_t+At*Ht)+-6*(Ct*Bt+Ut*Vt)),k=-6*Et*Yt+ot*(-24*Ot*Ht-6*Ut*Bt),q=6*Ft*St+ot*(24*At*Vt-6*Ct*_t),L=6*(Rt*St+Ft*Yt)+ot*(24*(Ot*Vt+At*Bt)-6*(Ut*_t+Ct*Ht)),F=6*Rt*Yt+ot*(24*Ot*Bt-6*Ut*Ht),j=(j=3*(Pt*Pt+Ft*Ft)+(S=12*At*At-3*Ct*Ct)*ot)+j+at*S,T=(T=6*(Pt*Et+Ft*Rt)+(Y=24*At*Ot-6*Ct*Ut)*ot)+T+at*Y,R=(R=3*(Et*Et+Rt*Rt)+(A=12*Ot*Ot-3*Ut*Ut)*ot)+R+at*A,n=-.5*(o=Dt*It)/st,e=-15*W*(a=o*st),s=At*Ct+Ot*Ut,r=Ot*Ct+At*Ut,i=Ot*Ut-At*Ct,1===jt&&(l=e,c=n,u=o,h=a,d=s,m=r,p=i,g=j,v=T,w=R,f=P,M=E,x=k,b=q,z=L,y=F,N=S,D=Y,I=A,vt=Mt,bt=xt,zt=ut,yt=ht,wt=mt*Z+dt*X,Nt=X*mt-Z*dt,Dt=4.7968065e-7)}return{snodm:X,cnodm:Z,sinim:et,cosim:nt,sinomm:$,cosomm:tt,day:rt,e3:2*e*i,ee2:2*e*r,em:W,emsq:ot,gam:pt,peo:0,pgho:0,pho:0,PInco:0,plo:0,rtemsq:st,se2:2*l*m,se3:2*l*p,sgh2:2*h*D,sgh3:2*h*(I-N),sgh4:-18*h*G,sh2:-2*c*z,sh3:-2*c*(y-b),si2:2*c*M,si3:2*c*(x-f),sl2:-2*u*v,sl3:-2*u*(w-g),sl4:-2*u*(-21-9*ot)*G,s1:e,s2:n,s3:o,s4:a,s5:s,s6:r,s7:i,ss1:l,ss2:c,ss3:u,ss4:h,ss5:d,ss6:m,ss7:p,sz1:g,sz2:v,sz3:w,sz11:f,sz12:M,sz13:x,sz21:b,sz22:z,sz23:y,sz31:N,sz32:D,sz33:I,xgh2:2*a*Y,xgh3:2*a*(A-S),xgh4:-18*a*J,xh2:-2*n*L,xh3:-2*n*(F-q),xi2:2*n*E,xi3:2*n*(k-P),xl2:-2*o*T,xl3:-2*o*(R-j),xl4:-2*o*(-21-9*ot)*J,nm:Q,z1:j,z2:T,z3:R,z11:P,z12:E,z13:k,z21:q,z22:L,z23:F,z31:S,z32:Y,z33:A,zmol:(.2299715*rt-pt+4.7199672)%K,zmos:(6.2565837+.017201977*rt)%K}},t.dsinit=function(t){var e=t.xke,n=t.cosim,o=t.argpo,r=t.s1,i=t.s2,l=t.s3,c=t.s4,u=t.s5,h=t.sinim,d=t.ss1,m=t.ss2,p=t.ss3,g=t.ss4,f=t.ss5,M=t.sz1,x=t.sz3,v=t.sz11,b=t.sz13,z=t.sz21,y=t.sz23,w=t.sz31,N=t.sz33,D=t.t,I=t.tc,j=t.gsto,P=t.mo,E=t.mdot,k=t.no,T=t.nodeo,q=t.nodedot,L=t.xPIdot,F=t.z1,R=t.z3,S=t.z11,Y=t.z13,A=t.z21,O=t.z23,C=t.z31,U=t.z33,V=t.ecco,B=t.eccsq,_=t.emsq,H=t.em,G=t.argpm,J=t.inclm,K=t.mm,Q=t.nm,W=t.nodem,X=t.irez,Z=t.atime,$=t.d2201,tt=t.d2211,et=t.d3210,nt=t.d3222,ot=t.d4410,at=t.d4422,st=t.d5220,rt=t.d5232,it=t.d5421,lt=t.d5433,ct=t.dedt,ut=t.didt,ht=t.dmdt,dt=t.dnodt,mt=t.domdt,pt=t.del1,gt=t.del2,ft=t.del3,Mt=t.xfact,xt=t.xlamo,vt=t.xli,bt=t.xni,zt=.0043752690880113,yt=.00015835218,wt=119459e-10;X=0,Q<.0052359877&&Q>.0034906585&&(X=1),Q>=.00826&&Q<=.00924&&H>=.5&&(X=2);var Nt=-wt*m*(z+y);(J<.052359877||J>a-.052359877)&&(Nt=0),0!==h&&(Nt/=h);var Dt=-yt*i*(A+O);(J<.052359877||J>a-.052359877)&&(Dt=0),mt=g*wt*(w+N-6)-n*Nt+c*yt*(C+U-6),dt=Nt,0!==h&&(mt-=n/h*Dt,dt+=Dt/h);var It=(j+I*zt)%s;if(H+=(ct=d*wt*f+r*yt*u)*D,J+=(ut=m*wt*(v+b)+i*yt*(S+Y))*D,G+=mt*D,W+=dt*D,K+=(ht=-wt*p*(M+x-14-6*_)-yt*l*(F+R-14-6*_))*D,0!==X){var jt=Math.pow(Q/e,2/3);if(2===X){var Pt=n*n,Et=H,kt=_,Tt=(H=V)*(_=B),qt=void 0,Lt=void 0,Ft=void 0,Rt=void 0,St=void 0,Yt=void 0,At=void 0,Ot=void 0,Ct=void 0;H<=.65?(qt=3.616-13.247*H+16.29*_,Lt=117.39*H-19.302-228.419*_+156.591*Tt,Ft=109.7927*H-18.9068-214.6334*_+146.5816*Tt,Rt=242.694*H-41.122-471.094*_+313.953*Tt,St=841.88*H-146.407-1629.014*_+1083.435*Tt,Yt=3017.977*H-532.114-5740.032*_+3708.276*Tt):(qt=331.819*H-72.099-508.738*_+266.724*Tt,Lt=1582.851*H-346.844-2415.925*_+1246.113*Tt,Ft=1554.908*H-342.585-2366.899*_+1215.972*Tt,Rt=4758.686*H-1052.797-7193.992*_+3651.957*Tt,St=16178.11*H-3581.69-24462.77*_+12422.52*Tt,Yt=H>.715?29936.92*H-5149.66-54087.36*_+31324.56*Tt:1464.74-4664.75*H+3763.64*_),H<.7?(Ct=4988.61*H-919.2277-9064.77*_+5542.21*Tt,At=4568.6173*H-822.71072-8491.4146*_+5337.524*Tt,Ot=4690.25*H-853.666-8624.77*_+5341.4*Tt):(Ct=161616.52*H-37995.78-229838.2*_+109377.94*Tt,At=218913.95*H-51752.104-309468.16*_+146349.42*Tt,Ot=170470.89*H-40023.88-242699.48*_+115605.82*Tt);var Ut=h*h,Vt=Q*Q*3*(jt*jt),Bt=17891679e-13*Vt;$=Bt*(_t=.75*(1+2*n+Pt))*(-.306-.44*(H-.64)),tt=Bt*(1.5*Ut)*qt,et=(Bt=3.7393792e-7*(Vt*=jt))*(1.875*h*(1-2*n-3*Pt))*Lt,nt=Bt*(-1.875*h*(1+2*n-3*Pt))*Ft,ot=(Bt=2*(Vt*=jt)*7.3636953e-9)*(35*Ut*_t)*Rt,at=Bt*(39.375*Ut*Ut)*St,st=(Bt=1.1428639e-7*(Vt*=jt))*(9.84375*h*(Ut*(1-2*n-5*Pt)+.33333333*(4*n-2+6*Pt)))*Yt,rt=Bt*(h*(4.92187512*Ut*(-2-4*n+10*Pt)+6.56250012*(1+2*n-3*Pt)))*Ot,it=(Bt=2*Vt*2.1765803e-9)*(29.53125*h*(2-8*n+Pt*(8*n-12+10*Pt)))*At,lt=Bt*(29.53125*h*(-2-8*n+Pt*(12+8*n-10*Pt)))*Ct,xt=(P+T+T-(It+It))%s,Mt=E+ht+2*(q+dt-zt)-k,H=Et,_=kt}if(1===X){var _t,Ht=1+n;gt=2*(pt=3*Q*Q*jt*jt)*(_t=.75*(1+n)*(1+n))*(1+_*(.8125*_-2.5))*17891679e-13,ft=3*pt*(Ht*=1.875*Ht*Ht)*(1+_*(6.60937*_-6))*2.2123015e-7*jt,pt=pt*(.9375*h*h*(1+3*n)-.75*(1+n))*(Lt=1+2*_)*21460748e-13*jt,xt=(P+T+o-It)%s,Mt=E+L+ht+mt+dt-(k+zt)}vt=xt,bt=k,Z=0,Q=k+0}return{em:H,argpm:G,inclm:J,mm:K,nm:Q,nodem:W,irez:X,atime:Z,d2201:$,d2211:tt,d3210:et,d3222:nt,d4410:ot,d4422:at,d5220:st,d5232:rt,d5421:it,d5433:lt,dedt:ct,didt:ut,dmdt:ht,dndt:0,dnodt:dt,domdt:mt,del1:pt,del2:gt,del3:ft,xfact:Mt,xlamo:xt,xli:vt,xni:bt}},t.dspace=function(t,e,n,o,a,r,i,l,c,u,h,d,m,p,g,f,M,x,v,b,z,y,w,N,D,I,j,P,E,k,T,q,L,F,R,S){var Y=.13130908,A=2.8843198,O=.37448087,C=5.7686396,U=.95240898,V=1.8014998,B=1.050833,_=4.4108898,H=259200,G=0,J=(N+.0043752690880113*w)%s;if(E+=d*y,T+=f*y,k+=v*y,R+=x*y,L+=M*y,0!==t){(0===P||y*P<=0||Math.abs(y)<Math.abs(P))&&(P=0,F=j,q=I);var K;K=y>0?720:-720;for(var Q=void 0,W=void 0,X=void 0,Z=void 0,$=void 0,tt=void 0,et=void 0,nt=381;381===nt;)2!==t?(tt=m*Math.sin(q-Y)+p*Math.sin(2*(q-A))+g*Math.sin(3*(q-O)),Z=F+D,$=m*Math.cos(q-Y)+2*p*Math.cos(2*(q-A))+3*g*Math.cos(3*(q-O)),$*=Z):(X=(et=b+z*P)+et,W=q+q,tt=e*Math.sin(X+q-C)+n*Math.sin(q-C)+o*Math.sin(et+q-U)+a*Math.sin(-et+q-U)+r*Math.sin(X+W-V)+i*Math.sin(W-V)+l*Math.sin(et+q-B)+c*Math.sin(-et+q-B)+u*Math.sin(et+W-_)+h*Math.sin(-et+W-_),Z=F+D,$=e*Math.cos(X+q-C)+n*Math.cos(q-C)+o*Math.cos(et+q-U)+a*Math.cos(-et+q-U)+l*Math.cos(et+q-B)+c*Math.cos(-et+q-B)+2*r*Math.cos(X+W-V)+i*Math.cos(W-V)+u*Math.cos(et+W-_)+h*Math.cos(-et+W-_),$*=Z),Math.abs(y-P)>=720?nt=381:(Q=y-P,nt=0),381===nt&&(q+=Z*K+tt*H,F+=tt*K+$*H,P+=K);S=F+tt*Q+$*Q*Q*.5;var ot=q+Z*Q+tt*Q*Q*.5;1!==t?(L=ot-2*R+2*J,G=S-j):(L=ot-R-k+J,G=S-j),S=j+G}return[E,k,T,L,R,S]},t.initl=function(e){var n=e.opsmode,o=e.ecco,a=e.epoch,s=e.inclo,r=e.xke,i=e.j2,l=e.no,c=2*Math.PI,u=2/3,h=o*o,d=1-h,m=Math.sqrt(d),p=Math.cos(s),g=p*p,f=Math.pow(r/l,u),M=.75*i*(3*g-1)/(m*d),x=M/(f*f),v=f*(1-x*x-x*(1/3+134*x*x/81));l/=1+(x=M/(v*v));var b,z=Math.pow(r/l,u),y=Math.sin(s),w=z*d,N=1-5*g,D=-N-g-g,I=1/z,j=w*w,P=z*(1-o);if("a"===n){var E=a-7305,k=Math.floor(E+1e-8),T=.017202791694070362;(b=(1.7321343856509375+T*k+(T+c)*(E-k)+E*E*5075514194322695e-30)%c)<0&&(b+=c)}else b=t.gstime(a+2433281.5);return{no:l,method:"n",ainv:I,ao:z,con41:D,con42:N,cosio:p,cosio2:g,eccsq:h,omeosq:d,posq:j,rp:P,rteosq:m,sinio:y,gsto:b}},t.sgp4init=function(e,n){var o=n.whichconst,a=void 0===o?"wgs72":o,r=n.opsmode,c=void 0===r?"i":r,u=n.satn,h=void 0===u?e.satnum:u,d=n.epoch,m=n.xbstar,p=n.xecco,g=n.xargpo,f=n.xinclo,M=n.xndot,x=n.xnddot,v=n.xmo,b=n.xno,z=n.xnodeo;e.isimp=0,e.method="n",e.aycof=0,e.con41=0,e.cc1=0,e.cc4=0,e.cc5=0,e.d2=0,e.d3=0,e.d4=0,e.delmo=0,e.eta=0,e.argpdot=0,e.omgcof=0,e.sinmao=0,e.t=0,e.t2cof=0,e.t3cof=0,e.t4cof=0,e.t5cof=0,e.x1mth2=0,e.x7thm1=0,e.mdot=0,e.nodedot=0,e.xlcof=0,e.xmcof=0,e.nodecf=0,e.irez=0,e.d2201=0,e.d2211=0,e.d3210=0,e.d3222=0,e.d4410=0,e.d4422=0,e.d5220=0,e.d5232=0,e.d5421=0,e.d5433=0,e.dedt=0,e.del1=0,e.del2=0,e.del3=0,e.didt=0,e.dmdt=0,e.dnodt=0,e.domdt=0,e.e3=0,e.ee2=0,e.peo=0,e.pgho=0,e.pho=0,e.PInco=0,e.plo=0,e.se2=0,e.se3=0,e.sgh2=0,e.sgh3=0,e.sgh4=0,e.sh2=0,e.sh3=0,e.si2=0,e.si3=0,e.sl2=0,e.sl3=0,e.sl4=0,e.gsto=0,e.xfact=0,e.xgh2=0,e.xgh3=0,e.xgh4=0,e.xh2=0,e.xh3=0,e.xi2=0,e.xi3=0,e.xl2=0,e.xl3=0,e.xl4=0,e.xlamo=0,e.zmol=0,e.zmos=0,e.atime=0,e.xli=0,e.xni=0;var y=t.getgravconst(a);e.tumin=y.tumin,e.mus=y.mus,e.radiusearthkm=y.radiusearthkm,e.xke=y.xke,e.j2=y.j2,e.j3=y.j3,e.j4=y.j4,e.j3oj2=y.j3oj2;var w=y.j2,N=y.j4,D=y.xke,I=y.j3oj2;e.error=0,e.operationmode=c;var j=h.split("")[0].toLowerCase();isNaN(parseInt(j))?e.satnum=parseInt(j.charCodeAt(0)-96+9+e.satnum.slice(1,5)).toString():e.satnum=h,e.bstar=m,e.ndot=M,e.nddot=x,e.ecco=p,e.argpo=g,e.inclo=f,e.mo=v,e.no=b,e.nodeo=z;var P=78/e.radiusearthkm+1,E=42/e.radiusearthkm,k=E*E*E*E;e.init="y",e.t=0;var T={ecco:e.ecco,epoch:d,inclo:e.inclo,no:e.no,method:e.method,opsmode:e.operationmode,xke:e.xke,j2:e.j2},q=t.initl(T),L=q.ao,F=q.con42,R=q.cosio,S=q.cosio2,Y=q.eccsq,A=q.omeosq,O=q.posq,C=q.rp,U=q.rteosq,V=q.sinio;if(e.no=q.no,e.con41=q.con41,e.gsto=q.gsto,e.a=Math.pow(e.no*e.tumin,-2/3),e.alta=e.a*(1+e.ecco)-1,e.altp=e.a*(1-e.ecco)-1,e.error=0,A>=0||e.no>=0){e.isimp=0,C<220/e.radiusearthkm+1&&(e.isimp=1);var B=P,_=k,H=(C-1)*e.radiusearthkm;if(H<156){B=H-78,H<98&&(B=20);var G=(120-B)/e.radiusearthkm;_=G*G*G*G,B=B/e.radiusearthkm+1}var J=1/O,K=1/(L-B);e.eta=L*e.ecco*K;var Q=e.eta*e.eta,W=e.ecco*e.eta,X=Math.abs(1-Q),Z=_*Math.pow(K,4),$=Z/Math.pow(X,3.5),tt=$*e.no*(L*(1+1.5*Q+W*(4+Q))+.375*w*K/X*e.con41*(8+3*Q*(8+Q)));e.cc1=e.bstar*tt;var et=0;e.ecco>1e-4&&(et=-2*Z*K*I*e.no*V/e.ecco),e.x1mth2=1-S,e.cc4=2*e.no*$*L*A*(e.eta*(2+.5*Q)+e.ecco*(.5+2*Q)-w*K/(L*X)*(-3*e.con41*(1-2*W+Q*(1.5-.5*W))+.75*e.x1mth2*(2*Q-W*(1+Q))*Math.cos(2*e.argpo))),e.cc5=2*$*L*A*(1+2.75*(Q+W)+W*Q);var nt=S*S,ot=1.5*w*J*e.no,at=.5*ot*w*J,st=-.46875*N*J*J*e.no;e.mdot=e.no+.5*ot*U*e.con41+.0625*at*U*(13-78*S+137*nt),e.argpdot=-.5*ot*F+.0625*at*(7-114*S+395*nt)+st*(3-36*S+49*nt);var rt=-ot*R;e.nodedot=rt+(.5*at*(4-19*S)+2*st*(3-7*S))*R;var it=e.argpdot+e.nodedot;e.omgcof=e.bstar*et*Math.cos(e.argpo),e.xmcof=0,e.ecco>1e-4&&(e.xmcof=-i*Z*e.bstar/W),e.nodecf=3.5*A*rt*e.cc1,e.t2cof=1.5*e.cc1,Math.abs(R+1)>15e-13?e.xlcof=-.25*I*V*(3+5*R)/(1+R):e.xlcof=-.25*I*V*(3+5*R)/l,e.aycof=-.5*I*V;var lt=1+e.eta*Math.cos(e.mo);if(e.delmo=lt*lt*lt,e.sinmao=Math.sin(e.mo),e.x7thm1=7*S-1,s/e.no>=225){e.method="d",e.isimp=1;var ct=e.inclo,ut={epoch:d,ep:e.ecco,argpp:e.argpo,tc:0,inclp:e.inclo,nodep:e.nodeo,np:e.no,e3:e.e3,ee2:e.ee2,peo:e.peo,pgho:e.pgho,pho:e.pho,PInco:e.PInco,plo:e.plo,se2:e.se2,se3:e.se3,sgh2:e.sgh2,sgh3:e.sgh3,sgh4:e.sgh4,sh2:e.sh2,sh3:e.sh3,si2:e.si2,si3:e.si3,sl2:e.sl2,sl3:e.sl3,sl4:e.sl4,xgh2:e.xgh2,xgh3:e.xgh3,xgh4:e.xgh4,xh2:e.xh2,xh3:e.xh3,xi2:e.xi2,xi3:e.xi3,xl2:e.xl2,xl3:e.xl3,xl4:e.xl4,zmol:e.zmol,zmos:e.zmos},ht=t.dscom(ut);e.e3=ht.e3,e.ee2=ht.ee2,e.peo=ht.peo,e.pgho=ht.pgho,e.pho=ht.pho,e.PInco=ht.PInco,e.plo=ht.plo,e.se2=ht.se2,e.se3=ht.se3,e.sgh2=ht.sgh2,e.sgh3=ht.sgh3,e.sgh4=ht.sgh4,e.sh2=ht.sh2,e.sh3=ht.sh3,e.si2=ht.si2,e.si3=ht.si3,e.sl2=ht.sl2,e.sl3=ht.sl3,e.sl4=ht.sl4;var dt=ht.sinim,mt=ht.cosim,pt=ht.em,gt=ht.emsq,ft=ht.s1,Mt=ht.s2,xt=ht.s3,vt=ht.s4,bt=ht.s5,zt=ht.ss1,yt=ht.ss2,wt=ht.ss3,Nt=ht.ss4,Dt=ht.ss5,It=ht.sz1,jt=ht.sz3,Pt=ht.sz11,Et=ht.sz13,kt=ht.sz21,Tt=ht.sz23,qt=ht.sz31,Lt=ht.sz33;e.xgh2=ht.xgh2,e.xgh3=ht.xgh3,e.xgh4=ht.xgh4,e.xh2=ht.xh2,e.xh3=ht.xh3,e.xi2=ht.xi2,e.xi3=ht.xi3,e.xl2=ht.xl2,e.xl3=ht.xl3,e.xl4=ht.xl4,e.zmol=ht.zmol,e.zmos=ht.zmos;var Ft=ht.nm,Rt=ht.z1,St=ht.z3,Yt=ht.z11,At=ht.z13,Ot=ht.z21,Ct=ht.z23,Ut=ht.z31,Vt=ht.z33,Bt={inclo:ct,init:e.init,ep:e.ecco,inclp:e.inclo,nodep:e.nodeo,argpp:e.argpo,mp:e.mo,opsmode:e.operationmode},_t=t.dpper(e,Bt);e.ecco=_t.ep,e.inclo=_t.inclp,e.nodeo=_t.nodep,e.argpo=_t.argpp,e.mo=_t.mp;var Ht={xke:D,cosim:mt,emsq:gt,argpo:e.argpo,s1:ft,s2:Mt,s3:xt,s4:vt,s5:bt,sinim:dt,ss1:zt,ss2:yt,ss3:wt,ss4:Nt,ss5:Dt,sz1:It,sz3:jt,sz11:Pt,sz13:Et,sz21:kt,sz23:Tt,sz31:qt,sz33:Lt,t:e.t,tc:0,gsto:e.gsto,mo:e.mo,mdot:e.mdot,no:e.no,nodeo:e.nodeo,nodedot:e.nodedot,xPIdot:it,z1:Rt,z3:St,z11:Yt,z13:At,z21:Ot,z23:Ct,z31:Ut,z33:Vt,ecco:e.ecco,eccsq:Y,em:pt,argpm:0,inclm:ct,mm:0,nm:Ft,nodem:0,irez:e.irez,atime:e.atime,d2201:e.d2201,d2211:e.d2211,d3210:e.d3210,d3222:e.d3222,d4410:e.d4410,d4422:e.d4422,d5220:e.d5220,d5232:e.d5232,d5421:e.d5421,d5433:e.d5433,dedt:e.dedt,didt:e.didt,dmdt:e.dmdt,dnodt:e.dnodt,domdt:e.domdt,del1:e.del1,del2:e.del2,del3:e.del3,xfact:e.xfact,xlamo:e.xlamo,xli:e.xli,xni:e.xni},Gt=t.dsinit(Ht);e.irez=Gt.irez,e.atime=Gt.atime,e.d2201=Gt.d2201,e.d2211=Gt.d2211,e.d3210=Gt.d3210,e.d3222=Gt.d3222,e.d4410=Gt.d4410,e.d4422=Gt.d4422,e.d5220=Gt.d5220,e.d5232=Gt.d5232,e.d5421=Gt.d5421,e.d5433=Gt.d5433,e.dedt=Gt.dedt,e.didt=Gt.didt,e.dmdt=Gt.dmdt,e.dnodt=Gt.dnodt,e.domdt=Gt.domdt,e.del1=Gt.del1,e.del2=Gt.del2,e.del3=Gt.del3,e.xfact=Gt.xfact,e.xlamo=Gt.xlamo,e.xli=Gt.xli,e.xni=Gt.xni}if(1!==e.isimp){var Jt=e.cc1*e.cc1;e.d2=4*L*K*Jt;var Kt=e.d2*K*e.cc1/3;e.d3=(17*L+B)*Kt,e.d4=.5*Kt*L*K*(221*L+31*B)*e.cc1,e.t3cof=e.d2+2*Jt,e.t4cof=.25*(3*e.d3+e.cc1*(12*e.d2+10*Jt)),e.t5cof=.2*(3*e.d4+12*e.cc1*e.d3+6*e.d2*e.d2+15*Jt*(2*e.d2+Jt))}}t.propagate(e,0),e.init="n"},t.propagate=function(e,n){var o=e.xke,r=e.j2,c=e.j3oj2,u=e.radiusearthkm*e.xke/60;e.t=n,e.error=0;var h=e.mo+e.mdot*e.t,d=e.argpo+e.argpdot*e.t,m=e.nodeo+e.nodedot*e.t,p=d,g=h,f=e.t*e.t,M=m+e.nodecf*f,x=1-e.cc1*e.t,v=e.bstar*e.cc4*e.t,b=e.t2cof*f;if(1!==e.isimp){var z=e.omgcof*e.t,y=1+e.eta*Math.cos(h),w=z+e.xmcof*(y*y*y-e.delmo);g=h+w,p=d-w;var N=f*e.t,D=N*e.t;x=x-e.d2*f-e.d3*N-e.d4*D,v+=e.bstar*e.cc5*(Math.sin(g)-e.sinmao),b=b+e.t3cof*N+D*(e.t4cof+e.t*e.t5cof)}var I=e.no,j=e.ecco,P=e.inclo;if("d"===e.method){var E=e.t,k=t.dspace(e.irez,e.d2201,e.d2211,e.d3210,e.d3222,e.d4410,e.d4422,e.d5220,e.d5232,e.d5421,e.d5433,e.dedt,e.del1,e.del2,e.del3,e.didt,e.dmdt,e.dnodt,e.domdt,e.argpo,e.argpdot,e.t,E,e.gsto,e.xfact,e.xlamo,e.no,e.atime,j,p,P,e.xli,g,e.xni,M,I);j=k[0],p=k[1],P=k[2],g=k[3],M=k[4],I=k[5]}if(I<=0)return e.error=2,{position:!1,velocity:!1};var T=Math.pow(o/I,i)*x*x;if(I=o/Math.pow(T,1.5),(j-=v)>=1||j<-.001)return e.error=1,{position:!1,velocity:!1};j<1e-6&&(j=1e-6);var q=(g+=e.no*b)+p+M,L=j,F=P,R=p%=s,S=M%=s,Y=g=((q%=s)-p-M)%s,A=Math.sin(P),O=Math.cos(P);if("d"===e.method){var C={inclo:e.inclo,init:"n",ep:L,inclp:F,nodep:S,argpp:R,mp:Y,opsmode:e.operationmode},U=t.dpper(e,C);if(L=U.ep,S=U.nodep,R=U.argpp,Y=U.mp,(F=U.inclp)<0&&(F=-F,S+=a,R-=a),L<0||L>1)return e.error=3,{position:!1,velocity:!1}}"d"===e.method&&(A=Math.sin(F),O=Math.cos(F),e.aycof=-.5*c*A,Math.abs(O+1)>15e-13?e.xlcof=-.25*c*A*(3+5*O)/(1+O):e.xlcof=-.25*c*A*(3+5*O)/l);for(var V,B,_=L*Math.cos(R),H=1/(T*(1-L*L)),G=L*Math.sin(R)+H*e.aycof,J=(Y+R+S+H*e.xlcof*_-S)%s,K=J,Q=9999.9,W=1;Math.abs(Q)>=1e-12&&W<=10;)B=Math.sin(K),Q=(J-G*(V=Math.cos(K))+_*B-K)/(Q=1-V*_-B*G),Math.abs(Q)>=.95&&(Q=Q>0?.95:-.95),K+=Q,W+=1;var X=_*V+G*B,Z=_*B-G*V,$=_*_+G*G,tt=T*(1-$);if(tt<0)return e.error=4,{position:!1,velocity:!1};var et=T*(1-X),nt=Math.sqrt(T)*Z/et,ot=Math.sqrt(tt)/et,at=Math.sqrt(1-$),st=T/et*(B-G-_*(H=Z/(1+at))),rt=T/et*(V-_+G*H),it=Math.atan2(st,rt),lt=(rt+rt)*st,ct=1-2*st*st,ut=.5*r*(H=1/tt),ht=ut*H;if("d"===e.method){var dt=O*O;e.con41=3*dt-1,e.x1mth2=1-dt,e.x7thm1=7*dt-1}var mt=et*(1-1.5*ht*at*e.con41)+.5*ut*e.x1mth2*ct;if(mt<1)return e.error=6,{position:!1,velocity:!1};it-=.25*ht*e.x7thm1*lt;var pt=S+1.5*ht*O*lt,gt=F+1.5*ht*O*A*ct,ft=nt-I*ut*e.x1mth2*lt/o,Mt=ot+I*ut*(e.x1mth2*ct+1.5*e.con41)/o,xt=Math.sin(it),vt=Math.cos(it),bt=Math.sin(pt),zt=Math.cos(pt),yt=Math.sin(gt),wt=Math.cos(gt),Nt=-bt*wt,Dt=zt*wt,It=Nt*xt+zt*vt,jt=Dt*xt+bt*vt,Pt=yt*xt,Et=Nt*vt-zt*xt,kt=Dt*vt-bt*xt,Tt=yt*vt;return{position:{x:mt*It*e.radiusearthkm,y:mt*jt*e.radiusearthkm,z:mt*Pt*e.radiusearthkm},velocity:{x:(ft*It+Mt*Et)*u,y:(ft*jt+Mt*kt)*u,z:(ft*Pt+Mt*Tt)*u}}},t.getgravconst=function(t){var e,n,o,a,s,r,i,l;switch(t){case"wgs72old":s=398600.79964,r=6378.135,i=1/(l=.0743669161),a=-165597e-11,o=(n=-253881e-11)/(e=.001082616);break;case"wgs72":s=398600.8,r=6378.135,i=1/(l=60/Math.sqrt(r*r*r/s)),a=-165597e-11,o=(n=-253881e-11)/(e=.001082616);break;case"wgs84":s=398600.5,r=6378.137,i=1/(l=60/Math.sqrt(r*r*r/s)),a=-161098761e-14,o=(n=-253215306e-14)/(e=.00108262998905);break;default:throw new Error("unknown gravity option ".concat(t))}return{tumin:i,mus:s,radiusearthkm:r,xke:l,j2:e,j3:n,j4:a,j3oj2:o}},t.createSatrec=function(e,n,o,s){void 0===o&&(o="wgs72"),void 0===s&&(s="i");var i,l={a:null,am:null,alta:null,altp:null,argpdot:null,argpo:null,aycof:null,bstar:null,cc1:null,cc4:null,cc5:null,con41:null,d2:null,d3:null,d4:null,d5232:null,d5421:null,d5433:null,dedt:null,delmo:null,del1:null,ecco:null,em:null,epochdays:null,epochyr:null,error:null,eta:null,gsto:null,im:null,inclo:null,init:null,isimp:null,jdsatepoch:null,mdot:null,method:null,mo:null,mm:null,nddot:null,ndot:null,no:null,nodecf:null,nodedot:null,nodeo:null,om:null,Om:null,omgcof:null,operationmode:null,satnum:null,sinmao:null,t:null,t2cof:null,t3cof:null,t4cof:null,t5cof:null,x1mth2:null,x7thm1:null,xlcof:null,xmcof:null,xfact:null,xlamo:null,xli:null,xgh4:null,xgh3:null,xh2:null,xi2:null,xi3:null,xl2:null,xl3:null,xl4:null,zmol:null,zmos:null,dmdt:null,dnodt:null,domdt:null,e3:null,ee2:null,peo:null,pgho:null,pho:null,PInco:null,plo:null,se2:null,se3:null,sgh2:null,sgh3:null,sgh4:null,sh2:null,sh3:null,si2:null,si3:null,sl2:null,sl3:null,sl4:null,xgh2:null,xh3:null,tumin:null,radiusearthkm:null,irez:null,d3210:null,d3222:null,d4410:null,d4422:null,d5220:null,del2:null,del3:null,didt:null,atime:null,j2:null,j3:null,j4:null,mus:null,xke:null,j3oj2:null,xni:null,d2201:null,d2211:null,nm:null},c=1440/(2*a);l.error=0,l.satnum=e.substring(2,7),l.epochyr=parseInt(e.substring(18,20)),l.epochdays=parseFloat(e.substring(20,32)),l.ndot=parseFloat(e.substring(33,43)),l.nddot=parseFloat("".concat(e.substring(44,45),".").concat(e.substring(45,50),"E").concat(e.substring(50,52))),l.bstar=parseFloat("".concat(e.substring(53,54),".").concat(e.substring(54,59),"E").concat(e.substring(59,61))),l.inclo=parseFloat(n.substring(8,16)),l.nodeo=parseFloat(n.substring(17,25)),l.ecco=parseFloat(".".concat(n.substring(26,33))),l.argpo=parseFloat(n.substring(34,42)),l.mo=parseFloat(n.substring(43,51)),l.no=parseFloat(n.substring(52,63)),l.no/=c,l.inclo*=r,l.nodeo*=r,l.argpo*=r,l.mo*=r,i=l.epochyr<57?l.epochyr+2e3:l.epochyr+1900;var u=t.days2mdhms(i,l.epochdays),h=u.mon,d=u.day,m=u.hr,p=u.minute,g=u.sec,f=t.jday(i,h,d,m,p,g);return l.jdsatepoch=f.jd+f.jdFrac,t.sgp4init(l,{whichconst:o,opsmode:s,satn:l.satnum,epoch:l.jdsatepoch-2433281.5,xbstar:l.bstar,xecco:l.ecco,xargpo:l.argpo,xinclo:l.inclo,xndot:l.ndot,xnddot:l.nddot,xmo:l.mo,xno:l.no,xnodeo:l.nodeo}),l},t.gstime=function(t){var e=(t-2451545)/36525,n=-62e-7*e*e*e+.093104*e*e+3164400184.812866*e+67310.54841;return(n=n*r/240%s)<0&&(n+=s),n},t.sgn=function(t){return t<0?-1:1},t.mag=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])},t.cross=function(t,e){var n=[0,0,0];return n[0]=t[1]*e[2]-t[2]*e[1],n[1]=t[2]*e[0]-t[0]*e[2],n[2]=t[0]*e[1]-t[1]*e[0],n},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.angle=function(e,n){var o=t.mag(e),a=t.mag(n);if(o*a>1e-8*1e-8){var s=t.dot(e,n)/(o*a);return Math.abs(s)>1&&(s=Number(t.sgn(s))),Math.acos(s)}return 999999.1},t.asinh=function(t){return Math.log(t+Math.sqrt(t*t+1))},t.newtonnu=function(e,n){var o=999999.9,s=999999.9,r=1e-8;if(Math.abs(e)<r)s=n,o=n;else if(e<1-r){var i=Math.sqrt(1-e*e)*Math.sin(n)/(1+e*Math.cos(n)),l=(e+Math.cos(n))/(1+e*Math.cos(n));s=(o=Math.atan2(i,l))-e*Math.sin(o)}else e>1+r?e>1&&Math.abs(n)+1e-5<a-Math.acos(1/e)&&(i=Math.sqrt(e*e-1)*Math.sin(n)/(1+e*Math.cos(n)),o=t.asinh(i),s=e*t.sinh(o)-o):Math.abs(n)<168*a/180&&(s=(o=Math.tan(.5*n))+o*o*o/3);return e<1&&((s%=2*a)<0&&(s+=2*a),o%=2*a),{e0:o,m:s}},t.sinh=function(t){return(Math.exp(t)-Math.exp(-t))/2},t.rv2coe=function(e,n,o){var r,i,l,c,u,h,d,m,p,g,f,M,x,v,b,z,y,w=[0,0,0],N=[0,0,0],D=.5*a,I=1e-8,j=999999.1,P=t.mag(e),E=t.mag(n),k=t.cross(e,n),T=t.mag(k);if(T>I){w[0]=-k[1],w[1]=k[0],w[2]=0,x=t.mag(w);var q=E*E-o/P;for(M=t.dot(e,n),z=0;z<=2;z++)N[z]=(q*e[z]-M*n[z])/o;if(l=t.mag(N),b=E*E*.5-o/P,i=Math.abs(b)>I?-o/(2*b):999999.9,r=T*T/o,v=k[2]/T,c=Math.acos(v),y=1,l<I?y=c<I||Math.abs(c-a)<I?2:3:(c<I||Math.abs(c-a)<I)&&(y=4),x>I){var L=w[0]/x;Math.abs(L)>1&&(L=t.sgn(L)),u=Math.acos(L),w[1]<0&&(u=s-u)}else u=j;1===y?(h=t.angle(w,N),N[2]<0&&(h=s-h)):h=j,1===y||4===y?(d=t.angle(N,e),M<0&&(d=s-d)):d=j,3===y?(p=t.angle(w,e),e[2]<0&&(p=s-p),m=p):p=j,l>I&&4===y?(L=N[0]/l,Math.abs(L)>1&&(L=t.sgn(L)),f=Math.acos(L),N[1]<0&&(f=s-f),c>D&&(f=s-f)):f=j,P>I&&2===y?(L=e[0]/P,Math.abs(L)>1&&(L=t.sgn(L)),g=Math.acos(L),e[1]<0&&(g=s-g),c>D&&(g=s-g),m=g):g=j,1!==y&&4!==y||(m=t.newtonnu(l,d).m)}else r=j,i=j,l=j,c=j,u=j,h=j,d=j,m=j,p=j,g=j,f=j;return{p:r,a:i,ecc:l,incl:c,omega:u,argp:h,nu:d,m,arglat:p,truelon:g,lonper:f}},t.jday=function(t,e,n,o,a,s){var r=367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5,i=(s+60*a+3600*o)/86400;if(Math.abs(i)>1){var l=Math.floor(i);r+=l,i-=l}return{jd:r,jdFrac:i}},t.days2mdhms=function(t,e){for(var n=[31,t%4==0?29:28,31,30,31,30,31,31,30,31,30,31],o=Math.floor(e),a=1,s=0;o>s+n[a-1]&&a<12;)s+=n[a-1],a+=1;var r=a,i=o-s,l=24*(e-o),c=Math.floor(l);l=60*(l-c);var u=Math.floor(l);return{mon:r,day:i,hr:c,minute:u,sec:60*(l-u)}},t.invjday=function(e,n){var o,a;Math.abs(n)>=1&&(e+=Math.floor(n),n-=Math.floor(n));var s=e-Math.floor(e)-.5;Math.abs(s)>1e-8&&(e-=s,n+=s);var r=e-2415019.5,i=r/365.25,l=1900+Math.floor(i);o=Math.floor(.25*(l-1901)),(a=Math.floor(r-(365*(l-1900)+o)))+n<1&&(l-=1,o=Math.floor(.25*(l-1901)),a=Math.floor(r-(365*(l-1900)+o)));var c=t.days2mdhms(l,a+n);return{year:l,mon:c.mon,day:c.day,hr:c.hr,minute:c.minute,sec:c.sec}},t}(),h=function(){function t(){}return t.getDegLat=function(e){if(e<-a/2||e>a/2)throw new RangeError("Latitude radians must be in range [-PI/2; PI/2].");return t.rad2deg(e)},t.getDegLon=function(e){if(e<-a||e>a)throw new RangeError("Longitude radians must be in range [-PI; PI].");return t.rad2deg(e)},t.getRadLat=function(e){if(e<-90||e>90)throw new RangeError("Latitude degrees must be in range [-90; 90].");return t.deg2rad(e)},t.getRadLon=function(e){if(e<-180||e>180)throw new RangeError("Longitude degrees must be in range [-180; 180].");return t.deg2rad(e)},t.rad2deg=function(t){return 180*t/a},t.deg2rad=function(t){return t*a/180},t.ecf2eci=function(t,e){return{x:t.x*Math.cos(e)-t.y*Math.sin(e),y:t.x*Math.sin(e)+t.y*Math.cos(e),z:t.z}},t.ecf2rae=function(e,n){var o=t.lla2sez(e,n);return t.sez2rae(o)},t.eci2lla=function(t,e){for(var n=6378.137,o=Math.sqrt(t.x*t.x+t.y*t.y),r=(n-6356.7523142)/n,i=2*r-r*r,l=Math.atan2(t.y,t.x)-e;l<-a;)l+=s;for(;l>a;)l-=s;for(var c,u=0,h=Math.atan2(t.z,Math.sqrt(t.x*t.x+t.y*t.y));u<20;)c=1/Math.sqrt(1-i*(Math.sin(h)*Math.sin(h))),h=Math.atan2(t.z+n*c*i*Math.sin(h),o),u+=1;return{lon:l,lat:h,alt:o/Math.cos(h)-n*c}},t.eci2ecf=function(t,e){return{x:t.x*Math.cos(e)+t.y*Math.sin(e),y:t.x*-Math.sin(e)+t.y*Math.cos(e),z:t.z}},t.lla2ecf=function(t){var e=t.lon,n=t.lat,o=t.alt,a=6378.137,s=(a-6356.7523142)/a,r=2*s-s*s,i=a/Math.sqrt(1-r*(Math.sin(n)*Math.sin(n)));return{x:(i+o)*Math.cos(n)*Math.cos(e),y:(i+o)*Math.cos(n)*Math.sin(e),z:(i*(1-r)+o)*Math.sin(n)}},t.lla2sez=function(e,n){var o=e.lon,a=e.lat,s=t.lla2ecf(e),r=n.x-s.x,i=n.y-s.y,l=n.z-s.z;return{s:Math.sin(a)*Math.cos(o)*r+Math.sin(a)*Math.sin(o)*i-Math.cos(a)*l,e:-Math.sin(o)*r+Math.cos(o)*i,z:Math.cos(a)*Math.cos(o)*r+Math.cos(a)*Math.sin(o)*i+Math.sin(a)*l}},t.rae2sez=function(t){return{s:-t.rng*Math.cos(t.el)*Math.cos(t.az),e:t.rng*Math.cos(t.el)*Math.sin(t.az),z:t.rng*Math.sin(t.el)}},t.rae2ecf=function(e,n){var o=t.lla2ecf(n),a=t.rae2sez(e),s=Math.sin(n.lat),r=Math.sin(n.lon),i=Math.cos(n.lat),l=Math.cos(n.lon);return{x:s*l*a.s+-r*a.e+i*l*a.z+o.x,y:s*r*a.s+l*a.e+i*r*a.z+o.y,z:-i*a.s+s*a.z+o.z}},t.sez2rae=function(t){var e=Math.sqrt(t.s*t.s+t.e*t.e+t.z*t.z),n=Math.asin(t.z/e);return{rng:e,az:Math.atan2(-t.e,t.s)+a,el:n}},t}(),d=function(){function t(){}return t.distance=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)+Math.pow(t.z-e.z,2))},t.dopplerFactor=function(e,n,o){var a=7292115e-11,s={x:n.x-e.x,y:n.y-e.y,z:n.z-e.z},r=Math.sqrt(Math.pow(s.x,2)+Math.pow(s.y,2)+Math.pow(s.z,2)),i=o.x+a*e.y,l=o.y-a*e.x,c=o.z,u=(s.x*i+s.y*l+s.z*c)/r;return 1+u/299792.458*t.sign(u)},t.createVec=function(t,e,n){for(var o=[],a=t;a<=e;a+=n)o.push(a);return o},t.roundToNDecimalPlaces=function(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)},t.Types=o,t.sign=function(t){return t>=0?1:-1},t.jday=function(t,e,n,o,a,s){if(!t){var r=new Date,i=new Date(r.getUTCFullYear(),0,0),l=r.getDate()-i.getDate();return Math.floor(l/c)}return 367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5+((s/60+a)/60+o)/24},t}(),m=function(t,e){this.start=t-1,this.stop=e,this.length=this.stop-this.start},p=function(){return(p=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)},g=function(){function t(){}return t.parseTle=function(e,n){var o=t.parseLine1(e),a=t.parseLine2(n);if(o.satNum!==a.satNum)throw new Error("Satellite numbers do not match");if(o.satNumRaw!==a.satNumRaw)throw new Error("Raw satellite numbers do not match");if(1!==o.lineNumber1)throw new Error("First line number must be 1");if(2!==a.lineNumber2)throw new Error("Second line number must be 2");return{satNum:o.satNum,intlDes:o.intlDes,epochYear:o.epochYear,epochDay:o.epochDay,meanMoDev1:o.meanMoDev1,meanMoDev2:o.meanMoDev2,bstar:o.bstar,inclination:a.inclination,raan:a.raan,eccentricity:a.eccentricity,argOfPerigee:a.argOfPerigee,meanAnomaly:a.meanAnomaly,meanMotion:a.meanMotion}},t.parseTleFull=function(e,n){var o=t.parseLine1(e),a=t.parseLine2(n);if(o.satNum!==a.satNum)throw new Error("Satellite numbers do not match");if(o.satNumRaw!==a.satNumRaw)throw new Error("Raw satellite numbers do not match");if(1!==o.lineNumber1)throw new Error("First line number must be 1");if(2!==a.lineNumber2)throw new Error("Second line number must be 2");return p(p({},o),a)},t.parseLine1=function(e){return{lineNumber1:t.getLineNumber(e),satNum:t.getSatNum(e),satNumRaw:t.getRawSatNum(e),classification:t.getClassification(e),intlDes:t.getIntlDes(e),intlDesYear:t.getIntlDesYear(e),intlDesLaunchNum:t.getIntlDesLaunchNum(e),intlDesLaunchPiece:t.getIntlDesLaunchPiece(e),epochYear:t.getEpochYear(e),epochYearFull:t.getEpochYearFull(e),epochDay:t.getEpochDay(e),meanMoDev1:t.getMeanMoDev1(e),meanMoDev2:t.getMeanMoDev2(e),bstar:t.getBstar(e),ephemerisType:t.getEphemerisType(e),elsetNum:t.getElsetNum(e),checksum1:t.getChecksum(e)}},t.parseLine2=function(e){return{lineNumber2:t.getLineNumber(e),satNum:t.getSatNum(e),satNumRaw:t.getRawSatNum(e),inclination:t.getInclination(e),raan:t.getRaan(e),eccentricity:t.getEccentricity(e),argOfPerigee:t.getArgOfPerigee(e),meanAnomaly:t.getMeanAnomaly(e),meanMotion:t.getMeanMotion(e),revNum:t.getRevNum(e),checksum2:t.getChecksum(e)}},t.getLineNumber=function(e){var n=parseInt(e.substring(t.lineNumber.start,t.lineNumber.stop));if(1!==n&&2!==n)throw new Error("Invalid line number");return n},t.getSatNum=function(e){var n=e.substring(t.satNum.start,t.satNum.stop),o=n.split("")[0].toLowerCase();return isNaN(parseInt(o))?parseInt(o.charCodeAt(0)-96+9+n.slice(1,5)):parseInt(n)},t.getRawSatNum=function(e){return e.substring(t.satNum.start,t.satNum.stop)},t.getClassification=function(e){return e.substring(t.classification.start,t.classification.stop)},t.getIntlDes=function(e){return e.substring(t.intlDes.start,t.intlDes.stop).trim()},t.getIntlDesYear=function(e){return parseInt(e.substring(t.intlDesYear.start,t.intlDesYear.stop))},t.getIntlDesLaunchNum=function(e){return parseInt(e.substring(t.intlDesLaunchNum.start,t.intlDesLaunchNum.stop))},t.getIntlDesLaunchPiece=function(e){return e.substring(t.intlDesLaunchPiece.start,t.intlDesLaunchPiece.stop).trim()},t.getEpochYear=function(e){var n=parseInt(e.substring(t.epochYear.start,t.epochYear.stop));if(n<0||n>99)throw new Error("Invalid epoch year");return n},t.getEpochYearFull=function(e){var n=parseInt(e.substring(t.epochYear.start,t.epochYear.stop));if(n<0||n>99)throw new Error("Invalid epoch year");return n<57?n+2e3:n+1900},t.getEpochDay=function(e){var n=parseFloat(e.substring(t.epochDay.start,t.epochDay.stop));if(n<1||n>365.99999999)throw new Error("Invalid epoch day");return d.roundToNDecimalPlaces(n,8)},t.getMeanMoDev1=function(e){var n=parseFloat(e.substring(t.meanMoDev1.start,t.meanMoDev1.stop));if(isNaN(n))throw new Error("Invalid first derivative of mean motion.");return d.roundToNDecimalPlaces(n,8)},t.getMeanMoDev2=function(e){var n=parseFloat(e.substring(t.meanMoDev2.start,t.meanMoDev2.stop));if(isNaN(n))throw new Error("Invalid second derivative of mean motion.");return n},t.getBstar=function(e){var n=t.bstar.start+1,o=t.bstar.start+6,a=t.bstar.stop-1,s=e.substring(t.bstar.start,n),r=parseFloat("0.".concat(e.substring(n,o))),i=e.substring(o,a),l=parseInt(e.substring(a,t.bstar.stop));if("-"===i)l*=-1;else if("+"!==i)throw new Error("Invalid BSTAR symbol: ".concat(s));if(r*=Math.pow(10,l),"-"===s)r*=-1;else if("+"!==s&&" "!==s)throw new Error("Invalid BSTAR symbol: ".concat(s));return d.roundToNDecimalPlaces(r,14)},t.getEphemerisType=function(e){return parseInt(e.substring(t.ephemerisType.start,t.ephemerisType.stop))},t.getElsetNum=function(e){return parseInt(e.substring(t.elsetNum.start,t.elsetNum.stop))},t.getChecksum=function(e){return parseInt(e.substring(t.checksum.start,t.checksum.stop))},t.getInclination=function(e){var n=parseFloat(e.substring(t.inclination.start,t.inclination.stop));if(n<0||n>180)throw new Error("Invalid inclination: ".concat(n));return d.roundToNDecimalPlaces(n,4)},t.getRaan=function(e){var n=parseFloat(e.substring(t.raan.start,t.raan.stop));if(!(n>=0&&n<=360))throw new Error("Invalid RAAN: ".concat(n));return d.roundToNDecimalPlaces(n,4)},t.getEccentricity=function(e){var n=parseFloat("0.".concat(e.substring(t.eccentricity.start,t.eccentricity.stop)));if(!(n>=0&&n<=1))throw new Error("Invalid eccentricity: ".concat(n));return d.roundToNDecimalPlaces(n,7)},t.getArgOfPerigee=function(e){var n=parseFloat(e.substring(t.argPerigee.start,t.argPerigee.stop));if(!(n>=0&&n<=360))throw new Error("Invalid argument of perigee: ".concat(n));return d.roundToNDecimalPlaces(n,4)},t.getMeanAnomaly=function(e){var n=parseFloat(e.substring(t.meanAnom.start,t.meanAnom.stop));if(!(n>=0&&n<=360))throw new Error("Invalid mean anomaly: ".concat(n));return d.roundToNDecimalPlaces(n,4)},t.getMeanMotion=function(e){var n=parseFloat(e.substring(t.meanMo.start,t.meanMo.stop));if(!(n>=0&&n<=17))throw new Error("Invalid mean motion: ".concat(n));return d.roundToNDecimalPlaces(n,8)},t.getRevNum=function(e){return parseInt(e.substring(t.revNum.start,t.revNum.stop))},t.lineNumber=new m(1,1),t.satNum=new m(3,7),t.classification=new m(8,8),t.intlDes=new m(10,17),t.intlDesYear=new m(10,11),t.intlDesLaunchNum=new m(12,14),t.intlDesLaunchPiece=new m(15,17),t.epochYear=new m(19,20),t.epochDay=new m(21,32),t.meanMoDev1=new m(34,43),t.meanMoDev2=new m(45,52),t.bstar=new m(54,61),t.ephemerisType=new m(63,63),t.elsetNum=new m(65,68),t.checksum=new m(69,69),t.inclination=new m(9,16),t.raan=new m(18,25),t.eccentricity=new m(27,33),t.argPerigee=new m(35,42),t.meanAnom=new m(44,51),t.meanMo=new m(53,63),t.revNum=new m(64,68),t}(),f=function(){function t(t,e,n){var o=g.parseTle(t,e);this.satNum=o.satNum,this.intlDes=o.intlDes,this.epochYear=o.epochYear,this.epochDay=o.epochDay,this.meanMoDev1=o.meanMoDev1,this.meanMoDev2=o.meanMoDev2,this.bstar=o.bstar,this.inclination=o.inclination,this.raan=o.raan,this.eccentricity=o.eccentricity,this.argOfPerigee=o.argOfPerigee,this.meanAnomaly=o.meanAnomaly,this.meanMotion=o.meanMotion,this.period=1440/this.meanMotion,this.satrec=u.createSatrec(t,e),this.options=n}return t.prototype.getStateVec=function(e){var n=t.calculateTimeVariables(e,this.satrec).m;return u.propagate(this.satrec,n)},t.prototype.getEci=function(e){var n=t.calculateTimeVariables(e,this.satrec).m;return u.propagate(this.satrec,n).position||{x:0,y:0,z:0}},t.prototype.getEcf=function(e){var n=t.calculateTimeVariables(e,this.satrec),o=n.m,a=n.gmst,s=u.propagate(this.satrec,o).position||{x:0,y:0,z:0};return h.eci2ecf(s,a)},t.prototype.getLla=function(e){var n=t.calculateTimeVariables(e,this.satrec),o=n.m,a=n.gmst,s=u.propagate(this.satrec,o).position||{x:0,y:0,z:0};return h.eci2lla(s,a)},t.calculateTimeVariables=function(t,e){var n=d.jday(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())+t.getUTCMilliseconds()*c;return{gmst:u.gstime(n),m:e?1440*(n-e.jdsatepoch):null,j:n}},t}()}},e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(409)})()}));
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={636:(t,e,n)=>{n.r(e),n.d(e,{DetailedSat:()=>R,Sat:()=>D,Sensor:()=>O,Sgp4:()=>d,SpaceObjectType:()=>o,Star:()=>_,Tle:()=>x,Transforms:()=>m,Utils:()=>v});var a={};n.r(a),n.d(a,{SpaceObjectType:()=>o});var o,r=Math.PI,s=2*r,i=r/180,c=2/3,l=15e-13,u=864e5,h=1.15741e-8,d=function(){function t(){}return t.dpper=function(t,e){var n=t.e3,a=t.ee2,o=t.peo,i=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,T=t.xgh2,N=t.xgh3,D=t.xgh4,E=t.xh2,R=t.xh3,I=t.xi2,O=t.xi3,z=t.xl2,_=t.xl3,C=t.xl4,S=t.zmol,L=t.zmos,P=e.ep,j=e.inclp,U=e.nodep,Y=e.argpp,F=e.mp,k=e.opsmode,q=void 0===k?"i":k,H=e.init,B=L+119459e-10*b;"y"===H&&(B=L);var V=B+.0335*Math.sin(B),G=Math.sin(V),J=.5*G*G-.25,K=-.5*G*Math.cos(V),W=h*J+d*K,Q=v*J+w*K,Z=y*J+x*K+A*G,X=m*J+p*K+f*G,$=g*J+M*K;B=S+.00015835218*b,"y"===H&&(B=S),V=B+.1098*Math.sin(B);var tt=W+(a*(J=.5*(G=Math.sin(V))*G-.25)+n*(K=-.5*G*Math.cos(V))),et=Q+(I*J+O*K),nt=Z+(z*J+_*K+C*G),at=X+(T*J+N*K+D*G),ot=$+(E*J+R*K);if("n"===H){nt-=u,at-=i,ot-=c,j+=et-=l,P+=tt-=o;var rt=Math.sin(j),st=Math.cos(j);if(j>=.2)Y+=at-=st*(ot/=rt),U+=ot,F+=nt;else{var it=Math.sin(U),ct=Math.cos(U),lt=rt*it,ut=rt*ct;lt+=ot*ct+et*st*it,ut+=-ot*it+et*st*ct,(U%=s)<0&&"a"===q&&(U+=s);var ht=F+Y+st*U;ht+=nt+at-et*U*rt;var dt=U;(U=Math.atan2(lt,ut))<0&&"a"===q&&(U+=s),Math.abs(dt-U)>r&&(U<dt?U+=s:U-=s),Y=ht-(F+=nt)-st*U}}return{ep:P,inclp:j,nodep:U,argpp:Y,mp:F}},t.dscom=function(t){var e,n,a,o,r,s,i,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,b,T,N,D,E,R,I,O,z,_,C,S,L,P,j,U,Y=t.epoch,F=t.ep,k=t.argpp,q=t.tc,H=t.inclp,B=t.nodep,V=t.np,G=.01675,J=.0549,K=2*Math.PI,W=V,Q=F,Z=Math.sin(B),X=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),st=Y+18261.5+q/1440,it=(4.523602-.00092422029*st)%K,ct=Math.sin(it),lt=Math.cos(it),ut=.91375164-.03568096*lt,ht=Math.sqrt(1-ut*ut),dt=.089683511*ct/ht,mt=Math.sqrt(1-dt*dt),pt=5.8351514+.001944368*st,ft=.39785416*ct/ht,gt=mt*lt+.91744867*dt*ct;ft=Math.atan2(ft,gt),ft+=pt-it;for(var Mt=Math.cos(ft),vt=Math.sin(ft),wt=.1945905,yt=-.98088458,xt=.91744867,At=.39785416,bt=X,Tt=Z,Nt=29864797e-13,Dt=1/W,Et=1;Et<=2;Et++){var Rt=wt*bt+yt*xt*Tt,It=-yt*bt+wt*xt*Tt,Ot=-wt*Tt+yt*xt*bt,zt=yt*At,_t=yt*Tt+wt*xt*bt,Ct=wt*At,St=nt*Ot+et*zt,Lt=nt*_t+et*Ct,Pt=-et*Ot+nt*zt,jt=-et*_t+nt*Ct,Ut=Rt*tt+St*$,Yt=It*tt+Lt*$,Ft=-Rt*$+St*tt,kt=-It*$+Lt*tt,qt=Pt*$,Ht=jt*$,Bt=Pt*tt,Vt=jt*tt;R=-6*Rt*Pt+at*(-24*Ut*Bt-6*Ft*qt),I=-6*(Rt*jt+It*Pt)+at*(-24*(Yt*Bt+Ut*Vt)+-6*(Ft*Ht+kt*qt)),O=-6*It*jt+at*(-24*Yt*Vt-6*kt*Ht),_=6*St*Pt+at*(24*Ut*qt-6*Ft*Bt),C=6*(Lt*Pt+St*jt)+at*(24*(Yt*qt+Ut*Ht)-6*(kt*Bt+Ft*Vt)),S=6*Lt*jt+at*(24*Yt*Ht-6*kt*Vt),E=(E=3*(Rt*Rt+St*St)+(P=12*Ut*Ut-3*Ft*Ft)*at)+E+ot*P,z=(z=6*(Rt*It+St*Lt)+(j=24*Ut*Yt-6*Ft*kt)*at)+z+ot*j,L=(L=3*(It*It+Lt*Lt)+(U=12*Yt*Yt-3*kt*kt)*at)+L+ot*U,n=-.5*(a=Nt*Dt)/rt,e=-15*Q*(o=a*rt),r=Ut*Ft+Yt*kt,s=Yt*Ft+Ut*kt,i=Yt*kt-Ut*Ft,1===Et&&(c=e,l=n,u=a,h=o,d=r,m=s,p=i,f=E,w=z,b=L,g=R,M=I,v=O,y=_,x=C,A=S,T=P,N=j,D=U,wt=Mt,yt=vt,xt=ut,At=ht,bt=mt*X+dt*Z,Tt=Z*mt-X*dt,Nt=4.7968065e-7)}return{snodm:Z,cnodm:X,sinim:et,cosim:nt,sinomm:$,cosomm:tt,day:st,e3:2*e*i,ee2:2*e*s,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*(D-T),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:s,s7:i,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:T,sz32:N,sz33:D,xgh2:2*o*j,xgh3:2*o*(U-P),xgh4:-18*o*J,xh2:-2*n*C,xh3:-2*n*(S-_),xi2:2*n*I,xi3:2*n*(O-R),xl2:-2*a*z,xl3:-2*a*(L-E),xl4:-2*a*(-21-9*at)*J,nm:W,z1:E,z2:z,z3:L,z11:R,z12:I,z13:O,z21:_,z22:C,z23:S,z31:P,z32:j,z33:U,zmol:(.2299715*st-pt+4.7199672)%K,zmos:(6.2565837+.017201977*st)%K}},t.dsinit=function(t){var e=t.xke,n=t.cosim,a=t.argpo,o=t.s1,i=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,T=t.sz33,N=t.t,D=t.tc,E=t.gsto,R=t.mo,I=t.mdot,O=t.no,z=t.nodeo,_=t.nodedot,C=t.xPIdot,S=t.z1,L=t.z3,P=t.z11,j=t.z13,U=t.z21,Y=t.z23,F=t.z31,k=t.z33,q=t.ecco,H=t.eccsq,B=t.emsq,V=t.em,G=t.argpm,J=t.inclm,K=t.mm,W=t.nm,Q=t.nodem,Z=t.irez,X=t.atime,$=t.d2201,tt=t.d2211,et=t.d3210,nt=t.d3222,at=t.d4410,ot=t.d4422,rt=t.d5220,st=t.d5232,it=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;Z=0,W<.0052359877&&W>.0034906585&&(Z=1),W>=.00826&&W<=.00924&&V>=.5&&(Z=2);var Tt=-bt*m*(x+A);(J<.052359877||J>r-.052359877)&&(Tt=0),0!==h&&(Tt/=h);var Nt=-At*i*(U+Y);(J<.052359877||J>r-.052359877)&&(Nt=0),mt=f*bt*(b+T-6)-n*Tt+l*At*(F+k-6),dt=Tt,0!==h&&(mt-=n/h*Nt,dt+=Nt/h);var Dt=(E+D*xt)%s;if(V+=(lt=d*bt*g+o*At*u)*N,J+=(ut=m*bt*(w+y)+i*At*(P+j))*N,G+=mt*N,Q+=dt*N,K+=(ht=-bt*p*(M+v-14-6*B)-At*c*(S+L-14-6*B))*N,0!==Z){var Et=Math.pow(W/e,2/3);if(2===Z){var Rt=n*n,It=V,Ot=B,zt=(V=q)*(B=H),_t=void 0,Ct=void 0,St=void 0,Lt=void 0,Pt=void 0,jt=void 0,Ut=void 0,Yt=void 0,Ft=void 0;V<=.65?(_t=3.616-13.247*V+16.29*B,Ct=117.39*V-19.302-228.419*B+156.591*zt,St=109.7927*V-18.9068-214.6334*B+146.5816*zt,Lt=242.694*V-41.122-471.094*B+313.953*zt,Pt=841.88*V-146.407-1629.014*B+1083.435*zt,jt=3017.977*V-532.114-5740.032*B+3708.276*zt):(_t=331.819*V-72.099-508.738*B+266.724*zt,Ct=1582.851*V-346.844-2415.925*B+1246.113*zt,St=1554.908*V-342.585-2366.899*B+1215.972*zt,Lt=4758.686*V-1052.797-7193.992*B+3651.957*zt,Pt=16178.11*V-3581.69-24462.77*B+12422.52*zt,jt=V>.715?29936.92*V-5149.66-54087.36*B+31324.56*zt:1464.74-4664.75*V+3763.64*B),V<.7?(Ft=4988.61*V-919.2277-9064.77*B+5542.21*zt,Ut=4568.6173*V-822.71072-8491.4146*B+5337.524*zt,Yt=4690.25*V-853.666-8624.77*B+5341.4*zt):(Ft=161616.52*V-37995.78-229838.2*B+109377.94*zt,Ut=218913.95*V-51752.104-309468.16*B+146349.42*zt,Yt=170470.89*V-40023.88-242699.48*B+115605.82*zt);var kt=h*h,qt=W*W*3*(Et*Et),Ht=17891679e-13*qt;$=Ht*(Bt=.75*(1+2*n+Rt))*(-.306-.44*(V-.64)),tt=Ht*(1.5*kt)*_t,et=(Ht=3.7393792e-7*(qt*=Et))*(1.875*h*(1-2*n-3*Rt))*Ct,nt=Ht*(-1.875*h*(1+2*n-3*Rt))*St,at=(Ht=2*(qt*=Et)*7.3636953e-9)*(35*kt*Bt)*Lt,ot=Ht*(39.375*kt*kt)*Pt,rt=(Ht=1.1428639e-7*(qt*=Et))*(9.84375*h*(kt*(1-2*n-5*Rt)+.33333333*(4*n-2+6*Rt)))*jt,st=Ht*(h*(4.92187512*kt*(-2-4*n+10*Rt)+6.56250012*(1+2*n-3*Rt)))*Yt,it=(Ht=2*qt*2.1765803e-9)*(29.53125*h*(2-8*n+Rt*(8*n-12+10*Rt)))*Ut,ct=Ht*(29.53125*h*(-2-8*n+Rt*(12+8*n-10*Rt)))*Ft,vt=(R+z+z-(Dt+Dt))%s,Mt=I+ht+2*(_+dt-xt)-O,V=It,B=Ot}if(1===Z){var Bt,Vt=1+n;ft=2*(pt=3*W*W*Et*Et)*(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*Et,pt=pt*(.9375*h*h*(1+3*n)-.75*(1+n))*(Ct=1+2*B)*21460748e-13*Et,vt=(R+z+a-Dt)%s,Mt=I+C+ht+mt+dt-(O+xt)}wt=vt,yt=O,X=0,W=O+0}return{em:V,argpm:G,inclm:J,mm:K,nm:W,nodem:Q,irez:Z,atime:X,d2201:$,d2211:tt,d3210:et,d3222:nt,d4410:at,d4422:ot,d5220:rt,d5232:st,d5421:it,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,i,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,b,T,N,D,E,R,I,O,z,_,C,S,L,P){var j=.13130908,U=2.8843198,Y=.37448087,F=5.7686396,k=.95240898,q=1.8014998,H=1.050833,B=4.4108898,V=259200,G=0,J=(T+.0043752690880113*b)%s;if(I+=d*A,z+=g*A,O+=w*A,L+=v*A,C+=M*A,0!==t){(0===R||A*R<=0||Math.abs(A)<Math.abs(R))&&(R=0,S=E,_=D);var K;K=A>0?720:-720;for(var W=void 0,Q=void 0,Z=void 0,X=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*(_-Y)),X=S+N,$=m*Math.cos(_-j)+2*p*Math.cos(2*(_-U))+3*f*Math.cos(3*(_-Y)),$*=X):(Z=(et=y+x*R)+et,Q=_+_,tt=e*Math.sin(Z+_-F)+n*Math.sin(_-F)+a*Math.sin(et+_-k)+o*Math.sin(-et+_-k)+r*Math.sin(Z+Q-q)+i*Math.sin(Q-q)+c*Math.sin(et+_-H)+l*Math.sin(-et+_-H)+u*Math.sin(et+Q-B)+h*Math.sin(-et+Q-B),X=S+N,$=e*Math.cos(Z+_-F)+n*Math.cos(_-F)+a*Math.cos(et+_-k)+o*Math.cos(-et+_-k)+c*Math.cos(et+_-H)+l*Math.cos(-et+_-H)+2*r*Math.cos(Z+Q-q)+i*Math.cos(Q-q)+u*Math.cos(et+Q-B)+h*Math.cos(-et+Q-B),$*=X),Math.abs(A-R)>=720?nt=381:(W=A-R,nt=0),381===nt&&(_+=X*K+tt*V,S+=tt*K+$*V,R+=K);P=S+tt*W+$*W*W*.5;var at=_+X*W+tt*W*W*.5;1!==t?(C=at-2*L+2*J,G=P-E):(C=at-L-O+J,G=P-E),P=E+G}return[I,O,z,C,L,P]},t.initl=function(e){var n=e.opsmode,a=e.ecco,o=e.epoch,r=e.inclo,s=e.xke,i=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(s/c,u),M=.75*i*(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(s/c,u),A=Math.sin(r),b=x*d,T=1-5*f,N=-T-f-f,D=1/x,E=b*b,R=x*(1-a);if("a"===n){var I=o-7305,O=Math.floor(I+1e-8),z=.017202791694070362;(y=(1.7321343856509375+z*O+(z+l)*(I-O)+I*I*5075514194322695e-30)%l)<0&&(y+=l)}else y=t.gstime(o+2433281.5);return{no:c,method:"n",ainv:D,ao:x,con41:N,con42:T,cosio:p,cosio2:f,eccsq:h,omeosq:d,posq:E,rp:R,rteosq:m,sinio:A,gsto:y}},t.sgp4init=function(e,n){var a=n.whichconst,o=void 0===a?"wgs72":a,r=n.opsmode,i=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,T=A.j4,N=A.xke,D=A.j3oj2;e.error=0,e.operationmode=i;var E=h.split("")[0].toLowerCase();isNaN(parseInt(E))?e.satnum=parseInt(E.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 R=78/e.radiusearthkm+1,I=42/e.radiusearthkm,O=I*I*I*I;e.init="y",e.t=0;var z={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(z),C=_.ao,S=_.con42,L=_.cosio,P=_.cosio2,j=_.eccsq,U=_.omeosq,Y=_.posq,F=_.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,F<220/e.radiusearthkm+1&&(e.isimp=1);var H=R,B=O,V=(F-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/Y,K=1/(C-H);e.eta=C*e.ecco*K;var W=e.eta*e.eta,Q=e.ecco*e.eta,Z=Math.abs(1-W),X=B*Math.pow(K,4),$=X/Math.pow(Z,3.5),tt=$*e.no*(C*(1+1.5*W+Q*(4+W))+.375*b*K/Z*e.con41*(8+3*W*(8+W)));e.cc1=e.bstar*tt;var et=0;e.ecco>1e-4&&(et=-2*X*K*D*e.no*q/e.ecco),e.x1mth2=1-P,e.cc4=2*e.no*$*C*U*(e.eta*(2+.5*W)+e.ecco*(.5+2*W)-b*K/(C*Z)*(-3*e.con41*(1-2*Q+W*(1.5-.5*Q))+.75*e.x1mth2*(2*W-Q*(1+W))*Math.cos(2*e.argpo))),e.cc5=2*$*C*U*(1+2.75*(W+Q)+Q*W);var nt=P*P,at=1.5*b*J*e.no,ot=.5*at*b*J,rt=-.46875*T*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 st=-at*L;e.nodedot=st+(.5*ot*(4-19*P)+2*rt*(3-7*P))*L;var it=e.argpdot+e.nodedot;e.omgcof=e.bstar*et*Math.cos(e.argpo),e.xmcof=0,e.ecco>1e-4&&(e.xmcof=-c*X*e.bstar/Q),e.nodecf=3.5*U*st*e.cc1,e.t2cof=1.5*e.cc1,Math.abs(L+1)>15e-13?e.xlcof=-.25*D*q*(3+5*L)/(1+L):e.xlcof=-.25*D*q*(3+5*L)/l,e.aycof=-.5*D*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,s/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,Tt=ht.ss4,Nt=ht.ss5,Dt=ht.sz1,Et=ht.sz3,Rt=ht.sz11,It=ht.sz13,Ot=ht.sz21,zt=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,Yt=ht.z21,Ft=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: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:Tt,ss5:Nt,sz1:Dt,sz3:Et,sz11:Rt,sz13:It,sz21:Ot,sz23:zt,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:it,z1:Lt,z3:Pt,z11:jt,z13:Ut,z21:Yt,z23:Ft,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*K*Jt;var Kt=e.d2*K*e.cc1/3;e.d3=(17*C+H)*Kt,e.d4=.5*Kt*C*K*(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.propagate=function(e,n){var a=e.xke,o=e.j2,i=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 T=g*e.t,N=T*e.t;v=v-e.d2*g-e.d3*T-e.d4*N,w+=e.bstar*e.cc5*(Math.sin(f)-e.sinmao),y=y+e.t3cof*T+N*(e.t4cof+e.t*e.t5cof)}var D=e.no,E=e.ecco,R=e.inclo;if("d"===e.method){var I=e.t,O=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,I,e.gsto,e.xfact,e.xlamo,e.no,e.atime,E,p,R,e.xli,f,e.xni,M,D);E=O[0],p=O[1],R=O[2],f=O[3],M=O[4],D=O[5]}if(D<=0)return e.error=2,{position:!1,velocity:!1};var z=Math.pow(a/D,c)*v*v;if(D=a/Math.pow(z,1.5),(E-=w)>=1||E<-.001)return e.error=1,{position:!1,velocity:!1};E<1e-6&&(E=1e-6);var _=(f+=e.no*y)+p+M,C=E,S=R,L=p%=s,P=M%=s,j=f=((_%=s)-p-M)%s,U=Math.sin(R),Y=Math.cos(R);if("d"===e.method){var F={inclo:e.inclo,init:"n",ep:C,inclp:S,nodep:P,argpp:L,mp:j,opsmode:e.operationmode},k=t.dpper(e,F);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),Y=Math.cos(S),e.aycof=-.5*i*U,Math.abs(Y+1)>15e-13?e.xlcof=-.25*i*U*(3+5*Y)/(1+Y):e.xlcof=-.25*i*U*(3+5*Y)/l);for(var q,H,B=C*Math.cos(L),V=1/(z*(1-C*C)),G=C*Math.sin(L)+V*e.aycof,J=(j+L+P+V*e.xlcof*B-P)%s,K=J,W=9999.9,Q=1;Math.abs(W)>=1e-12&&Q<=10;)H=Math.sin(K),W=(J-G*(q=Math.cos(K))+B*H-K)/(W=1-q*B-H*G),Math.abs(W)>=.95&&(W=W>0?.95:-.95),K+=W,Q+=1;var Z=B*q+G*H,X=B*H-G*q,$=B*B+G*G,tt=z*(1-$);if(tt<0)return e.error=4,{position:!1,velocity:!1};var et=z*(1-Z),nt=Math.sqrt(z)*X/et,at=Math.sqrt(tt)/et,ot=Math.sqrt(1-$),rt=z/et*(H-G-B*(V=X/(1+ot))),st=z/et*(q-B+G*V),it=Math.atan2(rt,st),ct=(st+st)*rt,lt=1-2*rt*rt,ut=.5*o*(V=1/tt),ht=ut*V;if("d"===e.method){var dt=Y*Y;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};it-=.25*ht*e.x7thm1*ct;var pt=P+1.5*ht*Y*ct,ft=S+1.5*ht*Y*U*lt,gt=nt-D*ut*e.x1mth2*ct/a,Mt=at+D*ut*(e.x1mth2*lt+1.5*e.con41)/a,vt=Math.sin(it),wt=Math.cos(it),yt=Math.sin(pt),xt=Math.cos(pt),At=Math.sin(ft),bt=Math.cos(ft),Tt=-yt*bt,Nt=xt*bt,Dt=Tt*vt+xt*wt,Et=Nt*vt+yt*wt,Rt=At*vt,It=Tt*wt-xt*vt,Ot=Nt*wt-yt*vt,zt=At*wt;return{position:{x:mt*Dt*e.radiusearthkm,y:mt*Et*e.radiusearthkm,z:mt*Rt*e.radiusearthkm},velocity:{x:(gt*Dt+Mt*It)*u,y:(gt*Et+Mt*Ot)*u,z:(gt*Rt+Mt*zt)*u}}},t.getgravconst=function(t){var e,n,a,o,r,s,i,c;switch(t){case"wgs72old":r=398600.79964,s=6378.135,i=1/(c=.0743669161),o=-165597e-11,a=(n=-253881e-11)/(e=.001082616);break;case"wgs72":r=398600.8,s=6378.135,i=1/(c=60/Math.sqrt(s*s*s/r)),o=-165597e-11,a=(n=-253881e-11)/(e=.001082616);break;case"wgs84":r=398600.5,s=6378.137,i=1/(c=60/Math.sqrt(s*s*s/r)),o=-161098761e-14,a=(n=-253215306e-14)/(e=.00108262998905);break;default:throw new Error("unknown gravity option ".concat(t))}return{tumin:i,mus:r,radiusearthkm:s,xke:c,j2:e,j3:n,j4:o,j3oj2:a}},t.createSatrec=function(e,n,a,o){void 0===a&&(a="wgs72"),void 0===o&&(o="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*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*=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: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.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%s)<0&&(n+=s),n},t.sgn=function(t){return t<0?-1:1},t.mag=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])},t.cross=function(t,e){var n=[0,0,0];return n[0]=t[1]*e[2]-t[2]*e[1],n[1]=t[2]*e[0]-t[0]*e[2],n[2]=t[0]*e[1]-t[1]*e[0],n},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.angle=function(e,n){var 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.newtonnu=function(e,n){var a=999999.9,o=999999.9,s=1e-8;if(Math.abs(e)<s)o=n,a=n;else if(e<1-s){var i=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(i,c))-e*Math.sin(a)}else e>1+s?e>1&&Math.abs(n)+1e-5<r-Math.acos(1/e)&&(i=Math.sqrt(e*e-1)*Math.sin(n)/(1+e*Math.cos(n)),a=t.asinh(i),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.sinh=function(t){return(Math.exp(t)-Math.exp(-t))/2},t.rv2coe=function(e,n,a){var o,i,c,l,u,h,d,m,p,f,g,M,v,w,y,x,A,b=[0,0,0],T=[0,0,0],N=.5*r,D=1e-8,E=999999.1,R=t.mag(e),I=t.mag(n),O=t.cross(e,n),z=t.mag(O);if(z>D){b[0]=-O[1],b[1]=O[0],b[2]=0,v=t.mag(b);var _=I*I-a/R;for(M=t.dot(e,n),x=0;x<=2;x++)T[x]=(_*e[x]-M*n[x])/a;if(c=t.mag(T),y=I*I*.5-a/R,i=Math.abs(y)>D?-a/(2*y):999999.9,o=z*z/a,w=O[2]/z,l=Math.acos(w),A=1,c<D?A=l<D||Math.abs(l-r)<D?2:3:(l<D||Math.abs(l-r)<D)&&(A=4),v>D){var C=b[0]/v;Math.abs(C)>1&&(C=t.sgn(C)),u=Math.acos(C),b[1]<0&&(u=s-u)}else u=E;1===A?(h=t.angle(b,T),T[2]<0&&(h=s-h)):h=E,1===A||4===A?(d=t.angle(T,e),M<0&&(d=s-d)):d=E,3===A?(p=t.angle(b,e),e[2]<0&&(p=s-p),m=p):p=E,c>D&&4===A?(C=T[0]/c,Math.abs(C)>1&&(C=t.sgn(C)),g=Math.acos(C),T[1]<0&&(g=s-g),l>N&&(g=s-g)):g=E,R>D&&2===A?(C=e[0]/R,Math.abs(C)>1&&(C=t.sgn(C)),f=Math.acos(C),e[1]<0&&(f=s-f),l>N&&(f=s-f),m=f):f=E,1!==A&&4!==A||(m=t.newtonnu(c,d).m)}else o=E,i=E,c=E,l=E,u=E,h=E,d=E,m=E,p=E,f=E,g=E;return{p:o,a:i,ecc:c,incl:l,omega:u,argp:h,nu:d,m,arglat:p,truelon:f,lonper:g}},t.jday=function(t,e,n,a,o,r,s){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===s&&(s=0),t instanceof Date&&(e=t.getUTCMonth()+1,n=t.getUTCDate(),a=t.getUTCHours(),o=t.getUTCMinutes(),r=t.getUTCSeconds(),s=t.getUTCMilliseconds(),t=t.getUTCFullYear());var i=367*t-Math.floor(7*(t+Math.floor((e+9)/12))*.25)+Math.floor(275*e/9)+n+1721013.5,c=(s/1e3+r+60*o+3600*a)/86400;if(Math.abs(c)>1){var l=Math.floor(c);i+=l,c-=l}return{jd:i,jdFrac:c}},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 s=o,i=a-r,c=24*(e-a),l=Math.floor(c);c=60*(c-l);var u=Math.floor(c);return{mon:s,day:i,hr:l,min:u,sec:60*(c-u)}},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 s=e-2415019.5,i=s/365.25,c=1900+Math.floor(i);a=Math.floor(.25*(c-1901)),(o=Math.floor(s-(365*(c-1900)+a)))+n<1&&(c-=1,a=Math.floor(.25*(c-1901)),o=Math.floor(s-(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}(),m=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,i=2*o-o*o,c=Math.atan2(t.y,t.x)-e;c<-r;)c+=s;for(;c>r;)c-=s;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-i*(Math.sin(h)*Math.sin(h))),h=Math.atan2(t.z+n*l*i*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,s=2*r-r*r,i=o/Math.sqrt(1-s*(Math.sin(n)*Math.sin(n)));return{x:(i+a)*Math.cos(n)*Math.cos(e),y:(i+a)*Math.cos(n)*Math.sin(e),z:(i*(1-s)+a)*Math.sin(n)}},t.lla2sez=function(e,n){var a=e.lon,o=e.lat,r=t.lla2ecf(e),s=n.x-r.x,i=n.y-r.y,c=n.z-r.z;return{s:Math.sin(o)*Math.cos(a)*s+Math.sin(o)*Math.sin(a)*i-Math.cos(o)*c,e:-Math.sin(a)*s+Math.cos(a)*i,z:Math.cos(o)*Math.cos(a)*s+Math.cos(o)*Math.sin(a)*i+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),s=Math.sin(n.lon),i=Math.cos(n.lat),c=Math.cos(n.lon);return{x:r*c*o.s+-s*o.e+i*c*o.z+a.x,y:r*s*o.s+c*o.e+i*s*o.z+a.y,z:-i*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 p,f=2*Math.PI,g=function(){function t(){}return t.julianCycle=function(e,n){var a=n/f;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.julian2date=function(e){return new Date((e-t.J1970)*u)},t.date2jSince2000=function(e){return e.getTime()/u+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 i*(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+i*(1.9148*Math.sin(t)+.02*Math.sin(2*t)+3e-4*Math.sin(3*t))+102.9372*i+Math.PI},t.eclipticLatitude=function(t){var e=f/360,n=t-.00569-.00478*Math.sin(e*t);return f*(n+3e-4*Math.sin(2*e*n))},t.julianCyle=function(e,n){return Math.round(e-t.J0-n/(2*f/2))},t.approxTransit=function(e,n,a){return t.J0+(e+n)/f+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,s,i){var c=t.hourAngle(e,a,o),l=t.approxTransit(c,n,r);return t.solarTransitJulian(l,s,i)},t.getSetJ=function(e,n,a,o,r,s,i){var c=t.hourAngle(e,a,o),l=t.approxTransit(c,n,r);return t.solarTransitJulian(l,s,i)},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,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)*i,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=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.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.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/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/12*Math.PI,h=t.elevation(u,c,r/180*Math.PI);return h+=t.astroRefraction(h),{az:t.azimuth(u,c,r/180*Math.PI),el: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.J1970=2440587.5,t.J2000=2451545,t.J0=9e-4,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}(),M=function(){function t(){}return 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:g.rightAscension(a,o),dec:g.declination(a,o),dist:r}},t.hoursLater=function(t,e){return new Date(t.getTime()+e*u/24)},t.getMoonPosition=function(e,n,a){var o=i*-a,r=i*n,s=g.date2jSince2000(e),c=t.moonCoords(s),l=g.siderealTime(s,o)-c.ra,u=g.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+=g.astroRefraction(u),{az:g.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=g.date2jSince2000(new Date(n)),r=g.getSunRaDec(o),s=t.moonCoords(o),i=149598e3,c=Math.acos(Math.sin(r.dec)*Math.sin(s.dec)+Math.cos(r.dec)*Math.cos(s.dec)*Math.cos(r.ra-s.ra)),l=Math.atan2(i*Math.sin(c),s.dist-i*Math.cos(c)),u=Math.atan2(Math.cos(r.dec)*Math.sin(r.ra-s.ra),Math.sin(r.dec)*Math.cos(s.dec)-Math.cos(r.dec)*Math.sin(s.dec)*Math.cos(r.ra-s.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 M=1913582083.5-d+n;M<n&&(M+=a);for(var v,w=Math.min(m,f,p,M),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:M,date:new Date(M).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 s=t.calculateRiseSetTimes(r,n,a),i=s.rise,c=s.set,l=s.ye,u={rise:null,set:null,ye:null,alwaysUp:null,alwaysDown:null,highest:null};return u.rise=i?new Date(t.hoursLater(e,i)):NaN,u.set=c?new Date(t.hoursLater(e,c)):NaN,i||c?i&&c?(u.alwaysUp=!1,u.alwaysDown=!1,u.highest=new Date(t.hoursLater(e,Math.min(i,c)+Math.abs(c-i)/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*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}(),v=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},s=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)+Math.pow(r.z,2)),i=a.x+o*e.y,c=a.y-o*e.x,l=a.z,u=(r.x*i+r.y*c+r.z*l)/s;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.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 s=new Date,i=new Date(s.getUTCFullYear(),0,0),c=s.getDate()-i.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.SunMath=g,t.MoonMath=M,t}(),w=function(t,e){this.start=t-1,this.stop=e,this.length=this.stop-this.start},y=function(){return y=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},y.apply(this,arguments)},x=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 y(y({},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 v.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 v.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),s=parseFloat("0.".concat(e.substring(n,a))),i=e.substring(a,o),c=parseInt(e.substring(o,t.bstar.stop));if("-"===i)c*=-1;else if("+"!==i)throw new Error("Invalid BSTAR symbol: ".concat(r));if(s*=Math.pow(10,c),"-"===r)s*=-1;else if("+"!==r&&" "!==r)throw new Error("Invalid BSTAR symbol: ".concat(r));return v.roundToNDecimalPlaces(s,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 v.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 v.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 v.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 v.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 v.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 v.roundToNDecimalPlaces(n,8)},t.getRevNum=function(e){return parseInt(e.substring(t.revNum.start,t.revNum.stop))},t.lineNumber=new w(1,1),t.satNum=new w(3,7),t.classification=new w(8,8),t.intlDes=new w(10,17),t.intlDesYear=new w(10,11),t.intlDesLaunchNum=new w(12,14),t.intlDesLaunchPiece=new w(15,17),t.epochYear=new w(19,20),t.epochDay=new w(21,32),t.meanMoDev1=new w(34,43),t.meanMoDev2=new w(45,52),t.bstar=new w(54,61),t.ephemerisType=new w(63,63),t.elsetNum=new w(65,68),t.checksum=new w(69,69),t.inclination=new w(9,16),t.raan=new w(18,25),t.eccentricity=new w(27,33),t.argPerigee=new w(35,42),t.meanAnom=new w(44,51),t.meanMo=new w(53,63),t.revNum=new w(64,68),t}(),A=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}(),b=(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)}),T=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 b(e,t),e.prototype.getRcs=function(){return this.rcs},e.prototype.getVmag=function(){return this.vmag},e}(A),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)}}(),D=function(t){function e(e,n){var a=t.call(this,e)||this,o=x.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,s=d.propagate(this.satrec,o).position||{x:0,y:0,z:0},i=m.eci2ecf(s,r);return m.ecf2rae({lat:t.lat,lon:t.lon,alt:t.alt},i)},e.calculateTimeVariables=function(t,e){var n=v.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}(T),E=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 E(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}(D),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){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")}if(n=t.call(this,e)||this,!(e.lat>=-90&&e.lat<=90))throw new Error("Invalid latitude");if(n.lat=e.lat,!(e.lon>=-180&&e.lon<=180))throw new Error("Invalid longitude");if(n.lon=e.lon,!(e.alt>=0))throw new Error("Invalid altitude");return n.alt=e.alt,n}return I(e,t),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}(A),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){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 z(e,t),e.prototype.getEci=function(t,n){void 0===t&&(t={lat:180,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,lon:0,alt:0}),void 0===e&&(e=this.time);var n=v.SunMath.getStarAzEl(e,t.lat*i,t.lon*i,this.ra,this.dec);return{az:n.az,el:n.el,rng:25e4}},e.calculateTimeVariables=function(t){var e=v.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}(T)}},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(636)})()}));
@@ -0,0 +1,77 @@
1
+ /**
2
+ * @author Theodore Kruczek.
3
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
4
+ * with satellites and other orbital objects.
5
+ *
6
+ * @file Commonly used constants.
7
+ *
8
+ * @license AGPL-3.0-or-later
9
+ * @Copyright (c) 2020-2022 Theodore Kruczek
10
+ *
11
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
12
+ * terms of the GNU Affero General Public License as published by the Free Software
13
+ * Foundation, either version 3 of the License, or (at your option) any later version.
14
+ *
15
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
16
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
+ * See the GNU Affero General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public License along with
20
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+
23
+ /**
24
+ * @author Theodore Kruczek.
25
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
26
+ * with satellites and other orbital objects.
27
+ *
28
+ * @file SunMath is a collection of functions for calculating the position of the sun
29
+ * and other stars. This was originally created by Vladimir Agafonkin. Robert Gester's
30
+ * update was referenced for documentation. There were a couple of bugs in both versions
31
+ * so there will be some differences if you are migrating from either to this library.
32
+ *
33
+ *
34
+ * @license AGPL-3.0-or-later
35
+ * @Copyright (c) 2020-2022 Theodore Kruczek
36
+ *
37
+ * @Copyright (c) 2011-2015, Vladimir Agafonkin
38
+ * SunCalc is a JavaScript library for calculating sun/moon position and light phases.
39
+ * https://github.com/mourner/suncalc
40
+ *
41
+ * Reworked and enhanced by Robert Gester
42
+ * @Copyright (c) 2022 Robert Gester
43
+ * https://github.com/hypnos3/suncalc3
44
+ *
45
+ * sun calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas
46
+ *
47
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
48
+ * terms of the GNU Affero General Public License as published by the Free Software
49
+ * Foundation, either version 3 of the License, or (at your option) any later version.
50
+ *
51
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
52
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
53
+ * See the GNU Affero General Public License for more details.
54
+ *
55
+ * You should have received a copy of the GNU Affero General Public License along with
56
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
57
+ */
58
+
59
+ /**
60
+ * @author Theodore Kruczek.
61
+ * @description Orbital Object ToolKit (OOTK) is a collection of tools for working
62
+ * with satellites and other orbital objects.
63
+ *
64
+ * @license AGPL-3.0-or-later
65
+ * @Copyright (c) 2020-2022 Theodore Kruczek
66
+ *
67
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
68
+ * terms of the GNU Affero General Public License as published by the Free Software
69
+ * Foundation, either version 3 of the License, or (at your option) any later version.
70
+ *
71
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
72
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
73
+ * See the GNU Affero General Public License for more details.
74
+ *
75
+ * You should have received a copy of the GNU Affero General Public License along with
76
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
77
+ */
@@ -9,28 +9,21 @@
9
9
  * in order provide context to the functions and clarify any adjustments made for
10
10
  * TypeScript/JavaScript compatibility.
11
11
  *
12
- * @copyright MIT License.
13
- * Copyright (c) 2020-2021 Theodore Kruczek
12
+ * @license AGPL-3.0-or-later
13
+ * @Copyright (c) 2020-2022 Theodore Kruczek
14
14
  *
15
- * Permission is hereby granted, free of charge, to any person obtaining a copy
16
- * of this software and associated documentation files (the "Software"), to deal
17
- * in the Software without restriction, including without limitation the rights
18
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
- * copies of the Software, and to permit persons to whom the Software is
20
- * furnished to do so, subject to the following conditions:
15
+ * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the
16
+ * terms of the GNU Affero General Public License as published by the Free Software
17
+ * Foundation, either version 3 of the License, or (at your option) any later version.
21
18
  *
22
- * The above copyright notice and this permission notice shall be included in all
23
- * copies or substantial portions of the Software.
19
+ * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
20
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21
+ * See the GNU Affero General Public License for more details.
24
22
  *
25
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
23
+ * You should have received a copy of the GNU Affero General Public License along with
24
+ * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>.
32
25
  */
33
- import { SatelliteRecord, StateVector, Vec3Flat } from './types';
26
+ import { SatelliteRecord, StateVector, Vec3Flat } from '../types/types';
34
27
  declare class Sgp4 {
35
28
  private static dpper;
36
29
  private static dscom;
@@ -66,7 +59,7 @@ declare class Sgp4 {
66
59
  truelon: number;
67
60
  lonper: number;
68
61
  };
69
- static jday(year: number, mon: number, day: number, hr: number, minute: number, sec: number): {
62
+ static jday(year: number | Date, mon?: number, day?: number, hr?: number, min?: number, sec?: number, ms?: number): {
70
63
  jd: number;
71
64
  jdFrac: number;
72
65
  };
@@ -74,7 +67,7 @@ declare class Sgp4 {
74
67
  mon: number;
75
68
  day: number;
76
69
  hr: number;
77
- minute: number;
70
+ min: number;
78
71
  sec: number;
79
72
  };
80
73
  static invjday(jd: number, jdfrac: number): {
@@ -82,7 +75,7 @@ declare class Sgp4 {
82
75
  mon: number;
83
76
  day: number;
84
77
  hr: number;
85
- minute: number;
78
+ min: number;
86
79
  sec: number;
87
80
  };
88
81
  }