@rr0/ufoathome 0.58.2 → 0.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -282,14 +282,20 @@ coverage floor:
282
282
  shortens when it points away from the observer instead of across their sky. Half the apparitions have no
283
283
  recorded tail length and are drawn with no tail at all.
284
284
 
285
- - **Satellites** (`src/engine/astronomy/Satellites.ts`). Not which one historical orbital elements
286
- cannot be obtained, and propagating today's back to 1965 would invent a precise, confident pass.
287
- What is complete is the ILLUMINATION: `h = R(sec B - 1)` gives how high the Earth's shadow stood
285
+ - **Satellites** (`src/engine/astronomy/Satellites.ts`). For every date, the ILLUMINATION: `h = R(sec B - 1)` gives how high the Earth's shadow stood
288
286
  above the witness, so deep in the night nothing in low orbit is lit and a light crossing the sky
289
287
  then was not a satellite. Being lit and being seen are kept apart — everything in orbit is sunlit
290
288
  by day, and an Iridium flare at magnitude -8 was genuinely watched at noon. Also complete, and
291
289
  from CelesTrak's SATCAT: how many tracked objects were in orbit that month, and when each named
292
290
  class existed (Echo balloons, Iridium flares, ISS, Starlink trains).
291
+ And from February 2021, WHICH ones (`TleArchive.ts`, `SatellitePasses.ts`): Laurent Chabin (SCEAU)
292
+ has saved the public element sets once or twice a day since then. They are propagated with SGP4
293
+ (satellite.js), lit through the Earth's umbra and penumbra, and given the magnitudes that were
294
+ measured — McCants' standard magnitudes, then Stellarium's for later objects, Mallama's for
295
+ Starlink, with the orbit-raising value that makes a train as bright as it is reported. A set is
296
+ never used more than a week from its epoch; the archive's holes are reported as holes. Before
297
+ 2021 no pass is drawn: propagating today's elements back to 1965 would invent a precise,
298
+ confident pass.
293
299
 
294
300
  - **What the air itself did to the light** (`src/engine/atmosphere/`). Two families, and neither is drawn form by
295
301
  form. The ICE one traces sunlight through hexagonal prisms in a cirrus deck (`IceCrystal.ts`, `HaloSky.ts`) and
@@ -317,6 +323,15 @@ is its state on the way down — Echo 1 is listed at 419 x 394 km and spent its
317
323
  using them to describe a historical orbit would be quietly wrong. Which classes are worth naming,
318
324
  and how bright they got, stay hand-entered in the script; every date is derived.
319
325
 
326
+ **Rebuilding the orbital element archive.** `npm run build:tle` reads a local copy of
327
+ [ufowaves.org/gp/my_tles](https://ufowaves.org/gp/my_tles/) in `scripts/data/tle/<year>/` (the
328
+ `Visible` zips and the `tle/*_visual.tle` and `*_starlink.tle` files), plus `scripts/data/satcat.csv`
329
+ for launch dates and `scripts/data/qs.mag` ([McCants](https://www.mmccants.org/programs/qsmag.zip))
330
+ and `scripts/data/stellarium-satellites.json` for magnitudes, and writes `public/tle/` (committed, served by ufoathome.org at `/tle/`):
331
+ weekly 44-byte-record bins per list, the object names, and an index with the archive's gaps. Every
332
+ day is kept for naked-eye objects and for Starlinks in their first 60 days; one set a week otherwise.
333
+ 838 MB of snapshots become 44 MB. Rebuild and commit it when the archive has grown.
334
+
320
335
  **Regenerating the comet catalog.** `src/engine/astronomy/cometCatalog.ts` is generated by
321
336
  `npm run build:comets`, which asks [JPL Horizons](https://ssd.jpl.nasa.gov/horizons/) for osculating elements at
322
337
  each apparition's own perihelion and caches the answers under `scripts/data/horizons/` (gitignored). The list of
@@ -476,6 +491,7 @@ interface SightingRecordingJson {
476
491
  instrument?: "eye" | "rectilinear-lens" // what it was observed THROUGH — see Instrument. Absent = the naked eye
477
492
  soundTrack?: { keyframes: Array<{ t: number, sound: { kind: "none" | "hum" | "whistle" | "rumble" | "crackle", volume: number, pitchHz: number, src?: string } }> } // what the witness heard — see What it sounded like
478
493
  decor?: DecorObject[] // buildings, trees, streetlights, vehicles, other witnesses — see src/engine/model/Decor.ts
494
+ references?: SceneReference[] // pictures of the place laid over the scene, each at a registered heading/pitch/roll/field — see Pictures of the place
479
495
  }
480
496
  ```
481
497
 
@@ -514,6 +530,35 @@ one instant of a sighting — weather still going on over it would be the reader
514
530
  evening. Clouds likewise use the recording's timeline: wind advection stops on pause and is
515
531
  recomputed deterministically when seeking.
516
532
 
533
+ ### Pictures of the place
534
+
535
+ Everything the scene draws is computed, and a reader has no way to tell a faithful reconstruction from a plausible
536
+ one. A photograph of the same place does: `references` lays pictures over the render, each at the direction it was
537
+ registered in (`registration`: heading, pitch, roll and vertical field, angles and nothing else), at an opacity the
538
+ reader varies with the slider beside the 🖼 button — all picture, all render, and every step between, with the
539
+ witness's own phenomenon drawn over both. A `photo` is a flat panel at its lens's field, a `panorama` an
540
+ equirectangular sphere. `src` is an address (rr0.org's case pictures are served to any origin; the bytes must be, since
541
+ WebGL draws them) or the picture itself as a `data:` URL when it was added from a disk, which keeps the recording
542
+ self-contained at the price of its size. `credit` and `creditUrl` are shown in the info panel's credits, `t` says it
543
+ was taken during the observation at that instant, and `drawing` that somebody drew on it — Cussac's own view from the
544
+ spot carries the sphere and its spiral by hand.
545
+
546
+ Nothing in the scene hides a picture and a picture hides nothing: it is a field of directions from one point, valid
547
+ from that point alone, and the reconstruction stands it at the witness's eye.
548
+
549
+ **Lining it up.** The editor's Pictures group types the registration, copies the witness's pose into it, and while that
550
+ group is open the canvas belongs to the selected picture: a drag turns it, the wheel changes its field, and *Add a
551
+ landmark* arms two clicks that name a detail on the picture, then the same detail in the render. Landmarks are kept in
552
+ the recording with a name ("Arbre masquant", "barrière") and listed with how far each still is from fitting; either end
553
+ of one can be dragged, and the selected one is bolder on the canvas — two landmarks turn the picture to fit them, three
554
+ or more fit its field too (`PictureRegistration`, a triad first guess refined by Gauss-Newton on the rotation), and the
555
+ status line says how far off the landmarks still are. *Adopt as the witness's pose* then writes the fitted heading,
556
+ pitch and roll into the pose at the playhead as a **measurement**, with a `derived` provenance naming the picture and
557
+ the residual — a heading read off a picture that fits the relief, where the one typed in the Witness group is the
558
+ witness's word. *Street-level pictures nearby* asks Panoramax (open imagery, CC BY-SA, served to any origin) for
559
+ pictures taken within 300 m of the witness's spot; each comes with where it was taken from and which way it looked, so
560
+ it arrives registered in heading, a full turn arriving as a panorama.
561
+
517
562
  ### Naming a place
518
563
 
519
564
  Testimony names a place. It says "on the Valensole plateau", "near Socorro", "over Montgomery" —
@@ -938,6 +983,7 @@ npm run build:all # all three
938
983
  npm run build:site # ufoathome.org, into dist-site/
939
984
  npm run build:comets # regenerate the comet catalog from JPL Horizons
940
985
  npm run build:satellites # regenerate the satellite catalog from CelesTrak's SATCAT
986
+ npm run build:tle # rebuild public/tle/ from a local copy of the orbital element archive
941
987
  ```
942
988
 
943
989
  ## The site
@@ -0,0 +1 @@
1
+ var Pa=Math.PI,R=Pa*2,$a=Pa/180,V0=1440,j0=398600.8,La=6378.135,Xa=60/Math.sqrt(La*La*La/j0),C0=La*Xa/60,R0=1/Xa,n0=.001082616,ar=-253881e-11,rr=-165597e-11,o0=ar/n0,x0=2/3,nr=1440/(2*Pa);function or(r,n){for(var o=[31,r%4===0?29:28,31,30,31,30,31,31,30,31,30,31],v=Math.floor(n),e=1,t=0;v>t+o[e-1]&&e<12;)t+=o[e-1],e+=1;var d=e,s=v-t,h=(n-v)*24,m=Math.floor(h);h=(h-m)*60;var c=Math.floor(h),l=(h-c)*60;return{mon:d,day:s,hr:m,minute:c,sec:l}}function S0(r,n,o,v,e,t){var d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;return 367*r-Math.floor(7*(r+Math.floor((n+9)/12))*.25)+Math.floor(275*n/9)+o+17210135e-1+((d/6e4+t/60+e)/60+v)/24}function M0(r,n,o,v,e,t){var d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;if(r instanceof Date){var s=r;return S0(s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds())}return S0(r,n,o,v,e,t,d)}function B0(r,n){var o=r.e3,v=r.ee2,e=r.peo,t=r.pgho,d=r.pho,s=r.pinco,h=r.plo,m=r.se2,c=r.se3,l=r.sgh2,T=r.sgh3,f=r.sgh4,V=r.sh2,G=r.sh3,B=r.si2,E=r.si3,X=r.sl2,k=r.sl3,U=r.sl4,u=r.t,g=r.xgh2,K=r.xgh3,z=r.xgh4,w=r.xh2,ea=r.xh3,Z=r.xi2,O=r.xi3,aa=r.xl2,Q=r.xl3,ta=r.xl4,y=r.zmol,ia=r.zmos,J=n.init,W=n.opsmode,sa=n.ep,S=n.inclp,N=n.nodep,Oa=n.argpp,ma=n.mp,M,x,ra,L,$,I,Aa,na,ca,D,C,oa,q,A,P,p,_,H,j,F,Y,la=119459e-10,ga=.01675,Ma=.00015835218,pa=.0549;Y=ia+la*u,J==="y"&&(Y=ia),F=Y+2*ga*Math.sin(Y),_=Math.sin(F),D=.5*_*_-.25,C=-.5*_*Math.cos(F);var Da=m*D+c*C,qa=B*D+E*C,a=X*D+k*C+U*_,xa=l*D+T*C+f*_,da=V*D+G*C;Y=y+Ma*u,J==="y"&&(Y=y),F=Y+2*pa*Math.sin(Y),_=Math.sin(F),D=.5*_*_-.25,C=-.5*_*Math.cos(F);var Ca=v*D+o*C,Ea=Z*D+O*C,va=aa*D+Q*C+ta*_,fa=g*D+K*C+z*_,ka=w*D+ea*C;return oa=Da+Ca,P=qa+Ea,p=a+va,q=xa+fa,A=da+ka,J==="n"&&(oa-=e,P-=s,p-=h,q-=t,A-=d,S+=P,sa+=oa,L=Math.sin(S),ra=Math.cos(S),S>=.2?(A/=L,q-=ra*A,Oa+=q,N+=A,ma+=p):(I=Math.sin(N),$=Math.cos(N),M=L*I,x=L*$,Aa=A*$+P*ra*I,na=-A*I+P*ra*$,M+=Aa,x+=na,N%=R,N<0&&W==="a"&&(N+=R),H=ma+Oa+ra*N,ca=p+q-P*N*L,H+=ca,j=N,N=Math.atan2(M,x),N<0&&W==="a"&&(N+=R),Math.abs(j-N)>Pa&&(N<j?N+=R:N-=R),ma+=p,Oa=H-ma-ra*N)),{ep:sa,inclp:S,nodep:N,argpp:Oa,mp:ma}}function vr(r){var n=r.epoch,o=r.ep,v=r.argpp,e=r.tc,t=r.inclp,d=r.nodep,s=r.np,h,m,c,l,T,f,V,G,B,E,X,k,U,u,g,K,z,w,ea,Z,O,aa,Q,ta,y,ia,J,W,sa,S,N,Oa,ma,M,x,ra,L,$,I,Aa,na,ca,D,C,oa,q,A,P,p,_,H,j,F,Y,la,ga,Ma,pa,Da,qa,a,xa,da,Ca=.01675,Ea=.0549,va=29864797e-13,fa=47968065e-14,ka=.39785416,wa=.91744867,za=.1945905,Ya=-.98088458,_a=s,Ka=o,Fa=Math.sin(d),ba=Math.cos(d),ya=Math.sin(v),Na=Math.cos(v),Ba=Math.sin(t),Wa=Math.cos(t),i=Ka*Ka,Ua=1-i,Sa=Math.sqrt(Ua),Va=0,b=0,v0=0,d0=0,h0=0,Ga=n+18261.5+e/1440,Ha=(4.523602-.00092422029*Ga)%R,ua=Math.sin(Ha),Za=Math.cos(Ha),e0=.91375164-.03568096*Za,t0=Math.sqrt(1-e0*e0),Ta=.089683511*ua/t0,Ia=Math.sqrt(1-Ta*Ta),ha=5.8351514+.001944368*Ga,ja=.39785416*ua/t0,f0=Ia*Za+.91744867*Ta*ua;ja=Math.atan2(ja,f0),ja+=ha-Ha;var z0=Math.cos(ja),p0=Math.sin(ja);Z=za,O=Ya,ta=wa,y=ka,aa=ba,Q=Fa,X=va;for(var u0=1/_a,s0=0;s0<2;)s0+=1,h=Z*aa+O*ta*Q,c=-O*aa+Z*ta*Q,V=-Z*Q+O*ta*aa,G=O*y,B=O*Q+Z*ta*aa,E=Z*y,m=Wa*V+Ba*G,l=Wa*B+Ba*E,T=-Ba*V+Wa*G,f=-Ba*B+Wa*E,k=h*Na+m*ya,U=c*Na+l*ya,u=-h*ya+m*Na,g=-c*ya+l*Na,K=T*ya,z=f*ya,w=T*Na,ea=f*Na,a=12*k*k-3*u*u,xa=24*k*U-6*u*g,da=12*U*U-3*g*g,j=3*(h*h+m*m)+a*i,F=6*(h*c+m*l)+xa*i,Y=3*(c*c+l*l)+da*i,la=-6*h*T+i*(-24*k*w-6*u*K),ga=-6*(h*f+c*T)+i*(-24*(U*w+k*ea)+-6*(u*z+g*K)),Ma=-6*c*f+i*(-24*U*ea-6*g*z),pa=6*m*T+i*(24*k*K-6*u*w),Da=6*(l*T+m*f)+i*(24*(U*K+k*z)-6*(g*w+u*ea)),qa=6*l*f+i*(24*U*z-6*g*ea),j=j+j+Ua*a,F=F+F+Ua*xa,Y=Y+Y+Ua*da,A=X*u0,q=-.5*A/Sa,P=A*Sa,oa=-15*Ka*P,p=k*u+U*g,_=U*u+k*g,H=U*g-k*u,s0===1&&(ia=oa,J=q,W=A,sa=P,S=p,N=_,Oa=H,ma=j,M=F,x=Y,ra=la,L=ga,$=Ma,I=pa,Aa=Da,na=qa,ca=a,D=xa,C=da,Z=z0,O=p0,ta=e0,y=t0,aa=Ia*ba+Ta*Fa,Q=Fa*Ia-ba*Ta,X=fa);var m0=(4.7199672+(.2299715*Ga-ha))%R,O0=(6.2565837+.017201977*Ga)%R,y0=2*ia*N,Ra=2*ia*Oa,a0=2*J*L,N0=2*J*($-ra),A0=-2*W*M,E0=-2*W*(x-ma),T0=-2*W*(-21-9*i)*Ca,i0=2*sa*D,I0=2*sa*(C-ca),D0=-18*sa*Ca,c0=-2*J*Aa,l0=-2*J*(na-I),g0=2*oa*_,q0=2*oa*H,w0=2*q*ga,K0=2*q*(Ma-la),W0=-2*A*F,H0=-2*A*(Y-j),Y0=-2*A*(-21-9*i)*Ea,G0=2*P*xa,J0=2*P*(da-a),$0=-18*P*Ea,X0=-2*q*Da,Q0=-2*q*(qa-pa);return{snodm:Fa,cnodm:ba,sinim:Ba,cosim:Wa,sinomm:ya,cosomm:Na,day:Ga,e3:q0,ee2:g0,em:Ka,emsq:i,gam:ha,peo:Va,pgho:d0,pho:h0,pinco:b,plo:v0,rtemsq:Sa,se2:y0,se3:Ra,sgh2:i0,sgh3:I0,sgh4:D0,sh2:c0,sh3:l0,si2:a0,si3:N0,sl2:A0,sl3:E0,sl4:T0,s1:oa,s2:q,s3:A,s4:P,s5:p,s6:_,s7:H,ss1:ia,ss2:J,ss3:W,ss4:sa,ss5:S,ss6:N,ss7:Oa,sz1:ma,sz2:M,sz3:x,sz11:ra,sz12:L,sz13:$,sz21:I,sz22:Aa,sz23:na,sz31:ca,sz32:D,sz33:C,xgh2:G0,xgh3:J0,xgh4:$0,xh2:X0,xh3:Q0,xi2:w0,xi3:K0,xl2:W0,xl3:H0,xl4:Y0,nm:_a,z1:j,z2:F,z3:Y,z11:la,z12:ga,z13:Ma,z21:pa,z22:Da,z23:qa,z31:a,z32:xa,z33:da,zmol:m0,zmos:O0}}function er(r){var n=r.cosim,o=r.argpo,v=r.s1,e=r.s2,t=r.s3,d=r.s4,s=r.s5,h=r.sinim,m=r.ss1,c=r.ss2,l=r.ss3,T=r.ss4,f=r.ss5,V=r.sz1,G=r.sz3,B=r.sz11,E=r.sz13,X=r.sz21,k=r.sz23,U=r.sz31,u=r.sz33,g=r.t,K=r.tc,z=r.gsto,w=r.mo,ea=r.mdot,Z=r.no,O=r.nodeo,aa=r.nodedot,Q=r.xpidot,ta=r.z1,y=r.z3,ia=r.z11,J=r.z13,W=r.z21,sa=r.z23,S=r.z31,N=r.z33,Oa=r.ecco,ma=r.eccsq,M=r.emsq,x=r.em,ra=r.argpm,L=r.inclm,$=r.mm,I=r.nm,Aa=r.nodem,na=r.irez,ca=r.atime,D=r.d2201,C=r.d2211,oa=r.d3210,q=r.d3222,A=r.d4410,P=r.d4422,p=r.d5220,_=r.d5232,H=r.d5421,j=r.d5433,F=r.dedt,Y=r.didt,la=r.dmdt,ga=r.dnodt,Ma=r.domdt,pa=r.del1,Da=r.del2,qa=r.del3,a=r.xfact,xa=r.xlamo,da=r.xli,Ca=r.xni,Ea,va,fa,ka,wa,za,Ya,_a,Ka,Fa,ba,ya,Na,Ba,Wa,i,Ua,Sa,Va,b,v0,d0,h0,Ga,Ha,ua,Za,e0,t0,Ta,Ia,ha,ja=17891679e-13,f0=21460748e-13,z0=22123015e-14,p0=17891679e-13,u0=73636953e-16,s0=21765803e-16,m0=.0043752690880113,O0=37393792e-14,y0=11428639e-14,Ra=.00015835218,a0=119459e-10;na=0,I<.0052359877&&I>.0034906585&&(na=1),I>=.00826&&I<=.00924&&x>=.5&&(na=2);var N0=m*a0*f,A0=c*a0*(B+E),E0=-a0*l*(V+G-14-6*M),T0=T*a0*(U+u-6),i0=-a0*c*(X+k);(L<.052359877||L>Pa-.052359877)&&(i0=0),h!==0&&(i0/=h);var I0=T0-n*i0;F=N0+v*Ra*s,Y=A0+e*Ra*(ia+J),la=E0-Ra*t*(ta+y-14-6*M);var D0=d*Ra*(S+N-6),c0=-Ra*e*(W+sa);(L<.052359877||L>Pa-.052359877)&&(c0=0),Ma=I0+D0,ga=i0,h!==0&&(Ma-=n/h*c0,ga+=c0/h);var l0=0,g0=(z+K*m0)%R;if(x+=F*g,L+=Y*g,ra+=Ma*g,Aa+=ga*g,$+=la*g,na!==0){if(Ta=Math.pow(I/Xa,x0),na===2){Ia=n*n;var q0=x;x=Oa;var w0=M;M=ma,ha=x*M,Ba=-.306-(x-.64)*.44,x<=.65?(Wa=3.616-13.247*x+16.29*M,Ua=-19.302+117.39*x-228.419*M+156.591*ha,Sa=-18.9068+109.7927*x-214.6334*M+146.5816*ha,Va=-41.122+242.694*x-471.094*M+313.953*ha,b=-146.407+841.88*x-1629.014*M+1083.435*ha,v0=-532.114+3017.977*x-5740.032*M+3708.276*ha):(Wa=-72.099+331.819*x-508.738*M+266.724*ha,Ua=-346.844+1582.851*x-2415.925*M+1246.113*ha,Sa=-342.585+1554.908*x-2366.899*M+1215.972*ha,Va=-1052.797+4758.686*x-7193.992*M+3651.957*ha,b=-3581.69+16178.11*x-24462.77*M+12422.52*ha,x>.715?v0=-5149.66+29936.92*x-54087.36*M+31324.56*ha:v0=1464.74-4664.75*x+3763.64*M),x<.7?(Ga=-919.2277+4988.61*x-9064.77*M+5542.21*ha,d0=-822.71072+4568.6173*x-8491.4146*M+5337.524*ha,h0=-853.666+4690.25*x-8624.77*M+5341.4*ha):(Ga=-37995.78+161616.52*x-229838.2*M+109377.94*ha,d0=-51752.104+218913.95*x-309468.16*M+146349.42*ha,h0=-40023.88+170470.89*x-242699.48*M+115605.82*ha),Ha=h*h,Ea=.75*(1+2*n+Ia),va=1.5*Ha,ka=1.875*h*(1-2*n-3*Ia),wa=-1.875*h*(1+2*n-3*Ia),Ya=35*Ha*Ea,_a=39.375*Ha*Ha,Ka=9.84375*h*(Ha*(1-2*n-5*Ia)+.33333333*(-2+4*n+6*Ia)),Fa=h*(4.92187512*Ha*(-2-4*n+10*Ia)+6.56250012*(1+2*n-3*Ia)),ba=29.53125*h*(2-8*n+Ia*(-12+8*n+10*Ia)),ya=29.53125*h*(-2-8*n+Ia*(12+8*n-10*Ia)),e0=I*I,t0=Ta*Ta,Za=3*e0*t0,ua=Za*p0,D=ua*Ea*Ba,C=ua*va*Wa,Za*=Ta,ua=Za*O0,oa=ua*ka*Ua,q=ua*wa*Sa,Za*=Ta,ua=2*Za*u0,A=ua*Ya*Va,P=ua*_a*b,Za*=Ta,ua=Za*y0,p=ua*Ka*v0,_=ua*Fa*h0,ua=2*Za*s0,H=ua*ba*d0,j=ua*ya*Ga,xa=(w+O+O-(g0+g0))%R,a=ea+la+2*(aa+ga-m0)-Z,x=q0,M=w0}na===1&&(Na=1+M*(-2.5+.8125*M),Ua=1+2*M,i=1+M*(-6+6.60937*M),Ea=.75*(1+n)*(1+n),fa=.9375*h*h*(1+3*n)-.75*(1+n),za=1+n,za*=1.875*za*za,pa=3*I*I*Ta*Ta,Da=2*pa*Ea*Na*ja,qa=3*pa*za*i*z0*Ta,pa=pa*fa*Ua*f0*Ta,xa=(w+O+o-g0)%R,a=ea+Q+la+Ma+ga-(Z+m0)),da=xa,Ca=Z,ca=0,I=Z+l0}return{em:x,argpm:ra,inclm:L,mm:$,nm:I,nodem:Aa,irez:na,atime:ca,d2201:D,d2211:C,d3210:oa,d3222:q,d4410:A,d4422:P,d5220:p,d5232:_,d5421:H,d5433:j,dedt:F,didt:Y,dmdt:la,dndt:l0,dnodt:ga,domdt:Ma,del1:pa,del2:Da,del3:qa,xfact:a,xlamo:xa,xli:da,xni:Ca}}function L0(r){var n=(r-2451545)/36525,o=-62e-7*n*n*n+.093104*n*n+(876600*3600+8640184812866e-6)*n+67310.54841;return o=o*$a/240%R,o<0&&(o+=R),o}function U0(r,n,o,v,e,t,d){return r instanceof Date?L0(M0(r)):L0(r)}function tr(r){var n=r.ecco,o=r.epoch,v=r.inclo,e=r.opsmode,t=r.no,d=n*n,s=1-d,h=Math.sqrt(s),m=Math.cos(v),c=m*m,l=Math.pow(Xa/t,x0),T=.75*n0*(3*c-1)/(h*s),f=T/(l*l),V=l*(1-f*f-f*(1/3+134*f*f/81));f=T/(V*V),t/=1+f;var G=Math.pow(Xa/t,x0),B=Math.sin(v),E=G*s,X=1-5*c,k=-X-c-c,U=1/G,u=E*E,g=G*(1-n),K="n",z;if(e==="a"){var w=o-7305,ea=Math.floor(w+1e-8),Z=w-ea,O=.017202791694070362,aa=1.7321343856509375,Q=5075514194322695e-30,ta=O+R;z=(aa+O*ea+ta*Z+w*w*Q)%R,z<0&&(z+=R)}else z=U0(o+24332815e-1);return{no:t,method:K,ainv:U,ao:G,con41:k,con42:X,cosio:m,cosio2:c,eccsq:d,omeosq:s,posq:u,rp:g,rteosq:h,sinio:B,gsto:z}}function ir(r){var n=r.irez,o=r.d2201,v=r.d2211,e=r.d3210,t=r.d3222,d=r.d4410,s=r.d4422,h=r.d5220,m=r.d5232,c=r.d5421,l=r.d5433,T=r.dedt,f=r.del1,V=r.del2,G=r.del3,B=r.didt,E=r.dmdt,X=r.dnodt,k=r.domdt,U=r.argpo,u=r.argpdot,g=r.t,K=r.tc,z=r.gsto,w=r.xfact,ea=r.xlamo,Z=r.no,O=r.atime,aa=r.em,Q=r.argpm,ta=r.inclm,y=r.xli,ia=r.mm,J=r.xni,W=r.nodem,sa=r.nm,S=.13130908,N=2.8843198,Oa=.37448087,ma=5.7686396,M=.95240898,x=1.8014998,ra=1.050833,L=4.4108898,$=.0043752690880113,I=720,Aa=-720,na=259200,ca,D,C,oa,q,A,P,p,_=0,H=0,j=(z+K*$)%R;if(aa+=T*g,ta+=B*g,Q+=k*g,W+=X*g,ia+=E*g,n!==0){(O===0||g*O<=0||Math.abs(g)<Math.abs(O))&&(O=0,J=Z,y=ea),g>0?ca=I:ca=Aa;for(var F=381;F===381;)n!==2?(P=f*Math.sin(y-S)+V*Math.sin(2*(y-N))+G*Math.sin(3*(y-Oa)),q=J+w,A=f*Math.cos(y-S)+2*V*Math.cos(2*(y-N))+3*G*Math.cos(3*(y-Oa)),A*=q):(p=U+u*O,C=p+p,D=y+y,P=o*Math.sin(C+y-ma)+v*Math.sin(y-ma)+e*Math.sin(p+y-M)+t*Math.sin(-p+y-M)+d*Math.sin(C+D-x)+s*Math.sin(D-x)+h*Math.sin(p+y-ra)+m*Math.sin(-p+y-ra)+c*Math.sin(p+D-L)+l*Math.sin(-p+D-L),q=J+w,A=o*Math.cos(C+y-ma)+v*Math.cos(y-ma)+e*Math.cos(p+y-M)+t*Math.cos(-p+y-M)+h*Math.cos(p+y-ra)+m*Math.cos(-p+y-ra)+2*(d*Math.cos(C+D-x)+s*Math.cos(D-x)+c*Math.cos(p+D-L)+l*Math.cos(-p+D-L)),A*=q),Math.abs(g-O)>=I?F=381:(H=g-O,F=0),F===381&&(y+=q*ca+P*na,J+=P*ca+A*na,O+=ca);sa=J+P*H+A*H*H*.5,oa=y+q*H+P*H*H*.5,n!==1?(ia=oa-2*W+2*j,_=sa-Z):(ia=oa-W-Q+j,_=sa-Z),sa=Z+_}return{atime:O,em:aa,argpm:Q,inclm:ta,xli:y,mm:ia,xni:J,nodem:W,dndt:_,nm:sa}}var Qa;(function(r){r[r.None=0]="None",r[r.MeanEccentricityOutOfRange=1]="MeanEccentricityOutOfRange",r[r.MeanMotionBelowZero=2]="MeanMotionBelowZero",r[r.PerturbedEccentricityOutOfRange=3]="PerturbedEccentricityOutOfRange",r[r.SemiLatusRectumBelowZero=4]="SemiLatusRectumBelowZero",r[r.Decayed=6]="Decayed"})(Qa||(Qa={}));function Z0(r,n){var o,v,e,t,d,s,h,m,c,l,T,f,V,G,B,E,X,k,U,u,g,K,z,w,ea,Z,O,aa=15e-13;r.t=n,r.error=Qa.None;var Q=r.mo+r.mdot*r.t,ta=r.argpo+r.argpdot*r.t,y=r.nodeo+r.nodedot*r.t;c=ta,g=Q;var ia=r.t*r.t;if(z=y+r.nodecf*ia,X=1-r.cc1*r.t,k=r.bstar*r.cc4*r.t,U=r.t2cof*ia,r.isimp!==1){h=r.omgcof*r.t;var J=1+r.eta*Math.cos(Q);s=r.xmcof*(J*J*J-r.delmo),E=h+s,g=Q+E,c=ta-E,f=ia*r.t,V=f*r.t,X=X-r.d2*ia-r.d3*f-r.d4*V,k+=r.bstar*r.cc5*(Math.sin(g)-r.sinmao),U=U+r.t3cof*f+V*(r.t4cof+r.t*r.t5cof)}K=r.no;var W=r.ecco;if(u=r.inclo,r.method==="d"){G=r.t;var sa={irez:r.irez,d2201:r.d2201,d2211:r.d2211,d3210:r.d3210,d3222:r.d3222,d4410:r.d4410,d4422:r.d4422,d5220:r.d5220,d5232:r.d5232,d5421:r.d5421,d5433:r.d5433,dedt:r.dedt,del1:r.del1,del2:r.del2,del3:r.del3,didt:r.didt,dmdt:r.dmdt,dnodt:r.dnodt,domdt:r.domdt,argpo:r.argpo,argpdot:r.argpdot,t:r.t,tc:G,gsto:r.gsto,xfact:r.xfact,xlamo:r.xlamo,no:r.no,atime:r.atime,em:W,argpm:c,inclm:u,xli:r.xli,mm:g,xni:r.xni,nodem:z,nm:K},S=ir(sa);W=S.em,c=S.argpm,u=S.inclm,g=S.mm,z=S.nodem,K=S.nm}if(K<=0)return r.error=Qa.MeanMotionBelowZero,null;var N=Math.pow(Xa/K,x0)*X*X;if(K=Xa/Math.pow(N,1.5),W-=k,W>=1||W<-.001)return r.error=Qa.MeanEccentricityOutOfRange,null;W<1e-6&&(W=1e-6),g+=r.no*U,ea=g+c+z,z%=R,c%=R,ea%=R,g=(ea-c-z)%R;var Oa={am:N,em:W,im:u,Om:z,om:c,mm:g,nm:K},ma=Math.sin(u),M=Math.cos(u),x=W;if(w=u,l=c,O=z,Z=g,t=ma,e=M,r.method==="d"){var ra={inclo:r.inclo,init:"n",ep:x,inclp:w,nodep:O,argpp:l,mp:Z,opsmode:r.operationmode},L=B0(r,ra);if(x=L.ep,O=L.nodep,l=L.argpp,Z=L.mp,w=L.inclp,w<0&&(w=-w,O+=Pa,l-=Pa),x<0||x>1)return r.error=Qa.PerturbedEccentricityOutOfRange,null}r.method==="d"&&(t=Math.sin(w),e=Math.cos(w),r.aycof=-.5*o0*t,Math.abs(e+1)>15e-13?r.xlcof=-.25*o0*t*(3+5*e)/(1+e):r.xlcof=-.25*o0*t*(3+5*e)/aa);var $=x*Math.cos(l);E=1/(N*(1-x*x));var I=x*Math.sin(l)+E*r.aycof,Aa=Z+l+O+E*r.xlcof*$,na=(Aa-O)%R;m=na,B=9999.9;for(var ca=1;Math.abs(B)>=1e-12&&ca<=10;)v=Math.sin(m),o=Math.cos(m),B=1-o*$-v*I,B=(na-I*o+$*v-m)/B,Math.abs(B)>=.95&&(B>0?B=.95:B=-.95),m+=B,ca+=1;var D=$*o+I*v,C=$*v-I*o,oa=$*$+I*I,q=N*(1-oa);if(q<0)return r.error=Qa.SemiLatusRectumBelowZero,null;var A=N*(1-D),P=Math.sqrt(N)*C/A,p=Math.sqrt(q)/A,_=Math.sqrt(1-oa);E=C/(1+_);var H=N/A*(v-I-$*E),j=N/A*(o-$+I*E);T=Math.atan2(H,j);var F=(j+j)*H,Y=1-2*H*H;E=1/q;var la=.5*n0*E,ga=la*E;r.method==="d"&&(d=e*e,r.con41=3*d-1,r.x1mth2=1-d,r.x7thm1=7*d-1);var Ma=A*(1-1.5*ga*_*r.con41)+.5*la*r.x1mth2*Y;if(Ma<1)return r.error=Qa.Decayed,null;T-=.25*ga*r.x7thm1*F;var pa=O+1.5*ga*e*F,Da=w+1.5*ga*e*t*Y,qa=P-K*la*r.x1mth2*F/Xa,a=p+K*la*(r.x1mth2*Y+1.5*r.con41)/Xa,xa=Math.sin(T),da=Math.cos(T),Ca=Math.sin(pa),Ea=Math.cos(pa),va=Math.sin(Da),fa=Math.cos(Da),ka=-Ca*fa,wa=Ea*fa,za=ka*xa+Ea*da,Ya=wa*xa+Ca*da,_a=va*xa,Ka=ka*da-Ea*xa,Fa=wa*da-Ca*xa,ba=va*da,ya={x:Ma*za*La,y:Ma*Ya*La,z:Ma*_a*La},Na={x:(qa*za+a*Ka)*C0,y:(qa*Ya+a*Fa)*C0,z:(qa*_a+a*ba)*C0};return{position:ya,velocity:Na,meanElements:Oa}}function dr(r,n){var o=n.opsmode,v=n.epoch,e=n.xbstar,t=n.xecco,d=n.xargpo,s=n.xinclo,h=n.xmo,m=n.xno,c=n.xnodeo,l,T,f,V,G,B,E,X,k,U,u,g,K,z,w,ea,Z,O,aa,Q,ta,y,ia,J,W,sa,S,N,Oa,ma,M,x,ra,L,$,I,Aa,na,ca,D,C,oa,q,A,P,p,_,H,j,F,Y,la,ga,Ma,pa,Da,qa=15e-13,a=r;a.isimp=0,a.method="n",a.aycof=0,a.con41=0,a.cc1=0,a.cc4=0,a.cc5=0,a.d2=0,a.d3=0,a.d4=0,a.delmo=0,a.eta=0,a.argpdot=0,a.omgcof=0,a.sinmao=0,a.t=0,a.t2cof=0,a.t3cof=0,a.t4cof=0,a.t5cof=0,a.x1mth2=0,a.x7thm1=0,a.mdot=0,a.nodedot=0,a.xlcof=0,a.xmcof=0,a.nodecf=0,a.irez=0,a.d2201=0,a.d2211=0,a.d3210=0,a.d3222=0,a.d4410=0,a.d4422=0,a.d5220=0,a.d5232=0,a.d5421=0,a.d5433=0,a.dedt=0,a.del1=0,a.del2=0,a.del3=0,a.didt=0,a.dmdt=0,a.dnodt=0,a.domdt=0,a.e3=0,a.ee2=0,a.peo=0,a.pgho=0,a.pho=0,a.pinco=0,a.plo=0,a.se2=0,a.se3=0,a.sgh2=0,a.sgh3=0,a.sgh4=0,a.sh2=0,a.sh3=0,a.si2=0,a.si3=0,a.sl2=0,a.sl3=0,a.sl4=0,a.gsto=0,a.xfact=0,a.xgh2=0,a.xgh3=0,a.xgh4=0,a.xh2=0,a.xh3=0,a.xi2=0,a.xi3=0,a.xl2=0,a.xl3=0,a.xl4=0,a.xlamo=0,a.zmol=0,a.zmos=0,a.atime=0,a.xli=0,a.xni=0,a.bstar=e,a.ecco=t,a.argpo=d,a.inclo=s,a.mo=h,a.no=m,a.nodeo=c,a.operationmode=o;var xa=78/La+1,da=42/La,Ca=da*da*da*da;a.init="y",a.t=0;var Ea={ecco:a.ecco,epoch:v,inclo:a.inclo,no:a.no,method:a.method,opsmode:a.operationmode},va=tr(Ea),fa=va.ao,ka=va.con42,wa=va.cosio,za=va.cosio2,Ya=va.eccsq,_a=va.omeosq,Ka=va.posq,Fa=va.rp,ba=va.rteosq,ya=va.sinio;if(a.no=va.no,a.con41=va.con41,a.gsto=va.gsto,a.a=Math.pow(a.no*R0,-2/3),a.alta=a.a*(1+a.ecco)-1,a.altp=a.a*(1-a.ecco)-1,a.error=0,_a>=0||a.no>=0){if(a.isimp=0,Fa<220/La+1&&(a.isimp=1),S=xa,ta=Ca,O=(Fa-1)*La,O<156){S=O-78,O<98&&(S=20);var Na=(120-S)/La;ta=Na*Na*Na*Na,S=S/La+1}aa=1/Ka,p=1/(fa-S),a.eta=fa*a.ecco*p,g=a.eta*a.eta,u=a.ecco*a.eta,Q=Math.abs(1-g),B=ta*Math.pow(p,4),E=B/Math.pow(Q,3.5),V=E*a.no*(fa*(1+1.5*g+u*(4+g))+.375*n0*p/Q*a.con41*(8+3*g*(8+g))),a.cc1=a.bstar*V,G=0,a.ecco>1e-4&&(G=-2*B*p*o0*a.no*ya/a.ecco),a.x1mth2=1-za,a.cc4=2*a.no*E*fa*_a*(a.eta*(2+.5*g)+a.ecco*(.5+2*g)-n0*p/(fa*Q)*(-3*a.con41*(1-2*u+g*(1.5-.5*u))+.75*a.x1mth2*(2*g-u*(1+g))*Math.cos(2*a.argpo))),a.cc5=2*E*fa*_a*(1+2.75*(g+u)+u*g),X=za*za,q=1.5*n0*aa*a.no,A=.5*q*n0*aa,P=-.46875*rr*aa*aa*a.no,a.mdot=a.no+.5*q*ba*a.con41+.0625*A*ba*(13-78*za+137*X),a.argpdot=-.5*q*ka+.0625*A*(7-114*za+395*X)+P*(3-36*za+49*X),H=-q*wa,a.nodedot=H+(.5*A*(4-19*za)+2*P*(3-7*za))*wa,_=a.argpdot+a.nodedot,a.omgcof=a.bstar*G*Math.cos(a.argpo),a.xmcof=0,a.ecco>1e-4&&(a.xmcof=-x0*B*a.bstar/u),a.nodecf=3.5*_a*H*a.cc1,a.t2cof=1.5*a.cc1,Math.abs(wa+1)>15e-13?a.xlcof=-.25*o0*ya*(3+5*wa)/(1+wa):a.xlcof=-.25*o0*ya*(3+5*wa)/qa,a.aycof=-.5*o0*ya;var Ba=1+a.eta*Math.cos(a.mo);if(a.delmo=Ba*Ba*Ba,a.sinmao=Math.sin(a.mo),a.x7thm1=7*za-1,2*Pa/a.no>=225){a.method="d",a.isimp=1,C=0,w=a.inclo;var Wa={epoch:v,ep:a.ecco,argpp:a.argpo,tc:C,inclp:a.inclo,nodep:a.nodeo,np:a.no,e3:a.e3,ee2:a.ee2,peo:a.peo,pgho:a.pgho,pho:a.pho,pinco:a.pinco,plo:a.plo,se2:a.se2,se3:a.se3,sgh2:a.sgh2,sgh3:a.sgh3,sgh4:a.sgh4,sh2:a.sh2,sh3:a.sh3,si2:a.si2,si3:a.si3,sl2:a.sl2,sl3:a.sl3,sl4:a.sl4,xgh2:a.xgh2,xgh3:a.xgh3,xgh4:a.xgh4,xh2:a.xh2,xh3:a.xh3,xi2:a.xi2,xi3:a.xi3,xl2:a.xl2,xl3:a.xl3,xl4:a.xl4,zmol:a.zmol,zmos:a.zmos},i=vr(Wa);a.e3=i.e3,a.ee2=i.ee2,a.peo=i.peo,a.pgho=i.pgho,a.pho=i.pho,a.pinco=i.pinco,a.plo=i.plo,a.se2=i.se2,a.se3=i.se3,a.sgh2=i.sgh2,a.sgh3=i.sgh3,a.sgh4=i.sgh4,a.sh2=i.sh2,a.sh3=i.sh3,a.si2=i.si2,a.si3=i.si3,a.sl2=i.sl2,a.sl3=i.sl3,a.sl4=i.sl4,T=i.sinim,l=i.cosim,k=i.em,U=i.emsq,y=i.s1,ia=i.s2,J=i.s3,W=i.s4,sa=i.s5,N=i.ss1,Oa=i.ss2,ma=i.ss3,M=i.ss4,x=i.ss5,ra=i.sz1,L=i.sz3,$=i.sz11,I=i.sz13,Aa=i.sz21,na=i.sz23,ca=i.sz31,D=i.sz33,a.xgh2=i.xgh2,a.xgh3=i.xgh3,a.xgh4=i.xgh4,a.xh2=i.xh2,a.xh3=i.xh3,a.xi2=i.xi2,a.xi3=i.xi3,a.xl2=i.xl2,a.xl3=i.xl3,a.xl4=i.xl4,a.zmol=i.zmol,a.zmos=i.zmos,Z=i.nm,j=i.z1,F=i.z3,Y=i.z11,la=i.z13,ga=i.z21,Ma=i.z23,pa=i.z31,Da=i.z33;var Ua={inclo:w,init:a.init,ep:a.ecco,inclp:a.inclo,nodep:a.nodeo,argpp:a.argpo,mp:a.mo,opsmode:a.operationmode},Sa=B0(a,Ua);a.ecco=Sa.ep,a.inclo=Sa.inclp,a.nodeo=Sa.nodep,a.argpo=Sa.argpp,a.mo=Sa.mp,K=0,z=0,ea=0;var Va={cosim:l,emsq:U,argpo:a.argpo,s1:y,s2:ia,s3:J,s4:W,s5:sa,sinim:T,ss1:N,ss2:Oa,ss3:ma,ss4:M,ss5:x,sz1:ra,sz3:L,sz11:$,sz13:I,sz21:Aa,sz23:na,sz31:ca,sz33:D,t:a.t,tc:C,gsto:a.gsto,mo:a.mo,mdot:a.mdot,no:a.no,nodeo:a.nodeo,nodedot:a.nodedot,xpidot:_,z1:j,z3:F,z11:Y,z13:la,z21:ga,z23:Ma,z31:pa,z33:Da,ecco:a.ecco,eccsq:Ya,em:k,argpm:K,inclm:w,mm:ea,nm:Z,nodem:z,irez:a.irez,atime:a.atime,d2201:a.d2201,d2211:a.d2211,d3210:a.d3210,d3222:a.d3222,d4410:a.d4410,d4422:a.d4422,d5220:a.d5220,d5232:a.d5232,d5421:a.d5421,d5433:a.d5433,dedt:a.dedt,didt:a.didt,dmdt:a.dmdt,dnodt:a.dnodt,domdt:a.domdt,del1:a.del1,del2:a.del2,del3:a.del3,xfact:a.xfact,xlamo:a.xlamo,xli:a.xli,xni:a.xni},b=er(Va);a.irez=b.irez,a.atime=b.atime,a.d2201=b.d2201,a.d2211=b.d2211,a.d3210=b.d3210,a.d3222=b.d3222,a.d4410=b.d4410,a.d4422=b.d4422,a.d5220=b.d5220,a.d5232=b.d5232,a.d5421=b.d5421,a.d5433=b.d5433,a.dedt=b.dedt,a.didt=b.didt,a.dmdt=b.dmdt,a.dnodt=b.dnodt,a.domdt=b.domdt,a.del1=b.del1,a.del2=b.del2,a.del3=b.del3,a.xfact=b.xfact,a.xlamo=b.xlamo,a.xli=b.xli,a.xni=b.xni}a.isimp!==1&&(f=a.cc1*a.cc1,a.d2=4*fa*p*f,oa=a.d2*p*a.cc1/3,a.d3=(17*fa+S)*oa,a.d4=.5*oa*fa*p*(221*fa+31*S)*a.cc1,a.t3cof=a.d2+2*f,a.t4cof=.25*(3*a.d3+a.cc1*(12*a.d2+10*f)),a.t5cof=.2*(3*a.d4+12*a.cc1*a.d3+6*a.d2*a.d2+15*f*(2*a.d2+f)))}Z0(a,0),a.init="n"}function hr(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"i",o=0,v=r.NORAD_CAT_ID.toString(),e=new Date(r.EPOCH.endsWith("Z")?r.EPOCH:r.EPOCH+"Z"),t=e.getUTCFullYear(),d=Number(t.toString().slice(-2)),s=(e.valueOf()-new Date(Date.UTC(t,0,1,0,0,0)).valueOf())/(86400*1e3)+1,h=Number(r.MEAN_MOTION_DOT),m=Number(r.MEAN_MOTION_DDOT),c=Number(r.BSTAR),l=Number(r.INCLINATION)*$a,T=Number(r.RA_OF_ASC_NODE)*$a,f=Number(r.ECCENTRICITY),V=Number(r.ARG_OF_PERICENTER)*$a,G=Number(r.MEAN_ANOMALY)*$a,B=Number(r.MEAN_MOTION)/nr,E=or(t,s),X=E.mon,k=E.day,U=E.hr,u=E.minute,g=E.sec,K=M0(t,X,k,U,u,g),z={error:o,satnum:v,epochyr:d,epochdays:s,ndot:h,nddot:m,bstar:c,inclo:l,nodeo:T,ecco:f,argpo:V,mo:G,no:B,jdsatepoch:K};return dr(z,{opsmode:n,satn:z.satnum,epoch:z.jdsatepoch-24332815e-1,xbstar:z.bstar,xecco:z.ecco,xargpo:z.argpo,xinclo:z.inclo,xmo:z.mo,xno:z.no,xnodeo:z.nodeo}),z}function P0(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),v=1;v<n;v++)o[v-1]=arguments[v];var e=M0.apply(void 0,o),t=(e-r.jdsatepoch)*V0;return Z0(r,t)}function _0(r){return r*$a}function k0(r){var n=r.longitude,o=r.latitude,v=r.height,e=6378.137,t=6356.7523142,d=(e-t)/e,s=2*d-d*d,h=e/Math.sqrt(1-s*(Math.sin(o)*Math.sin(o))),m=(h+v)*Math.cos(o)*Math.cos(n),c=(h+v)*Math.cos(o)*Math.sin(n),l=(h*(1-s)+v)*Math.sin(o);return{x:m,y:c,z:l}}function sr(r,n){var o=r.x*Math.cos(n)-r.y*Math.sin(n),v=r.x*Math.sin(n)+r.y*Math.cos(n),e=r.z;return{x:o,y:v,z:e}}function F0(r,n){var o=r.x*Math.cos(n)+r.y*Math.sin(n),v=r.x*-Math.sin(n)+r.y*Math.cos(n),e=r.z;return{x:o,y:v,z:e}}function mr(r,n){var o=r.longitude,v=r.latitude,e=k0(r),t=n.x-e.x,d=n.y-e.y,s=n.z-e.z,h=Math.sin(v)*Math.cos(o)*t+Math.sin(v)*Math.sin(o)*d-Math.cos(v)*s,m=-Math.sin(o)*t+Math.cos(o)*d,c=Math.cos(v)*Math.cos(o)*t+Math.cos(v)*Math.sin(o)*d+Math.sin(v)*s;return{topS:h,topE:m,topZ:c}}function cr(r){var n=r.topS,o=r.topE,v=r.topZ,e=Math.sqrt(n*n+o*o+v*v),t=Math.asin(v/e),d=Math.atan2(-o,n)+Pa;return{azimuth:d,elevation:t,rangeSat:e}}function b0(r,n){var o=mr(r,n);return cr(o)}function gr(r){var n=(r-2451545)/36525,o=(280.46+36000.77*n)%360,v=n,e=(357.5277233+35999.05034*v*$a)%R;e<0&&(e+=R);var t=(o+1.914666471*Math.sin(e)+.019994643*Math.sin(2*e))%360*$a,d=(23.439291-.0130042*v)*$a,s=1.000140612-.016708617*Math.cos(e)-139589e-9*Math.cos(2*e),h=[s*Math.cos(t),s*Math.cos(d)*Math.sin(t),s*Math.sin(d)*Math.sin(t)],m=Math.atan(Math.cos(d)*Math.tan(t)),c=m;Math.abs(t-c)>Pa*.5&&(c+=.5*Pa*Math.round((t-m)/(.5*Pa)));var l=Math.asin(Math.sin(d)*Math.sin(t));return{rsun:h,rtasc:c,decl:l}}class Ja{static STARLINK_ERAS=[{launchedFrom:"2019-05-24",magnitude1000Km:5.93},{launchedFrom:"2020-08-07",magnitude1000Km:7.21}];static STARLINK_ORBIT_RAISING={belowKm:357,magnitude1000Km:4.58};static MEASURED_CONSTELLATIONS=[{namePrefix:"ONEWEB-",eras:[{launchedFrom:"2019-02-27",magnitude1000Km:7.18}]},{namePrefix:"SPACEMOBILE-",eras:[{launchedFrom:"2024-09-12",magnitude1000Km:3.77},{launchedFrom:"2025-12-24",magnitude1000Km:4.32}]}];static of(n,o,v,e,t=1/0){if(e<=0)return;let d;if(n.stdMag!==void 0){const s=(1+Math.cos(_0(v)))/2;if(s<=0)return;d=n.stdMag-15.75+2.5*Math.log10(o*o/s)}else{const s=Ja.measured1000Km(n,t);s!==void 0&&(d=s+5*Math.log10(o/1e3))}return d===void 0?void 0:d-2.5*Math.log10(e)}static measured1000Km(n,o=1/0){if(n.kind==="starlink"){const e=Ja.STARLINK_ORBIT_RAISING;return o<e.belowKm?e.magnitude1000Km:Ja.starlinkMagnitude1000Km(n.launch)}const v=Ja.MEASURED_CONSTELLATIONS.find(e=>n.name.startsWith(e.namePrefix));return v?Ja.eraOf(v.eras,n.launch):void 0}static starlinkMagnitude1000Km(n){return Ja.eraOf(Ja.STARLINK_ERAS,n)}static eraOf(n,o){return([...n].reverse().find(e=>o!==void 0&&o>=e.launchedFrom)??n[n.length-1]).magnitude1000Km}}class r0{static CANDIDATE_WINDOW_S=60;static CANDIDATE_BELOW_HORIZON_DEG=-10;records;candidates;constructor(n){this.records=[];for(const o of n){const v=r0.satrecOf(o);v&&this.records.push({object:o,satrec:v})}}get size(){return this.records.length}static satrecOf(n){const o=n.elements;try{const v=hr({OBJECT_NAME:n.name,OBJECT_ID:String(n.norad),EPOCH:new Date(o.epochMs).toISOString().replace("Z",""),MEAN_MOTION:o.meanMotion,ECCENTRICITY:o.eccentricity,INCLINATION:o.inclinationDeg,RA_OF_ASC_NODE:o.raanDeg,ARG_OF_PERICENTER:o.argOfPerigeeDeg,MEAN_ANOMALY:o.meanAnomalyDeg,NORAD_CAT_ID:n.norad,ELEMENT_SET_NO:999,BSTAR:o.bstar,MEAN_MOTION_DOT:0,MEAN_MOTION_DDOT:0});return v.error?void 0:v}catch{return}}positionsAt(n,o,v=0){const e=this.frameAt(n,o),t=[];for(const d of this.candidateIndices(n,o)){const s=this.positionOf(this.records[d],n,e);s&&s.altitudeDeg>=v&&t.push(s)}return t}passesDuring(n,o,v,e=10){const t=[],d=new Map;for(let s=n.getTime();s<=o.getTime();s+=e*1e3){const h=new Date(s);for(const m of this.positionsAt(h,v)){if(m.sunlitFraction<=0)continue;const c=d.get(m.object.norad);if(!c||s-c.end.getTime()>e*1e3){const l={object:m.object,start:h,end:h,peak:{...m,date:h}};d.set(m.object.norad,l),t.push(l);continue}c.end=h,r0.outshines(m,c.peak)&&(c.peak={...m,date:h})}}return t}static outshines(n,o){return n.magnitude!==void 0&&o.magnitude!==void 0?n.magnitude<o.magnitude:n.magnitude!==void 0?!0:o.magnitude!==void 0?!1:n.altitudeDeg>o.altitudeDeg}frameAt(n,o){const v=U0(n),e={latitude:_0(o.lat),longitude:_0(o.lng),height:o.elevationM/1e3},t=sr(k0(e),v),[d,s,h]=gr(M0(n)).rsun;return{gmst:v,geodetic:e,observerEci:t,sunEciAu:{x:d,y:s,z:h}}}positionOf(n,o,v){const e=P0(n.satrec,o);if(!e||!e.position||Number.isNaN(e.position.x))return;const t=e.position,d=b0(v.geodetic,F0(t,v.gmst)),s=1-r0.shadowFraction(t,v.sunEciAu),h=r0.phaseAngleDeg(t,v.sunEciAu,v.observerEci),m=Math.hypot(t.x,t.y,t.z)-6371;return{object:n.object,azimuthDeg:d.azimuth*180/Math.PI,altitudeDeg:d.elevation*180/Math.PI,rangeKm:d.rangeSat,heightKm:m,sunlitFraction:s,phaseAngleDeg:h,magnitude:Ja.of(n.object,d.rangeSat,h,s,m)}}static shadowFraction(n,o){const v=1495978707e-1,e=696e3,t=6378.137,d=[o.x*v-n.x,o.y*v-n.y,o.z*v-n.z],s=Math.hypot(d[0],d[1],d[2]),h=Math.hypot(n.x,n.y,n.z),m=Math.asin(Math.min(1,e/s)),c=Math.asin(Math.min(1,t/h)),l=-(n.x*d[0]+n.y*d[1]+n.z*d[2])/(h*s),T=Math.acos(Math.max(-1,Math.min(1,l)));if(T>=m+c)return 0;if(T<=c-m)return 1;const f=(T*T+m*m-c*c)/(2*T),V=Math.sqrt(Math.max(0,m*m-f*f)),G=m*m*Math.acos(Math.max(-1,Math.min(1,f/m)))+c*c*Math.acos(Math.max(-1,Math.min(1,(T-f)/c)))-T*V;return Math.min(1,Math.max(0,G/(Math.PI*m*m)))}static phaseAngleDeg(n,o,v){const e=1495978707e-1,t=[o.x*e-n.x,o.y*e-n.y,o.z*e-n.z],d=[v.x-n.x,v.y-n.y,v.z-n.z],h=(t[0]*d[0]+t[1]*d[1]+t[2]*d[2])/(Math.hypot(t[0],t[1],t[2])*Math.hypot(d[0],d[1],d[2]));return Math.acos(Math.max(-1,Math.min(1,h)))*180/Math.PI}candidateIndices(n,o){const v=r0.CANDIDATE_WINDOW_S*1e3,e=Math.floor(n.getTime()/v)*v,t=`${o.lat.toFixed(2)},${o.lng.toFixed(2)}`;if(this.candidates?.windowStart===e&&this.candidates.observerKey===t)return this.candidates.indices;const d=new Date(e+v/2),s=this.frameAt(d,o),h=[];return this.records.forEach((m,c)=>{const l=P0(m.satrec,d);if(!l||!l.position||Number.isNaN(l.position.x))return;b0(s.geodetic,F0(l.position,s.gmst)).elevation*180/Math.PI>=r0.CANDIDATE_BELOW_HORIZON_DEG&&h.push(c)}),this.candidates={windowStart:e,observerKey:t,indices:h},h}}export{Ja as SatelliteMagnitude,r0 as SatellitePasses};
@@ -1 +1 @@
1
- const e={play:"Lecture",pause:"Pause",noDuration:"Aucune durée d'observation",autoReplay:"Lecture automatique",currentPosition:"Position actuelle",duration:"Durée",switchToElapsed:"cliquer pour afficher la durée écoulée",switchToClockTime:"cliquer pour afficher l'heure de l'observation",fullscreen:"Plein écran",exitFullscreen:"Quitter le plein écran",showWitnessMap:"Voir où était le témoin",hideWitnessMap:"Masquer où était le témoin",mapImageryUnavailable:"Vue aérienne indisponible",showMilestones:"Voir les moments du récit",hideMilestones:"Masquer les moments du récit",witnessHere:"Le témoin, ici",decorHere:"Élément de décor"};export{e as ufoMessages_fr};
1
+ const e={play:"Lecture",pause:"Pause",noDuration:"Aucune durée d'observation",autoReplay:"Lecture automatique",currentPosition:"Position actuelle",duration:"Durée",switchToElapsed:"cliquer pour afficher la durée écoulée",switchToClockTime:"cliquer pour afficher l'heure de l'observation",fullscreen:"Plein écran",exitFullscreen:"Quitter le plein écran",showWitnessMap:"Voir où était le témoin",hideWitnessMap:"Masquer où était le témoin",mapImageryUnavailable:"Vue aérienne indisponible",showReferences:"Voir les photos des lieux",hideReferences:"Masquer les photos des lieux",referenceOpacity:"Opacité des photos",showMilestones:"Voir les moments du récit",hideMilestones:"Masquer les moments du récit",witnessHere:"Le témoin, ici",decorHere:"Élément de décor"};export{e as ufoMessages_fr};