@astronomy-bundle/core 8.0.1 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,10 @@
4
4
 
5
5
  A TypeScript library for astronomical calculations including the position of the Sun, Moon, and planets, sunrise and sunset times, and solar eclipses. Most calculations are based on Jean Meeus' *Astronomical Algorithms* and the VSOP87 theory.
6
6
 
7
- ---
7
+ ## Packages
8
+
9
+ - [`@astronomy-bundle/core`](https://www.npmjs.com/package/@astronomy-bundle/core)
10
+ - [`@astronomy-bundle/solar-eclipse`](https://www.npmjs.com/package/@astronomy-bundle/solar-eclipse)
8
11
 
9
12
  ## API Reference
10
13
 
package/index.d.mts CHANGED
@@ -17,6 +17,11 @@ declare class Location {
17
17
  getDistanceToInKm(location: Location): number;
18
18
  }
19
19
 
20
+ interface LatLon {
21
+ lat: number;
22
+ lon: number;
23
+ }
24
+
20
25
  type Time = {
21
26
  year: number;
22
27
  month: number;
@@ -26,11 +31,6 @@ type Time = {
26
31
  sec: number;
27
32
  };
28
33
 
29
- interface LatLon {
30
- lat: number;
31
- lon: number;
32
- }
33
-
34
34
  declare class TimeOfInterest {
35
35
  readonly time: Time;
36
36
  readonly jd: number;
package/index.d.ts CHANGED
@@ -17,6 +17,11 @@ declare class Location {
17
17
  getDistanceToInKm(location: Location): number;
18
18
  }
19
19
 
20
+ interface LatLon {
21
+ lat: number;
22
+ lon: number;
23
+ }
24
+
20
25
  type Time = {
21
26
  year: number;
22
27
  month: number;
@@ -26,11 +31,6 @@ type Time = {
26
31
  sec: number;
27
32
  };
28
33
 
29
- interface LatLon {
30
- lat: number;
31
- lon: number;
32
- }
33
-
34
34
  declare class TimeOfInterest {
35
35
  readonly time: Time;
36
36
  readonly jd: number;
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var y=Object.defineProperty;var r0=Object.getOwnPropertyDescriptor;var a0=Object.getOwnPropertyNames;var i0=Object.prototype.hasOwnProperty;var u0=(t,n)=>{for(var o in n)y(t,o,{get:n[o],enumerable:!0})},s0=(t,n,o,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of a0(n))!i0.call(t,r)&&r!==o&&y(t,r,{get:()=>n[r],enumerable:!(e=r0(n,r))||e.enumerable});return t};var c0=t=>s0(y({},"__esModule",{value:!0}),t);var b0={};u0(b0,{Location:()=>D,TimeOfInterest:()=>L});module.exports=c0(b0);function A(t,n=0){let o=Math.pow(10,n);return Math.round(t*o)/o}function h(t,n){let o=t.toString();for(;o.length<n;)o="0"+o;return o}function d(t){return Math.sin(t)*Math.sin(t)}function w(t){return Math.cos(t)*Math.cos(t)}function _(t,n=!1,o){let e=k(t,o);t=Math.abs(t);let r=Math.floor(t),u=A((t-r)*60,5),i=r+"\xB0 ",a=h(u,2)+"'";return n&&r===0?e+a:e+i+a}function T(t,n=!1,o){let e=k(t,o);t=Math.abs(t);let r=Math.floor(t),u=Math.floor((t-r)*60),i=A((t-r-u/60)*3600,3),a=i.toString().split("."),c=r+"\xB0 ",s=h(u,2)+"' ",m=(a.length===1?h(i,2):h(a[0],2)+"."+a[1])+'"';return n&&r===0&&u===0?e+m:n&&r===0?e+s+m:e+c+s+m}function f(t,n=360){let o=t%n;return o<0&&(o=o+n),o}function k(t,n){return n?t<0?n.negativePrefix:n.positivePrefix:t<0?"-":""}var m0=.996647189335,N=1-m0,A0=1.002738*15,U=[[0,0,0,0,1,-171996,-174.2,92025,8.9],[0,0,2,-2,2,-13187,-1.6,5736,-3.1],[0,0,2,0,2,-2274,-.2,977,-.5],[0,0,0,0,2,2062,.2,-895,.5],[0,1,0,0,0,1426,-3.4,54,-.1],[1,0,0,0,0,712,.1,-7,0],[0,1,2,-2,2,-517,1.2,224,-.6],[0,0,2,0,1,-386,-.4,200,0],[1,0,2,0,2,-301,0,129,-.1],[0,-1,2,-2,2,217,-.5,-95,.3],[1,0,0,-2,0,-158,0,-1,0],[0,0,2,-2,1,129,.1,-70,0],[-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p)+w(s)*d(p),b=w(m)*w(p)+d(s)*d(p),g=Math.atan(Math.sqrt(l/b)),x=Math.sqrt(l*b)/g,n0=2*g*6378137/1e3,e0=(3*x-1)/(2*b),o0=(3*x+1)/(2*l);return n0*(1+N*e0*d(s)*w(m)-N*o0*w(s)*d(m))}var D=class t{constructor(n,o,e=0){this.lat=n;this.lon=o;this.elevation=e;this.prefixesNorthSouth={positivePrefix:"N ",negativePrefix:"S "};this.prefixesEastWest={positivePrefix:"E ",negativePrefix:"W "};this.location={lat:n,lon:o,elevation:e}}static create(n,o,e=0){return new t(n,o,e)}getLatitude(){return this.location.lat}getLongitude(){return this.location.lon}getLatitudeInDegreeMinutes(){return _(this.location.lat,!1,this.prefixesNorthSouth)}getLongitudeInDegreeMinutes(){return _(this.location.lon,!1,this.prefixesEastWest)}getLatitudeInDegreeMinutesSeconds(){return T(this.location.lat,!1,this.prefixesNorthSouth)}getLongitudeInDegreeMinutesSeconds(){return T(this.location.lon,!1,this.prefixesEastWest)}getElevation(){return this.location.elevation}getDistanceToInKm(n){return v(this.location,n)}};function j(t){let n=parseFloat(t.year+"."+O(t)),o,e;t.month>2?(o=t.year,e=t.month):(o=t.year-1,e=t.month+12);let r=t.day,u=t.hour/24+t.min/1440+t.sec/86400,i,a;if(n>=1582.288)i=Math.floor(o/100),a=2-i+Math.floor(i/4);else if(n<=1582.277)a=0;else throw new Error("Date between 1582-10-04 and 1582-10-15 is not defined.");return Math.floor(365.25*(o+4716))+Math.floor(30.6001*(e+1))+r+u+a-1524.5}function C(t){t=t+.5;let n=Math.floor(t),o=t-n,e=n;if(n>=2299161){let g=Math.floor((n-186721625e-2)/36524.25);e=n+1+g-Math.floor(g/4)}let r=e+1524,u=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*u),a=Math.floor((r-i)/30.6001),c=r-i-Math.floor(30.6001*a)+o,s=a<14?a-1:a-13,m=s>2?u-4716:u-4715,p=(c-Math.floor(c))*24,l=(p-Math.floor(p))*60,b=(l-Math.floor(l))*60;return{year:Math.floor(m),month:Math.floor(s),day:Math.floor(c),hour:Math.floor(p),min:Math.floor(l),sec:Math.floor(b)}}function W(t){return Math.floor(t+.5)-.5}function F(t){return(t-2451545)/36525}function E(t){return t*36525+2451545}function B(t){return F(t)/10}function $(t,n){let o=S(t)?1:2,e=n<32?1:Math.floor(9*(o+n)/275+.98),r=Math.floor(n-Math.floor(275*e/9)+o*Math.floor((e+9)/12)+30),u=24*(n-Math.floor(n)),i=Math.floor(u),a=60*(u-i),c=Math.floor(a),s=A(60*(a-c));return{year:t,month:e,day:r,hour:i,min:c,sec:s}}function q(t){let n=S(t.year)?366:365,o=O(t)-1+t.hour/24+t.min/1440+t.sec/86400;return t.year+o/n}function O(t){let n=S(t.year)?1:2,o=t.month,e=t.day;return Math.floor(275*o/9)-n*Math.floor((o+9)/12)+e-30}function z(t){let n=j(t);return Math.floor((n+1.5)%7)}function S(t){return t/4!==Math.floor(t/4)?!1:t/100!==Math.floor(t/100)?!0:t/400===Math.floor(t/400)}function R(t){let n=357.5291092+35999.0502909*t-1536e-7*Math.pow(t,2)+Math.pow(t,3)/2449e3;return f(n)}function G(t){let n=297.8501921+445267.1114034*t-.0018819*Math.pow(t,2)+Math.pow(t,3)/545868-Math.pow(t,4)/113065e3;return f(n)}function P(t){let n=134.9633964+477198.8675055*t+.0087414*Math.pow(t,2)+Math.pow(t,3)/69699-Math.pow(t,4)/1471200;return f(n)}function Y(t){let n=93.272095+483202.0175233*t-.0036539*Math.pow(t,2)-Math.pow(t,3)/352600+Math.pow(t,4)/86331e3;return f(n)}function M0(t){let n=t/100;return(84381.448-4680.93*n-1.55*Math.pow(n,2)+1999.25*Math.pow(n,3)-51.38*Math.pow(n,4)-249.67*Math.pow(n,5)-39.05*Math.pow(n,6)+7.12*Math.pow(n,7)+27.87*Math.pow(n,8)+5.79*Math.pow(n,9)+2.45*Math.pow(n,10))/3600}function V(t){let n=M0(t),o=f0(t);return n+o}function H(t){let n=G(t),o=R(t),e=P(t),r=Y(t),u=125.04452-1934.136261*t+.0020708*Math.pow(t,2)+Math.pow(t,3)/45e4,i=0;return U.forEach(a=>{let c=a[0],s=a[1],m=a[2],p=a[3],l=a[4],b=a[5],g=a[6],x=p*n+s*o+c*e+m*r+l*u;i+=Math.sin(x*M)*(b+g*t)}),i*1e-4/3600}function f0(t){let n=G(t),o=R(t),e=P(t),r=Y(t),u=125.04452-1934.136261*t+.0020708*Math.pow(t,2)+Math.pow(t,3)/45e4,i=0;return U.forEach(a=>{let c=a[0],s=a[1],m=a[2],p=a[3],l=a[4],b=a[7],g=a[8],x=p*n+s*o+c*e+m*r+l*u;i+=Math.cos(x*M)*(b+g*t)}),i*1e-4/3600}function I(t){let o=280.46061837+360.98564736629*(E(t)-2451545)+387933e-9*Math.pow(t,2)+Math.pow(t,3)/3871e4;return f(o)}function J(t){let n=I(t),o=H(t),r=V(t)*M;return n+o*Math.cos(r)}function X(t,n){let e=I(t)+n;return f(e)}function Z(t,n){return J(t)+n}function t0(t,n=0){let o=t+(n-.5)/12,e,r=0;return t<-500&&(e=(o-1820)/100,r=-20+32*Math.pow(e,2)),t>=-500&&t<500&&(e=o/100,r=10583.6-1014.41*e+33.78311*Math.pow(e,2)-5.952053*Math.pow(e,3)-.1798452*Math.pow(e,4)+.022174192*Math.pow(e,5)+.0090316521*Math.pow(e,6)),t>=500&&t<1600&&(e=(o-1e3)/100,r=1574.2-556.01*e+71.23472*Math.pow(e,2)+.319781*Math.pow(e,3)-.8503463*Math.pow(e,4)-.005050998*Math.pow(e,5)+.0083572073*Math.pow(e,6)),t>=1600&&t<1700&&(e=o-1600,r=120-.9808*e-.01532*Math.pow(e,2)+Math.pow(e,3)/7129),t>=1700&&t<1800&&(e=o-1700,r=8.83+.1603*e-.0059285*Math.pow(e,2)+13336e-8*Math.pow(e,3)-Math.pow(e,4)/1174e3),t>=1800&&t<1860&&(e=o-1800,r=13.72-.332447*e+.0068612*Math.pow(e,2)+.0041116*Math.pow(e,3)-37436e-8*Math.pow(e,4)+121272e-10*Math.pow(e,5)-1699e-10*Math.pow(e,6)+875e-12*Math.pow(e,7)),t>=1860&&t<1900&&(e=o-1860,r=7.62+.5737*e-.251754*Math.pow(e,2)+.01680668*Math.pow(e,3)-.0004473624*Math.pow(e,4)+Math.pow(e,5)/233174),t>=1900&&t<1920&&(e=o-1900,r=-2.79+1.494119*e-.0598939*Math.pow(e,2)+.0061966*Math.pow(e,3)-197e-6*Math.pow(e,4)),t>=1920&&t<1941&&(e=o-1920,r=21.2+.84493*e-.0761*Math.pow(e,2)+.0020936*Math.pow(e,3)),t>=1941&&t<1961&&(e=o-1950,r=29.07+.407*e-Math.pow(e,2)/233+Math.pow(e,3)/2547),t>=1961&&t<1986&&(e=o-1975,r=45.45+1.067*e-Math.pow(e,2)/260-Math.pow(e,3)/718),t>=1986&&t<2005&&(e=o-2e3,r=63.86+.3345*e-.060374*Math.pow(e,2)+.0017275*Math.pow(e,3)+651814e-9*Math.pow(e,4)+2373599e-11*Math.pow(e,5)),t>=2005&&t<2050&&(e=o-2e3,r=62.92+.32217*e+.005589*Math.pow(e,2)),t>=2050&&(e=(o-1820)/100,r=-20+32*Math.pow(e,2)),r}var L=class t{constructor(n){this.time=n;this.jd=0;this.T=0;this.jd=j(n),this.T=F(this.jd)}static fromCurrentTime(){let n=new Date(Date.now());return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromTime(n,o,e,r=0,u=0,i=0){return new t({year:n,month:o,day:e,hour:r,min:u,sec:i})}static fromDate(n){return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromYearOfDay(n,o){let e=$(n,o);return new t(e)}static fromJulianDay(n){let o=C(n);return new t(o)}static fromJulianCenturiesJ2000(n){let o=E(n),e=C(o);return new t(e)}getTime(){return this.time}getString(){let{year:n,month:o,day:e,hour:r,min:u,sec:i}=this.time;return`${n}-${h(o,2)}-${h(e,2)} ${h(r,2)}:${h(u,2)}:${h(i,2)}`}getDate(){let{year:n,month:o,day:e,hour:r,min:u,sec:i}=this.time;return new Date(Date.UTC(n,o-1,e,r,u,i))}getDecimalYear(){return q(this.time)}getDayOfYear(){return O(this.time)}getDayOfWeek(){return z(this.time)}isLeapYear(){return S(this.time.year)}getJulianDay(){return this.jd}getJulianDay0(){return W(this.jd)}getJulianCenturiesJ2000(){return this.T}getJulianMillenniaJ2000(){return B(this.jd)}getGreenwichMeanSiderealTime(){return I(this.T)}getGreenwichApparentSiderealTime(){return J(this.T)}getLocalMeanSiderealTime(n){return X(this.T,n.lon)}getLocalApparentSiderealTime(n){return Z(this.T,n.lon)}getDeltaT(){let{year:n,month:o}=this.time;return t0(n,o)}};0&&(module.exports={Location,TimeOfInterest});
1
+ "use strict";var T=Object.defineProperty;var o0=Object.getOwnPropertyDescriptor;var i0=Object.getOwnPropertyNames;var u0=Object.prototype.hasOwnProperty;var s0=(t,n)=>{for(var r in n)T(t,r,{get:n[r],enumerable:!0})},a0=(t,n,r,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of i0(n))!u0.call(t,o)&&o!==r&&T(t,o,{get:()=>n[o],enumerable:!(e=o0(n,o))||e.enumerable});return t};var c0=t=>a0(T({},"__esModule",{value:!0}),t);var h0={};s0(h0,{Location:()=>L,TimeOfInterest:()=>E});module.exports=c0(h0);function D(t,n=0){let r=10**n;return Math.round(t*r)/r}function p(t,n){let r=t.toString();for(;r.length<n;)r=`0${r}`;return r}function d(t){return Math.sin(t)*Math.sin(t)}function x(t){return Math.cos(t)*Math.cos(t)}function _(t,n=!1,r){let e=J(t,r);t=Math.abs(t);let o=Math.floor(t),s=D((t-o)*60,5),u=`${o}\xB0 `,i=`${p(s,2)}'`;return n&&o===0?e+i:e+u+i}function N(t,n=!1,r){let e=J(t,r);t=Math.abs(t);let o=Math.floor(t),s=Math.floor((t-o)*60),u=D((t-o-s/60)*3600,3),i=u.toString().split("."),c=`${o}\xB0 `,a=`${p(s,2)}' `,m=`${i.length===1?p(u,2):`${p(i[0],2)}.${i[1]}`}"`;return n&&o===0&&s===0?e+m:n&&o===0?e+a+m:e+c+a+m}function g(t,n=360){let r=t%n;return r<0&&(r=r+n),r}function J(t,n){return n?t<0?n.negativePrefix:n.positivePrefix:t<0?"-":""}var b=Math.PI/180,m0=180/Math.PI;var l0=.996647189335,U=1-l0,L0=1.002738*15,j=[[0,0,0,0,1,-171996,-174.2,92025,8.9],[0,0,2,-2,2,-13187,-1.6,5736,-3.1],[0,0,2,0,2,-2274,-.2,977,-.5],[0,0,0,0,2,2062,.2,-895,.5],[0,1,0,0,0,1426,-3.4,54,-.1],[1,0,0,0,0,712,.1,-7,0],[0,1,2,-2,2,-517,1.2,224,-.6],[0,0,2,0,1,-386,-.4,200,0],[1,0,2,0,2,-301,0,129,-.1],[0,-1,2,-2,2,217,-.5,-95,.3],[1,0,0,-2,0,-158,0,-1,0],[0,0,2,-2,1,129,.1,-70,0],[-1,0,2,0,2,123,0,-53,0],[0,0,0,2,0,63,0,-2,0],[1,0,0,0,1,63,.1,-33,0],[-1,0,2,2,2,-59,0,26,0],[-1,0,0,0,1,-58,-.1,32,0],[1,0,2,0,1,-51,0,27,0],[2,0,0,-2,0,48,0,1,0],[-2,0,2,0,1,46,0,-24,0],[0,0,2,2,2,-38,0,16,0],[2,0,2,0,2,-31,0,13,0],[2,0,0,0,0,29,0,-1,0],[1,0,2,-2,2,29,0,-12,0],[0,0,2,0,0,26,0,-1,0],[0,0,2,-2,0,-22,0,0,0],[-1,0,2,0,1,21,0,-10,0],[0,2,0,0,0,17,-.1,0,0],[0,2,2,-2,2,-16,.1,7,0],[-1,0,0,2,1,16,0,-8,0],[0,1,0,0,1,-15,0,9,0],[1,0,0,-2,1,-13,0,7,0],[0,-1,0,0,1,-12,0,6,0],[2,0,-2,0,0,11,0,0,0],[-1,0,2,2,1,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2,1,-1,0,1,0],[-2,0,2,4,2,-1,0,1,0],[-1,0,4,0,2,1,0,0,0],[1,-1,0,-2,0,1,0,0,0],[2,0,2,-2,1,1,0,-1,0],[2,0,2,2,2,-1,0,0,0],[1,0,0,2,1,-1,0,0,0],[0,0,4,-2,2,1,0,0,0],[3,0,2,-2,2,1,0,0,0],[1,0,2,-2,0,-1,0,0,0],[0,1,2,0,1,1,0,0,0],[-1,-1,0,2,1,1,0,0,0],[0,0,-2,0,1,-1,0,0,0],[0,0,2,-1,2,-1,0,0,0],[0,1,0,2,0,-1,0,0,0],[1,0,-2,-2,0,-1,0,0,0],[0,-1,2,0,1,-1,0,0,0],[1,1,0,-2,1,-1,0,0,0],[1,0,-2,2,0,-1,0,0,0],[2,0,0,2,0,1,0,0,0],[0,0,2,4,2,-1,0,0,0],[0,1,0,1,0,1,0,0,0]];function k(t,n){let{lat:r,lon:e}=t,{lat:o,lon:s}=n,u=(r+o)/2,i=(r-o)/2,c=(s-e)/2,a=u*b,m=i*b,l=c*b,f=d(m)*x(l)+x(a)*d(l),h=x(m)*x(l)+d(a)*d(l),M=Math.atan(Math.sqrt(f/h)),A=Math.sqrt(f*h)/M,n0=2*M*6378137/1e3,e0=(3*A-1)/(2*h),r0=(3*A+1)/(2*f);return n0*(1+U*e0*d(a)*x(m)-U*r0*x(a)*d(m))}var L=class t{constructor(n,r,e=0){this.lat=n;this.lon=r;this.elevation=e;this.prefixesNorthSouth={positivePrefix:"N ",negativePrefix:"S "};this.prefixesEastWest={positivePrefix:"E ",negativePrefix:"W "};this.location={lat:n,lon:r,elevation:e}}static create(n,r,e=0){return new t(n,r,e)}getLatitude(){return this.location.lat}getLongitude(){return this.location.lon}getLatitudeInDegreeMinutes(){return _(this.location.lat,!1,this.prefixesNorthSouth)}getLongitudeInDegreeMinutes(){return _(this.location.lon,!1,this.prefixesEastWest)}getLatitudeInDegreeMinutesSeconds(){return N(this.location.lat,!1,this.prefixesNorthSouth)}getLongitudeInDegreeMinutesSeconds(){return N(this.location.lon,!1,this.prefixesEastWest)}getElevation(){return this.location.elevation}getDistanceToInKm(n){return k(this.location,n)}};function y(t){let n=357.5291092+35999.0502909*t-1536e-7*t**2+t**3/2449e3;return g(n)}function C(t){let n=297.8501921+445267.1114034*t-.0018819*t**2+t**3/545868-t**4/113065e3;return g(n)}function F(t){let n=134.9633964+477198.8675055*t+.0087414*t**2+t**3/69699-t**4/1471200;return g(n)}function w(t){let n=93.272095+483202.0175233*t-.0036539*t**2-t**3/352600+t**4/86331e3;return g(n)}function b0(t){let n=t/100;return(84381.448-4680.93*n-1.55*n**2+1999.25*n**3-51.38*n**4-249.67*n**5-39.05*n**6+7.12*n**7+27.87*n**8+5.79*n**9+2.45*n**10)/3600}function B(t){let n=b0(t),r=g0(t);return n+r}function G(t){let n=C(t),r=y(t),e=F(t),o=w(t),s=125.04452-1934.136261*t+.0020708*t**2+t**3/45e4,u=0;return j.forEach(i=>{let c=i[0],a=i[1],m=i[2],l=i[3],f=i[4],h=i[5],M=i[6],A=l*n+a*r+c*e+m*o+f*s;u+=Math.sin(A*b)*(h+M*t)}),u*1e-4/3600}function g0(t){let n=C(t),r=y(t),e=F(t),o=w(t),s=125.04452-1934.136261*t+.0020708*t**2+t**3/45e4,u=0;return j.forEach(i=>{let c=i[0],a=i[1],m=i[2],l=i[3],f=i[4],h=i[7],M=i[8],A=l*n+a*r+c*e+m*o+f*s;u+=Math.cos(A*b)*(h+M*t)}),u*1e-4/3600}function $(t){let n=parseFloat(`${t.year}.${O(t)}`),r,e;t.month>2?(r=t.year,e=t.month):(r=t.year-1,e=t.month+12);let o=t.day,s=t.hour/24+t.min/1440+t.sec/86400,u,i;if(n>=1582.288)u=Math.floor(r/100),i=2-u+Math.floor(u/4);else if(n<=1582.277)i=0;else throw new Error("Date between 1582-10-04 and 1582-10-15 is not defined.");return Math.floor(365.25*(r+4716))+Math.floor(30.6001*(e+1))+o+s+i-1524.5}function P(t){t=t+.5;let n=Math.floor(t),r=t-n,e=n;if(n>=2299161){let M=Math.floor((n-186721625e-2)/36524.25);e=n+1+M-Math.floor(M/4)}let o=e+1524,s=Math.floor((o-122.1)/365.25),u=Math.floor(365.25*s),i=Math.floor((o-u)/30.6001),c=o-u-Math.floor(30.6001*i)+r,a=i<14?i-1:i-13,m=a>2?s-4716:s-4715,l=(c-Math.floor(c))*24,f=(l-Math.floor(l))*60,h=(f-Math.floor(f))*60;return{year:Math.floor(m),month:Math.floor(a),day:Math.floor(c),hour:Math.floor(l),min:Math.floor(f),sec:Math.floor(h)}}function q(t){return Math.floor(t+.5)-.5}function Y(t){return(t-2451545)/36525}function R(t){return t*36525+2451545}function z(t){return Y(t)/10}function K(t,n){let r=S(t)?1:2,e=n<32?1:Math.floor(9*(r+n)/275+.98),o=Math.floor(n-Math.floor(275*e/9)+r*Math.floor((e+9)/12)+30),s=24*(n-Math.floor(n)),u=Math.floor(s),i=60*(s-u),c=Math.floor(i),a=D(60*(i-c));return{year:t,month:e,day:o,hour:u,min:c,sec:a}}function Q(t){let n=S(t.year)?366:365,r=O(t)-1+t.hour/24+t.min/1440+t.sec/86400;return t.year+r/n}function O(t){let n=S(t.year)?1:2,r=t.month,e=t.day;return Math.floor(275*r/9)-n*Math.floor((r+9)/12)+e-30}function V(t){let n=$(t);return Math.floor((n+1.5)%7)}function S(t){return t/4!==Math.floor(t/4)?!1:t/100!==Math.floor(t/100)?!0:t/400===Math.floor(t/400)}function I(t){let r=280.46061837+360.98564736629*(R(t)-2451545)+387933e-9*t**2+t**3/3871e4;return g(r)}function H(t){let n=I(t),r=G(t),o=B(t)*b;return n+r*Math.cos(o)}function X(t,n){let e=I(t)+n;return g(e)}function Z(t,n){return H(t)+n}function t0(t,n=0){let r=t+(n-.5)/12,e,o=0;return t<-500&&(e=(r-1820)/100,o=-20+32*e**2),t>=-500&&t<500&&(e=r/100,o=10583.6-1014.41*e+33.78311*e**2-5.952053*e**3-.1798452*e**4+.022174192*e**5+.0090316521*e**6),t>=500&&t<1600&&(e=(r-1e3)/100,o=1574.2-556.01*e+71.23472*e**2+.319781*e**3-.8503463*e**4-.005050998*e**5+.0083572073*e**6),t>=1600&&t<1700&&(e=r-1600,o=120-.9808*e-.01532*e**2+e**3/7129),t>=1700&&t<1800&&(e=r-1700,o=8.83+.1603*e-.0059285*e**2+13336e-8*e**3-e**4/1174e3),t>=1800&&t<1860&&(e=r-1800,o=13.72-.332447*e+.0068612*e**2+.0041116*e**3-37436e-8*e**4+121272e-10*e**5-1699e-10*e**6+875e-12*e**7),t>=1860&&t<1900&&(e=r-1860,o=7.62+.5737*e-.251754*e**2+.01680668*e**3-.0004473624*e**4+e**5/233174),t>=1900&&t<1920&&(e=r-1900,o=-2.79+1.494119*e-.0598939*e**2+.0061966*e**3-197e-6*e**4),t>=1920&&t<1941&&(e=r-1920,o=21.2+.84493*e-.0761*e**2+.0020936*e**3),t>=1941&&t<1961&&(e=r-1950,o=29.07+.407*e-e**2/233+e**3/2547),t>=1961&&t<1986&&(e=r-1975,o=45.45+1.067*e-e**2/260-e**3/718),t>=1986&&t<2005&&(e=r-2e3,o=63.86+.3345*e-.060374*e**2+.0017275*e**3+651814e-9*e**4+2373599e-11*e**5),t>=2005&&t<2050&&(e=r-2e3,o=62.92+.32217*e+.005589*e**2),t>=2050&&(e=(r-1820)/100,o=-20+32*e**2),o}var E=class t{constructor(n){this.time=n;this.jd=0;this.T=0;this.jd=$(n),this.T=Y(this.jd)}static fromCurrentTime(){let n=new Date(Date.now());return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromTime(n,r,e,o=0,s=0,u=0){return new t({year:n,month:r,day:e,hour:o,min:s,sec:u})}static fromDate(n){return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromYearOfDay(n,r){let e=K(n,r);return new t(e)}static fromJulianDay(n){let r=P(n);return new t(r)}static fromJulianCenturiesJ2000(n){let r=R(n),e=P(r);return new t(e)}getTime(){return this.time}getString(){let{year:n,month:r,day:e,hour:o,min:s,sec:u}=this.time;return`${n}-${p(r,2)}-${p(e,2)} ${p(o,2)}:${p(s,2)}:${p(u,2)}`}getDate(){let{year:n,month:r,day:e,hour:o,min:s,sec:u}=this.time;return new Date(Date.UTC(n,r-1,e,o,s,u))}getDecimalYear(){return Q(this.time)}getDayOfYear(){return O(this.time)}getDayOfWeek(){return V(this.time)}isLeapYear(){return S(this.time.year)}getJulianDay(){return this.jd}getJulianDay0(){return q(this.jd)}getJulianCenturiesJ2000(){return this.T}getJulianMillenniaJ2000(){return z(this.jd)}getGreenwichMeanSiderealTime(){return I(this.T)}getGreenwichApparentSiderealTime(){return H(this.T)}getLocalMeanSiderealTime(n){return X(this.T,n.lon)}getLocalApparentSiderealTime(n){return Z(this.T,n.lon)}getDeltaT(){let{year:n,month:r}=this.time;return t0(n,r)}};0&&(module.exports={Location,TimeOfInterest});
2
2
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../index.ts","../../../app/utils/math.ts","../../../app/utils/angle.ts","../../../app/constants/earth.ts","../../../app/constants/math.ts","../../../app/utils/distance.ts","../../location/models/Location.ts","../../time/utils/dateTime.ts","../../../app/utils/sun.ts","../../../app/utils/moon.ts","../../../app/utils/earth.ts","../../../app/utils/siderealTime.ts","../../time/utils/deltaT.ts","../../time/models/TimeOfInterest.ts"],"sourcesContent":["export {default as Location} from '@package/location/models/Location';\nexport {default as TimeOfInterest} from '@package/time/models/TimeOfInterest';\n","export function round(value: number, decimals = 0): number {\n const p = Math.pow(10, decimals);\n\n return Math.round(value * p) / p;\n}\n\nexport function pad(num: number | string, size: number): string {\n let numStr = num.toString();\n\n while (numStr.length < size) {\n numStr = '0' + numStr;\n }\n\n return numStr;\n}\n\nexport function sin2(number: number): number {\n return Math.sin(number) * Math.sin(number);\n}\n\nexport function cos2(number: number): number {\n return Math.cos(number) * Math.cos(number);\n}\n","import {pad, round} from './math';\n\nexport type AnglePrefixes = {\n positivePrefix: string;\n negativePrefix: string;\n};\n\n/**\n * @deprecated use decimal2degreeMinutesSeconds instead\n * @param deg\n * @param short\n */\nexport function deg2angle(deg: number, short = false): string {\n return decimal2degreeMinutesSeconds(deg, short);\n}\n\nexport function decimal2degreeMinutes(\n decimal: number,\n short = false,\n prefixes?: AnglePrefixes,\n): string {\n const sign = getSignPrefix(decimal, prefixes);\n\n decimal = Math.abs(decimal);\n\n const degPart = Math.floor(decimal);\n const min = round((decimal - degPart) * 60, 5);\n\n const degString = degPart + '° ';\n const minString = pad(min, 2) + '\\'';\n\n if (short && degPart === 0.0) {\n return sign + minString;\n }\n\n return sign + degString + minString;\n}\n\nexport function decimal2degreeMinutesSeconds(\n decimal: number,\n short = false,\n prefixes?: AnglePrefixes,\n): string {\n const sign = getSignPrefix(decimal, prefixes);\n\n decimal = Math.abs(decimal);\n\n const degPart = Math.floor(decimal);\n const min = Math.floor((decimal - degPart) * 60);\n const sec = round((decimal - degPart - min / 60) * 3600, 3);\n const secParts = sec.toString().split('.');\n\n const degString = degPart + '° ';\n const minString = pad(min, 2) + '\\' ';\n const secString = (secParts.length === 1 ? pad(sec, 2) : pad(secParts[0], 2) + '.' + secParts[1]) + '\"';\n\n if (short && degPart === 0.0 && min === 0.0) {\n return sign + secString;\n }\n\n if (short && degPart === 0.0) {\n return sign + minString + secString;\n }\n\n return sign + degString + minString + secString;\n}\n\nexport function angle2deg(angle: string): number {\n const matches = angle.match(/(-?)(\\d+)°.*?(\\d+)'.*?([\\d.]+)\"/);\n\n if (!matches) {\n throw new Error('false angle format');\n }\n\n const sign = matches[1].trim() === '-' ? -1 : 1;\n const deg = parseInt(matches[2]);\n const min = parseInt(matches[3]);\n const sec = parseFloat(matches[4]);\n\n return sign * (deg + min / 60 + sec / 3600);\n}\n\nexport function deg2time(angle: number): string {\n const sign = angle < 0 ? '-' : '';\n const time = Math.abs(angle / 15);\n\n const hour = Math.floor(time);\n const min = Math.floor((time - hour) * 60);\n const sec = round((time - hour - min / 60) * 3600, 3);\n const secParts = sec.toString().split('.');\n\n const hourString = sign + hour;\n const minString = pad(min, 2);\n const secString = secParts.length === 1 ? pad(sec, 2) : pad(secParts[0], 2) + '.' + secParts[1];\n\n return `${hourString}h ${minString}m ${secString}s`;\n}\n\nexport function time2deg(timeAngle: string): number {\n const matches = timeAngle.match(/(-?)(\\d+)h.*?(\\d+)m.*?([\\d.]+)s/);\n\n if (!matches) {\n throw new Error('false time angle format');\n }\n\n const sign = matches[1].trim() === '-' ? -1 : 1;\n const deg = parseInt(matches[2]);\n const min = parseInt(matches[3]);\n const sec = parseFloat(matches[4]);\n\n const angleDeg = sign * (deg + min / 60 + sec / 3600);\n\n return angleDeg * 15;\n}\n\nexport function normalizeAngle(degrees: number, baseAngle = 360.0): number {\n let angle = degrees % baseAngle;\n\n if (angle < 0) {\n angle = angle + baseAngle;\n }\n\n return angle;\n}\n\nexport function sec2deg(seconds: number): number {\n return seconds / 3600;\n}\n\nfunction getSignPrefix(decimal: number, prefixes?: AnglePrefixes): string {\n if (prefixes) {\n return decimal < 0 ? prefixes.negativePrefix : prefixes.positivePrefix;\n }\n\n return decimal < 0 ? '-' : '';\n}\n","export const EARTH_EQUATORIAL_RADIUS_METERS = 6_378_137;\nexport const EARTH_EQUATORIAL_RADIUS_KM = EARTH_EQUATORIAL_RADIUS_METERS / 1000;\nexport const EARTH_AXIS_RATIO = 0.996647189335;\nexport const EARTH_FLATTENING = 1 - EARTH_AXIS_RATIO;\nexport const EARTH_ROTATION_DEG_PER_HOUR = 1.002738 * 15;\n\nexport const EARTH_ARGUMENTS_OF_NUTATION = [\n [0, 0, 0, 0, 1, -171996, -174.2, 92025, 8.9],\n [0, 0, 2, -2, 2, -13187, -1.6, 5736, -3.1],\n [0, 0, 2, 0, 2, -2274, -0.2, 977, -0.5],\n [0, 0, 0, 0, 2, 2062, 0.2, -895, 0.5],\n [0, 1, 0, 0, 0, 1426, -3.4, 54, -0.1],\n [1, 0, 0, 0, 0, 712, 0.1, -7, 0.0],\n [0, 1, 2, -2, 2, -517, 1.2, 224, -0.6],\n [0, 0, 2, 0, 1, -386, -0.4, 200, 0.0],\n [1, 0, 2, 0, 2, -301, 0.0, 129, -0.1],\n [0, -1, 2, -2, 2, 217, -0.5, -95, 0.3],\n [1, 0, 0, -2, 0, -158, 0.0, -1, 0.0],\n [0, 0, 2, -2, 1, 129, 0.1, -70, 0.0],\n [-1, 0, 2, 0, 2, 123, 0.0, -53, 0.0],\n [0, 0, 0, 2, 0, 63, 0.0, -2, 0.0],\n [1, 0, 0, 0, 1, 63, 0.1, -33, 0.0],\n [-1, 0, 2, 2, 2, -59, 0.0, 26, 0.0],\n [-1, 0, 0, 0, 1, -58, -0.1, 32, 0.0],\n [1, 0, 2, 0, 1, -51, 0.0, 27, 0.0],\n [2, 0, 0, -2, 0, 48, 0.0, 1, 0.0],\n [-2, 0, 2, 0, 1, 46, 0.0, -24, 0.0],\n [0, 0, 2, 2, 2, -38, 0.0, 16, 0.0],\n [2, 0, 2, 0, 2, -31, 0.0, 13, 0.0],\n [2, 0, 0, 0, 0, 29, 0.0, -1, 0.0],\n [1, 0, 2, -2, 2, 29, 0.0, -12, 0.0],\n [0, 0, 2, 0, 0, 26, 0.0, -1, 0.0],\n [0, 0, 2, -2, 0, -22, 0.0, 0, 0.0],\n [-1, 0, 2, 0, 1, 21, 0.0, -10, 0.0],\n [0, 2, 0, 0, 0, 17, -0.1, 0, 0.0],\n [0, 2, 2, -2, 2, -16, 0.1, 7, 0.0],\n [-1, 0, 0, 2, 1, 16, 0.0, -8, 0.0],\n [0, 1, 0, 0, 1, -15, 0.0, 9, 0.0],\n [1, 0, 0, -2, 1, -13, 0.0, 7, 0.0],\n [0, -1, 0, 0, 1, -12, 0.0, 6, 0.0],\n [2, 0, -2, 0, 0, 11, 0.0, 0, 0.0],\n [-1, 0, 2, 2, 1, -10, 0.0, 5, 0.0],\n [1, 0, 2, 2, 2, -8, 0.0, 3, 0.0],\n [1, 1, 0, -2, 0, -7, 0.0, 0, 0.0],\n [0, 1, 2, 0, 2, 7, 0.0, -3, 0.0],\n [0, -1, 2, 0, 2, -7, 0.0, 3, 0.0],\n [0, 0, 2, 2, 1, -7, 0.0, 3, 0.0],\n [-2, 0, 0, 2, 1, -6, 0.0, 3, 0.0],\n [1, 0, 0, 2, 0, 6, 0.0, 0, 0.0],\n [2, 0, 2, -2, 2, 6, 0.0, -3, 0.0],\n [0, 0, 0, 2, 1, -6, 0.0, 3, 0.0],\n [1, 0, 2, -2, 1, 6, 0.0, -3, 0.0],\n [0, -1, 2, -2, 1, -5, 0.0, 3, 0.0],\n [0, 0, 0, -2, 1, -5, 0.0, 3, 0.0],\n [1, -1, 0, 0, 0, 5, 0.0, 0, 0.0],\n [2, 0, 2, 0, 1, -5, 0.0, 3, 0.0],\n [2, 0, 0, -2, 1, 4, 0.0, -2, 0.0],\n [0, 1, 2, -2, 1, 4, 0.0, -2, 0.0],\n [1, 0, 0, -1, 0, -4, 0.0, 0, 0.0],\n [0, 1, 0, -2, 0, -4, 0.0, 0, 0.0],\n [1, 0, -2, 0, 0, 4, 0.0, 0, 0.0],\n [0, 0, 0, 1, 0, -4, 0.0, 0, 0.0],\n [-2, 0, 2, 0, 2, -3, 0.0, 1, 0.0],\n [1, -1, 0, -1, 0, -3, 0.0, 0, 0.0],\n [1, 1, 0, 0, 0, -3, 0.0, 0, 0.0],\n [1, 0, 2, 0, 0, 3, 0.0, 0, 0.0],\n [1, -1, 2, 0, 2, -3, 0.0, 1, 0.0],\n [-1, -1, 2, 2, 2, -3, 0.0, 1, 0.0],\n [3, 0, 2, 0, 2, -3, 0.0, 1, 0.0],\n [0, -1, 2, 2, 2, -3, 0.0, 1, 0.0],\n [0, -2, 2, -2, 1, -2, 0.0, 1, 0.0],\n [-2, 0, 0, 0, 1, -2, 0.0, 1, 0.0],\n [1, 1, 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[0, 0, -2, 0, 1, -1, 0.0, 0, 0.0],\n [0, 0, 2, -1, 2, -1, 0.0, 0, 0.0],\n [0, 1, 0, 2, 0, -1, 0.0, 0, 0.0],\n [1, 0, -2, -2, 0, -1, 0.0, 0, 0.0],\n [0, -1, 2, 0, 1, -1, 0.0, 0, 0.0],\n [1, 1, 0, -2, 1, -1, 0.0, 0, 0.0],\n [1, 0, -2, 2, 0, -1, 0.0, 0, 0.0],\n [2, 0, 0, 2, 0, 1, 0.0, 0, 0.0],\n [0, 0, 2, 4, 2, -1, 0.0, 0, 0.0],\n [0, 1, 0, 1, 0, 1, 0.0, 0, 0.0],\n];\n","export const DEG = Math.PI / 180;\nexport const RAD = 180 / Math.PI;\n","import {cos2, sin2} from './math';\nimport {EARTH_FLATTENING, EARTH_EQUATORIAL_RADIUS_METERS} from '../constants/earth';\nimport {LatLon} from '../types/LocationTypes';\nimport {ASTRONOMICAL_UNIT_IN_METERS} from '../constants/units';\nimport {DEG} from '@app/constants/math';\n\nexport function au2km(R: number): number {\n return R * (ASTRONOMICAL_UNIT_IN_METERS / 1000);\n}\n\nexport function km2au(km: number): number {\n return km / (ASTRONOMICAL_UNIT_IN_METERS / 1000);\n}\n\nexport function getDistanceInKm(location1: LatLon, location2: LatLon): number {\n const {lat: lat1, lon: lon1} = location1;\n const {lat: lat2, lon: lon2} = location2;\n\n // Meeus 11\n const F = (lat1 + lat2) / 2;\n const G = (lat1 - lat2) / 2;\n const lambda = (lon2 - lon1) / 2;\n\n const FRad = F * DEG;\n const GRad = G * DEG;\n const lambdaRad = lambda * DEG;\n\n const S = sin2(GRad) * cos2(lambdaRad) + cos2(FRad) * sin2(lambdaRad);\n const C = cos2(GRad) * cos2(lambdaRad) + sin2(FRad) * sin2(lambdaRad);\n\n const omegaRad = Math.atan(Math.sqrt(S / C));\n\n const R = Math.sqrt(S * C) / omegaRad;\n const D = 2 * omegaRad * EARTH_EQUATORIAL_RADIUS_METERS / 1000;\n const H1 = (3 * R - 1) / (2 * C);\n const H2 = (3 * R + 1) / (2 * S);\n\n return D * (1 + EARTH_FLATTENING * H1 * sin2(FRad) * cos2(GRad) - EARTH_FLATTENING * H2 * cos2(FRad) * sin2(GRad));\n}\n","import {Location as LocationType} from '../types/LocationTypes';\nimport {decimal2degreeMinutes, decimal2degreeMinutesSeconds} from '@app/utils/angle';\nimport {getDistanceInKm} from '@app/utils/distance';\n\nexport default class Location {\n private readonly location: LocationType;\n\n private prefixesNorthSouth = {positivePrefix: 'N ', negativePrefix: 'S '};\n\n private prefixesEastWest = {positivePrefix: 'E ', negativePrefix: 'W '};\n\n public constructor(\n public readonly lat: number,\n public readonly lon: number,\n public readonly elevation: number = 0,\n ) {\n this.location = {lat, lon, elevation};\n }\n\n public static create(lat: number, lon: number, elevation = 0): Location {\n return new Location(lat, lon, elevation);\n }\n\n public getLatitude(): number {\n return this.location.lat;\n }\n\n public getLongitude(): number {\n return this.location.lon;\n }\n\n public getLatitudeInDegreeMinutes(): string {\n return decimal2degreeMinutes(this.location.lat, false, this.prefixesNorthSouth);\n }\n\n public getLongitudeInDegreeMinutes(): string {\n return decimal2degreeMinutes(this.location.lon, false, this.prefixesEastWest);\n }\n\n public getLatitudeInDegreeMinutesSeconds(): string {\n return decimal2degreeMinutesSeconds(this.location.lat, false, this.prefixesNorthSouth);\n }\n\n public getLongitudeInDegreeMinutesSeconds(): string {\n return decimal2degreeMinutesSeconds(this.location.lon, false, this.prefixesEastWest);\n }\n\n public getElevation(): number {\n return this.location.elevation;\n }\n\n public getDistanceToInKm(location: Location): number {\n return getDistanceInKm(this.location, location);\n }\n}\n","import {Time} from '../types/TimeTypes';\nimport {round} from '@app/utils/math';\nimport {EPOCH_J2000} from '@app/constants/epoch';\n\nexport function sec2string(sec: number, short = false): string {\n const sign = sec < 0 ? '-' : '';\n sec = Math.abs(sec);\n\n const hour = Math.floor(sec / 3660);\n const min = Math.floor((sec - hour * 3600) / 60);\n const secPart = round(sec - hour * 3600 - min * 60, 2);\n\n if (short && hour === 0.0 && min === 0.0) {\n return sign + secPart + 's';\n }\n\n if (short && hour === 0.0) {\n return sign + min + 'm ' + secPart + 's';\n }\n\n return sign + hour + 'h ' + min + 'm ' + secPart + 's';\n}\n\nexport function time2julianDay(time: Time): number {\n const tmpYear = parseFloat(time.year + '.' + getDayOfYear(time));\n\n let Y;\n let M;\n if (time.month > 2) {\n Y = time.year;\n M = time.month;\n } else {\n Y = time.year - 1;\n M = time.month + 12;\n }\n\n const D = time.day;\n const H = time.hour / 24 + time.min / 1440 + time.sec / 86400;\n\n let A;\n let B;\n if (tmpYear >= 1582.288) { // YYYY-MM-DD >= 1582-10-15\n A = Math.floor(Y / 100);\n B = 2 - A + Math.floor(A / 4);\n } else if (tmpYear <= 1582.277) { // YY-MM-DD <= 1582-10-04\n B = 0;\n } else {\n throw new Error('Date between 1582-10-04 and 1582-10-15 is not defined.');\n }\n\n // Meeus 7.1\n return Math.floor(365.25 * (Y + 4716)) + Math.floor(30.6001 * (M + 1)) + D + H + B - 1524.5;\n}\n\nexport function julianDay2time(jd: number): Time {\n jd = jd + 0.5;\n\n const Z = Math.floor(jd);\n const F = jd - Z;\n\n let A = Z;\n if (Z >= 2299161) {\n const a = Math.floor((Z - 1867216.25) / 36524.25);\n A = Z + 1 + a - Math.floor(a / 4);\n }\n\n const B = A + 1524;\n const C = Math.floor((B - 122.1) / 365.25);\n const D = Math.floor(365.25 * C);\n const E = Math.floor((B - D) / 30.6001);\n\n const dayOnMonth = B - D - Math.floor(30.6001 * E) + F;\n const month = E < 14 ? E - 1 : E - 13;\n const year = month > 2 ? C - 4716 : C - 4715;\n const hour = (dayOnMonth - Math.floor(dayOnMonth)) * 24;\n const min = (hour - Math.floor(hour)) * 60;\n const sec = (min - Math.floor(min)) * 60;\n\n return {\n year: Math.floor(year),\n month: Math.floor(month),\n day: Math.floor(dayOnMonth),\n hour: Math.floor(hour),\n min: Math.floor(min),\n sec: Math.floor(sec),\n };\n}\n\nexport function julianDay2julianDay0(jd: number): number {\n return Math.floor(jd + 0.5) - 0.5;\n}\n\nexport function julianDay2ModifiedJulianDay(jd: number): number {\n return jd - 2400000.5;\n}\n\nexport function julianDay2julianCenturiesJ2000(jd: number): number {\n return (jd - 2451545.0) / 36525.0;\n}\n\nexport function julianCenturiesJ20002julianDay(T: number): number {\n return T * 36525.0 + 2451545.0;\n}\n\nexport function julianDay2julianMillenniaJ2000(jd: number): number {\n const T = julianDay2julianCenturiesJ2000(jd);\n\n return T / 10;\n}\n\nexport function julianMillenniaJ20002julianDay(t: number): number {\n const T = t * 10;\n\n return julianCenturiesJ20002julianDay(T);\n}\n\nexport function dayOfYear2time(year: number, dayOfYear: number): Time {\n // Meeus 7\n const K = isLeapYear(year) ? 1 : 2;\n const month = dayOfYear < 32 ? 1 : Math.floor(9 * (K + dayOfYear) / 275 + 0.98);\n const day = Math.floor(dayOfYear - Math.floor(275 * month / 9) + K * Math.floor((month + 9) / 12) + 30);\n\n const hourFloat = 24 * (dayOfYear - Math.floor(dayOfYear));\n const hour = Math.floor(hourFloat);\n const minFloat = 60 * (hourFloat - hour);\n const min = Math.floor(minFloat);\n const sec = round(60 * (minFloat - min));\n\n return {year, month, day, hour, min, sec};\n}\n\nexport function getDecimalYear(time: Time): number {\n const daysInYear = isLeapYear(time.year) ? 366 : 365;\n const dayOfYear = getDayOfYear(time) - 1\n + time.hour / 24\n + time.min / 1440\n + time.sec / 86400;\n\n return time.year + dayOfYear / daysInYear;\n}\n\nexport function getDayOfYear(time: Time): number {\n const K = isLeapYear(time.year) ? 1 : 2;\n const M = time.month;\n const D = time.day;\n\n // Meeus 7.f\n return Math.floor(275 * M / 9) - K * Math.floor((M + 9) / 12) + D - 30;\n}\n\nexport function getDayOfWeek(time: Time): number {\n const jd = time2julianDay(time);\n\n // Meeus 7.e\n return Math.floor((jd + 1.5) % 7);\n}\n\nexport function isLeapYear(year: number): boolean {\n if (year / 4 !== Math.floor(year / 4)) {\n return false;\n } else if (year / 100 !== Math.floor(year / 100)) {\n return true;\n } else if (year / 400 !== Math.floor(year / 400)) {\n return false;\n } else {\n return true;\n }\n}\n\nexport function shortYear2longYear(shortYearString: string): number {\n const currentDate = new Date(Date.now());\n const currentYear = currentDate.getFullYear();\n const currentYearStr = currentYear.toString();\n\n const currentYearFirstDigitsStr = currentYearStr.substr(0, currentYearStr.length - 2);\n const currentYearFirstDigits = parseInt(currentYearFirstDigitsStr);\n\n const year1Str = currentYearFirstDigits + shortYearString;\n const year1 = parseInt(year1Str);\n const year2Str = (currentYearFirstDigits - 1).toString() + shortYearString;\n const year2 = parseInt(year2Str);\n\n return year1 <= currentYear ? year1 : year2;\n}\n","import {normalizeAngle} from '@app/utils/angle';\nimport {DEG} from '@app/constants/math';\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.4\n const M = 357.5291092\n + 35999.0502909 * T\n - 0.0001536 * Math.pow(T, 2)\n + Math.pow(T, 3) / 2449000;\n\n return normalizeAngle(M);\n}\n\nexport function getTrueAnomaly(T: number): number {\n // Meeus 25.4\n const M = getMeanAnomaly(T);\n const C = getEquationOfCenter(T);\n\n return M + C;\n}\n\nexport function getMeanLongitude(T: number): number {\n const t = T / 10;\n\n // Meeus 28.2\n const L0 = 280.4664567\n + 360007.6982779 * t\n + 0.03042028 * Math.pow(t, 2)\n + Math.pow(t, 3) / 49931\n - Math.pow(t, 4) / 15300\n + Math.pow(t, 5) / 2000000;\n\n return normalizeAngle(L0);\n}\n\nexport function getTrueLongitude(T: number): number {\n // Meeus 25.4\n const L0 = getMeanLongitude(T);\n const C = getEquationOfCenter(T);\n\n return L0 + C;\n}\n\nexport function getApparentLongitude(T: number): number {\n // Meeus 25.5\n const o = getTrueLongitude(T);\n\n const omega = 125.04 - 1934.136 * T;\n const omegaRad = omega * DEG;\n\n return o - 0.00569 - 0.00478 * Math.sin(omegaRad);\n}\n\nexport function getEquationOfCenter(T: number): number {\n const M = getMeanAnomaly(T);\n\n // Meeus 25.4\n let C = (1.914602 - 0.004817 * T - 0.000014 * Math.pow(T, 2)) * Math.sin(M * DEG);\n C += (0.019993 - 0.000101 * T) * Math.sin(2 * M * DEG);\n C += 0.000289 * Math.sin(3 * M * DEG);\n\n return C;\n}\n","import * as earth from '@app/utils/earth';\nimport * as sun from '@app/utils/sun';\nimport {normalizeAngle} from '@app/utils/angle';\nimport {DEG, RAD} from '@app/constants/math';\nimport {km2au} from '@app/utils/distance';\nimport {MOON_ARGUMENTS_B, MOON_ARGUMENTS_LR} from '@app/constants/moon';\n\nexport function getMeanElongation(T: number): number {\n // Meeus 47.2\n const D = 297.8501921\n + 445267.1114034 * T\n - 0.0018819 * Math.pow(T, 2)\n + Math.pow(T, 3) / 545868\n - Math.pow(T, 4) / 113065000;\n\n return normalizeAngle(D);\n}\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.2\n const Mmoon = 134.9633964\n + 477198.8675055 * T\n + 0.0087414 * Math.pow(T, 2)\n + Math.pow(T, 3) / 69699\n - Math.pow(T, 4) / 1471200;\n\n return normalizeAngle(Mmoon);\n}\n\nexport function getArgumentOfLatitude(T: number): number {\n // Meeus 47.5\n const F = 93.2720950\n + 483202.0175233 * T\n - 0.0036539 * Math.pow(T, 2)\n - Math.pow(T, 3) / 352600\n + Math.pow(T, 4) / 86331000;\n\n return normalizeAngle(F);\n}\n\nexport function getMeanLongitude(T: number): number {\n // Meeus 47.1\n const L = 218.3164477\n + 481267.88123421 * T\n - 0.0015786 * Math.pow(T, 2)\n + Math.pow(T, 3) / 538841\n - Math.pow(T, 4) / 65194000;\n\n return normalizeAngle(L);\n}\n\nexport function getMeanLongitudeOfAscendingNode(T: number): number {\n return 125.0445479\n - 1934.1362891 * T\n + 0.0020754 * Math.pow(T, 2)\n + Math.pow(T, 3) / 467441\n - Math.pow(T, 4) / 60616000;\n}\n\nexport function getEquatorialHorizontalParallax(T: number): number {\n const d = getDistanceToEarth(T);\n\n // Meeus 47\n return Math.asin(6378.14 / d) * RAD;\n}\n\nexport function getLongitude(T: number): number {\n const L = getMeanLongitude(T);\n const sumL = _getSumL(T);\n\n return L + sumL / 1000000;\n}\n\nexport function getLatitude(T: number): number {\n const sumB = _getSumB(T);\n\n return sumB / 1000000;\n}\n\nexport function getRadiusVector(T: number): number {\n return km2au(getDistanceToEarth(T));\n}\n\nexport function getDistanceToEarth(T: number): number {\n const sumR = _getSumR(T);\n\n return 385000.56 + sumR / 1000;\n}\n\nfunction _getSumR(T: number): number {\n // Meeus 47.b\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of jupiter\n const E = 1 - 0.002516 * T - 0.0000074 * Math.pow(T, 2);\n\n let sumR = 0;\n MOON_ARGUMENTS_LR.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumR = args[5];\n\n let tmpSumR = Math.cos((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumR = tmpSumR * argSumR * E;\n break;\n case 2:\n case -2:\n tmpSumR = tmpSumR * argSumR * E * E;\n break;\n default:\n tmpSumR = tmpSumR * argSumR;\n break;\n }\n\n sumR += tmpSumR;\n });\n\n return sumR;\n}\n\nfunction _getSumL(T: number): number {\n // Meeus 47.b\n const L = getMeanLongitude(T);\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of venus\n const A1 = 119.75 + 131.849 * T;\n // Action of jupiter\n const A2 = 53.09 + 479264.290 * T;\n const E = 1 - 0.002516 * T - 0.0000074 * Math.pow(T, 2);\n\n let sumL = 3958 * Math.sin(A1 * DEG)\n + 1962 * Math.sin((L - F) * DEG)\n + 318 * Math.sin(A2 * DEG);\n\n MOON_ARGUMENTS_LR.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumL = args[4];\n\n let tmpSumL = Math.sin((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumL = tmpSumL * argSumL * E;\n break;\n case 2:\n case -2:\n tmpSumL = tmpSumL * argSumL * E * E;\n break;\n default:\n tmpSumL = tmpSumL * argSumL;\n break;\n }\n\n sumL += tmpSumL;\n });\n\n return sumL;\n}\n\nfunction _getSumB(T: number): number {\n // Meeus 47.B\n const L = getMeanLongitude(T);\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of venus\n const A1 = 119.75 + 131.849 * T;\n // Action of jupiter\n const A3 = 313.45 + 481266.484 * T;\n const E = 1 - 0.002516 * T - 0.0000074 * Math.pow(T, 2);\n\n let sumB = -2235 * Math.sin(L * DEG)\n + 382 * Math.sin(A3 * DEG)\n + 175 * Math.sin((A1 - F) * DEG)\n + 175 * Math.sin((A1 + F) * DEG)\n + 127 * Math.sin((L - Mmoon) * DEG)\n - 115 * Math.sin((L + Mmoon) * DEG);\n\n MOON_ARGUMENTS_B.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumB = args[4];\n\n let tmpSumB = Math.sin((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumB = tmpSumB * argSumB * E;\n break;\n case 2:\n case -2:\n tmpSumB = tmpSumB * argSumB * Math.pow(E, 2);\n break;\n default:\n tmpSumB = tmpSumB * argSumB;\n break;\n }\n\n sumB += tmpSumB;\n });\n\n return sumB;\n}\n\nexport function getOpticalLiberationInLongitude(longitude: number, latitude: number, T: number): number {\n const latRad = latitude * DEG;\n\n const i = 1.54242;\n const iRad = i * DEG;\n\n const phi = earth.getNutationInLongitude(T);\n const F = getArgumentOfLatitude(T);\n const Omega = getMeanLongitudeOfAscendingNode(T);\n\n // Meeus 53.1\n const W = normalizeAngle(longitude - phi - Omega);\n const WRad = W * DEG;\n\n const ARad = Math.atan2(\n Math.sin(WRad) * Math.cos(latRad) * Math.cos(iRad) - Math.sin(latRad) * Math.sin(iRad),\n Math.cos(WRad) * Math.cos(latRad),\n );\n const A = normalizeAngle(ARad * RAD);\n\n return A - F;\n}\n\nexport function getOpticalLiberationInLatitude(longitude: number, latitude: number, T: number): number {\n const latRad = latitude * DEG;\n\n const i = 1.54242;\n const iRad = i * DEG;\n\n const phi = earth.getNutationInLongitude(T);\n const Omega = getMeanLongitudeOfAscendingNode(T);\n\n // Meeus 53.1\n const W = normalizeAngle(longitude - phi - Omega);\n const WRad = W * DEG;\n\n const bRad = Math.asin(\n -1 * Math.sin(WRad) * Math.cos(latRad) * Math.sin(iRad) - Math.sin(latRad) * Math.cos(iRad),\n );\n\n return bRad * RAD;\n}\n","import * as moon from '@app/utils/moon';\nimport * as sun from '@app/utils/sun';\nimport {EARTH_ARGUMENTS_OF_NUTATION} from '@app/constants/earth';\nimport {normalizeAngle} from '@app/utils/angle';\nimport {DEG} from '@app/constants/math';\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.4\n const M = 357.5291092\n + 35999.0502909 * T\n - 0.0001536 * Math.pow(T, 2)\n + Math.pow(T, 3) / 2449000;\n\n return normalizeAngle(M);\n}\n\nexport function getEccentricity(T: number): number {\n // Meeus 25.4\n return 0.016708634\n - 0.000042037 * T\n - 0.0000001267 * Math.pow(T, 2);\n}\n\nexport function getLongitudeOfPerihelionOfOrbit(T: number): number {\n // Meeus 23\n return 102.93735\n + 1.71946 * T\n + 0.00046 * Math.pow(T, 2);\n}\n\nexport function getMeanObliquityOfEcliptic(T: number): number {\n const U = T / 100;\n\n // Meeus 22.3\n const eps0 = 84381.448\n - 4680.93 * U\n - 1.55 * Math.pow(U, 2)\n + 1999.25 * Math.pow(U, 3)\n - 51.38 * Math.pow(U, 4)\n - 249.67 * Math.pow(U, 5)\n - 39.05 * Math.pow(U, 6)\n + 7.12 * Math.pow(U, 7)\n + 27.87 * Math.pow(U, 8)\n + 5.79 * Math.pow(U, 9)\n + 2.45 * Math.pow(U, 10);\n\n return eps0 / 3600;\n}\n\nexport function getTrueObliquityOfEcliptic(T: number): number {\n const eps0 = getMeanObliquityOfEcliptic(T);\n const sumEps = getNutationInObliquity(T);\n\n // Meeus chapter 22\n return eps0 + sumEps;\n}\n\nexport function getNutationInLongitude(T: number): number {\n // Meeus chapter 22\n const D = moon.getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = moon.getMeanAnomaly(T);\n const F = moon.getArgumentOfLatitude(T);\n\n // Longitude of the ascending node of moon's mean orbit on ecliptic\n const O = 125.04452\n - 1934.136261 * T\n + 0.0020708 * Math.pow(T, 2)\n + Math.pow(T, 3) / 450000;\n\n let sumPhi = 0;\n EARTH_ARGUMENTS_OF_NUTATION.forEach((args) => {\n const argMmoon = args[0]; // Mean anomaly of moon\n const argMsun = args[1]; // Mean anomaly of sun\n const argF = args[2]; // Mean argument of perigee\n const argD = args[3]; // Mean elongation of moon\n const argO = args[4]; // Mean length of ascending knot of moon's orbit\n const argPhi1 = args[5];\n const argPhi2 = args[6];\n\n const tmpSum = argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F + argO * O;\n\n sumPhi += Math.sin(tmpSum * DEG) * (argPhi1 + argPhi2 * T);\n });\n\n return sumPhi * 0.0001 / 3600;\n}\n\nexport function getNutationInObliquity(T: number): number {\n // Meeus chapter 22\n const D = moon.getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = moon.getMeanAnomaly(T);\n const F = moon.getArgumentOfLatitude(T);\n\n // Longitude of the ascending node of moon's mean orbit on ecliptic\n const O = 125.04452\n - 1934.136261 * T\n + 0.0020708 * Math.pow(T, 2)\n + Math.pow(T, 3) / 450000;\n\n let sumEps = 0;\n EARTH_ARGUMENTS_OF_NUTATION.forEach((args) => {\n const argMmoon = args[0]; // Mean anomaly of moon\n const argMsun = args[1]; // Mean anomaly of sun\n const argF = args[2]; // Mean argument of perigee\n const argD = args[3]; // Mean elongation of moon\n const argO = args[4]; // Mean length of ascending knot of moon's orbit\n const argEps1 = args[7];\n const argEps2 = args[8];\n\n const tmpSum = argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F + argO * O;\n\n sumEps += Math.cos(tmpSum * DEG) * (argEps1 + argEps2 * T);\n });\n\n return sumEps * 0.0001 / 3600;\n}\n","import {normalizeAngle} from '@app/utils/angle';\nimport {julianCenturiesJ20002julianDay} from '@package/time/utils/dateTime';\nimport {DEG} from '@app/constants/math';\nimport * as earth from '@app/utils/earth';\n\nexport function getGreenwichMeanSiderealTime(T: number): number {\n const jd = julianCenturiesJ20002julianDay(T);\n\n // Meeus 12.4\n const GMST = 280.46061837\n + 360.98564736629 * (jd - 2451545)\n + 0.000387933 * Math.pow(T, 2)\n + Math.pow(T, 3) / 38710000;\n\n return normalizeAngle(GMST);\n}\n\nexport function getGreenwichApparentSiderealTime(T: number): number {\n const GMST = getGreenwichMeanSiderealTime(T);\n const p = earth.getNutationInLongitude(T);\n const e = earth.getTrueObliquityOfEcliptic(T);\n const eRad = e * DEG;\n\n // Meeus 12\n return GMST + p * Math.cos(eRad);\n}\n\nexport function getLocalMeanSiderealTime(T: number, lon: number): number {\n const GMST = getGreenwichMeanSiderealTime(T);\n\n const LMST = GMST + lon;\n\n return normalizeAngle(LMST);\n}\n\nexport function getLocalApparentSiderealTime(T: number, lon: number): number {\n const GAST = getGreenwichApparentSiderealTime(T);\n\n // Meeus 12\n return GAST + lon;\n}\n\nexport function getLocalHourAngle(T: number, lon: number, rightAscension: number): number {\n const LAST = getLocalApparentSiderealTime(T, lon);\n\n return normalizeAngle(LAST - rightAscension);\n}\n\n","\nexport function getDeltaT(year: number, month = 0): number {\n // https://eclipse.gsfc.nasa.gov/SEcat5/deltatpoly.html\n const y = year + (month - 0.5) / 12;\n\n let t;\n let deltaT = 0;\n\n if (year < -500) {\n t = (y - 1820) / 100;\n deltaT = -20\n + 32 * Math.pow(t, 2);\n }\n\n if (year >= -500 && year < 500) {\n t = y / 100;\n deltaT = 10583.6\n - 1014.41 * t\n + 33.78311 * Math.pow(t, 2)\n - 5.952053 * Math.pow(t, 3)\n - 0.1798452 * Math.pow(t, 4)\n + 0.022174192 * Math.pow(t, 5)\n + 0.0090316521 * Math.pow(t, 6);\n }\n\n if (year >= 500 && year < 1600) {\n t = (y - 1000) / 100;\n deltaT = 1574.2\n - 556.01 * t\n + 71.23472 * Math.pow(t, 2)\n + 0.319781 * Math.pow(t, 3)\n - 0.8503463 * Math.pow(t, 4)\n - 0.005050998 * Math.pow(t, 5)\n + 0.0083572073 * Math.pow(t, 6);\n }\n\n if (year >= 1600 && year < 1700) {\n t = y - 1600;\n deltaT = 120\n - 0.9808 * t\n - 0.01532 * Math.pow(t, 2)\n + Math.pow(t, 3) / 7129;\n }\n\n if (year >= 1700 && year < 1800) {\n t = y - 1700;\n deltaT = 8.83\n + 0.1603 * t\n - 0.0059285 * Math.pow(t, 2)\n + 0.00013336 * Math.pow(t, 3)\n - Math.pow(t, 4) / 1174000;\n }\n\n if (year >= 1800 && year < 1860) {\n t = y - 1800;\n deltaT = 13.72\n - 0.332447 * t\n + 0.0068612 * Math.pow(t, 2)\n + 0.0041116 * Math.pow(t, 3)\n - 0.00037436 * Math.pow(t, 4)\n + 0.0000121272 * Math.pow(t, 5)\n - 0.0000001699 * Math.pow(t, 6)\n + 0.000000000875 * Math.pow(t, 7);\n }\n\n if (year >= 1860 && year < 1900) {\n t = y - 1860;\n\n deltaT = 7.62\n + 0.5737 * t\n - 0.251754 * Math.pow(t, 2)\n + 0.01680668 * Math.pow(t, 3)\n - 0.0004473624 * Math.pow(t, 4)\n + Math.pow(t, 5) / 233174;\n }\n\n if (year >= 1900 && year < 1920) {\n t = y - 1900;\n deltaT = -2.79\n + 1.494119 * t\n - 0.0598939 * Math.pow(t, 2)\n + 0.0061966 * Math.pow(t, 3)\n - 0.000197 * Math.pow(t, 4);\n }\n\n if (year >= 1920 && year < 1941) {\n t = y - 1920;\n deltaT = 21.20\n + 0.84493 * t\n - 0.076100 * Math.pow(t, 2)\n + 0.0020936 * Math.pow(t, 3);\n }\n\n if (year >= 1941 && year < 1961) {\n t = y - 1950;\n deltaT = 29.07\n + 0.407 * t\n - Math.pow(t, 2) / 233\n + Math.pow(t, 3) / 2547;\n }\n\n if (year >= 1961 && year < 1986) {\n t = y - 1975;\n deltaT = 45.45\n + 1.067 * t\n - Math.pow(t, 2) / 260\n - Math.pow(t, 3) / 718;\n }\n\n if (year >= 1986 && year < 2005) {\n t = y - 2000;\n deltaT = 63.86\n + 0.3345 * t\n - 0.060374 * Math.pow(t, 2)\n + 0.0017275 * Math.pow(t, 3)\n + 0.000651814 * Math.pow(t, 4)\n + 0.00002373599 * Math.pow(t, 5);\n }\n\n if (year >= 2005 && year < 2050) {\n t = y - 2000;\n deltaT = 62.92\n + 0.32217 * t\n + 0.005589 * Math.pow(t, 2);\n }\n\n if (year >= 2050) {\n t = (y - 1820) / 100;\n deltaT = -20\n + 32 * Math.pow(t, 2);\n }\n\n return deltaT;\n}\n","import {Time} from '../types/TimeTypes';\nimport {pad} from '@app/utils/math';\nimport {LatLon} from '@app/types/LocationTypes';\nimport {\n dayOfYear2time,\n getDayOfWeek,\n getDayOfYear,\n getDecimalYear,\n isLeapYear,\n julianCenturiesJ20002julianDay,\n julianDay2julianCenturiesJ2000,\n julianDay2julianDay0,\n julianDay2julianMillenniaJ2000,\n julianDay2time,\n time2julianDay\n} from '@package/time/utils/dateTime';\nimport {\n getGreenwichApparentSiderealTime,\n getGreenwichMeanSiderealTime,\n getLocalApparentSiderealTime,\n getLocalMeanSiderealTime,\n} from '@app/utils/siderealTime';\nimport {getDeltaT} from '@package/time/utils/deltaT';\n\nexport default class TimeOfInterest {\n public readonly jd: number = 0.0;\n\n public readonly T: number = 0.0;\n\n public constructor(public readonly time: Time) {\n this.jd = time2julianDay(time);\n this.T = julianDay2julianCenturiesJ2000(this.jd);\n }\n\n public static fromCurrentTime(): TimeOfInterest {\n const date = new Date(Date.now());\n\n return new TimeOfInterest({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n min: date.getUTCMinutes(),\n sec: date.getUTCSeconds(),\n });\n }\n\n public static fromTime(\n year: number,\n month: number,\n day: number,\n hour = 0,\n min = 0,\n sec = 0,\n ): TimeOfInterest {\n return new TimeOfInterest({year, month, day, hour, min, sec});\n }\n\n public static fromDate(date: Date): TimeOfInterest {\n return new TimeOfInterest({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n min: date.getUTCMinutes(),\n sec: date.getUTCSeconds(),\n });\n }\n\n public static fromYearOfDay(year: number, dayOfYear: number): TimeOfInterest {\n const time = dayOfYear2time(year, dayOfYear);\n\n return new TimeOfInterest(time);\n }\n\n public static fromJulianDay(jd: number): TimeOfInterest {\n const time = julianDay2time(jd);\n\n return new TimeOfInterest(time);\n }\n\n public static fromJulianCenturiesJ2000(T: number): TimeOfInterest {\n const jd = julianCenturiesJ20002julianDay(T);\n const time = julianDay2time(jd);\n\n return new TimeOfInterest(time);\n }\n\n public getTime(): Time {\n return this.time;\n }\n\n public getString(): string {\n const {year, month, day, hour, min, sec} = this.time;\n\n return `${year}-${pad(month, 2)}-${pad(day, 2)} ${pad(hour, 2)}:${pad(min, 2)}:${pad(sec, 2)}`;\n }\n\n public getDate(): Date {\n const {year, month, day, hour, min, sec} = this.time;\n\n return new Date(Date.UTC(year, month - 1, day, hour, min, sec));\n }\n\n public getDecimalYear(): number {\n return getDecimalYear(this.time);\n }\n\n public getDayOfYear(): number {\n return getDayOfYear(this.time);\n }\n\n public getDayOfWeek(): number {\n return getDayOfWeek(this.time);\n }\n\n public isLeapYear(): boolean {\n return isLeapYear(this.time.year);\n }\n\n public getJulianDay(): number {\n return this.jd;\n }\n\n public getJulianDay0(): number {\n return julianDay2julianDay0(this.jd);\n }\n\n public getJulianCenturiesJ2000(): number {\n return this.T;\n }\n\n public getJulianMillenniaJ2000(): number {\n return julianDay2julianMillenniaJ2000(this.jd);\n }\n\n public getGreenwichMeanSiderealTime(): number {\n return getGreenwichMeanSiderealTime(this.T);\n }\n\n public getGreenwichApparentSiderealTime(): number {\n return getGreenwichApparentSiderealTime(this.T);\n }\n\n public getLocalMeanSiderealTime(location: LatLon): number {\n return getLocalMeanSiderealTime(this.T, location.lon);\n }\n\n public getLocalApparentSiderealTime(location: LatLon): number {\n return getLocalApparentSiderealTime(this.T, location.lon);\n }\n\n public getDeltaT(): number {\n const {year, month} = this.time;\n\n return getDeltaT(year, month);\n }\n}\n"],"mappings":"mbAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,cAAAE,EAAA,mBAAAC,IAAA,eAAAC,GAAAJ,ICAO,SAASK,EAAMC,EAAeC,EAAW,EAAW,CACvD,IAAMC,EAAI,KAAK,IAAI,GAAID,CAAQ,EAE/B,OAAO,KAAK,MAAMD,EAAQE,CAAC,EAAIA,CACnC,CAEO,SAASC,EAAIC,EAAsBC,EAAsB,CAC5D,IAAIC,EAASF,EAAI,SAAS,EAE1B,KAAOE,EAAO,OAASD,GACnBC,EAAS,IAAMA,EAGnB,OAAOA,CACX,CAEO,SAASC,EAAKC,EAAwB,CACzC,OAAO,KAAK,IAAIA,CAAM,EAAI,KAAK,IAAIA,CAAM,CAC7C,CAEO,SAASC,EAAKD,EAAwB,CACzC,OAAO,KAAK,IAAIA,CAAM,EAAI,KAAK,IAAIA,CAAM,CAC7C,CCNO,SAASE,EACZC,EACAC,EAAQ,GACRC,EACM,CACN,IAAMC,EAAOC,EAAcJ,EAASE,CAAQ,EAE5CF,EAAU,KAAK,IAAIA,CAAO,EAE1B,IAAMK,EAAU,KAAK,MAAML,CAAO,EAC5BM,EAAMC,GAAOP,EAAUK,GAAW,GAAI,CAAC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AAW,KAAK,KAAK,IAAI,CACpC,CAEO,cAAuB,CAC1B,OAAO,KAAK,EAChB,CAEO,eAAwB,CAC3B,OAAOC,EAAqB,KAAK,EAAE,CACvC,CAEO,yBAAkC,CACrC,OAAO,KAAK,CAChB,CAEO,yBAAkC,CACrC,OAAOC,EAA+B,KAAK,EAAE,CACjD,CAEO,8BAAuC,CAC1C,OAAOC,EAA6B,KAAK,CAAC,CAC9C,CAEO,kCAA2C,CAC9C,OAAOC,EAAiC,KAAK,CAAC,CAClD,CAEO,yBAAyBC,EAA0B,CACtD,OAAOC,EAAyB,KAAK,EAAGD,EAAS,GAAG,CACxD,CAEO,6BAA6BA,EAA0B,CAC1D,OAAOE,EAA6B,KAAK,EAAGF,EAAS,GAAG,CAC5D,CAEO,WAAoB,CACvB,GAAM,CAAC,KAAArB,EAAM,MAAAC,CAAK,EAAI,KAAK,KAE3B,OAAOuB,GAAUxB,EAAMC,CAAK,CAChC,CACJ","names":["core_exports","__export","Location","TimeOfInterest","__toCommonJS","round","value","decimals","p","pad","num","size","numStr","sin2","number","cos2","decimal2degreeMinutes","decimal","short","prefixes","sign","getSignPrefix","degPart","min","round","degString","minString","pad","decimal2degreeMinutesSeconds","sec","secParts","secString","normalizeAngle","degrees","baseAngle","angle","getSignPrefix","decimal","prefixes","EARTH_AXIS_RATIO","EARTH_FLATTENING","EARTH_ROTATION_DEG_PER_HOUR","EARTH_ARGUMENTS_OF_NUTATION","DEG","RAD","getDistanceInKm","location1","location2","lat1","lon1","lat2","lon2","F","G","lambda","FRad","DEG","GRad","lambdaRad","S","sin2","cos2","C","omegaRad","R","D","H1","H2","EARTH_FLATTENING","Location","_Location","lat","lon","elevation","decimal2degreeMinutes","decimal2degreeMinutesSeconds","location","getDistanceInKm","time2julianDay","time","tmpYear","getDayOfYear","Y","M","D","H","A","B","julianDay2time","jd","Z","F","a","C","E","dayOnMonth","month","year","hour","min","sec","julianDay2julianDay0","julianDay2julianCenturiesJ2000","jd","julianCenturiesJ20002julianDay","T","julianDay2julianMillenniaJ2000","dayOfYear2time","year","dayOfYear","K","isLeapYear","month","day","hourFloat","hour","minFloat","min","sec","round","getDecimalYear","time","daysInYear","getDayOfYear","M","D","getDayOfWeek","jd","time2julianDay","getMeanAnomaly","T","M","normalizeAngle","getMeanElongation","T","D","normalizeAngle","getMeanAnomaly","Mmoon","getArgumentOfLatitude","F","getMeanObliquityOfEcliptic","T","U","getTrueObliquityOfEcliptic","eps0","sumEps","getNutationInObliquity","getNutationInLongitude","D","getMeanElongation","Msun","getMeanAnomaly","Mmoon","F","getArgumentOfLatitude","O","sumPhi","EARTH_ARGUMENTS_OF_NUTATION","args","argMmoon","argMsun","argF","argD","argO","argPhi1","argPhi2","tmpSum","DEG","argEps1","argEps2","getGreenwichMeanSiderealTime","T","GMST","julianCenturiesJ20002julianDay","normalizeAngle","getGreenwichApparentSiderealTime","p","getNutationInLongitude","eRad","getTrueObliquityOfEcliptic","DEG","getLocalMeanSiderealTime","lon","LMST","getLocalApparentSiderealTime","getDeltaT","year","month","y","t","deltaT","TimeOfInterest","_TimeOfInterest","time","time2julianDay","julianDay2julianCenturiesJ2000","date","year","month","day","hour","min","sec","dayOfYear","dayOfYear2time","jd","julianDay2time","T","julianCenturiesJ20002julianDay","pad","getDecimalYear","getDayOfYear","getDayOfWeek","isLeapYear","julianDay2julianDay0","julianDay2julianMillenniaJ2000","getGreenwichMeanSiderealTime","getGreenwichApparentSiderealTime","location","getLocalMeanSiderealTime","getLocalApparentSiderealTime","getDeltaT"]}
1
+ {"version":3,"sources":["../index.ts","../../../app/utils/math.ts","../../../app/utils/angle.ts","../../../app/constants/math.ts","../../../app/constants/earth.ts","../../../app/utils/distance.ts","../../location/models/Location.ts","../../../app/utils/sun.ts","../../../app/utils/moon.ts","../../../app/utils/earth.ts","../../time/utils/dateTime.ts","../../../app/utils/siderealTime.ts","../../time/utils/deltaT.ts","../../time/models/TimeOfInterest.ts"],"sourcesContent":["export {default as Location} from '@package/location/models/Location';\nexport {default as TimeOfInterest} from '@package/time/models/TimeOfInterest';\n","export function round(value: number, decimals = 0): number {\n const p = 10 ** decimals;\n\n return Math.round(value * p) / p;\n}\n\nexport function pad(num: number | string, size: number): string {\n let numStr = num.toString();\n\n while (numStr.length < size) {\n numStr = `0${numStr}`;\n }\n\n return numStr;\n}\n\nexport function sin2(number: number): number {\n return Math.sin(number) * Math.sin(number);\n}\n\nexport function cos2(number: number): number {\n return Math.cos(number) * Math.cos(number);\n}\n","import {pad, round} from './math';\n\nexport type AnglePrefixes = {\n positivePrefix: string;\n negativePrefix: string;\n};\n\n/**\n * @deprecated use decimal2degreeMinutesSeconds instead\n * @param deg\n * @param short\n */\nexport function deg2angle(deg: number, short = false): string {\n return decimal2degreeMinutesSeconds(deg, short);\n}\n\nexport function decimal2degreeMinutes(decimal: number, short = false, prefixes?: AnglePrefixes): string {\n const sign = getSignPrefix(decimal, prefixes);\n\n decimal = Math.abs(decimal);\n\n const degPart = Math.floor(decimal);\n const min = round((decimal - degPart) * 60, 5);\n\n const degString = `${degPart}° `;\n const minString = `${pad(min, 2)}'`;\n\n if (short && degPart === 0.0) {\n return sign + minString;\n }\n\n return sign + degString + minString;\n}\n\nexport function decimal2degreeMinutesSeconds(decimal: number, short = false, prefixes?: AnglePrefixes): string {\n const sign = getSignPrefix(decimal, prefixes);\n\n decimal = Math.abs(decimal);\n\n const degPart = Math.floor(decimal);\n const min = Math.floor((decimal - degPart) * 60);\n const sec = round((decimal - degPart - min / 60) * 3600, 3);\n const secParts = sec.toString().split('.');\n\n const degString = `${degPart}° `;\n const minString = `${pad(min, 2)}' `;\n const secString = `${secParts.length === 1 ? pad(sec, 2) : `${pad(secParts[0], 2)}.${secParts[1]}`}\"`;\n\n if (short && degPart === 0.0 && min === 0.0) {\n return sign + secString;\n }\n\n if (short && degPart === 0.0) {\n return sign + minString + secString;\n }\n\n return sign + degString + minString + secString;\n}\n\nexport function angle2deg(angle: string): number {\n const matches = angle.match(/(-?)(\\d+)°.*?(\\d+)'.*?([\\d.]+)\"/);\n\n if (!matches) {\n throw new Error('false angle format');\n }\n\n const sign = matches[1].trim() === '-' ? -1 : 1;\n const deg = parseInt(matches[2], 10);\n const min = parseInt(matches[3], 10);\n const sec = parseFloat(matches[4]);\n\n return sign * (deg + min / 60 + sec / 3600);\n}\n\nexport function deg2time(angle: number): string {\n const sign = angle < 0 ? '-' : '';\n const time = Math.abs(angle / 15);\n\n const hour = Math.floor(time);\n const min = Math.floor((time - hour) * 60);\n const sec = round((time - hour - min / 60) * 3600, 3);\n const secParts = sec.toString().split('.');\n\n const hourString = sign + hour;\n const minString = pad(min, 2);\n const secString = secParts.length === 1 ? pad(sec, 2) : `${pad(secParts[0], 2)}.${secParts[1]}`;\n\n return `${hourString}h ${minString}m ${secString}s`;\n}\n\nexport function time2deg(timeAngle: string): number {\n const matches = timeAngle.match(/(-?)(\\d+)h.*?(\\d+)m.*?([\\d.]+)s/);\n\n if (!matches) {\n throw new Error('false time angle format');\n }\n\n const sign = matches[1].trim() === '-' ? -1 : 1;\n const deg = parseInt(matches[2], 10);\n const min = parseInt(matches[3], 10);\n const sec = parseFloat(matches[4]);\n\n const angleDeg = sign * (deg + min / 60 + sec / 3600);\n\n return angleDeg * 15;\n}\n\nexport function normalizeAngle(degrees: number, baseAngle = 360.0): number {\n let angle = degrees % baseAngle;\n\n if (angle < 0) {\n angle = angle + baseAngle;\n }\n\n return angle;\n}\n\nexport function sec2deg(seconds: number): number {\n return seconds / 3600;\n}\n\nfunction getSignPrefix(decimal: number, prefixes?: AnglePrefixes): string {\n if (prefixes) {\n return decimal < 0 ? prefixes.negativePrefix : prefixes.positivePrefix;\n }\n\n return decimal < 0 ? '-' : '';\n}\n","export const DEG = Math.PI / 180;\nexport const RAD = 180 / Math.PI;\n","export const EARTH_EQUATORIAL_RADIUS_METERS = 6_378_137;\nexport const EARTH_EQUATORIAL_RADIUS_KM = EARTH_EQUATORIAL_RADIUS_METERS / 1000;\nexport const EARTH_AXIS_RATIO = 0.996647189335;\nexport const EARTH_FLATTENING = 1 - EARTH_AXIS_RATIO;\nexport const EARTH_ROTATION_DEG_PER_HOUR = 1.002738 * 15;\n\nexport const EARTH_ARGUMENTS_OF_NUTATION = [\n [0, 0, 0, 0, 1, -171996, -174.2, 92025, 8.9],\n [0, 0, 2, -2, 2, -13187, -1.6, 5736, -3.1],\n [0, 0, 2, 0, 2, -2274, -0.2, 977, -0.5],\n [0, 0, 0, 0, 2, 2062, 0.2, -895, 0.5],\n [0, 1, 0, 0, 0, 1426, -3.4, 54, -0.1],\n [1, 0, 0, 0, 0, 712, 0.1, -7, 0.0],\n [0, 1, 2, -2, 2, -517, 1.2, 224, -0.6],\n [0, 0, 2, 0, 1, -386, -0.4, 200, 0.0],\n [1, 0, 2, 0, 2, -301, 0.0, 129, -0.1],\n [0, -1, 2, -2, 2, 217, -0.5, -95, 0.3],\n [1, 0, 0, -2, 0, -158, 0.0, -1, 0.0],\n [0, 0, 2, -2, 1, 129, 0.1, -70, 0.0],\n [-1, 0, 2, 0, 2, 123, 0.0, -53, 0.0],\n [0, 0, 0, 2, 0, 63, 0.0, -2, 0.0],\n [1, 0, 0, 0, 1, 63, 0.1, -33, 0.0],\n [-1, 0, 2, 2, 2, -59, 0.0, 26, 0.0],\n [-1, 0, 0, 0, 1, -58, -0.1, 32, 0.0],\n [1, 0, 2, 0, 1, -51, 0.0, 27, 0.0],\n [2, 0, 0, -2, 0, 48, 0.0, 1, 0.0],\n [-2, 0, 2, 0, 1, 46, 0.0, -24, 0.0],\n [0, 0, 2, 2, 2, -38, 0.0, 16, 0.0],\n [2, 0, 2, 0, 2, -31, 0.0, 13, 0.0],\n [2, 0, 0, 0, 0, 29, 0.0, -1, 0.0],\n [1, 0, 2, -2, 2, 29, 0.0, -12, 0.0],\n [0, 0, 2, 0, 0, 26, 0.0, -1, 0.0],\n [0, 0, 2, -2, 0, -22, 0.0, 0, 0.0],\n [-1, 0, 2, 0, 1, 21, 0.0, -10, 0.0],\n [0, 2, 0, 0, 0, 17, -0.1, 0, 0.0],\n [0, 2, 2, -2, 2, -16, 0.1, 7, 0.0],\n [-1, 0, 0, 2, 1, 16, 0.0, -8, 0.0],\n [0, 1, 0, 0, 1, -15, 0.0, 9, 0.0],\n [1, 0, 0, -2, 1, -13, 0.0, 7, 0.0],\n [0, -1, 0, 0, 1, -12, 0.0, 6, 0.0],\n [2, 0, -2, 0, 0, 11, 0.0, 0, 0.0],\n [-1, 0, 2, 2, 1, -10, 0.0, 5, 0.0],\n [1, 0, 2, 2, 2, -8, 0.0, 3, 0.0],\n [1, 1, 0, -2, 0, -7, 0.0, 0, 0.0],\n [0, 1, 2, 0, 2, 7, 0.0, -3, 0.0],\n [0, -1, 2, 0, 2, -7, 0.0, 3, 0.0],\n [0, 0, 2, 2, 1, -7, 0.0, 3, 0.0],\n [-2, 0, 0, 2, 1, -6, 0.0, 3, 0.0],\n [1, 0, 0, 2, 0, 6, 0.0, 0, 0.0],\n [2, 0, 2, -2, 2, 6, 0.0, -3, 0.0],\n [0, 0, 0, 2, 1, -6, 0.0, 3, 0.0],\n [1, 0, 2, -2, 1, 6, 0.0, -3, 0.0],\n [0, -1, 2, -2, 1, -5, 0.0, 3, 0.0],\n [0, 0, 0, -2, 1, -5, 0.0, 3, 0.0],\n [1, -1, 0, 0, 0, 5, 0.0, 0, 0.0],\n [2, 0, 2, 0, 1, -5, 0.0, 3, 0.0],\n [2, 0, 0, -2, 1, 4, 0.0, -2, 0.0],\n [0, 1, 2, -2, 1, 4, 0.0, -2, 0.0],\n [1, 0, 0, -1, 0, -4, 0.0, 0, 0.0],\n [0, 1, 0, -2, 0, -4, 0.0, 0, 0.0],\n [1, 0, -2, 0, 0, 4, 0.0, 0, 0.0],\n [0, 0, 0, 1, 0, -4, 0.0, 0, 0.0],\n [-2, 0, 2, 0, 2, -3, 0.0, 1, 0.0],\n [1, -1, 0, -1, 0, -3, 0.0, 0, 0.0],\n [1, 1, 0, 0, 0, -3, 0.0, 0, 0.0],\n [1, 0, 2,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2, 0, 2, 2, 2, -1, 0.0, 0, 0.0],\n [1, 0, 0, 2, 1, -1, 0.0, 0, 0.0],\n [0, 0, 4, -2, 2, 1, 0.0, 0, 0.0],\n [3, 0, 2, -2, 2, 1, 0.0, 0, 0.0],\n [1, 0, 2, -2, 0, -1, 0.0, 0, 0.0],\n [0, 1, 2, 0, 1, 1, 0.0, 0, 0.0],\n [-1, -1, 0, 2, 1, 1, 0.0, 0, 0.0],\n [0, 0, -2, 0, 1, -1, 0.0, 0, 0.0],\n [0, 0, 2, -1, 2, -1, 0.0, 0, 0.0],\n [0, 1, 0, 2, 0, -1, 0.0, 0, 0.0],\n [1, 0, -2, -2, 0, -1, 0.0, 0, 0.0],\n [0, -1, 2, 0, 1, -1, 0.0, 0, 0.0],\n [1, 1, 0, -2, 1, -1, 0.0, 0, 0.0],\n [1, 0, -2, 2, 0, -1, 0.0, 0, 0.0],\n [2, 0, 0, 2, 0, 1, 0.0, 0, 0.0],\n [0, 0, 2, 4, 2, -1, 0.0, 0, 0.0],\n [0, 1, 0, 1, 0, 1, 0.0, 0, 0.0],\n];\n","import {DEG} from '@app/constants/math';\nimport {EARTH_EQUATORIAL_RADIUS_METERS, EARTH_FLATTENING} from '../constants/earth';\nimport {ASTRONOMICAL_UNIT_IN_METERS} from '../constants/units';\nimport type {LatLon} from '../types/LocationTypes';\nimport {cos2, sin2} from './math';\n\nexport function au2km(R: number): number {\n return R * (ASTRONOMICAL_UNIT_IN_METERS / 1000);\n}\n\nexport function km2au(km: number): number {\n return km / (ASTRONOMICAL_UNIT_IN_METERS / 1000);\n}\n\nexport function getDistanceInKm(location1: LatLon, location2: LatLon): number {\n const {lat: lat1, lon: lon1} = location1;\n const {lat: lat2, lon: lon2} = location2;\n\n // Meeus 11\n const F = (lat1 + lat2) / 2;\n const G = (lat1 - lat2) / 2;\n const lambda = (lon2 - lon1) / 2;\n\n const FRad = F * DEG;\n const GRad = G * DEG;\n const lambdaRad = lambda * DEG;\n\n const S = sin2(GRad) * cos2(lambdaRad) + cos2(FRad) * sin2(lambdaRad);\n const C = cos2(GRad) * cos2(lambdaRad) + sin2(FRad) * sin2(lambdaRad);\n\n const omegaRad = Math.atan(Math.sqrt(S / C));\n\n const R = Math.sqrt(S * C) / omegaRad;\n const D = (2 * omegaRad * EARTH_EQUATORIAL_RADIUS_METERS) / 1000;\n const H1 = (3 * R - 1) / (2 * C);\n const H2 = (3 * R + 1) / (2 * S);\n\n return D * (1 + EARTH_FLATTENING * H1 * sin2(FRad) * cos2(GRad) - EARTH_FLATTENING * H2 * cos2(FRad) * sin2(GRad));\n}\n","import {decimal2degreeMinutes, decimal2degreeMinutesSeconds} from '@app/utils/angle';\nimport {getDistanceInKm} from '@app/utils/distance';\nimport type {Location as LocationType} from '../types/LocationTypes';\n\nexport default class Location {\n private readonly location: LocationType;\n\n private prefixesNorthSouth = {positivePrefix: 'N ', negativePrefix: 'S '};\n\n private prefixesEastWest = {positivePrefix: 'E ', negativePrefix: 'W '};\n\n public constructor(\n public readonly lat: number,\n public readonly lon: number,\n public readonly elevation: number = 0,\n ) {\n this.location = {lat, lon, elevation};\n }\n\n public static create(lat: number, lon: number, elevation = 0): Location {\n return new Location(lat, lon, elevation);\n }\n\n public getLatitude(): number {\n return this.location.lat;\n }\n\n public getLongitude(): number {\n return this.location.lon;\n }\n\n public getLatitudeInDegreeMinutes(): string {\n return decimal2degreeMinutes(this.location.lat, false, this.prefixesNorthSouth);\n }\n\n public getLongitudeInDegreeMinutes(): string {\n return decimal2degreeMinutes(this.location.lon, false, this.prefixesEastWest);\n }\n\n public getLatitudeInDegreeMinutesSeconds(): string {\n return decimal2degreeMinutesSeconds(this.location.lat, false, this.prefixesNorthSouth);\n }\n\n public getLongitudeInDegreeMinutesSeconds(): string {\n return decimal2degreeMinutesSeconds(this.location.lon, false, this.prefixesEastWest);\n }\n\n public getElevation(): number {\n return this.location.elevation;\n }\n\n public getDistanceToInKm(location: Location): number {\n return getDistanceInKm(this.location, location);\n }\n}\n","import {DEG} from '@app/constants/math';\nimport {normalizeAngle} from '@app/utils/angle';\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.4\n const M = 357.5291092 + 35999.0502909 * T - 0.0001536 * T ** 2 + T ** 3 / 2449000;\n\n return normalizeAngle(M);\n}\n\nexport function getTrueAnomaly(T: number): number {\n // Meeus 25.4\n const M = getMeanAnomaly(T);\n const C = getEquationOfCenter(T);\n\n return M + C;\n}\n\nexport function getMeanLongitude(T: number): number {\n const t = T / 10;\n\n // Meeus 28.2\n const L0 =\n 280.4664567 + 360007.6982779 * t + 0.03042028 * t ** 2 + t ** 3 / 49931 - t ** 4 / 15300 + t ** 5 / 2000000;\n\n return normalizeAngle(L0);\n}\n\nexport function getTrueLongitude(T: number): number {\n // Meeus 25.4\n const L0 = getMeanLongitude(T);\n const C = getEquationOfCenter(T);\n\n return L0 + C;\n}\n\nexport function getApparentLongitude(T: number): number {\n // Meeus 25.5\n const o = getTrueLongitude(T);\n\n const omega = 125.04 - 1934.136 * T;\n const omegaRad = omega * DEG;\n\n return o - 0.00569 - 0.00478 * Math.sin(omegaRad);\n}\n\nexport function getEquationOfCenter(T: number): number {\n const M = getMeanAnomaly(T);\n\n // Meeus 25.4\n let C = (1.914602 - 0.004817 * T - 0.000014 * T ** 2) * Math.sin(M * DEG);\n C += (0.019993 - 0.000101 * T) * Math.sin(2 * M * DEG);\n C += 0.000289 * Math.sin(3 * M * DEG);\n\n return C;\n}\n","import {DEG, RAD} from '@app/constants/math';\nimport {MOON_ARGUMENTS_B, MOON_ARGUMENTS_LR} from '@app/constants/moon';\nimport {normalizeAngle} from '@app/utils/angle';\nimport {km2au} from '@app/utils/distance';\nimport * as earth from '@app/utils/earth';\nimport * as sun from '@app/utils/sun';\n\nexport function getMeanElongation(T: number): number {\n // Meeus 47.2\n const D = 297.8501921 + 445267.1114034 * T - 0.0018819 * T ** 2 + T ** 3 / 545868 - T ** 4 / 113065000;\n\n return normalizeAngle(D);\n}\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.2\n const Mmoon = 134.9633964 + 477198.8675055 * T + 0.0087414 * T ** 2 + T ** 3 / 69699 - T ** 4 / 1471200;\n\n return normalizeAngle(Mmoon);\n}\n\nexport function getArgumentOfLatitude(T: number): number {\n // Meeus 47.5\n const F = 93.272095 + 483202.0175233 * T - 0.0036539 * T ** 2 - T ** 3 / 352600 + T ** 4 / 86331000;\n\n return normalizeAngle(F);\n}\n\nexport function getMeanLongitude(T: number): number {\n // Meeus 47.1\n const L = 218.3164477 + 481267.88123421 * T - 0.0015786 * T ** 2 + T ** 3 / 538841 - T ** 4 / 65194000;\n\n return normalizeAngle(L);\n}\n\nexport function getMeanLongitudeOfAscendingNode(T: number): number {\n return 125.0445479 - 1934.1362891 * T + 0.0020754 * T ** 2 + T ** 3 / 467441 - T ** 4 / 60616000;\n}\n\nexport function getEquatorialHorizontalParallax(T: number): number {\n const d = getDistanceToEarth(T);\n\n // Meeus 47\n return Math.asin(6378.14 / d) * RAD;\n}\n\nexport function getLongitude(T: number): number {\n const L = getMeanLongitude(T);\n const sumL = _getSumL(T);\n\n return L + sumL / 1000000;\n}\n\nexport function getLatitude(T: number): number {\n const sumB = _getSumB(T);\n\n return sumB / 1000000;\n}\n\nexport function getRadiusVector(T: number): number {\n return km2au(getDistanceToEarth(T));\n}\n\nexport function getDistanceToEarth(T: number): number {\n const sumR = _getSumR(T);\n\n return 385000.56 + sumR / 1000;\n}\n\nfunction _getSumR(T: number): number {\n // Meeus 47.b\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of jupiter\n const E = 1 - 0.002516 * T - 0.0000074 * T ** 2;\n\n let sumR = 0;\n MOON_ARGUMENTS_LR.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumR = args[5];\n\n let tmpSumR = Math.cos((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumR = tmpSumR * argSumR * E;\n break;\n case 2:\n case -2:\n tmpSumR = tmpSumR * argSumR * E * E;\n break;\n default:\n tmpSumR = tmpSumR * argSumR;\n break;\n }\n\n sumR += tmpSumR;\n });\n\n return sumR;\n}\n\nfunction _getSumL(T: number): number {\n // Meeus 47.b\n const L = getMeanLongitude(T);\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of venus\n const A1 = 119.75 + 131.849 * T;\n // Action of jupiter\n const A2 = 53.09 + 479264.29 * T;\n const E = 1 - 0.002516 * T - 0.0000074 * T ** 2;\n\n let sumL = 3958 * Math.sin(A1 * DEG) + 1962 * Math.sin((L - F) * DEG) + 318 * Math.sin(A2 * DEG);\n\n MOON_ARGUMENTS_LR.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumL = args[4];\n\n let tmpSumL = Math.sin((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumL = tmpSumL * argSumL * E;\n break;\n case 2:\n case -2:\n tmpSumL = tmpSumL * argSumL * E * E;\n break;\n default:\n tmpSumL = tmpSumL * argSumL;\n break;\n }\n\n sumL += tmpSumL;\n });\n\n return sumL;\n}\n\nfunction _getSumB(T: number): number {\n // Meeus 47.B\n const L = getMeanLongitude(T);\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of venus\n const A1 = 119.75 + 131.849 * T;\n // Action of jupiter\n const A3 = 313.45 + 481266.484 * T;\n const E = 1 - 0.002516 * T - 0.0000074 * T ** 2;\n\n let sumB =\n -2235 * Math.sin(L * DEG)\n + 382 * Math.sin(A3 * DEG)\n + 175 * Math.sin((A1 - F) * DEG)\n + 175 * Math.sin((A1 + F) * DEG)\n + 127 * Math.sin((L - Mmoon) * DEG)\n - 115 * Math.sin((L + Mmoon) * DEG);\n\n MOON_ARGUMENTS_B.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumB = args[4];\n\n let tmpSumB = Math.sin((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumB = tmpSumB * argSumB * E;\n break;\n case 2:\n case -2:\n tmpSumB = tmpSumB * argSumB * E ** 2;\n break;\n default:\n tmpSumB = tmpSumB * argSumB;\n break;\n }\n\n sumB += tmpSumB;\n });\n\n return sumB;\n}\n\nexport function getOpticalLiberationInLongitude(longitude: number, latitude: number, T: number): number {\n const latRad = latitude * DEG;\n\n const i = 1.54242;\n const iRad = i * DEG;\n\n const phi = earth.getNutationInLongitude(T);\n const F = getArgumentOfLatitude(T);\n const Omega = getMeanLongitudeOfAscendingNode(T);\n\n // Meeus 53.1\n const W = normalizeAngle(longitude - phi - Omega);\n const WRad = W * DEG;\n\n const ARad = Math.atan2(\n Math.sin(WRad) * Math.cos(latRad) * Math.cos(iRad) - Math.sin(latRad) * Math.sin(iRad),\n Math.cos(WRad) * Math.cos(latRad),\n );\n const A = normalizeAngle(ARad * RAD);\n\n return A - F;\n}\n\nexport function getOpticalLiberationInLatitude(longitude: number, latitude: number, T: number): number {\n const latRad = latitude * DEG;\n\n const i = 1.54242;\n const iRad = i * DEG;\n\n const phi = earth.getNutationInLongitude(T);\n const Omega = getMeanLongitudeOfAscendingNode(T);\n\n // Meeus 53.1\n const W = normalizeAngle(longitude - phi - Omega);\n const WRad = W * DEG;\n\n const bRad = Math.asin(-1 * Math.sin(WRad) * Math.cos(latRad) * Math.sin(iRad) - Math.sin(latRad) * Math.cos(iRad));\n\n return bRad * RAD;\n}\n","import {EARTH_ARGUMENTS_OF_NUTATION} from '@app/constants/earth';\nimport {DEG} from '@app/constants/math';\nimport {normalizeAngle} from '@app/utils/angle';\nimport * as moon from '@app/utils/moon';\nimport * as sun from '@app/utils/sun';\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.4\n const M = 357.5291092 + 35999.0502909 * T - 0.0001536 * T ** 2 + T ** 3 / 2449000;\n\n return normalizeAngle(M);\n}\n\nexport function getEccentricity(T: number): number {\n // Meeus 25.4\n return 0.016708634 - 0.000042037 * T - 0.0000001267 * T ** 2;\n}\n\nexport function getLongitudeOfPerihelionOfOrbit(T: number): number {\n // Meeus 23\n return 102.93735 + 1.71946 * T + 0.00046 * T ** 2;\n}\n\nexport function getMeanObliquityOfEcliptic(T: number): number {\n const U = T / 100;\n\n // Meeus 22.3\n const eps0 =\n 84381.448\n - 4680.93 * U\n - 1.55 * U ** 2\n + 1999.25 * U ** 3\n - 51.38 * U ** 4\n - 249.67 * U ** 5\n - 39.05 * U ** 6\n + 7.12 * U ** 7\n + 27.87 * U ** 8\n + 5.79 * U ** 9\n + 2.45 * U ** 10;\n\n return eps0 / 3600;\n}\n\nexport function getTrueObliquityOfEcliptic(T: number): number {\n const eps0 = getMeanObliquityOfEcliptic(T);\n const sumEps = getNutationInObliquity(T);\n\n // Meeus chapter 22\n return eps0 + sumEps;\n}\n\nexport function getNutationInLongitude(T: number): number {\n // Meeus chapter 22\n const D = moon.getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = moon.getMeanAnomaly(T);\n const F = moon.getArgumentOfLatitude(T);\n\n // Longitude of the ascending node of moon's mean orbit on ecliptic\n const O = 125.04452 - 1934.136261 * T + 0.0020708 * T ** 2 + T ** 3 / 450000;\n\n let sumPhi = 0;\n EARTH_ARGUMENTS_OF_NUTATION.forEach((args) => {\n const argMmoon = args[0]; // Mean anomaly of moon\n const argMsun = args[1]; // Mean anomaly of sun\n const argF = args[2]; // Mean argument of perigee\n const argD = args[3]; // Mean elongation of moon\n const argO = args[4]; // Mean length of ascending knot of moon's orbit\n const argPhi1 = args[5];\n const argPhi2 = args[6];\n\n const tmpSum = argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F + argO * O;\n\n sumPhi += Math.sin(tmpSum * DEG) * (argPhi1 + argPhi2 * T);\n });\n\n return (sumPhi * 0.0001) / 3600;\n}\n\nexport function getNutationInObliquity(T: number): number {\n // Meeus chapter 22\n const D = moon.getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = moon.getMeanAnomaly(T);\n const F = moon.getArgumentOfLatitude(T);\n\n // Longitude of the ascending node of moon's mean orbit on ecliptic\n const O = 125.04452 - 1934.136261 * T + 0.0020708 * T ** 2 + T ** 3 / 450000;\n\n let sumEps = 0;\n EARTH_ARGUMENTS_OF_NUTATION.forEach((args) => {\n const argMmoon = args[0]; // Mean anomaly of moon\n const argMsun = args[1]; // Mean anomaly of sun\n const argF = args[2]; // Mean argument of perigee\n const argD = args[3]; // Mean elongation of moon\n const argO = args[4]; // Mean length of ascending knot of moon's orbit\n const argEps1 = args[7];\n const argEps2 = args[8];\n\n const tmpSum = argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F + argO * O;\n\n sumEps += Math.cos(tmpSum * DEG) * (argEps1 + argEps2 * T);\n });\n\n return (sumEps * 0.0001) / 3600;\n}\n","import {round} from '@app/utils/math';\nimport type {Time} from '../types/TimeTypes';\n\nexport function sec2string(sec: number, short = false): string {\n const sign = sec < 0 ? '-' : '';\n sec = Math.abs(sec);\n\n const hour = Math.floor(sec / 3660);\n const min = Math.floor((sec - hour * 3600) / 60);\n const secPart = round(sec - hour * 3600 - min * 60, 2);\n\n if (short && hour === 0.0 && min === 0.0) {\n return `${sign + secPart}s`;\n }\n\n if (short && hour === 0.0) {\n return `${sign + min}m ${secPart}s`;\n }\n\n return `${sign + hour}h ${min}m ${secPart}s`;\n}\n\nexport function time2julianDay(time: Time): number {\n const tmpYear = parseFloat(`${time.year}.${getDayOfYear(time)}`);\n\n let Y: number;\n let M: number;\n\n if (time.month > 2) {\n Y = time.year;\n M = time.month;\n } else {\n Y = time.year - 1;\n M = time.month + 12;\n }\n\n const D = time.day;\n const H = time.hour / 24 + time.min / 1440 + time.sec / 86400;\n\n let A: number;\n let B: number;\n\n if (tmpYear >= 1582.288) {\n // YYYY-MM-DD >= 1582-10-15\n A = Math.floor(Y / 100);\n B = 2 - A + Math.floor(A / 4);\n } else if (tmpYear <= 1582.277) {\n // YY-MM-DD <= 1582-10-04\n B = 0;\n } else {\n throw new Error('Date between 1582-10-04 and 1582-10-15 is not defined.');\n }\n\n // Meeus 7.1\n return Math.floor(365.25 * (Y + 4716)) + Math.floor(30.6001 * (M + 1)) + D + H + B - 1524.5;\n}\n\nexport function julianDay2time(jd: number): Time {\n jd = jd + 0.5;\n\n const Z = Math.floor(jd);\n const F = jd - Z;\n\n let A = Z;\n if (Z >= 2299161) {\n const a = Math.floor((Z - 1867216.25) / 36524.25);\n A = Z + 1 + a - Math.floor(a / 4);\n }\n\n const B = A + 1524;\n const C = Math.floor((B - 122.1) / 365.25);\n const D = Math.floor(365.25 * C);\n const E = Math.floor((B - D) / 30.6001);\n\n const dayOnMonth = B - D - Math.floor(30.6001 * E) + F;\n const month = E < 14 ? E - 1 : E - 13;\n const year = month > 2 ? C - 4716 : C - 4715;\n const hour = (dayOnMonth - Math.floor(dayOnMonth)) * 24;\n const min = (hour - Math.floor(hour)) * 60;\n const sec = (min - Math.floor(min)) * 60;\n\n return {\n year: Math.floor(year),\n month: Math.floor(month),\n day: Math.floor(dayOnMonth),\n hour: Math.floor(hour),\n min: Math.floor(min),\n sec: Math.floor(sec),\n };\n}\n\nexport function julianDay2julianDay0(jd: number): number {\n return Math.floor(jd + 0.5) - 0.5;\n}\n\nexport function julianDay2ModifiedJulianDay(jd: number): number {\n return jd - 2400000.5;\n}\n\nexport function julianDay2julianCenturiesJ2000(jd: number): number {\n return (jd - 2451545.0) / 36525.0;\n}\n\nexport function julianCenturiesJ20002julianDay(T: number): number {\n return T * 36525.0 + 2451545.0;\n}\n\nexport function julianDay2julianMillenniaJ2000(jd: number): number {\n const T = julianDay2julianCenturiesJ2000(jd);\n\n return T / 10;\n}\n\nexport function julianMillenniaJ20002julianDay(t: number): number {\n const T = t * 10;\n\n return julianCenturiesJ20002julianDay(T);\n}\n\nexport function dayOfYear2time(year: number, dayOfYear: number): Time {\n // Meeus 7\n const K = isLeapYear(year) ? 1 : 2;\n const month = dayOfYear < 32 ? 1 : Math.floor((9 * (K + dayOfYear)) / 275 + 0.98);\n const day = Math.floor(dayOfYear - Math.floor((275 * month) / 9) + K * Math.floor((month + 9) / 12) + 30);\n\n const hourFloat = 24 * (dayOfYear - Math.floor(dayOfYear));\n const hour = Math.floor(hourFloat);\n const minFloat = 60 * (hourFloat - hour);\n const min = Math.floor(minFloat);\n const sec = round(60 * (minFloat - min));\n\n return {year, month, day, hour, min, sec};\n}\n\nexport function getDecimalYear(time: Time): number {\n const daysInYear = isLeapYear(time.year) ? 366 : 365;\n const dayOfYear = getDayOfYear(time) - 1 + time.hour / 24 + time.min / 1440 + time.sec / 86400;\n\n return time.year + dayOfYear / daysInYear;\n}\n\nexport function getDayOfYear(time: Time): number {\n const K = isLeapYear(time.year) ? 1 : 2;\n const M = time.month;\n const D = time.day;\n\n // Meeus 7.f\n return Math.floor((275 * M) / 9) - K * Math.floor((M + 9) / 12) + D - 30;\n}\n\nexport function getDayOfWeek(time: Time): number {\n const jd = time2julianDay(time);\n\n // Meeus 7.e\n return Math.floor((jd + 1.5) % 7);\n}\n\nexport function isLeapYear(year: number): boolean {\n if (year / 4 !== Math.floor(year / 4)) {\n return false;\n } else if (year / 100 !== Math.floor(year / 100)) {\n return true;\n } else if (year / 400 !== Math.floor(year / 400)) {\n return false;\n } else {\n return true;\n }\n}\n\nexport function shortYear2longYear(shortYearString: string): number {\n const currentDate = new Date(Date.now());\n const currentYear = currentDate.getFullYear();\n const currentYearStr = currentYear.toString();\n\n const currentYearFirstDigitsStr = currentYearStr.substr(0, currentYearStr.length - 2);\n const currentYearFirstDigits = parseInt(currentYearFirstDigitsStr, 10);\n\n const year1Str = currentYearFirstDigits + shortYearString;\n const year1 = parseInt(year1Str, 10);\n const year2Str = (currentYearFirstDigits - 1).toString() + shortYearString;\n const year2 = parseInt(year2Str, 10);\n\n return year1 <= currentYear ? year1 : year2;\n}\n","import {DEG} from '@app/constants/math';\nimport {normalizeAngle} from '@app/utils/angle';\nimport * as earth from '@app/utils/earth';\nimport {julianCenturiesJ20002julianDay} from '@package/time/utils/dateTime';\n\nexport function getGreenwichMeanSiderealTime(T: number): number {\n const jd = julianCenturiesJ20002julianDay(T);\n\n // Meeus 12.4\n const GMST = 280.46061837 + 360.98564736629 * (jd - 2451545) + 0.000387933 * T ** 2 + T ** 3 / 38710000;\n\n return normalizeAngle(GMST);\n}\n\nexport function getGreenwichApparentSiderealTime(T: number): number {\n const GMST = getGreenwichMeanSiderealTime(T);\n const p = earth.getNutationInLongitude(T);\n const e = earth.getTrueObliquityOfEcliptic(T);\n const eRad = e * DEG;\n\n // Meeus 12\n return GMST + p * Math.cos(eRad);\n}\n\nexport function getLocalMeanSiderealTime(T: number, lon: number): number {\n const GMST = getGreenwichMeanSiderealTime(T);\n\n const LMST = GMST + lon;\n\n return normalizeAngle(LMST);\n}\n\nexport function getLocalApparentSiderealTime(T: number, lon: number): number {\n const GAST = getGreenwichApparentSiderealTime(T);\n\n // Meeus 12\n return GAST + lon;\n}\n\nexport function getLocalHourAngle(T: number, lon: number, rightAscension: number): number {\n const LAST = getLocalApparentSiderealTime(T, lon);\n\n return normalizeAngle(LAST - rightAscension);\n}\n","export function getDeltaT(year: number, month = 0): number {\n // https://eclipse.gsfc.nasa.gov/SEcat5/deltatpoly.html\n const y = year + (month - 0.5) / 12;\n\n let t: number;\n let deltaT = 0;\n\n if (year < -500) {\n t = (y - 1820) / 100;\n deltaT = -20 + 32 * t ** 2;\n }\n\n if (year >= -500 && year < 500) {\n t = y / 100;\n deltaT =\n 10583.6\n - 1014.41 * t\n + 33.78311 * t ** 2\n - 5.952053 * t ** 3\n - 0.1798452 * t ** 4\n + 0.022174192 * t ** 5\n + 0.0090316521 * t ** 6;\n }\n\n if (year >= 500 && year < 1600) {\n t = (y - 1000) / 100;\n deltaT =\n 1574.2\n - 556.01 * t\n + 71.23472 * t ** 2\n + 0.319781 * t ** 3\n - 0.8503463 * t ** 4\n - 0.005050998 * t ** 5\n + 0.0083572073 * t ** 6;\n }\n\n if (year >= 1600 && year < 1700) {\n t = y - 1600;\n deltaT = 120 - 0.9808 * t - 0.01532 * t ** 2 + t ** 3 / 7129;\n }\n\n if (year >= 1700 && year < 1800) {\n t = y - 1700;\n deltaT = 8.83 + 0.1603 * t - 0.0059285 * t ** 2 + 0.00013336 * t ** 3 - t ** 4 / 1174000;\n }\n\n if (year >= 1800 && year < 1860) {\n t = y - 1800;\n deltaT =\n 13.72\n - 0.332447 * t\n + 0.0068612 * t ** 2\n + 0.0041116 * t ** 3\n - 0.00037436 * t ** 4\n + 0.0000121272 * t ** 5\n - 0.0000001699 * t ** 6\n + 0.000000000875 * t ** 7;\n }\n\n if (year >= 1860 && year < 1900) {\n t = y - 1860;\n\n deltaT = 7.62 + 0.5737 * t - 0.251754 * t ** 2 + 0.01680668 * t ** 3 - 0.0004473624 * t ** 4 + t ** 5 / 233174;\n }\n\n if (year >= 1900 && year < 1920) {\n t = y - 1900;\n deltaT = -2.79 + 1.494119 * t - 0.0598939 * t ** 2 + 0.0061966 * t ** 3 - 0.000197 * t ** 4;\n }\n\n if (year >= 1920 && year < 1941) {\n t = y - 1920;\n deltaT = 21.2 + 0.84493 * t - 0.0761 * t ** 2 + 0.0020936 * t ** 3;\n }\n\n if (year >= 1941 && year < 1961) {\n t = y - 1950;\n deltaT = 29.07 + 0.407 * t - t ** 2 / 233 + t ** 3 / 2547;\n }\n\n if (year >= 1961 && year < 1986) {\n t = y - 1975;\n deltaT = 45.45 + 1.067 * t - t ** 2 / 260 - t ** 3 / 718;\n }\n\n if (year >= 1986 && year < 2005) {\n t = y - 2000;\n deltaT =\n 63.86 + 0.3345 * t - 0.060374 * t ** 2 + 0.0017275 * t ** 3 + 0.000651814 * t ** 4 + 0.00002373599 * t ** 5;\n }\n\n if (year >= 2005 && year < 2050) {\n t = y - 2000;\n deltaT = 62.92 + 0.32217 * t + 0.005589 * t ** 2;\n }\n\n if (year >= 2050) {\n t = (y - 1820) / 100;\n deltaT = -20 + 32 * t ** 2;\n }\n\n return deltaT;\n}\n","import type {LatLon} from '@app/types/LocationTypes';\nimport {pad} from '@app/utils/math';\nimport {\n getGreenwichApparentSiderealTime,\n getGreenwichMeanSiderealTime,\n getLocalApparentSiderealTime,\n getLocalMeanSiderealTime,\n} from '@app/utils/siderealTime';\nimport {\n dayOfYear2time,\n getDayOfWeek,\n getDayOfYear,\n getDecimalYear,\n isLeapYear,\n julianCenturiesJ20002julianDay,\n julianDay2julianCenturiesJ2000,\n julianDay2julianDay0,\n julianDay2julianMillenniaJ2000,\n julianDay2time,\n time2julianDay,\n} from '@package/time/utils/dateTime';\nimport {getDeltaT} from '@package/time/utils/deltaT';\nimport type {Time} from '../types/TimeTypes';\n\nexport default class TimeOfInterest {\n public readonly jd: number = 0.0;\n\n public readonly T: number = 0.0;\n\n public constructor(public readonly time: Time) {\n this.jd = time2julianDay(time);\n this.T = julianDay2julianCenturiesJ2000(this.jd);\n }\n\n public static fromCurrentTime(): TimeOfInterest {\n const date = new Date(Date.now());\n\n return new TimeOfInterest({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n min: date.getUTCMinutes(),\n sec: date.getUTCSeconds(),\n });\n }\n\n public static fromTime(year: number, month: number, day: number, hour = 0, min = 0, sec = 0): TimeOfInterest {\n return new TimeOfInterest({year, month, day, hour, min, sec});\n }\n\n public static fromDate(date: Date): TimeOfInterest {\n return new TimeOfInterest({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n min: date.getUTCMinutes(),\n sec: date.getUTCSeconds(),\n });\n }\n\n public static fromYearOfDay(year: number, dayOfYear: number): TimeOfInterest {\n const time = dayOfYear2time(year, dayOfYear);\n\n return new TimeOfInterest(time);\n }\n\n public static fromJulianDay(jd: number): TimeOfInterest {\n const time = julianDay2time(jd);\n\n return new TimeOfInterest(time);\n }\n\n public static fromJulianCenturiesJ2000(T: number): TimeOfInterest {\n const jd = julianCenturiesJ20002julianDay(T);\n const time = julianDay2time(jd);\n\n return new TimeOfInterest(time);\n }\n\n public getTime(): Time {\n return this.time;\n }\n\n public getString(): string {\n const {year, month, day, hour, min, sec} = this.time;\n\n return `${year}-${pad(month, 2)}-${pad(day, 2)} ${pad(hour, 2)}:${pad(min, 2)}:${pad(sec, 2)}`;\n }\n\n public getDate(): Date {\n const {year, month, day, hour, min, sec} = this.time;\n\n return new Date(Date.UTC(year, month - 1, day, hour, min, sec));\n }\n\n public getDecimalYear(): number {\n return getDecimalYear(this.time);\n }\n\n public getDayOfYear(): number {\n return getDayOfYear(this.time);\n }\n\n public getDayOfWeek(): number {\n return getDayOfWeek(this.time);\n }\n\n public isLeapYear(): boolean {\n return isLeapYear(this.time.year);\n }\n\n public getJulianDay(): number {\n return this.jd;\n }\n\n public getJulianDay0(): number {\n return julianDay2julianDay0(this.jd);\n }\n\n public getJulianCenturiesJ2000(): number {\n return this.T;\n }\n\n public getJulianMillenniaJ2000(): number {\n return julianDay2julianMillenniaJ2000(this.jd);\n }\n\n public getGreenwichMeanSiderealTime(): number {\n return getGreenwichMeanSiderealTime(this.T);\n }\n\n public getGreenwichApparentSiderealTime(): number {\n return getGreenwichApparentSiderealTime(this.T);\n }\n\n public getLocalMeanSiderealTime(location: LatLon): number {\n return getLocalMeanSiderealTime(this.T, location.lon);\n }\n\n public getLocalApparentSiderealTime(location: LatLon): number {\n return getLocalApparentSiderealTime(this.T, location.lon);\n }\n\n public getDeltaT(): number {\n const {year, month} = this.time;\n\n return getDelt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AAyB,KAAK,EAAGD,EAAS,GAAG,CACxD,CAEO,6BAA6BA,EAA0B,CAC1D,OAAOE,EAA6B,KAAK,EAAGF,EAAS,GAAG,CAC5D,CAEO,WAAoB,CACvB,GAAM,CAAC,KAAArB,EAAM,MAAAC,CAAK,EAAI,KAAK,KAE3B,OAAOuB,GAAUxB,EAAMC,CAAK,CAChC,CACJ","names":["core_exports","__export","Location","TimeOfInterest","__toCommonJS","round","value","decimals","p","pad","num","size","numStr","sin2","number","cos2","decimal2degreeMinutes","decimal","short","prefixes","sign","getSignPrefix","degPart","min","round","degString","minString","pad","decimal2degreeMinutesSeconds","sec","secParts","secString","normalizeAngle","degrees","baseAngle","angle","getSignPrefix","decimal","prefixes","DEG","RAD","EARTH_AXIS_RATIO","EARTH_FLATTENING","EARTH_ROTATION_DEG_PER_HOUR","EARTH_ARGUMENTS_OF_NUTATION","getDistanceInKm","location1","location2","lat1","lon1","lat2","lon2","F","G","lambda","FRad","DEG","GRad","lambdaRad","S","sin2","cos2","C","omegaRad","R","D","H1","H2","EARTH_FLATTENING","Location","_Location","lat","lon","elevation","decimal2degreeMinutes","decimal2degreeMinutesSeconds","location","getDistanceInKm","getMeanAnomaly","T","M","normalizeAngle","getMeanElongation","T","D","normalizeAngle","getMeanAnomaly","Mmoon","getArgumentOfLatitude","F","getMeanObliquityOfEcliptic","T","U","getTrueObliquityOfEcliptic","eps0","sumEps","getNutationInObliquity","getNutationInLongitude","D","getMeanElongation","Msun","getMeanAnomaly","Mmoon","F","getArgumentOfLatitude","O","sumPhi","EARTH_ARGUMENTS_OF_NUTATION","args","argMmoon","argMsun","argF","argD","argO","argPhi1","argPhi2","tmpSum","DEG","argEps1","argEps2","time2julianDay","time","tmpYear","getDayOfYear","Y","M","D","H","A","B","julianDay2time","jd","Z","F","a","C","E","dayOnMonth","month","year","hour","min","sec","julianDay2julianDay0","julianDay2julianCenturiesJ2000","jd","julianCenturiesJ20002julianDay","T","julianDay2julianMillenniaJ2000","dayOfYear2time","year","dayOfYear","K","isLeapYear","month","day","hourFloat","hour","minFloat","min","sec","round","getDecimalYear","time","daysInYear","getDayOfYear","M","D","getDayOfWeek","jd","time2julianDay","getGreenwichMeanSiderealTime","T","GMST","julianCenturiesJ20002julianDay","normalizeAngle","getGreenwichApparentSiderealTime","p","getNutationInLongitude","eRad","getTrueObliquityOfEcliptic","DEG","getLocalMeanSiderealTime","lon","LMST","getLocalApparentSiderealTime","getDeltaT","year","month","y","t","deltaT","TimeOfInterest","_TimeOfInterest","time","time2julianDay","julianDay2julianCenturiesJ2000","date","year","month","day","hour","min","sec","dayOfYear","dayOfYear2time","jd","julianDay2time","T","julianCenturiesJ20002julianDay","pad","getDecimalYear","getDayOfYear","getDayOfWeek","isLeapYear","julianDay2julianDay0","julianDay2julianMillenniaJ2000","getGreenwichMeanSiderealTime","getGreenwichApparentSiderealTime","location","getLocalMeanSiderealTime","getLocalApparentSiderealTime","getDeltaT"]}
package/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- function A(t,n=0){let o=Math.pow(10,n);return Math.round(t*o)/o}function h(t,n){let o=t.toString();for(;o.length<n;)o="0"+o;return o}function d(t){return Math.sin(t)*Math.sin(t)}function w(t){return Math.cos(t)*Math.cos(t)}function y(t,n=!1,o){let e=J(t,o);t=Math.abs(t);let r=Math.floor(t),u=A((t-r)*60,5),i=r+"\xB0 ",a=h(u,2)+"'";return n&&r===0?e+a:e+i+a}function _(t,n=!1,o){let e=J(t,o);t=Math.abs(t);let r=Math.floor(t),u=Math.floor((t-r)*60),i=A((t-r-u/60)*3600,3),a=i.toString().split("."),c=r+"\xB0 ",s=h(u,2)+"' ",m=(a.length===1?h(i,2):h(a[0],2)+"."+a[1])+'"';return n&&r===0&&u===0?e+m:n&&r===0?e+s+m:e+c+s+m}function f(t,n=360){let o=t%n;return o<0&&(o=o+n),o}function J(t,n){return n?t<0?n.negativePrefix:n.positivePrefix:t<0?"-":""}var o0=.996647189335,T=1-o0,l0=1.002738*15,N=[[0,0,0,0,1,-171996,-174.2,92025,8.9],[0,0,2,-2,2,-13187,-1.6,5736,-3.1],[0,0,2,0,2,-2274,-.2,977,-.5],[0,0,0,0,2,2062,.2,-895,.5],[0,1,0,0,0,1426,-3.4,54,-.1],[1,0,0,0,0,712,.1,-7,0],[0,1,2,-2,2,-517,1.2,224,-.6],[0,0,2,0,1,-386,-.4,200,0],[1,0,2,0,2,-301,0,129,-.1],[0,-1,2,-2,2,217,-.5,-95,.3],[1,0,0,-2,0,-158,0,-1,0],[0,0,2,-2,1,129,.1,-70,0],[-1,0,2,0,2,123,0,-53,0],[0,0,0,2,0,63,0,-2,0],[1,0,0,0,1,63,.1,-33,0],[-1,0,2,2,2,-59,0,26,0],[-1,0,0,0,1,-58,-.1,32,0],[1,0,2,0,1,-51,0,27,0],[2,0,0,-2,0,48,0,1,0],[-2,0,2,0,1,46,0,-24,0],[0,0,2,2,2,-38,0,16,0],[2,0,2,0,2,-31,0,13,0],[2,0,0,0,0,29,0,-1,0],[1,0,2,-2,2,29,0,-12,0],[0,0,2,0,0,26,0,-1,0],[0,0,2,-2,0,-22,0,0,0],[-1,0,2,0,1,21,0,-10,0],[0,2,0,0,0,17,-.1,0,0],[0,2,2,-2,2,-16,.1,7,0],[-1,0,0,2,1,16,0,-8,0],[0,1,0,0,1,-15,0,9,0],[1,0,0,-2,1,-13,0,7,0],[0,-1,0,0,1,-12,0,6,0],[2,0,-2,0,0,11,0,0,0],[-1,0,2,2,1,-10,0,5,0],[1,0,2,2,2,-8,0,3,0],[1,1,0,-2,0,-7,0,0,0],[0,1,2,0,2,7,0,-3,0],[0,-1,2,0,2,-7,0,3,0],[0,0,2,2,1,-7,0,3,0],[-2,0,0,2,1,-6,0,3,0],[1,0,0,2,0,6,0,0,0],[2,0,2,-2,2,6,0,-3,0],[0,0,0,2,1,-6,0,3,0],[1,0,2,-2,1,6,0,-3,0],[0,-1,2,-2,1,-5,0,3,0],[0,0,0,-2,1,-5,0,3,0],[1,-1,0,0,0,5,0,0,0],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,0],[0,1,0,2,0,-1,0,0,0],[1,0,-2,-2,0,-1,0,0,0],[0,-1,2,0,1,-1,0,0,0],[1,1,0,-2,1,-1,0,0,0],[1,0,-2,2,0,-1,0,0,0],[2,0,0,2,0,1,0,0,0],[0,0,2,4,2,-1,0,0,0],[0,1,0,1,0,1,0,0,0]];var M=Math.PI/180,r0=180/Math.PI;function k(t,n){let{lat:o,lon:e}=t,{lat:r,lon:u}=n,i=(o+r)/2,a=(o-r)/2,c=(u-e)/2,s=i*M,m=a*M,p=c*M,l=d(m)*w(p)+w(s)*d(p),b=w(m)*w(p)+d(s)*d(p),g=Math.atan(Math.sqrt(l/b)),x=Math.sqrt(l*b)/g,t0=2*g*6378137/1e3,n0=(3*x-1)/(2*b),e0=(3*x+1)/(2*l);return t0*(1+T*n0*d(s)*w(m)-T*e0*w(s)*d(m))}var S=class t{constructor(n,o,e=0){this.lat=n;this.lon=o;this.elevation=e;this.prefixesNorthSouth={positivePrefix:"N ",negativePrefix:"S "};this.prefixesEastWest={positivePrefix:"E ",negativePrefix:"W "};this.location={lat:n,lon:o,elevation:e}}static create(n,o,e=0){return new t(n,o,e)}getLatitude(){return this.location.lat}getLongitude(){return this.location.lon}getLatitudeInDegreeMinutes(){return y(this.location.lat,!1,this.prefixesNorthSouth)}getLongitudeInDegreeMinutes(){return y(this.location.lon,!1,this.prefixesEastWest)}getLatitudeInDegreeMinutesSeconds(){return _(this.location.lat,!1,this.prefixesNorthSouth)}getLongitudeInDegreeMinutesSeconds(){return _(this.location.lon,!1,this.prefixesEastWest)}getElevation(){return this.location.elevation}getDistanceToInKm(n){return k(this.location,n)}};function U(t){let n=parseFloat(t.year+"."+E(t)),o,e;t.month>2?(o=t.year,e=t.month):(o=t.year-1,e=t.month+12);let r=t.day,u=t.hour/24+t.min/1440+t.sec/86400,i,a;if(n>=1582.288)i=Math.floor(o/100),a=2-i+Math.floor(i/4);else if(n<=1582.277)a=0;else throw new Error("Date between 1582-10-04 and 1582-10-15 is not defined.");return Math.floor(365.25*(o+4716))+Math.floor(30.6001*(e+1))+r+u+a-1524.5}function j(t){t=t+.5;let n=Math.floor(t),o=t-n,e=n;if(n>=2299161){let g=Math.floor((n-186721625e-2)/36524.25);e=n+1+g-Math.floor(g/4)}let r=e+1524,u=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*u),a=Math.floor((r-i)/30.6001),c=r-i-Math.floor(30.6001*a)+o,s=a<14?a-1:a-13,m=s>2?u-4716:u-4715,p=(c-Math.floor(c))*24,l=(p-Math.floor(p))*60,b=(l-Math.floor(l))*60;return{year:Math.floor(m),month:Math.floor(s),day:Math.floor(c),hour:Math.floor(p),min:Math.floor(l),sec:Math.floor(b)}}function v(t){return Math.floor(t+.5)-.5}function C(t){return(t-2451545)/36525}function L(t){return t*36525+2451545}function W(t){return C(t)/10}function B(t,n){let o=D(t)?1:2,e=n<32?1:Math.floor(9*(o+n)/275+.98),r=Math.floor(n-Math.floor(275*e/9)+o*Math.floor((e+9)/12)+30),u=24*(n-Math.floor(n)),i=Math.floor(u),a=60*(u-i),c=Math.floor(a),s=A(60*(a-c));return{year:t,month:e,day:r,hour:i,min:c,sec:s}}function $(t){let n=D(t.year)?366:365,o=E(t)-1+t.hour/24+t.min/1440+t.sec/86400;return t.year+o/n}function E(t){let n=D(t.year)?1:2,o=t.month,e=t.day;return Math.floor(275*o/9)-n*Math.floor((o+9)/12)+e-30}function q(t){let n=U(t);return Math.floor((n+1.5)%7)}function D(t){return t/4!==Math.floor(t/4)?!1:t/100!==Math.floor(t/100)?!0:t/400===Math.floor(t/400)}function O(t){let n=357.5291092+35999.0502909*t-1536e-7*Math.pow(t,2)+Math.pow(t,3)/2449e3;return f(n)}function F(t){let n=297.8501921+445267.1114034*t-.0018819*Math.pow(t,2)+Math.pow(t,3)/545868-Math.pow(t,4)/113065e3;return f(n)}function G(t){let n=134.9633964+477198.8675055*t+.0087414*Math.pow(t,2)+Math.pow(t,3)/69699-Math.pow(t,4)/1471200;return f(n)}function P(t){let n=93.272095+483202.0175233*t-.0036539*Math.pow(t,2)-Math.pow(t,3)/352600+Math.pow(t,4)/86331e3;return f(n)}function u0(t){let n=t/100;return(84381.448-4680.93*n-1.55*Math.pow(n,2)+1999.25*Math.pow(n,3)-51.38*Math.pow(n,4)-249.67*Math.pow(n,5)-39.05*Math.pow(n,6)+7.12*Math.pow(n,7)+27.87*Math.pow(n,8)+5.79*Math.pow(n,9)+2.45*Math.pow(n,10))/3600}function Q(t){let n=u0(t),o=s0(t);return n+o}function Y(t){let n=F(t),o=O(t),e=G(t),r=P(t),u=125.04452-1934.136261*t+.0020708*Math.pow(t,2)+Math.pow(t,3)/45e4,i=0;return N.forEach(a=>{let c=a[0],s=a[1],m=a[2],p=a[3],l=a[4],b=a[5],g=a[6],x=p*n+s*o+c*e+m*r+l*u;i+=Math.sin(x*M)*(b+g*t)}),i*1e-4/3600}function s0(t){let n=F(t),o=O(t),e=G(t),r=P(t),u=125.04452-1934.136261*t+.0020708*Math.pow(t,2)+Math.pow(t,3)/45e4,i=0;return N.forEach(a=>{let c=a[0],s=a[1],m=a[2],p=a[3],l=a[4],b=a[7],g=a[8],x=p*n+s*o+c*e+m*r+l*u;i+=Math.cos(x*M)*(b+g*t)}),i*1e-4/3600}function R(t){let o=280.46061837+360.98564736629*(L(t)-2451545)+387933e-9*Math.pow(t,2)+Math.pow(t,3)/3871e4;return f(o)}function H(t){let n=R(t),o=Y(t),r=Q(t)*M;return n+o*Math.cos(r)}function V(t,n){let e=R(t)+n;return f(e)}function X(t,n){return H(t)+n}function Z(t,n=0){let o=t+(n-.5)/12,e,r=0;return t<-500&&(e=(o-1820)/100,r=-20+32*Math.pow(e,2)),t>=-500&&t<500&&(e=o/100,r=10583.6-1014.41*e+33.78311*Math.pow(e,2)-5.952053*Math.pow(e,3)-.1798452*Math.pow(e,4)+.022174192*Math.pow(e,5)+.0090316521*Math.pow(e,6)),t>=500&&t<1600&&(e=(o-1e3)/100,r=1574.2-556.01*e+71.23472*Math.pow(e,2)+.319781*Math.pow(e,3)-.8503463*Math.pow(e,4)-.005050998*Math.pow(e,5)+.0083572073*Math.pow(e,6)),t>=1600&&t<1700&&(e=o-1600,r=120-.9808*e-.01532*Math.pow(e,2)+Math.pow(e,3)/7129),t>=1700&&t<1800&&(e=o-1700,r=8.83+.1603*e-.0059285*Math.pow(e,2)+13336e-8*Math.pow(e,3)-Math.pow(e,4)/1174e3),t>=1800&&t<1860&&(e=o-1800,r=13.72-.332447*e+.0068612*Math.pow(e,2)+.0041116*Math.pow(e,3)-37436e-8*Math.pow(e,4)+121272e-10*Math.pow(e,5)-1699e-10*Math.pow(e,6)+875e-12*Math.pow(e,7)),t>=1860&&t<1900&&(e=o-1860,r=7.62+.5737*e-.251754*Math.pow(e,2)+.01680668*Math.pow(e,3)-.0004473624*Math.pow(e,4)+Math.pow(e,5)/233174),t>=1900&&t<1920&&(e=o-1900,r=-2.79+1.494119*e-.0598939*Math.pow(e,2)+.0061966*Math.pow(e,3)-197e-6*Math.pow(e,4)),t>=1920&&t<1941&&(e=o-1920,r=21.2+.84493*e-.0761*Math.pow(e,2)+.0020936*Math.pow(e,3)),t>=1941&&t<1961&&(e=o-1950,r=29.07+.407*e-Math.pow(e,2)/233+Math.pow(e,3)/2547),t>=1961&&t<1986&&(e=o-1975,r=45.45+1.067*e-Math.pow(e,2)/260-Math.pow(e,3)/718),t>=1986&&t<2005&&(e=o-2e3,r=63.86+.3345*e-.060374*Math.pow(e,2)+.0017275*Math.pow(e,3)+651814e-9*Math.pow(e,4)+2373599e-11*Math.pow(e,5)),t>=2005&&t<2050&&(e=o-2e3,r=62.92+.32217*e+.005589*Math.pow(e,2)),t>=2050&&(e=(o-1820)/100,r=-20+32*Math.pow(e,2)),r}var I=class t{constructor(n){this.time=n;this.jd=0;this.T=0;this.jd=U(n),this.T=C(this.jd)}static fromCurrentTime(){let n=new Date(Date.now());return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromTime(n,o,e,r=0,u=0,i=0){return new t({year:n,month:o,day:e,hour:r,min:u,sec:i})}static fromDate(n){return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromYearOfDay(n,o){let e=B(n,o);return new t(e)}static fromJulianDay(n){let o=j(n);return new t(o)}static fromJulianCenturiesJ2000(n){let o=L(n),e=j(o);return new t(e)}getTime(){return this.time}getString(){let{year:n,month:o,day:e,hour:r,min:u,sec:i}=this.time;return`${n}-${h(o,2)}-${h(e,2)} ${h(r,2)}:${h(u,2)}:${h(i,2)}`}getDate(){let{year:n,month:o,day:e,hour:r,min:u,sec:i}=this.time;return new Date(Date.UTC(n,o-1,e,r,u,i))}getDecimalYear(){return $(this.time)}getDayOfYear(){return E(this.time)}getDayOfWeek(){return q(this.time)}isLeapYear(){return D(this.time.year)}getJulianDay(){return this.jd}getJulianDay0(){return v(this.jd)}getJulianCenturiesJ2000(){return this.T}getJulianMillenniaJ2000(){return W(this.jd)}getGreenwichMeanSiderealTime(){return R(this.T)}getGreenwichApparentSiderealTime(){return H(this.T)}getLocalMeanSiderealTime(n){return V(this.T,n.lon)}getLocalApparentSiderealTime(n){return X(this.T,n.lon)}getDeltaT(){let{year:n,month:o}=this.time;return Z(n,o)}};export{S as Location,I as TimeOfInterest};
1
+ function D(t,n=0){let r=10**n;return Math.round(t*r)/r}function p(t,n){let r=t.toString();for(;r.length<n;)r=`0${r}`;return r}function d(t){return Math.sin(t)*Math.sin(t)}function x(t){return Math.cos(t)*Math.cos(t)}function T(t,n=!1,r){let e=H(t,r);t=Math.abs(t);let o=Math.floor(t),s=D((t-o)*60,5),u=`${o}\xB0 `,i=`${p(s,2)}'`;return n&&o===0?e+i:e+u+i}function _(t,n=!1,r){let e=H(t,r);t=Math.abs(t);let o=Math.floor(t),s=Math.floor((t-o)*60),u=D((t-o-s/60)*3600,3),i=u.toString().split("."),c=`${o}\xB0 `,a=`${p(s,2)}' `,m=`${i.length===1?p(u,2):`${p(i[0],2)}.${i[1]}`}"`;return n&&o===0&&s===0?e+m:n&&o===0?e+a+m:e+c+a+m}function g(t,n=360){let r=t%n;return r<0&&(r=r+n),r}function H(t,n){return n?t<0?n.negativePrefix:n.positivePrefix:t<0?"-":""}var b=Math.PI/180,r0=180/Math.PI;var o0=.996647189335,N=1-o0,p0=1.002738*15,U=[[0,0,0,0,1,-171996,-174.2,92025,8.9],[0,0,2,-2,2,-13187,-1.6,5736,-3.1],[0,0,2,0,2,-2274,-.2,977,-.5],[0,0,0,0,2,2062,.2,-895,.5],[0,1,0,0,0,1426,-3.4,54,-.1],[1,0,0,0,0,712,.1,-7,0],[0,1,2,-2,2,-517,1.2,224,-.6],[0,0,2,0,1,-386,-.4,200,0],[1,0,2,0,2,-301,0,129,-.1],[0,-1,2,-2,2,217,-.5,-95,.3],[1,0,0,-2,0,-158,0,-1,0],[0,0,2,-2,1,129,.1,-70,0],[-1,0,2,0,2,123,0,-53,0],[0,0,0,2,0,63,0,-2,0],[1,0,0,0,1,63,.1,-33,0],[-1,0,2,2,2,-59,0,26,0],[-1,0,0,0,1,-58,-.1,32,0],[1,0,2,0,1,-51,0,27,0],[2,0,0,-2,0,48,0,1,0],[-2,0,2,0,1,46,0,-24,0],[0,0,2,2,2,-38,0,16,0],[2,0,2,0,2,-31,0,13,0],[2,0,0,0,0,29,0,-1,0],[1,0,2,-2,2,29,0,-12,0],[0,0,2,0,0,26,0,-1,0],[0,0,2,-2,0,-22,0,0,0],[-1,0,2,0,1,21,0,-10,0],[0,2,0,0,0,17,-.1,0,0],[0,2,2,-2,2,-16,.1,7,0],[-1,0,0,2,1,16,0,-8,0],[0,1,0,0,1,-15,0,9,0],[1,0,0,-2,1,-13,0,7,0],[0,-1,0,0,1,-12,0,6,0],[2,0,-2,0,0,11,0,0,0],[-1,0,2,2,1,-10,0,5,0],[1,0,2,2,2,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,4,2,-1,0,1,0],[-1,0,4,0,2,1,0,0,0],[1,-1,0,-2,0,1,0,0,0],[2,0,2,-2,1,1,0,-1,0],[2,0,2,2,2,-1,0,0,0],[1,0,0,2,1,-1,0,0,0],[0,0,4,-2,2,1,0,0,0],[3,0,2,-2,2,1,0,0,0],[1,0,2,-2,0,-1,0,0,0],[0,1,2,0,1,1,0,0,0],[-1,-1,0,2,1,1,0,0,0],[0,0,-2,0,1,-1,0,0,0],[0,0,2,-1,2,-1,0,0,0],[0,1,0,2,0,-1,0,0,0],[1,0,-2,-2,0,-1,0,0,0],[0,-1,2,0,1,-1,0,0,0],[1,1,0,-2,1,-1,0,0,0],[1,0,-2,2,0,-1,0,0,0],[2,0,0,2,0,1,0,0,0],[0,0,2,4,2,-1,0,0,0],[0,1,0,1,0,1,0,0,0]];function J(t,n){let{lat:r,lon:e}=t,{lat:o,lon:s}=n,u=(r+o)/2,i=(r-o)/2,c=(s-e)/2,a=u*b,m=i*b,l=c*b,f=d(m)*x(l)+x(a)*d(l),h=x(m)*x(l)+d(a)*d(l),M=Math.atan(Math.sqrt(f/h)),A=Math.sqrt(f*h)/M,t0=2*M*6378137/1e3,n0=(3*A-1)/(2*h),e0=(3*A+1)/(2*f);return t0*(1+N*n0*d(a)*x(m)-N*e0*x(a)*d(m))}var S=class t{constructor(n,r,e=0){this.lat=n;this.lon=r;this.elevation=e;this.prefixesNorthSouth={positivePrefix:"N ",negativePrefix:"S "};this.prefixesEastWest={positivePrefix:"E ",negativePrefix:"W "};this.location={lat:n,lon:r,elevation:e}}static create(n,r,e=0){return new t(n,r,e)}getLatitude(){return this.location.lat}getLongitude(){return this.location.lon}getLatitudeInDegreeMinutes(){return T(this.location.lat,!1,this.prefixesNorthSouth)}getLongitudeInDegreeMinutes(){return T(this.location.lon,!1,this.prefixesEastWest)}getLatitudeInDegreeMinutesSeconds(){return _(this.location.lat,!1,this.prefixesNorthSouth)}getLongitudeInDegreeMinutesSeconds(){return _(this.location.lon,!1,this.prefixesEastWest)}getElevation(){return this.location.elevation}getDistanceToInKm(n){return J(this.location,n)}};function E(t){let n=357.5291092+35999.0502909*t-1536e-7*t**2+t**3/2449e3;return g(n)}function j(t){let n=297.8501921+445267.1114034*t-.0018819*t**2+t**3/545868-t**4/113065e3;return g(n)}function C(t){let n=134.9633964+477198.8675055*t+.0087414*t**2+t**3/69699-t**4/1471200;return g(n)}function F(t){let n=93.272095+483202.0175233*t-.0036539*t**2-t**3/352600+t**4/86331e3;return g(n)}function s0(t){let n=t/100;return(84381.448-4680.93*n-1.55*n**2+1999.25*n**3-51.38*n**4-249.67*n**5-39.05*n**6+7.12*n**7+27.87*n**8+5.79*n**9+2.45*n**10)/3600}function W(t){let n=s0(t),r=a0(t);return n+r}function w(t){let n=j(t),r=E(t),e=C(t),o=F(t),s=125.04452-1934.136261*t+.0020708*t**2+t**3/45e4,u=0;return U.forEach(i=>{let c=i[0],a=i[1],m=i[2],l=i[3],f=i[4],h=i[5],M=i[6],A=l*n+a*r+c*e+m*o+f*s;u+=Math.sin(A*b)*(h+M*t)}),u*1e-4/3600}function a0(t){let n=j(t),r=E(t),e=C(t),o=F(t),s=125.04452-1934.136261*t+.0020708*t**2+t**3/45e4,u=0;return U.forEach(i=>{let c=i[0],a=i[1],m=i[2],l=i[3],f=i[4],h=i[7],M=i[8],A=l*n+a*r+c*e+m*o+f*s;u+=Math.cos(A*b)*(h+M*t)}),u*1e-4/3600}function G(t){let n=parseFloat(`${t.year}.${R(t)}`),r,e;t.month>2?(r=t.year,e=t.month):(r=t.year-1,e=t.month+12);let o=t.day,s=t.hour/24+t.min/1440+t.sec/86400,u,i;if(n>=1582.288)u=Math.floor(r/100),i=2-u+Math.floor(u/4);else if(n<=1582.277)i=0;else throw new Error("Date between 1582-10-04 and 1582-10-15 is not defined.");return Math.floor(365.25*(r+4716))+Math.floor(30.6001*(e+1))+o+s+i-1524.5}function $(t){t=t+.5;let n=Math.floor(t),r=t-n,e=n;if(n>=2299161){let M=Math.floor((n-186721625e-2)/36524.25);e=n+1+M-Math.floor(M/4)}let o=e+1524,s=Math.floor((o-122.1)/365.25),u=Math.floor(365.25*s),i=Math.floor((o-u)/30.6001),c=o-u-Math.floor(30.6001*i)+r,a=i<14?i-1:i-13,m=a>2?s-4716:s-4715,l=(c-Math.floor(c))*24,f=(l-Math.floor(l))*60,h=(f-Math.floor(f))*60;return{year:Math.floor(m),month:Math.floor(a),day:Math.floor(c),hour:Math.floor(l),min:Math.floor(f),sec:Math.floor(h)}}function B(t){return Math.floor(t+.5)-.5}function P(t){return(t-2451545)/36525}function y(t){return t*36525+2451545}function q(t){return P(t)/10}function z(t,n){let r=L(t)?1:2,e=n<32?1:Math.floor(9*(r+n)/275+.98),o=Math.floor(n-Math.floor(275*e/9)+r*Math.floor((e+9)/12)+30),s=24*(n-Math.floor(n)),u=Math.floor(s),i=60*(s-u),c=Math.floor(i),a=D(60*(i-c));return{year:t,month:e,day:o,hour:u,min:c,sec:a}}function K(t){let n=L(t.year)?366:365,r=R(t)-1+t.hour/24+t.min/1440+t.sec/86400;return t.year+r/n}function R(t){let n=L(t.year)?1:2,r=t.month,e=t.day;return Math.floor(275*r/9)-n*Math.floor((r+9)/12)+e-30}function Q(t){let n=G(t);return Math.floor((n+1.5)%7)}function L(t){return t/4!==Math.floor(t/4)?!1:t/100!==Math.floor(t/100)?!0:t/400===Math.floor(t/400)}function O(t){let r=280.46061837+360.98564736629*(y(t)-2451545)+387933e-9*t**2+t**3/3871e4;return g(r)}function Y(t){let n=O(t),r=w(t),o=W(t)*b;return n+r*Math.cos(o)}function V(t,n){let e=O(t)+n;return g(e)}function X(t,n){return Y(t)+n}function Z(t,n=0){let r=t+(n-.5)/12,e,o=0;return t<-500&&(e=(r-1820)/100,o=-20+32*e**2),t>=-500&&t<500&&(e=r/100,o=10583.6-1014.41*e+33.78311*e**2-5.952053*e**3-.1798452*e**4+.022174192*e**5+.0090316521*e**6),t>=500&&t<1600&&(e=(r-1e3)/100,o=1574.2-556.01*e+71.23472*e**2+.319781*e**3-.8503463*e**4-.005050998*e**5+.0083572073*e**6),t>=1600&&t<1700&&(e=r-1600,o=120-.9808*e-.01532*e**2+e**3/7129),t>=1700&&t<1800&&(e=r-1700,o=8.83+.1603*e-.0059285*e**2+13336e-8*e**3-e**4/1174e3),t>=1800&&t<1860&&(e=r-1800,o=13.72-.332447*e+.0068612*e**2+.0041116*e**3-37436e-8*e**4+121272e-10*e**5-1699e-10*e**6+875e-12*e**7),t>=1860&&t<1900&&(e=r-1860,o=7.62+.5737*e-.251754*e**2+.01680668*e**3-.0004473624*e**4+e**5/233174),t>=1900&&t<1920&&(e=r-1900,o=-2.79+1.494119*e-.0598939*e**2+.0061966*e**3-197e-6*e**4),t>=1920&&t<1941&&(e=r-1920,o=21.2+.84493*e-.0761*e**2+.0020936*e**3),t>=1941&&t<1961&&(e=r-1950,o=29.07+.407*e-e**2/233+e**3/2547),t>=1961&&t<1986&&(e=r-1975,o=45.45+1.067*e-e**2/260-e**3/718),t>=1986&&t<2005&&(e=r-2e3,o=63.86+.3345*e-.060374*e**2+.0017275*e**3+651814e-9*e**4+2373599e-11*e**5),t>=2005&&t<2050&&(e=r-2e3,o=62.92+.32217*e+.005589*e**2),t>=2050&&(e=(r-1820)/100,o=-20+32*e**2),o}var I=class t{constructor(n){this.time=n;this.jd=0;this.T=0;this.jd=G(n),this.T=P(this.jd)}static fromCurrentTime(){let n=new Date(Date.now());return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromTime(n,r,e,o=0,s=0,u=0){return new t({year:n,month:r,day:e,hour:o,min:s,sec:u})}static fromDate(n){return new t({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),min:n.getUTCMinutes(),sec:n.getUTCSeconds()})}static fromYearOfDay(n,r){let e=z(n,r);return new t(e)}static fromJulianDay(n){let r=$(n);return new t(r)}static fromJulianCenturiesJ2000(n){let r=y(n),e=$(r);return new t(e)}getTime(){return this.time}getString(){let{year:n,month:r,day:e,hour:o,min:s,sec:u}=this.time;return`${n}-${p(r,2)}-${p(e,2)} ${p(o,2)}:${p(s,2)}:${p(u,2)}`}getDate(){let{year:n,month:r,day:e,hour:o,min:s,sec:u}=this.time;return new Date(Date.UTC(n,r-1,e,o,s,u))}getDecimalYear(){return K(this.time)}getDayOfYear(){return R(this.time)}getDayOfWeek(){return Q(this.time)}isLeapYear(){return L(this.time.year)}getJulianDay(){return this.jd}getJulianDay0(){return B(this.jd)}getJulianCenturiesJ2000(){return this.T}getJulianMillenniaJ2000(){return q(this.jd)}getGreenwichMeanSiderealTime(){return O(this.T)}getGreenwichApparentSiderealTime(){return Y(this.T)}getLocalMeanSiderealTime(n){return V(this.T,n.lon)}getLocalApparentSiderealTime(n){return X(this.T,n.lon)}getDeltaT(){let{year:n,month:r}=this.time;return Z(n,r)}};export{S as Location,I as TimeOfInterest};
2
2
  //# sourceMappingURL=index.mjs.map
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../app/utils/math.ts","../../../app/utils/angle.ts","../../../app/constants/earth.ts","../../../app/constants/math.ts","../../../app/utils/distance.ts","../../location/models/Location.ts","../../time/utils/dateTime.ts","../../../app/utils/sun.ts","../../../app/utils/moon.ts","../../../app/utils/earth.ts","../../../app/utils/siderealTime.ts","../../time/utils/deltaT.ts","../../time/models/TimeOfInterest.ts"],"sourcesContent":["export function round(value: number, decimals = 0): number {\n const p = Math.pow(10, decimals);\n\n return Math.round(value * p) / p;\n}\n\nexport function pad(num: number | string, size: number): string {\n let numStr = num.toString();\n\n while (numStr.length < size) {\n numStr = '0' + numStr;\n }\n\n return numStr;\n}\n\nexport function sin2(number: number): number {\n return Math.sin(number) * Math.sin(number);\n}\n\nexport function cos2(number: number): number {\n return Math.cos(number) * Math.cos(number);\n}\n","import {pad, round} from './math';\n\nexport type AnglePrefixes = {\n positivePrefix: string;\n negativePrefix: string;\n};\n\n/**\n * @deprecated use decimal2degreeMinutesSeconds instead\n * @param deg\n * @param short\n */\nexport function deg2angle(deg: number, short = false): string {\n return decimal2degreeMinutesSeconds(deg, short);\n}\n\nexport function decimal2degreeMinutes(\n decimal: number,\n short = false,\n prefixes?: AnglePrefixes,\n): string {\n const sign = getSignPrefix(decimal, prefixes);\n\n decimal = Math.abs(decimal);\n\n const degPart = Math.floor(decimal);\n const min = round((decimal - degPart) * 60, 5);\n\n const degString = degPart + '° ';\n const minString = pad(min, 2) + '\\'';\n\n if (short && degPart === 0.0) {\n return sign + minString;\n }\n\n return sign + degString + minString;\n}\n\nexport function decimal2degreeMinutesSeconds(\n decimal: number,\n short = false,\n prefixes?: AnglePrefixes,\n): string {\n const sign = getSignPrefix(decimal, prefixes);\n\n decimal = Math.abs(decimal);\n\n const degPart = Math.floor(decimal);\n const min = Math.floor((decimal - degPart) * 60);\n const sec = round((decimal - degPart - min / 60) * 3600, 3);\n const secParts = sec.toString().split('.');\n\n const degString = degPart + '° ';\n const minString = pad(min, 2) + '\\' ';\n const secString = (secParts.length === 1 ? pad(sec, 2) : pad(secParts[0], 2) + '.' + secParts[1]) + '\"';\n\n if (short && degPart === 0.0 && min === 0.0) {\n return sign + secString;\n }\n\n if (short && degPart === 0.0) {\n return sign + minString + secString;\n }\n\n return sign + degString + minString + secString;\n}\n\nexport function angle2deg(angle: string): number {\n const matches = angle.match(/(-?)(\\d+)°.*?(\\d+)'.*?([\\d.]+)\"/);\n\n if (!matches) {\n throw new Error('false angle format');\n }\n\n const sign = matches[1].trim() === '-' ? -1 : 1;\n const deg = parseInt(matches[2]);\n const min = parseInt(matches[3]);\n const sec = parseFloat(matches[4]);\n\n return sign * (deg + min / 60 + sec / 3600);\n}\n\nexport function deg2time(angle: number): string {\n const sign = angle < 0 ? '-' : '';\n const time = Math.abs(angle / 15);\n\n const hour = Math.floor(time);\n const min = Math.floor((time - hour) * 60);\n const sec = round((time - hour - min / 60) * 3600, 3);\n const secParts = sec.toString().split('.');\n\n const hourString = sign + hour;\n const minString = pad(min, 2);\n const secString = secParts.length === 1 ? pad(sec, 2) : pad(secParts[0], 2) + '.' + secParts[1];\n\n return `${hourString}h ${minString}m ${secString}s`;\n}\n\nexport function time2deg(timeAngle: string): number {\n const matches = timeAngle.match(/(-?)(\\d+)h.*?(\\d+)m.*?([\\d.]+)s/);\n\n if (!matches) {\n throw new Error('false time angle format');\n }\n\n const sign = matches[1].trim() === '-' ? -1 : 1;\n const deg = parseInt(matches[2]);\n const min = parseInt(matches[3]);\n const sec = parseFloat(matches[4]);\n\n const angleDeg = sign * (deg + min / 60 + sec / 3600);\n\n return angleDeg * 15;\n}\n\nexport function normalizeAngle(degrees: number, baseAngle = 360.0): number {\n let angle = degrees % baseAngle;\n\n if (angle < 0) {\n angle = angle + baseAngle;\n }\n\n return angle;\n}\n\nexport function sec2deg(seconds: number): number {\n return seconds / 3600;\n}\n\nfunction getSignPrefix(decimal: number, prefixes?: AnglePrefixes): string {\n if (prefixes) {\n return decimal < 0 ? prefixes.negativePrefix : prefixes.positivePrefix;\n }\n\n return decimal < 0 ? '-' : '';\n}\n","export const EARTH_EQUATORIAL_RADIUS_METERS = 6_378_137;\nexport const EARTH_EQUATORIAL_RADIUS_KM = EARTH_EQUATORIAL_RADIUS_METERS / 1000;\nexport const EARTH_AXIS_RATIO = 0.996647189335;\nexport const EARTH_FLATTENING = 1 - EARTH_AXIS_RATIO;\nexport const EARTH_ROTATION_DEG_PER_HOUR = 1.002738 * 15;\n\nexport const EARTH_ARGUMENTS_OF_NUTATION = [\n [0, 0, 0, 0, 1, -171996, -174.2, 92025, 8.9],\n [0, 0, 2, -2, 2, -13187, -1.6, 5736, -3.1],\n [0, 0, 2, 0, 2, -2274, -0.2, 977, -0.5],\n [0, 0, 0, 0, 2, 2062, 0.2, -895, 0.5],\n [0, 1, 0, 0, 0, 1426, -3.4, 54, -0.1],\n [1, 0, 0, 0, 0, 712, 0.1, -7, 0.0],\n [0, 1, 2, -2, 2, -517, 1.2, 224, -0.6],\n [0, 0, 2, 0, 1, -386, -0.4, 200, 0.0],\n [1, 0, 2, 0, 2, -301, 0.0, 129, -0.1],\n [0, -1, 2, -2, 2, 217, -0.5, -95, 0.3],\n [1, 0, 0, -2, 0, -158, 0.0, -1, 0.0],\n [0, 0, 2, -2, 1, 129, 0.1, -70, 0.0],\n [-1, 0, 2, 0, 2, 123, 0.0, -53, 0.0],\n [0, 0, 0, 2, 0, 63, 0.0, -2, 0.0],\n [1, 0, 0, 0, 1, 63, 0.1, -33, 0.0],\n [-1, 0, 2, 2, 2, -59, 0.0, 26, 0.0],\n [-1, 0, 0, 0, 1, -58, -0.1, 32, 0.0],\n [1, 0, 2, 0, 1, -51, 0.0, 27, 0.0],\n [2, 0, 0, -2, 0, 48, 0.0, 1, 0.0],\n [-2, 0, 2, 0, 1, 46, 0.0, -24, 0.0],\n [0, 0, 2, 2, 2, -38, 0.0, 16, 0.0],\n [2, 0, 2, 0, 2, -31, 0.0, 13, 0.0],\n [2, 0, 0, 0, 0, 29, 0.0, -1, 0.0],\n [1, 0, 2, -2, 2, 29, 0.0, -12, 0.0],\n [0, 0, 2, 0, 0, 26, 0.0, -1, 0.0],\n [0, 0, 2, -2, 0, -22, 0.0, 0, 0.0],\n [-1, 0, 2, 0, 1, 21, 0.0, -10, 0.0],\n [0, 2, 0, 0, 0, 17, -0.1, 0, 0.0],\n [0, 2, 2, -2, 2, -16, 0.1, 7, 0.0],\n [-1, 0, 0, 2, 1, 16, 0.0, -8, 0.0],\n [0, 1, 0, 0, 1, -15, 0.0, 9, 0.0],\n [1, 0, 0, -2, 1, -13, 0.0, 7, 0.0],\n [0, -1, 0, 0, 1, -12, 0.0, 6, 0.0],\n [2, 0, -2, 0, 0, 11, 0.0, 0, 0.0],\n [-1, 0, 2, 2, 1, -10, 0.0, 5, 0.0],\n [1, 0, 2, 2, 2, -8, 0.0, 3, 0.0],\n [1, 1, 0, -2, 0, -7, 0.0, 0, 0.0],\n [0, 1, 2, 0, 2, 7, 0.0, -3, 0.0],\n [0, -1, 2, 0, 2, -7, 0.0, 3, 0.0],\n [0, 0, 2, 2, 1, -7, 0.0, 3, 0.0],\n [-2, 0, 0, 2, 1, -6, 0.0, 3, 0.0],\n [1, 0, 0, 2, 0, 6, 0.0, 0, 0.0],\n [2, 0, 2, -2, 2, 6, 0.0, -3, 0.0],\n [0, 0, 0, 2, 1, -6, 0.0, 3, 0.0],\n [1, 0, 2, -2, 1, 6, 0.0, -3, 0.0],\n [0, -1, 2, -2, 1, -5, 0.0, 3, 0.0],\n [0, 0, 0, -2, 1, -5, 0.0, 3, 0.0],\n [1, -1, 0, 0, 0, 5, 0.0, 0, 0.0],\n [2, 0, 2, 0, 1, -5, 0.0, 3, 0.0],\n [2, 0, 0, -2, 1, 4, 0.0, -2, 0.0],\n [0, 1, 2, -2, 1, 4, 0.0, -2, 0.0],\n [1, 0, 0, -1, 0, -4, 0.0, 0, 0.0],\n [0, 1, 0, -2, 0, -4, 0.0, 0, 0.0],\n [1, 0, -2, 0, 0, 4, 0.0, 0, 0.0],\n [0, 0, 0, 1, 0, -4, 0.0, 0, 0.0],\n [-2, 0, 2, 0, 2, -3, 0.0, 1, 0.0],\n [1, -1, 0, -1, 0, -3, 0.0, 0, 0.0],\n [1, 1, 0, 0, 0, -3, 0.0, 0, 0.0],\n [1, 0, 2, 0, 0, 3, 0.0, 0, 0.0],\n [1, -1, 2, 0, 2, -3, 0.0, 1, 0.0],\n [-1, -1, 2, 2, 2, -3, 0.0, 1, 0.0],\n [3, 0, 2, 0, 2, -3, 0.0, 1, 0.0],\n [0, -1, 2, 2, 2, -3, 0.0, 1, 0.0],\n [0, -2, 2, -2, 1, -2, 0.0, 1, 0.0],\n [-2, 0, 0, 0, 1, -2, 0.0, 1, 0.0],\n [1, 1, 2, 0, 2, 2, 0.0, -1, 0.0],\n [-1, 0, 2, -2, 1, -2, 0.0, 1, 0.0],\n [2, 0, 0, 0, 1, 2, 0.0,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, 0.0, 0, 0.0],\n [1, 0, -2, -2, 0, -1, 0.0, 0, 0.0],\n [0, -1, 2, 0, 1, -1, 0.0, 0, 0.0],\n [1, 1, 0, -2, 1, -1, 0.0, 0, 0.0],\n [1, 0, -2, 2, 0, -1, 0.0, 0, 0.0],\n [2, 0, 0, 2, 0, 1, 0.0, 0, 0.0],\n [0, 0, 2, 4, 2, -1, 0.0, 0, 0.0],\n [0, 1, 0, 1, 0, 1, 0.0, 0, 0.0],\n];\n","export const DEG = Math.PI / 180;\nexport const RAD = 180 / Math.PI;\n","import {cos2, sin2} from './math';\nimport {EARTH_FLATTENING, EARTH_EQUATORIAL_RADIUS_METERS} from '../constants/earth';\nimport {LatLon} from '../types/LocationTypes';\nimport {ASTRONOMICAL_UNIT_IN_METERS} from '../constants/units';\nimport {DEG} from '@app/constants/math';\n\nexport function au2km(R: number): number {\n return R * (ASTRONOMICAL_UNIT_IN_METERS / 1000);\n}\n\nexport function km2au(km: number): number {\n return km / (ASTRONOMICAL_UNIT_IN_METERS / 1000);\n}\n\nexport function getDistanceInKm(location1: LatLon, location2: LatLon): number {\n const {lat: lat1, lon: lon1} = location1;\n const {lat: lat2, lon: lon2} = location2;\n\n // Meeus 11\n const F = (lat1 + lat2) / 2;\n const G = (lat1 - lat2) / 2;\n const lambda = (lon2 - lon1) / 2;\n\n const FRad = F * DEG;\n const GRad = G * DEG;\n const lambdaRad = lambda * DEG;\n\n const S = sin2(GRad) * cos2(lambdaRad) + cos2(FRad) * sin2(lambdaRad);\n const C = cos2(GRad) * cos2(lambdaRad) + sin2(FRad) * sin2(lambdaRad);\n\n const omegaRad = Math.atan(Math.sqrt(S / C));\n\n const R = Math.sqrt(S * C) / omegaRad;\n const D = 2 * omegaRad * EARTH_EQUATORIAL_RADIUS_METERS / 1000;\n const H1 = (3 * R - 1) / (2 * C);\n const H2 = (3 * R + 1) / (2 * S);\n\n return D * (1 + EARTH_FLATTENING * H1 * sin2(FRad) * cos2(GRad) - EARTH_FLATTENING * H2 * cos2(FRad) * sin2(GRad));\n}\n","import {Location as LocationType} from '../types/LocationTypes';\nimport {decimal2degreeMinutes, decimal2degreeMinutesSeconds} from '@app/utils/angle';\nimport {getDistanceInKm} from '@app/utils/distance';\n\nexport default class Location {\n private readonly location: LocationType;\n\n private prefixesNorthSouth = {positivePrefix: 'N ', negativePrefix: 'S '};\n\n private prefixesEastWest = {positivePrefix: 'E ', negativePrefix: 'W '};\n\n public constructor(\n public readonly lat: number,\n public readonly lon: number,\n public readonly elevation: number = 0,\n ) {\n this.location = {lat, lon, elevation};\n }\n\n public static create(lat: number, lon: number, elevation = 0): Location {\n return new Location(lat, lon, elevation);\n }\n\n public getLatitude(): number {\n return this.location.lat;\n }\n\n public getLongitude(): number {\n return this.location.lon;\n }\n\n public getLatitudeInDegreeMinutes(): string {\n return decimal2degreeMinutes(this.location.lat, false, this.prefixesNorthSouth);\n }\n\n public getLongitudeInDegreeMinutes(): string {\n return decimal2degreeMinutes(this.location.lon, false, this.prefixesEastWest);\n }\n\n public getLatitudeInDegreeMinutesSeconds(): string {\n return decimal2degreeMinutesSeconds(this.location.lat, false, this.prefixesNorthSouth);\n }\n\n public getLongitudeInDegreeMinutesSeconds(): string {\n return decimal2degreeMinutesSeconds(this.location.lon, false, this.prefixesEastWest);\n }\n\n public getElevation(): number {\n return this.location.elevation;\n }\n\n public getDistanceToInKm(location: Location): number {\n return getDistanceInKm(this.location, location);\n }\n}\n","import {Time} from '../types/TimeTypes';\nimport {round} from '@app/utils/math';\nimport {EPOCH_J2000} from '@app/constants/epoch';\n\nexport function sec2string(sec: number, short = false): string {\n const sign = sec < 0 ? '-' : '';\n sec = Math.abs(sec);\n\n const hour = Math.floor(sec / 3660);\n const min = Math.floor((sec - hour * 3600) / 60);\n const secPart = round(sec - hour * 3600 - min * 60, 2);\n\n if (short && hour === 0.0 && min === 0.0) {\n return sign + secPart + 's';\n }\n\n if (short && hour === 0.0) {\n return sign + min + 'm ' + secPart + 's';\n }\n\n return sign + hour + 'h ' + min + 'm ' + secPart + 's';\n}\n\nexport function time2julianDay(time: Time): number {\n const tmpYear = parseFloat(time.year + '.' + getDayOfYear(time));\n\n let Y;\n let M;\n if (time.month > 2) {\n Y = time.year;\n M = time.month;\n } else {\n Y = time.year - 1;\n M = time.month + 12;\n }\n\n const D = time.day;\n const H = time.hour / 24 + time.min / 1440 + time.sec / 86400;\n\n let A;\n let B;\n if (tmpYear >= 1582.288) { // YYYY-MM-DD >= 1582-10-15\n A = Math.floor(Y / 100);\n B = 2 - A + Math.floor(A / 4);\n } else if (tmpYear <= 1582.277) { // YY-MM-DD <= 1582-10-04\n B = 0;\n } else {\n throw new Error('Date between 1582-10-04 and 1582-10-15 is not defined.');\n }\n\n // Meeus 7.1\n return Math.floor(365.25 * (Y + 4716)) + Math.floor(30.6001 * (M + 1)) + D + H + B - 1524.5;\n}\n\nexport function julianDay2time(jd: number): Time {\n jd = jd + 0.5;\n\n const Z = Math.floor(jd);\n const F = jd - Z;\n\n let A = Z;\n if (Z >= 2299161) {\n const a = Math.floor((Z - 1867216.25) / 36524.25);\n A = Z + 1 + a - Math.floor(a / 4);\n }\n\n const B = A + 1524;\n const C = Math.floor((B - 122.1) / 365.25);\n const D = Math.floor(365.25 * C);\n const E = Math.floor((B - D) / 30.6001);\n\n const dayOnMonth = B - D - Math.floor(30.6001 * E) + F;\n const month = E < 14 ? E - 1 : E - 13;\n const year = month > 2 ? C - 4716 : C - 4715;\n const hour = (dayOnMonth - Math.floor(dayOnMonth)) * 24;\n const min = (hour - Math.floor(hour)) * 60;\n const sec = (min - Math.floor(min)) * 60;\n\n return {\n year: Math.floor(year),\n month: Math.floor(month),\n day: Math.floor(dayOnMonth),\n hour: Math.floor(hour),\n min: Math.floor(min),\n sec: Math.floor(sec),\n };\n}\n\nexport function julianDay2julianDay0(jd: number): number {\n return Math.floor(jd + 0.5) - 0.5;\n}\n\nexport function julianDay2ModifiedJulianDay(jd: number): number {\n return jd - 2400000.5;\n}\n\nexport function julianDay2julianCenturiesJ2000(jd: number): number {\n return (jd - 2451545.0) / 36525.0;\n}\n\nexport function julianCenturiesJ20002julianDay(T: number): number {\n return T * 36525.0 + 2451545.0;\n}\n\nexport function julianDay2julianMillenniaJ2000(jd: number): number {\n const T = julianDay2julianCenturiesJ2000(jd);\n\n return T / 10;\n}\n\nexport function julianMillenniaJ20002julianDay(t: number): number {\n const T = t * 10;\n\n return julianCenturiesJ20002julianDay(T);\n}\n\nexport function dayOfYear2time(year: number, dayOfYear: number): Time {\n // Meeus 7\n const K = isLeapYear(year) ? 1 : 2;\n const month = dayOfYear < 32 ? 1 : Math.floor(9 * (K + dayOfYear) / 275 + 0.98);\n const day = Math.floor(dayOfYear - Math.floor(275 * month / 9) + K * Math.floor((month + 9) / 12) + 30);\n\n const hourFloat = 24 * (dayOfYear - Math.floor(dayOfYear));\n const hour = Math.floor(hourFloat);\n const minFloat = 60 * (hourFloat - hour);\n const min = Math.floor(minFloat);\n const sec = round(60 * (minFloat - min));\n\n return {year, month, day, hour, min, sec};\n}\n\nexport function getDecimalYear(time: Time): number {\n const daysInYear = isLeapYear(time.year) ? 366 : 365;\n const dayOfYear = getDayOfYear(time) - 1\n + time.hour / 24\n + time.min / 1440\n + time.sec / 86400;\n\n return time.year + dayOfYear / daysInYear;\n}\n\nexport function getDayOfYear(time: Time): number {\n const K = isLeapYear(time.year) ? 1 : 2;\n const M = time.month;\n const D = time.day;\n\n // Meeus 7.f\n return Math.floor(275 * M / 9) - K * Math.floor((M + 9) / 12) + D - 30;\n}\n\nexport function getDayOfWeek(time: Time): number {\n const jd = time2julianDay(time);\n\n // Meeus 7.e\n return Math.floor((jd + 1.5) % 7);\n}\n\nexport function isLeapYear(year: number): boolean {\n if (year / 4 !== Math.floor(year / 4)) {\n return false;\n } else if (year / 100 !== Math.floor(year / 100)) {\n return true;\n } else if (year / 400 !== Math.floor(year / 400)) {\n return false;\n } else {\n return true;\n }\n}\n\nexport function shortYear2longYear(shortYearString: string): number {\n const currentDate = new Date(Date.now());\n const currentYear = currentDate.getFullYear();\n const currentYearStr = currentYear.toString();\n\n const currentYearFirstDigitsStr = currentYearStr.substr(0, currentYearStr.length - 2);\n const currentYearFirstDigits = parseInt(currentYearFirstDigitsStr);\n\n const year1Str = currentYearFirstDigits + shortYearString;\n const year1 = parseInt(year1Str);\n const year2Str = (currentYearFirstDigits - 1).toString() + shortYearString;\n const year2 = parseInt(year2Str);\n\n return year1 <= currentYear ? year1 : year2;\n}\n","import {normalizeAngle} from '@app/utils/angle';\nimport {DEG} from '@app/constants/math';\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.4\n const M = 357.5291092\n + 35999.0502909 * T\n - 0.0001536 * Math.pow(T, 2)\n + Math.pow(T, 3) / 2449000;\n\n return normalizeAngle(M);\n}\n\nexport function getTrueAnomaly(T: number): number {\n // Meeus 25.4\n const M = getMeanAnomaly(T);\n const C = getEquationOfCenter(T);\n\n return M + C;\n}\n\nexport function getMeanLongitude(T: number): number {\n const t = T / 10;\n\n // Meeus 28.2\n const L0 = 280.4664567\n + 360007.6982779 * t\n + 0.03042028 * Math.pow(t, 2)\n + Math.pow(t, 3) / 49931\n - Math.pow(t, 4) / 15300\n + Math.pow(t, 5) / 2000000;\n\n return normalizeAngle(L0);\n}\n\nexport function getTrueLongitude(T: number): number {\n // Meeus 25.4\n const L0 = getMeanLongitude(T);\n const C = getEquationOfCenter(T);\n\n return L0 + C;\n}\n\nexport function getApparentLongitude(T: number): number {\n // Meeus 25.5\n const o = getTrueLongitude(T);\n\n const omega = 125.04 - 1934.136 * T;\n const omegaRad = omega * DEG;\n\n return o - 0.00569 - 0.00478 * Math.sin(omegaRad);\n}\n\nexport function getEquationOfCenter(T: number): number {\n const M = getMeanAnomaly(T);\n\n // Meeus 25.4\n let C = (1.914602 - 0.004817 * T - 0.000014 * Math.pow(T, 2)) * Math.sin(M * DEG);\n C += (0.019993 - 0.000101 * T) * Math.sin(2 * M * DEG);\n C += 0.000289 * Math.sin(3 * M * DEG);\n\n return C;\n}\n","import * as earth from '@app/utils/earth';\nimport * as sun from '@app/utils/sun';\nimport {normalizeAngle} from '@app/utils/angle';\nimport {DEG, RAD} from '@app/constants/math';\nimport {km2au} from '@app/utils/distance';\nimport {MOON_ARGUMENTS_B, MOON_ARGUMENTS_LR} from '@app/constants/moon';\n\nexport function getMeanElongation(T: number): number {\n // Meeus 47.2\n const D = 297.8501921\n + 445267.1114034 * T\n - 0.0018819 * Math.pow(T, 2)\n + Math.pow(T, 3) / 545868\n - Math.pow(T, 4) / 113065000;\n\n return normalizeAngle(D);\n}\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.2\n const Mmoon = 134.9633964\n + 477198.8675055 * T\n + 0.0087414 * Math.pow(T, 2)\n + Math.pow(T, 3) / 69699\n - Math.pow(T, 4) / 1471200;\n\n return normalizeAngle(Mmoon);\n}\n\nexport function getArgumentOfLatitude(T: number): number {\n // Meeus 47.5\n const F = 93.2720950\n + 483202.0175233 * T\n - 0.0036539 * Math.pow(T, 2)\n - Math.pow(T, 3) / 352600\n + Math.pow(T, 4) / 86331000;\n\n return normalizeAngle(F);\n}\n\nexport function getMeanLongitude(T: number): number {\n // Meeus 47.1\n const L = 218.3164477\n + 481267.88123421 * T\n - 0.0015786 * Math.pow(T, 2)\n + Math.pow(T, 3) / 538841\n - Math.pow(T, 4) / 65194000;\n\n return normalizeAngle(L);\n}\n\nexport function getMeanLongitudeOfAscendingNode(T: number): number {\n return 125.0445479\n - 1934.1362891 * T\n + 0.0020754 * Math.pow(T, 2)\n + Math.pow(T, 3) / 467441\n - Math.pow(T, 4) / 60616000;\n}\n\nexport function getEquatorialHorizontalParallax(T: number): number {\n const d = getDistanceToEarth(T);\n\n // Meeus 47\n return Math.asin(6378.14 / d) * RAD;\n}\n\nexport function getLongitude(T: number): number {\n const L = getMeanLongitude(T);\n const sumL = _getSumL(T);\n\n return L + sumL / 1000000;\n}\n\nexport function getLatitude(T: number): number {\n const sumB = _getSumB(T);\n\n return sumB / 1000000;\n}\n\nexport function getRadiusVector(T: number): number {\n return km2au(getDistanceToEarth(T));\n}\n\nexport function getDistanceToEarth(T: number): number {\n const sumR = _getSumR(T);\n\n return 385000.56 + sumR / 1000;\n}\n\nfunction _getSumR(T: number): number {\n // Meeus 47.b\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of jupiter\n const E = 1 - 0.002516 * T - 0.0000074 * Math.pow(T, 2);\n\n let sumR = 0;\n MOON_ARGUMENTS_LR.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumR = args[5];\n\n let tmpSumR = Math.cos((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumR = tmpSumR * argSumR * E;\n break;\n case 2:\n case -2:\n tmpSumR = tmpSumR * argSumR * E * E;\n break;\n default:\n tmpSumR = tmpSumR * argSumR;\n break;\n }\n\n sumR += tmpSumR;\n });\n\n return sumR;\n}\n\nfunction _getSumL(T: number): number {\n // Meeus 47.b\n const L = getMeanLongitude(T);\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of venus\n const A1 = 119.75 + 131.849 * T;\n // Action of jupiter\n const A2 = 53.09 + 479264.290 * T;\n const E = 1 - 0.002516 * T - 0.0000074 * Math.pow(T, 2);\n\n let sumL = 3958 * Math.sin(A1 * DEG)\n + 1962 * Math.sin((L - F) * DEG)\n + 318 * Math.sin(A2 * DEG);\n\n MOON_ARGUMENTS_LR.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumL = args[4];\n\n let tmpSumL = Math.sin((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumL = tmpSumL * argSumL * E;\n break;\n case 2:\n case -2:\n tmpSumL = tmpSumL * argSumL * E * E;\n break;\n default:\n tmpSumL = tmpSumL * argSumL;\n break;\n }\n\n sumL += tmpSumL;\n });\n\n return sumL;\n}\n\nfunction _getSumB(T: number): number {\n // Meeus 47.B\n const L = getMeanLongitude(T);\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of venus\n const A1 = 119.75 + 131.849 * T;\n // Action of jupiter\n const A3 = 313.45 + 481266.484 * T;\n const E = 1 - 0.002516 * T - 0.0000074 * Math.pow(T, 2);\n\n let sumB = -2235 * Math.sin(L * DEG)\n + 382 * Math.sin(A3 * DEG)\n + 175 * Math.sin((A1 - F) * DEG)\n + 175 * Math.sin((A1 + F) * DEG)\n + 127 * Math.sin((L - Mmoon) * DEG)\n - 115 * Math.sin((L + Mmoon) * DEG);\n\n MOON_ARGUMENTS_B.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumB = args[4];\n\n let tmpSumB = Math.sin((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumB = tmpSumB * argSumB * E;\n break;\n case 2:\n case -2:\n tmpSumB = tmpSumB * argSumB * Math.pow(E, 2);\n break;\n default:\n tmpSumB = tmpSumB * argSumB;\n break;\n }\n\n sumB += tmpSumB;\n });\n\n return sumB;\n}\n\nexport function getOpticalLiberationInLongitude(longitude: number, latitude: number, T: number): number {\n const latRad = latitude * DEG;\n\n const i = 1.54242;\n const iRad = i * DEG;\n\n const phi = earth.getNutationInLongitude(T);\n const F = getArgumentOfLatitude(T);\n const Omega = getMeanLongitudeOfAscendingNode(T);\n\n // Meeus 53.1\n const W = normalizeAngle(longitude - phi - Omega);\n const WRad = W * DEG;\n\n const ARad = Math.atan2(\n Math.sin(WRad) * Math.cos(latRad) * Math.cos(iRad) - Math.sin(latRad) * Math.sin(iRad),\n Math.cos(WRad) * Math.cos(latRad),\n );\n const A = normalizeAngle(ARad * RAD);\n\n return A - F;\n}\n\nexport function getOpticalLiberationInLatitude(longitude: number, latitude: number, T: number): number {\n const latRad = latitude * DEG;\n\n const i = 1.54242;\n const iRad = i * DEG;\n\n const phi = earth.getNutationInLongitude(T);\n const Omega = getMeanLongitudeOfAscendingNode(T);\n\n // Meeus 53.1\n const W = normalizeAngle(longitude - phi - Omega);\n const WRad = W * DEG;\n\n const bRad = Math.asin(\n -1 * Math.sin(WRad) * Math.cos(latRad) * Math.sin(iRad) - Math.sin(latRad) * Math.cos(iRad),\n );\n\n return bRad * RAD;\n}\n","import * as moon from '@app/utils/moon';\nimport * as sun from '@app/utils/sun';\nimport {EARTH_ARGUMENTS_OF_NUTATION} from '@app/constants/earth';\nimport {normalizeAngle} from '@app/utils/angle';\nimport {DEG} from '@app/constants/math';\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.4\n const M = 357.5291092\n + 35999.0502909 * T\n - 0.0001536 * Math.pow(T, 2)\n + Math.pow(T, 3) / 2449000;\n\n return normalizeAngle(M);\n}\n\nexport function getEccentricity(T: number): number {\n // Meeus 25.4\n return 0.016708634\n - 0.000042037 * T\n - 0.0000001267 * Math.pow(T, 2);\n}\n\nexport function getLongitudeOfPerihelionOfOrbit(T: number): number {\n // Meeus 23\n return 102.93735\n + 1.71946 * T\n + 0.00046 * Math.pow(T, 2);\n}\n\nexport function getMeanObliquityOfEcliptic(T: number): number {\n const U = T / 100;\n\n // Meeus 22.3\n const eps0 = 84381.448\n - 4680.93 * U\n - 1.55 * Math.pow(U, 2)\n + 1999.25 * Math.pow(U, 3)\n - 51.38 * Math.pow(U, 4)\n - 249.67 * Math.pow(U, 5)\n - 39.05 * Math.pow(U, 6)\n + 7.12 * Math.pow(U, 7)\n + 27.87 * Math.pow(U, 8)\n + 5.79 * Math.pow(U, 9)\n + 2.45 * Math.pow(U, 10);\n\n return eps0 / 3600;\n}\n\nexport function getTrueObliquityOfEcliptic(T: number): number {\n const eps0 = getMeanObliquityOfEcliptic(T);\n const sumEps = getNutationInObliquity(T);\n\n // Meeus chapter 22\n return eps0 + sumEps;\n}\n\nexport function getNutationInLongitude(T: number): number {\n // Meeus chapter 22\n const D = moon.getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = moon.getMeanAnomaly(T);\n const F = moon.getArgumentOfLatitude(T);\n\n // Longitude of the ascending node of moon's mean orbit on ecliptic\n const O = 125.04452\n - 1934.136261 * T\n + 0.0020708 * Math.pow(T, 2)\n + Math.pow(T, 3) / 450000;\n\n let sumPhi = 0;\n EARTH_ARGUMENTS_OF_NUTATION.forEach((args) => {\n const argMmoon = args[0]; // Mean anomaly of moon\n const argMsun = args[1]; // Mean anomaly of sun\n const argF = args[2]; // Mean argument of perigee\n const argD = args[3]; // Mean elongation of moon\n const argO = args[4]; // Mean length of ascending knot of moon's orbit\n const argPhi1 = args[5];\n const argPhi2 = args[6];\n\n const tmpSum = argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F + argO * O;\n\n sumPhi += Math.sin(tmpSum * DEG) * (argPhi1 + argPhi2 * T);\n });\n\n return sumPhi * 0.0001 / 3600;\n}\n\nexport function getNutationInObliquity(T: number): number {\n // Meeus chapter 22\n const D = moon.getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = moon.getMeanAnomaly(T);\n const F = moon.getArgumentOfLatitude(T);\n\n // Longitude of the ascending node of moon's mean orbit on ecliptic\n const O = 125.04452\n - 1934.136261 * T\n + 0.0020708 * Math.pow(T, 2)\n + Math.pow(T, 3) / 450000;\n\n let sumEps = 0;\n EARTH_ARGUMENTS_OF_NUTATION.forEach((args) => {\n const argMmoon = args[0]; // Mean anomaly of moon\n const argMsun = args[1]; // Mean anomaly of sun\n const argF = args[2]; // Mean argument of perigee\n const argD = args[3]; // Mean elongation of moon\n const argO = args[4]; // Mean length of ascending knot of moon's orbit\n const argEps1 = args[7];\n const argEps2 = args[8];\n\n const tmpSum = argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F + argO * O;\n\n sumEps += Math.cos(tmpSum * DEG) * (argEps1 + argEps2 * T);\n });\n\n return sumEps * 0.0001 / 3600;\n}\n","import {normalizeAngle} from '@app/utils/angle';\nimport {julianCenturiesJ20002julianDay} from '@package/time/utils/dateTime';\nimport {DEG} from '@app/constants/math';\nimport * as earth from '@app/utils/earth';\n\nexport function getGreenwichMeanSiderealTime(T: number): number {\n const jd = julianCenturiesJ20002julianDay(T);\n\n // Meeus 12.4\n const GMST = 280.46061837\n + 360.98564736629 * (jd - 2451545)\n + 0.000387933 * Math.pow(T, 2)\n + Math.pow(T, 3) / 38710000;\n\n return normalizeAngle(GMST);\n}\n\nexport function getGreenwichApparentSiderealTime(T: number): number {\n const GMST = getGreenwichMeanSiderealTime(T);\n const p = earth.getNutationInLongitude(T);\n const e = earth.getTrueObliquityOfEcliptic(T);\n const eRad = e * DEG;\n\n // Meeus 12\n return GMST + p * Math.cos(eRad);\n}\n\nexport function getLocalMeanSiderealTime(T: number, lon: number): number {\n const GMST = getGreenwichMeanSiderealTime(T);\n\n const LMST = GMST + lon;\n\n return normalizeAngle(LMST);\n}\n\nexport function getLocalApparentSiderealTime(T: number, lon: number): number {\n const GAST = getGreenwichApparentSiderealTime(T);\n\n // Meeus 12\n return GAST + lon;\n}\n\nexport function getLocalHourAngle(T: number, lon: number, rightAscension: number): number {\n const LAST = getLocalApparentSiderealTime(T, lon);\n\n return normalizeAngle(LAST - rightAscension);\n}\n\n","\nexport function getDeltaT(year: number, month = 0): number {\n // https://eclipse.gsfc.nasa.gov/SEcat5/deltatpoly.html\n const y = year + (month - 0.5) / 12;\n\n let t;\n let deltaT = 0;\n\n if (year < -500) {\n t = (y - 1820) / 100;\n deltaT = -20\n + 32 * Math.pow(t, 2);\n }\n\n if (year >= -500 && year < 500) {\n t = y / 100;\n deltaT = 10583.6\n - 1014.41 * t\n + 33.78311 * Math.pow(t, 2)\n - 5.952053 * Math.pow(t, 3)\n - 0.1798452 * Math.pow(t, 4)\n + 0.022174192 * Math.pow(t, 5)\n + 0.0090316521 * Math.pow(t, 6);\n }\n\n if (year >= 500 && year < 1600) {\n t = (y - 1000) / 100;\n deltaT = 1574.2\n - 556.01 * t\n + 71.23472 * Math.pow(t, 2)\n + 0.319781 * Math.pow(t, 3)\n - 0.8503463 * Math.pow(t, 4)\n - 0.005050998 * Math.pow(t, 5)\n + 0.0083572073 * Math.pow(t, 6);\n }\n\n if (year >= 1600 && year < 1700) {\n t = y - 1600;\n deltaT = 120\n - 0.9808 * t\n - 0.01532 * Math.pow(t, 2)\n + Math.pow(t, 3) / 7129;\n }\n\n if (year >= 1700 && year < 1800) {\n t = y - 1700;\n deltaT = 8.83\n + 0.1603 * t\n - 0.0059285 * Math.pow(t, 2)\n + 0.00013336 * Math.pow(t, 3)\n - Math.pow(t, 4) / 1174000;\n }\n\n if (year >= 1800 && year < 1860) {\n t = y - 1800;\n deltaT = 13.72\n - 0.332447 * t\n + 0.0068612 * Math.pow(t, 2)\n + 0.0041116 * Math.pow(t, 3)\n - 0.00037436 * Math.pow(t, 4)\n + 0.0000121272 * Math.pow(t, 5)\n - 0.0000001699 * Math.pow(t, 6)\n + 0.000000000875 * Math.pow(t, 7);\n }\n\n if (year >= 1860 && year < 1900) {\n t = y - 1860;\n\n deltaT = 7.62\n + 0.5737 * t\n - 0.251754 * Math.pow(t, 2)\n + 0.01680668 * Math.pow(t, 3)\n - 0.0004473624 * Math.pow(t, 4)\n + Math.pow(t, 5) / 233174;\n }\n\n if (year >= 1900 && year < 1920) {\n t = y - 1900;\n deltaT = -2.79\n + 1.494119 * t\n - 0.0598939 * Math.pow(t, 2)\n + 0.0061966 * Math.pow(t, 3)\n - 0.000197 * Math.pow(t, 4);\n }\n\n if (year >= 1920 && year < 1941) {\n t = y - 1920;\n deltaT = 21.20\n + 0.84493 * t\n - 0.076100 * Math.pow(t, 2)\n + 0.0020936 * Math.pow(t, 3);\n }\n\n if (year >= 1941 && year < 1961) {\n t = y - 1950;\n deltaT = 29.07\n + 0.407 * t\n - Math.pow(t, 2) / 233\n + Math.pow(t, 3) / 2547;\n }\n\n if (year >= 1961 && year < 1986) {\n t = y - 1975;\n deltaT = 45.45\n + 1.067 * t\n - Math.pow(t, 2) / 260\n - Math.pow(t, 3) / 718;\n }\n\n if (year >= 1986 && year < 2005) {\n t = y - 2000;\n deltaT = 63.86\n + 0.3345 * t\n - 0.060374 * Math.pow(t, 2)\n + 0.0017275 * Math.pow(t, 3)\n + 0.000651814 * Math.pow(t, 4)\n + 0.00002373599 * Math.pow(t, 5);\n }\n\n if (year >= 2005 && year < 2050) {\n t = y - 2000;\n deltaT = 62.92\n + 0.32217 * t\n + 0.005589 * Math.pow(t, 2);\n }\n\n if (year >= 2050) {\n t = (y - 1820) / 100;\n deltaT = -20\n + 32 * Math.pow(t, 2);\n }\n\n return deltaT;\n}\n","import {Time} from '../types/TimeTypes';\nimport {pad} from '@app/utils/math';\nimport {LatLon} from '@app/types/LocationTypes';\nimport {\n dayOfYear2time,\n getDayOfWeek,\n getDayOfYear,\n getDecimalYear,\n isLeapYear,\n julianCenturiesJ20002julianDay,\n julianDay2julianCenturiesJ2000,\n julianDay2julianDay0,\n julianDay2julianMillenniaJ2000,\n julianDay2time,\n time2julianDay\n} from '@package/time/utils/dateTime';\nimport {\n getGreenwichApparentSiderealTime,\n getGreenwichMeanSiderealTime,\n getLocalApparentSiderealTime,\n getLocalMeanSiderealTime,\n} from '@app/utils/siderealTime';\nimport {getDeltaT} from '@package/time/utils/deltaT';\n\nexport default class TimeOfInterest {\n public readonly jd: number = 0.0;\n\n public readonly T: number = 0.0;\n\n public constructor(public readonly time: Time) {\n this.jd = time2julianDay(time);\n this.T = julianDay2julianCenturiesJ2000(this.jd);\n }\n\n public static fromCurrentTime(): TimeOfInterest {\n const date = new Date(Date.now());\n\n return new TimeOfInterest({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n min: date.getUTCMinutes(),\n sec: date.getUTCSeconds(),\n });\n }\n\n public static fromTime(\n year: number,\n month: number,\n day: number,\n hour = 0,\n min = 0,\n sec = 0,\n ): TimeOfInterest {\n return new TimeOfInterest({year, month, day, hour, min, sec});\n }\n\n public static fromDate(date: Date): TimeOfInterest {\n return new TimeOfInterest({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n min: date.getUTCMinutes(),\n sec: date.getUTCSeconds(),\n });\n }\n\n public static fromYearOfDay(year: number, dayOfYear: number): TimeOfInterest {\n const time = dayOfYear2time(year, dayOfYear);\n\n return new TimeOfInterest(time);\n }\n\n public static fromJulianDay(jd: number): TimeOfInterest {\n const time = julianDay2time(jd);\n\n return new TimeOfInterest(time);\n }\n\n public static fromJulianCenturiesJ2000(T: number): TimeOfInterest {\n const jd = julianCenturiesJ20002julianDay(T);\n const time = julianDay2time(jd);\n\n return new TimeOfInterest(time);\n }\n\n public getTime(): Time {\n return this.time;\n }\n\n public getString(): string {\n const {year, month, day, hour, min, sec} = this.time;\n\n return `${year}-${pad(month, 2)}-${pad(day, 2)} ${pad(hour, 2)}:${pad(min, 2)}:${pad(sec, 2)}`;\n }\n\n public getDate(): Date {\n const {year, month, day, hour, min, sec} = this.time;\n\n return new Date(Date.UTC(year, month - 1, day, hour, min, sec));\n }\n\n public getDecimalYear(): number {\n return getDecimalYear(this.time);\n }\n\n public getDayOfYear(): number {\n return getDayOfYear(this.time);\n }\n\n public getDayOfWeek(): number {\n return getDayOfWeek(this.time);\n }\n\n public isLeapYear(): boolean {\n return isLeapYear(this.time.year);\n }\n\n public getJulianDay(): number {\n return this.jd;\n }\n\n public getJulianDay0(): number {\n return julianDay2julianDay0(this.jd);\n }\n\n public getJulianCenturiesJ2000(): number {\n return this.T;\n }\n\n public getJulianMillenniaJ2000(): number {\n return julianDay2julianMillenniaJ2000(this.jd);\n }\n\n public getGreenwichMeanSiderealTime(): number {\n return getGreenwichMeanSiderealTime(this.T);\n }\n\n public getGreenwichApparentSiderealTime(): number {\n return getGreenwichApparentSiderealTime(this.T);\n }\n\n public getLocalMeanSiderealTime(location: LatLon): number {\n return getLocalMeanSiderealTime(this.T, location.lon);\n }\n\n public getLocalApparentSiderealTime(location: LatLon): number {\n return getLocalApparentSiderealTime(this.T, location.lon);\n }\n\n public getDeltaT(): number {\n const {year, month} = this.time;\n\n return getDeltaT(year, month);\n }\n}\n"],"mappings":"AAAO,SAASA,EAAMC,EAAeC,EAAW,EAAW,CACvD,IAAMC,EAAI,KAAK,IAAI,GAAID,CAAQ,EAE/B,OAAO,KAAK,MAAMD,EAAQE,CAAC,EAAIA,CACnC,CAEO,SAASC,EAAIC,EAAsBC,EAAsB,CAC5D,IAAIC,EAASF,EAAI,SAAS,EAE1B,KAAOE,EAAO,OAASD,GACnBC,EAAS,IAAMA,EAGnB,OAAOA,CACX,CAEO,SAASC,EAAKC,EAAwB,CACzC,OAAO,KAAK,IAAIA,CAAM,EAAI,KAAK,IAAIA,CAAM,CAC7C,CAEO,SAASC,EAAKD,EAAwB,CACzC,OAAO,KAAK,IAAIA,CAAM,EAAI,KAAK,IAAIA,CAAM,CAC7C,CCNO,SAASE,EACZC,EACAC,EAAQ,GACRC,EACM,CACN,IAAMC,EAAOC,EAAcJ,EAASE,CAAQ,EAE5CF,EAAU,KAAK,IAAIA,CAAO,EAE1B,IAAMK,EAAU,KAAK,MAAML,CAAO,EAC5BM,EAAMC,GAAOP,EAAUK,GAAW,GAAI,CAAC,EAEvCG,EAAYH,EAAU,QACtBI,EAAYC,EAAIJ,EAAK,CAAC,EAAI,IAEhC,OAAIL,GAASI,IAAY,EACdF,EAAOM,EAGXN,EAAOK,EAAYC,CAC9B,CAEO,SAASE,EACZX,EACAC,EAAQ,GACRC,EACM,CACN,IAAM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C,EAA+B,KAAK,EAAE,CACjD,CAEO,8BAAuC,CAC1C,OAAOC,EAA6B,KAAK,CAAC,CAC9C,CAEO,kCAA2C,CAC9C,OAAOC,EAAiC,KAAK,CAAC,CAClD,CAEO,yBAAyBC,EAA0B,CACtD,OAAOC,EAAyB,KAAK,EAAGD,EAAS,GAAG,CACxD,CAEO,6BAA6BA,EAA0B,CAC1D,OAAOE,EAA6B,KAAK,EAAGF,EAAS,GAAG,CAC5D,CAEO,WAAoB,CACvB,GAAM,CAAC,KAAArB,EAAM,MAAAC,CAAK,EAAI,KAAK,KAE3B,OAAOuB,EAAUxB,EAAMC,CAAK,CAChC,CACJ","names":["round","value","decimals","p","pad","num","size","numStr","sin2","number","cos2","decimal2degreeMinutes","decimal","short","prefixes","sign","getSignPrefix","degPart","min","round","degString","minString","pad","decimal2degreeMinutesSeconds","sec","secParts","secString","normalizeAngle","degrees","baseAngle","angle","getSignPrefix","decimal","prefixes","EARTH_AXIS_RATIO","EARTH_FLATTENING","EARTH_ROTATION_DEG_PER_HOUR","EARTH_ARGUMENTS_OF_NUTATION","DEG","RAD","getDistanceInKm","location1","location2","lat1","lon1","lat2","lon2","F","G","lambda","FRad","DEG","GRad","lambdaRad","S","sin2","cos2","C","omegaRad","R","D","H1","H2","EARTH_FLATTENING","Location","_Location","lat","lon","elevation","decimal2degreeMinutes","decimal2degreeMinutesSeconds","location","getDistanceInKm","time2julianDay","time","tmpYear","getDayOfYear","Y","M","D","H","A","B","julianDay2time","jd","Z","F","a","C","E","dayOnMonth","month","year","hour","min","sec","julianDay2julianDay0","julianDay2julianCenturiesJ2000","jd","julianCenturiesJ20002julianDay","T","julianDay2julianMillenniaJ2000","dayOfYear2time","year","dayOfYear","K","isLeapYear","month","day","hourFloat","hour","minFloat","min","sec","round","getDecimalYear","time","daysInYear","getDayOfYear","M","D","getDayOfWeek","jd","time2julianDay","getMeanAnomaly","T","M","normalizeAngle","getMeanElongation","T","D","normalizeAngle","getMeanAnomaly","Mmoon","getArgumentOfLatitude","F","getMeanObliquityOfEcliptic","T","U","getTrueObliquityOfEcliptic","eps0","sumEps","getNutationInObliquity","getNutationInLongitude","D","getMeanElongation","Msun","getMeanAnomaly","Mmoon","F","getArgumentOfLatitude","O","sumPhi","EARTH_ARGUMENTS_OF_NUTATION","args","argMmoon","argMsun","argF","argD","argO","argPhi1","argPhi2","tmpSum","DEG","argEps1","argEps2","getGreenwichMeanSiderealTime","T","GMST","julianCenturiesJ20002julianDay","normalizeAngle","getGreenwichApparentSiderealTime","p","getNutationInLongitude","eRad","getTrueObliquityOfEcliptic","DEG","getLocalMeanSiderealTime","lon","LMST","getLocalApparentSiderealTime","getDeltaT","year","month","y","t","deltaT","TimeOfInterest","_TimeOfInterest","time","time2julianDay","julianDay2julianCenturiesJ2000","date","year","month","day","hour","min","sec","dayOfYear","dayOfYear2time","jd","julianDay2time","T","julianCenturiesJ20002julianDay","pad","getDecimalYear","getDayOfYear","getDayOfWeek","isLeapYear","julianDay2julianDay0","julianDay2julianMillenniaJ2000","getGreenwichMeanSiderealTime","getGreenwichApparentSiderealTime","location","getLocalMeanSiderealTime","getLocalApparentSiderealTime","getDeltaT"]}
1
+ {"version":3,"sources":["../../../app/utils/math.ts","../../../app/utils/angle.ts","../../../app/constants/math.ts","../../../app/constants/earth.ts","../../../app/utils/distance.ts","../../location/models/Location.ts","../../../app/utils/sun.ts","../../../app/utils/moon.ts","../../../app/utils/earth.ts","../../time/utils/dateTime.ts","../../../app/utils/siderealTime.ts","../../time/utils/deltaT.ts","../../time/models/TimeOfInterest.ts"],"sourcesContent":["export function round(value: number, decimals = 0): number {\n const p = 10 ** decimals;\n\n return Math.round(value * p) / p;\n}\n\nexport function pad(num: number | string, size: number): string {\n let numStr = num.toString();\n\n while (numStr.length < size) {\n numStr = `0${numStr}`;\n }\n\n return numStr;\n}\n\nexport function sin2(number: number): number {\n return Math.sin(number) * Math.sin(number);\n}\n\nexport function cos2(number: number): number {\n return Math.cos(number) * Math.cos(number);\n}\n","import {pad, round} from './math';\n\nexport type AnglePrefixes = {\n positivePrefix: string;\n negativePrefix: string;\n};\n\n/**\n * @deprecated use decimal2degreeMinutesSeconds instead\n * @param deg\n * @param short\n */\nexport function deg2angle(deg: number, short = false): string {\n return decimal2degreeMinutesSeconds(deg, short);\n}\n\nexport function decimal2degreeMinutes(decimal: number, short = false, prefixes?: AnglePrefixes): string {\n const sign = getSignPrefix(decimal, prefixes);\n\n decimal = Math.abs(decimal);\n\n const degPart = Math.floor(decimal);\n const min = round((decimal - degPart) * 60, 5);\n\n const degString = `${degPart}° `;\n const minString = `${pad(min, 2)}'`;\n\n if (short && degPart === 0.0) {\n return sign + minString;\n }\n\n return sign + degString + minString;\n}\n\nexport function decimal2degreeMinutesSeconds(decimal: number, short = false, prefixes?: AnglePrefixes): string {\n const sign = getSignPrefix(decimal, prefixes);\n\n decimal = Math.abs(decimal);\n\n const degPart = Math.floor(decimal);\n const min = Math.floor((decimal - degPart) * 60);\n const sec = round((decimal - degPart - min / 60) * 3600, 3);\n const secParts = sec.toString().split('.');\n\n const degString = `${degPart}° `;\n const minString = `${pad(min, 2)}' `;\n const secString = `${secParts.length === 1 ? pad(sec, 2) : `${pad(secParts[0], 2)}.${secParts[1]}`}\"`;\n\n if (short && degPart === 0.0 && min === 0.0) {\n return sign + secString;\n }\n\n if (short && degPart === 0.0) {\n return sign + minString + secString;\n }\n\n return sign + degString + minString + secString;\n}\n\nexport function angle2deg(angle: string): number {\n const matches = angle.match(/(-?)(\\d+)°.*?(\\d+)'.*?([\\d.]+)\"/);\n\n if (!matches) {\n throw new Error('false angle format');\n }\n\n const sign = matches[1].trim() === '-' ? -1 : 1;\n const deg = parseInt(matches[2], 10);\n const min = parseInt(matches[3], 10);\n const sec = parseFloat(matches[4]);\n\n return sign * (deg + min / 60 + sec / 3600);\n}\n\nexport function deg2time(angle: number): string {\n const sign = angle < 0 ? '-' : '';\n const time = Math.abs(angle / 15);\n\n const hour = Math.floor(time);\n const min = Math.floor((time - hour) * 60);\n const sec = round((time - hour - min / 60) * 3600, 3);\n const secParts = sec.toString().split('.');\n\n const hourString = sign + hour;\n const minString = pad(min, 2);\n const secString = secParts.length === 1 ? pad(sec, 2) : `${pad(secParts[0], 2)}.${secParts[1]}`;\n\n return `${hourString}h ${minString}m ${secString}s`;\n}\n\nexport function time2deg(timeAngle: string): number {\n const matches = timeAngle.match(/(-?)(\\d+)h.*?(\\d+)m.*?([\\d.]+)s/);\n\n if (!matches) {\n throw new Error('false time angle format');\n }\n\n const sign = matches[1].trim() === '-' ? -1 : 1;\n const deg = parseInt(matches[2], 10);\n const min = parseInt(matches[3], 10);\n const sec = parseFloat(matches[4]);\n\n const angleDeg = sign * (deg + min / 60 + sec / 3600);\n\n return angleDeg * 15;\n}\n\nexport function normalizeAngle(degrees: number, baseAngle = 360.0): number {\n let angle = degrees % baseAngle;\n\n if (angle < 0) {\n angle = angle + baseAngle;\n }\n\n return angle;\n}\n\nexport function sec2deg(seconds: number): number {\n return seconds / 3600;\n}\n\nfunction getSignPrefix(decimal: number, prefixes?: AnglePrefixes): string {\n if (prefixes) {\n return decimal < 0 ? prefixes.negativePrefix : prefixes.positivePrefix;\n }\n\n return decimal < 0 ? '-' : '';\n}\n","export const DEG = Math.PI / 180;\nexport const RAD = 180 / Math.PI;\n","export const EARTH_EQUATORIAL_RADIUS_METERS = 6_378_137;\nexport const EARTH_EQUATORIAL_RADIUS_KM = EARTH_EQUATORIAL_RADIUS_METERS / 1000;\nexport const EARTH_AXIS_RATIO = 0.996647189335;\nexport const EARTH_FLATTENING = 1 - EARTH_AXIS_RATIO;\nexport const EARTH_ROTATION_DEG_PER_HOUR = 1.002738 * 15;\n\nexport const EARTH_ARGUMENTS_OF_NUTATION = [\n [0, 0, 0, 0, 1, -171996, -174.2, 92025, 8.9],\n [0, 0, 2, -2, 2, -13187, -1.6, 5736, -3.1],\n [0, 0, 2, 0, 2, -2274, -0.2, 977, -0.5],\n [0, 0, 0, 0, 2, 2062, 0.2, -895, 0.5],\n [0, 1, 0, 0, 0, 1426, -3.4, 54, -0.1],\n [1, 0, 0, 0, 0, 712, 0.1, -7, 0.0],\n [0, 1, 2, -2, 2, -517, 1.2, 224, -0.6],\n [0, 0, 2, 0, 1, -386, -0.4, 200, 0.0],\n [1, 0, 2, 0, 2, -301, 0.0, 129, -0.1],\n [0, -1, 2, -2, 2, 217, -0.5, -95, 0.3],\n [1, 0, 0, -2, 0, -158, 0.0, -1, 0.0],\n [0, 0, 2, -2, 1, 129, 0.1, -70, 0.0],\n [-1, 0, 2, 0, 2, 123, 0.0, -53, 0.0],\n [0, 0, 0, 2, 0, 63, 0.0, -2, 0.0],\n [1, 0, 0, 0, 1, 63, 0.1, -33, 0.0],\n [-1, 0, 2, 2, 2, -59, 0.0, 26, 0.0],\n [-1, 0, 0, 0, 1, -58, -0.1, 32, 0.0],\n [1, 0, 2, 0, 1, -51, 0.0, 27, 0.0],\n [2, 0, 0, -2, 0, 48, 0.0, 1, 0.0],\n [-2, 0, 2, 0, 1, 46, 0.0, -24, 0.0],\n [0, 0, 2, 2, 2, -38, 0.0, 16, 0.0],\n [2, 0, 2, 0, 2, -31, 0.0, 13, 0.0],\n [2, 0, 0, 0, 0, 29, 0.0, -1, 0.0],\n [1, 0, 2, -2, 2, 29, 0.0, -12, 0.0],\n [0, 0, 2, 0, 0, 26, 0.0, -1, 0.0],\n [0, 0, 2, -2, 0, -22, 0.0, 0, 0.0],\n [-1, 0, 2, 0, 1, 21, 0.0, -10, 0.0],\n [0, 2, 0, 0, 0, 17, -0.1, 0, 0.0],\n [0, 2, 2, -2, 2, -16, 0.1, 7, 0.0],\n [-1, 0, 0, 2, 1, 16, 0.0, -8, 0.0],\n [0, 1, 0, 0, 1, -15, 0.0, 9, 0.0],\n [1, 0, 0, -2, 1, -13, 0.0, 7, 0.0],\n [0, -1, 0, 0, 1, -12, 0.0, 6, 0.0],\n [2, 0, -2, 0, 0, 11, 0.0, 0, 0.0],\n [-1, 0, 2, 2, 1, -10, 0.0, 5, 0.0],\n [1, 0, 2, 2, 2, -8, 0.0, 3, 0.0],\n [1, 1, 0, -2, 0, -7, 0.0, 0, 0.0],\n [0, 1, 2, 0, 2, 7, 0.0, -3, 0.0],\n [0, -1, 2, 0, 2, -7, 0.0, 3, 0.0],\n [0, 0, 2, 2, 1, -7, 0.0, 3, 0.0],\n [-2, 0, 0, 2, 1, -6, 0.0, 3, 0.0],\n [1, 0, 0, 2, 0, 6, 0.0, 0, 0.0],\n [2, 0, 2, -2, 2, 6, 0.0, -3, 0.0],\n [0, 0, 0, 2, 1, -6, 0.0, 3, 0.0],\n [1, 0, 2, -2, 1, 6, 0.0, -3, 0.0],\n [0, -1, 2, -2, 1, -5, 0.0, 3, 0.0],\n [0, 0, 0, -2, 1, -5, 0.0, 3, 0.0],\n [1, -1, 0, 0, 0, 5, 0.0, 0, 0.0],\n [2, 0, 2, 0, 1, -5, 0.0, 3, 0.0],\n [2, 0, 0, -2, 1, 4, 0.0, -2, 0.0],\n [0, 1, 2, -2, 1, 4, 0.0, -2, 0.0],\n [1, 0, 0, -1, 0, -4, 0.0, 0, 0.0],\n [0, 1, 0, -2, 0, -4, 0.0, 0, 0.0],\n [1, 0, -2, 0, 0, 4, 0.0, 0, 0.0],\n [0, 0, 0, 1, 0, -4, 0.0, 0, 0.0],\n [-2, 0, 2, 0, 2, -3, 0.0, 1, 0.0],\n [1, -1, 0, -1, 0, -3, 0.0, 0, 0.0],\n [1, 1, 0, 0, 0, -3, 0.0, 0, 0.0],\n [1, 0, 2, 0, 0, 3, 0.0, 0, 0.0],\n [1, -1, 2, 0, 2, -3, 0.0, 1, 0.0],\n [-1, -1, 2, 2, 2, -3, 0.0, 1, 0.0],\n [3, 0, 2, 0, 2, -3, 0.0, 1, 0.0],\n [0, -1, 2, 2, 2, -3, 0.0, 1, 0.0],\n [0, -2, 2, -2, 1, -2, 0.0, 1, 0.0],\n [-2, 0, 0, 0, 1, -2, 0.0, 1, 0.0],\n [1, 1, 2, 0, 2, 2, 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 1, -1, 0.0, 0, 0.0],\n [0, 0, 2, -1, 2, -1, 0.0, 0, 0.0],\n [0, 1, 0, 2, 0, -1, 0.0, 0, 0.0],\n [1, 0, -2, -2, 0, -1, 0.0, 0, 0.0],\n [0, -1, 2, 0, 1, -1, 0.0, 0, 0.0],\n [1, 1, 0, -2, 1, -1, 0.0, 0, 0.0],\n [1, 0, -2, 2, 0, -1, 0.0, 0, 0.0],\n [2, 0, 0, 2, 0, 1, 0.0, 0, 0.0],\n [0, 0, 2, 4, 2, -1, 0.0, 0, 0.0],\n [0, 1, 0, 1, 0, 1, 0.0, 0, 0.0],\n];\n","import {DEG} from '@app/constants/math';\nimport {EARTH_EQUATORIAL_RADIUS_METERS, EARTH_FLATTENING} from '../constants/earth';\nimport {ASTRONOMICAL_UNIT_IN_METERS} from '../constants/units';\nimport type {LatLon} from '../types/LocationTypes';\nimport {cos2, sin2} from './math';\n\nexport function au2km(R: number): number {\n return R * (ASTRONOMICAL_UNIT_IN_METERS / 1000);\n}\n\nexport function km2au(km: number): number {\n return km / (ASTRONOMICAL_UNIT_IN_METERS / 1000);\n}\n\nexport function getDistanceInKm(location1: LatLon, location2: LatLon): number {\n const {lat: lat1, lon: lon1} = location1;\n const {lat: lat2, lon: lon2} = location2;\n\n // Meeus 11\n const F = (lat1 + lat2) / 2;\n const G = (lat1 - lat2) / 2;\n const lambda = (lon2 - lon1) / 2;\n\n const FRad = F * DEG;\n const GRad = G * DEG;\n const lambdaRad = lambda * DEG;\n\n const S = sin2(GRad) * cos2(lambdaRad) + cos2(FRad) * sin2(lambdaRad);\n const C = cos2(GRad) * cos2(lambdaRad) + sin2(FRad) * sin2(lambdaRad);\n\n const omegaRad = Math.atan(Math.sqrt(S / C));\n\n const R = Math.sqrt(S * C) / omegaRad;\n const D = (2 * omegaRad * EARTH_EQUATORIAL_RADIUS_METERS) / 1000;\n const H1 = (3 * R - 1) / (2 * C);\n const H2 = (3 * R + 1) / (2 * S);\n\n return D * (1 + EARTH_FLATTENING * H1 * sin2(FRad) * cos2(GRad) - EARTH_FLATTENING * H2 * cos2(FRad) * sin2(GRad));\n}\n","import {decimal2degreeMinutes, decimal2degreeMinutesSeconds} from '@app/utils/angle';\nimport {getDistanceInKm} from '@app/utils/distance';\nimport type {Location as LocationType} from '../types/LocationTypes';\n\nexport default class Location {\n private readonly location: LocationType;\n\n private prefixesNorthSouth = {positivePrefix: 'N ', negativePrefix: 'S '};\n\n private prefixesEastWest = {positivePrefix: 'E ', negativePrefix: 'W '};\n\n public constructor(\n public readonly lat: number,\n public readonly lon: number,\n public readonly elevation: number = 0,\n ) {\n this.location = {lat, lon, elevation};\n }\n\n public static create(lat: number, lon: number, elevation = 0): Location {\n return new Location(lat, lon, elevation);\n }\n\n public getLatitude(): number {\n return this.location.lat;\n }\n\n public getLongitude(): number {\n return this.location.lon;\n }\n\n public getLatitudeInDegreeMinutes(): string {\n return decimal2degreeMinutes(this.location.lat, false, this.prefixesNorthSouth);\n }\n\n public getLongitudeInDegreeMinutes(): string {\n return decimal2degreeMinutes(this.location.lon, false, this.prefixesEastWest);\n }\n\n public getLatitudeInDegreeMinutesSeconds(): string {\n return decimal2degreeMinutesSeconds(this.location.lat, false, this.prefixesNorthSouth);\n }\n\n public getLongitudeInDegreeMinutesSeconds(): string {\n return decimal2degreeMinutesSeconds(this.location.lon, false, this.prefixesEastWest);\n }\n\n public getElevation(): number {\n return this.location.elevation;\n }\n\n public getDistanceToInKm(location: Location): number {\n return getDistanceInKm(this.location, location);\n }\n}\n","import {DEG} from '@app/constants/math';\nimport {normalizeAngle} from '@app/utils/angle';\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.4\n const M = 357.5291092 + 35999.0502909 * T - 0.0001536 * T ** 2 + T ** 3 / 2449000;\n\n return normalizeAngle(M);\n}\n\nexport function getTrueAnomaly(T: number): number {\n // Meeus 25.4\n const M = getMeanAnomaly(T);\n const C = getEquationOfCenter(T);\n\n return M + C;\n}\n\nexport function getMeanLongitude(T: number): number {\n const t = T / 10;\n\n // Meeus 28.2\n const L0 =\n 280.4664567 + 360007.6982779 * t + 0.03042028 * t ** 2 + t ** 3 / 49931 - t ** 4 / 15300 + t ** 5 / 2000000;\n\n return normalizeAngle(L0);\n}\n\nexport function getTrueLongitude(T: number): number {\n // Meeus 25.4\n const L0 = getMeanLongitude(T);\n const C = getEquationOfCenter(T);\n\n return L0 + C;\n}\n\nexport function getApparentLongitude(T: number): number {\n // Meeus 25.5\n const o = getTrueLongitude(T);\n\n const omega = 125.04 - 1934.136 * T;\n const omegaRad = omega * DEG;\n\n return o - 0.00569 - 0.00478 * Math.sin(omegaRad);\n}\n\nexport function getEquationOfCenter(T: number): number {\n const M = getMeanAnomaly(T);\n\n // Meeus 25.4\n let C = (1.914602 - 0.004817 * T - 0.000014 * T ** 2) * Math.sin(M * DEG);\n C += (0.019993 - 0.000101 * T) * Math.sin(2 * M * DEG);\n C += 0.000289 * Math.sin(3 * M * DEG);\n\n return C;\n}\n","import {DEG, RAD} from '@app/constants/math';\nimport {MOON_ARGUMENTS_B, MOON_ARGUMENTS_LR} from '@app/constants/moon';\nimport {normalizeAngle} from '@app/utils/angle';\nimport {km2au} from '@app/utils/distance';\nimport * as earth from '@app/utils/earth';\nimport * as sun from '@app/utils/sun';\n\nexport function getMeanElongation(T: number): number {\n // Meeus 47.2\n const D = 297.8501921 + 445267.1114034 * T - 0.0018819 * T ** 2 + T ** 3 / 545868 - T ** 4 / 113065000;\n\n return normalizeAngle(D);\n}\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.2\n const Mmoon = 134.9633964 + 477198.8675055 * T + 0.0087414 * T ** 2 + T ** 3 / 69699 - T ** 4 / 1471200;\n\n return normalizeAngle(Mmoon);\n}\n\nexport function getArgumentOfLatitude(T: number): number {\n // Meeus 47.5\n const F = 93.272095 + 483202.0175233 * T - 0.0036539 * T ** 2 - T ** 3 / 352600 + T ** 4 / 86331000;\n\n return normalizeAngle(F);\n}\n\nexport function getMeanLongitude(T: number): number {\n // Meeus 47.1\n const L = 218.3164477 + 481267.88123421 * T - 0.0015786 * T ** 2 + T ** 3 / 538841 - T ** 4 / 65194000;\n\n return normalizeAngle(L);\n}\n\nexport function getMeanLongitudeOfAscendingNode(T: number): number {\n return 125.0445479 - 1934.1362891 * T + 0.0020754 * T ** 2 + T ** 3 / 467441 - T ** 4 / 60616000;\n}\n\nexport function getEquatorialHorizontalParallax(T: number): number {\n const d = getDistanceToEarth(T);\n\n // Meeus 47\n return Math.asin(6378.14 / d) * RAD;\n}\n\nexport function getLongitude(T: number): number {\n const L = getMeanLongitude(T);\n const sumL = _getSumL(T);\n\n return L + sumL / 1000000;\n}\n\nexport function getLatitude(T: number): number {\n const sumB = _getSumB(T);\n\n return sumB / 1000000;\n}\n\nexport function getRadiusVector(T: number): number {\n return km2au(getDistanceToEarth(T));\n}\n\nexport function getDistanceToEarth(T: number): number {\n const sumR = _getSumR(T);\n\n return 385000.56 + sumR / 1000;\n}\n\nfunction _getSumR(T: number): number {\n // Meeus 47.b\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of jupiter\n const E = 1 - 0.002516 * T - 0.0000074 * T ** 2;\n\n let sumR = 0;\n MOON_ARGUMENTS_LR.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumR = args[5];\n\n let tmpSumR = Math.cos((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumR = tmpSumR * argSumR * E;\n break;\n case 2:\n case -2:\n tmpSumR = tmpSumR * argSumR * E * E;\n break;\n default:\n tmpSumR = tmpSumR * argSumR;\n break;\n }\n\n sumR += tmpSumR;\n });\n\n return sumR;\n}\n\nfunction _getSumL(T: number): number {\n // Meeus 47.b\n const L = getMeanLongitude(T);\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of venus\n const A1 = 119.75 + 131.849 * T;\n // Action of jupiter\n const A2 = 53.09 + 479264.29 * T;\n const E = 1 - 0.002516 * T - 0.0000074 * T ** 2;\n\n let sumL = 3958 * Math.sin(A1 * DEG) + 1962 * Math.sin((L - F) * DEG) + 318 * Math.sin(A2 * DEG);\n\n MOON_ARGUMENTS_LR.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumL = args[4];\n\n let tmpSumL = Math.sin((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumL = tmpSumL * argSumL * E;\n break;\n case 2:\n case -2:\n tmpSumL = tmpSumL * argSumL * E * E;\n break;\n default:\n tmpSumL = tmpSumL * argSumL;\n break;\n }\n\n sumL += tmpSumL;\n });\n\n return sumL;\n}\n\nfunction _getSumB(T: number): number {\n // Meeus 47.B\n const L = getMeanLongitude(T);\n const D = getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = getMeanAnomaly(T);\n const F = getArgumentOfLatitude(T);\n\n // Action of venus\n const A1 = 119.75 + 131.849 * T;\n // Action of jupiter\n const A3 = 313.45 + 481266.484 * T;\n const E = 1 - 0.002516 * T - 0.0000074 * T ** 2;\n\n let sumB =\n -2235 * Math.sin(L * DEG)\n + 382 * Math.sin(A3 * DEG)\n + 175 * Math.sin((A1 - F) * DEG)\n + 175 * Math.sin((A1 + F) * DEG)\n + 127 * Math.sin((L - Mmoon) * DEG)\n - 115 * Math.sin((L + Mmoon) * DEG);\n\n MOON_ARGUMENTS_B.forEach((args: Array<number>) => {\n const argD = args[0];\n const argMsun = args[1];\n const argMmoon = args[2];\n const argF = args[3];\n const argSumB = args[4];\n\n let tmpSumB = Math.sin((argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F) * DEG);\n\n switch (argMsun) {\n case 1:\n case -1:\n tmpSumB = tmpSumB * argSumB * E;\n break;\n case 2:\n case -2:\n tmpSumB = tmpSumB * argSumB * E ** 2;\n break;\n default:\n tmpSumB = tmpSumB * argSumB;\n break;\n }\n\n sumB += tmpSumB;\n });\n\n return sumB;\n}\n\nexport function getOpticalLiberationInLongitude(longitude: number, latitude: number, T: number): number {\n const latRad = latitude * DEG;\n\n const i = 1.54242;\n const iRad = i * DEG;\n\n const phi = earth.getNutationInLongitude(T);\n const F = getArgumentOfLatitude(T);\n const Omega = getMeanLongitudeOfAscendingNode(T);\n\n // Meeus 53.1\n const W = normalizeAngle(longitude - phi - Omega);\n const WRad = W * DEG;\n\n const ARad = Math.atan2(\n Math.sin(WRad) * Math.cos(latRad) * Math.cos(iRad) - Math.sin(latRad) * Math.sin(iRad),\n Math.cos(WRad) * Math.cos(latRad),\n );\n const A = normalizeAngle(ARad * RAD);\n\n return A - F;\n}\n\nexport function getOpticalLiberationInLatitude(longitude: number, latitude: number, T: number): number {\n const latRad = latitude * DEG;\n\n const i = 1.54242;\n const iRad = i * DEG;\n\n const phi = earth.getNutationInLongitude(T);\n const Omega = getMeanLongitudeOfAscendingNode(T);\n\n // Meeus 53.1\n const W = normalizeAngle(longitude - phi - Omega);\n const WRad = W * DEG;\n\n const bRad = Math.asin(-1 * Math.sin(WRad) * Math.cos(latRad) * Math.sin(iRad) - Math.sin(latRad) * Math.cos(iRad));\n\n return bRad * RAD;\n}\n","import {EARTH_ARGUMENTS_OF_NUTATION} from '@app/constants/earth';\nimport {DEG} from '@app/constants/math';\nimport {normalizeAngle} from '@app/utils/angle';\nimport * as moon from '@app/utils/moon';\nimport * as sun from '@app/utils/sun';\n\nexport function getMeanAnomaly(T: number): number {\n // Meeus 47.4\n const M = 357.5291092 + 35999.0502909 * T - 0.0001536 * T ** 2 + T ** 3 / 2449000;\n\n return normalizeAngle(M);\n}\n\nexport function getEccentricity(T: number): number {\n // Meeus 25.4\n return 0.016708634 - 0.000042037 * T - 0.0000001267 * T ** 2;\n}\n\nexport function getLongitudeOfPerihelionOfOrbit(T: number): number {\n // Meeus 23\n return 102.93735 + 1.71946 * T + 0.00046 * T ** 2;\n}\n\nexport function getMeanObliquityOfEcliptic(T: number): number {\n const U = T / 100;\n\n // Meeus 22.3\n const eps0 =\n 84381.448\n - 4680.93 * U\n - 1.55 * U ** 2\n + 1999.25 * U ** 3\n - 51.38 * U ** 4\n - 249.67 * U ** 5\n - 39.05 * U ** 6\n + 7.12 * U ** 7\n + 27.87 * U ** 8\n + 5.79 * U ** 9\n + 2.45 * U ** 10;\n\n return eps0 / 3600;\n}\n\nexport function getTrueObliquityOfEcliptic(T: number): number {\n const eps0 = getMeanObliquityOfEcliptic(T);\n const sumEps = getNutationInObliquity(T);\n\n // Meeus chapter 22\n return eps0 + sumEps;\n}\n\nexport function getNutationInLongitude(T: number): number {\n // Meeus chapter 22\n const D = moon.getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = moon.getMeanAnomaly(T);\n const F = moon.getArgumentOfLatitude(T);\n\n // Longitude of the ascending node of moon's mean orbit on ecliptic\n const O = 125.04452 - 1934.136261 * T + 0.0020708 * T ** 2 + T ** 3 / 450000;\n\n let sumPhi = 0;\n EARTH_ARGUMENTS_OF_NUTATION.forEach((args) => {\n const argMmoon = args[0]; // Mean anomaly of moon\n const argMsun = args[1]; // Mean anomaly of sun\n const argF = args[2]; // Mean argument of perigee\n const argD = args[3]; // Mean elongation of moon\n const argO = args[4]; // Mean length of ascending knot of moon's orbit\n const argPhi1 = args[5];\n const argPhi2 = args[6];\n\n const tmpSum = argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F + argO * O;\n\n sumPhi += Math.sin(tmpSum * DEG) * (argPhi1 + argPhi2 * T);\n });\n\n return (sumPhi * 0.0001) / 3600;\n}\n\nexport function getNutationInObliquity(T: number): number {\n // Meeus chapter 22\n const D = moon.getMeanElongation(T);\n const Msun = sun.getMeanAnomaly(T);\n const Mmoon = moon.getMeanAnomaly(T);\n const F = moon.getArgumentOfLatitude(T);\n\n // Longitude of the ascending node of moon's mean orbit on ecliptic\n const O = 125.04452 - 1934.136261 * T + 0.0020708 * T ** 2 + T ** 3 / 450000;\n\n let sumEps = 0;\n EARTH_ARGUMENTS_OF_NUTATION.forEach((args) => {\n const argMmoon = args[0]; // Mean anomaly of moon\n const argMsun = args[1]; // Mean anomaly of sun\n const argF = args[2]; // Mean argument of perigee\n const argD = args[3]; // Mean elongation of moon\n const argO = args[4]; // Mean length of ascending knot of moon's orbit\n const argEps1 = args[7];\n const argEps2 = args[8];\n\n const tmpSum = argD * D + argMsun * Msun + argMmoon * Mmoon + argF * F + argO * O;\n\n sumEps += Math.cos(tmpSum * DEG) * (argEps1 + argEps2 * T);\n });\n\n return (sumEps * 0.0001) / 3600;\n}\n","import {round} from '@app/utils/math';\nimport type {Time} from '../types/TimeTypes';\n\nexport function sec2string(sec: number, short = false): string {\n const sign = sec < 0 ? '-' : '';\n sec = Math.abs(sec);\n\n const hour = Math.floor(sec / 3660);\n const min = Math.floor((sec - hour * 3600) / 60);\n const secPart = round(sec - hour * 3600 - min * 60, 2);\n\n if (short && hour === 0.0 && min === 0.0) {\n return `${sign + secPart}s`;\n }\n\n if (short && hour === 0.0) {\n return `${sign + min}m ${secPart}s`;\n }\n\n return `${sign + hour}h ${min}m ${secPart}s`;\n}\n\nexport function time2julianDay(time: Time): number {\n const tmpYear = parseFloat(`${time.year}.${getDayOfYear(time)}`);\n\n let Y: number;\n let M: number;\n\n if (time.month > 2) {\n Y = time.year;\n M = time.month;\n } else {\n Y = time.year - 1;\n M = time.month + 12;\n }\n\n const D = time.day;\n const H = time.hour / 24 + time.min / 1440 + time.sec / 86400;\n\n let A: number;\n let B: number;\n\n if (tmpYear >= 1582.288) {\n // YYYY-MM-DD >= 1582-10-15\n A = Math.floor(Y / 100);\n B = 2 - A + Math.floor(A / 4);\n } else if (tmpYear <= 1582.277) {\n // YY-MM-DD <= 1582-10-04\n B = 0;\n } else {\n throw new Error('Date between 1582-10-04 and 1582-10-15 is not defined.');\n }\n\n // Meeus 7.1\n return Math.floor(365.25 * (Y + 4716)) + Math.floor(30.6001 * (M + 1)) + D + H + B - 1524.5;\n}\n\nexport function julianDay2time(jd: number): Time {\n jd = jd + 0.5;\n\n const Z = Math.floor(jd);\n const F = jd - Z;\n\n let A = Z;\n if (Z >= 2299161) {\n const a = Math.floor((Z - 1867216.25) / 36524.25);\n A = Z + 1 + a - Math.floor(a / 4);\n }\n\n const B = A + 1524;\n const C = Math.floor((B - 122.1) / 365.25);\n const D = Math.floor(365.25 * C);\n const E = Math.floor((B - D) / 30.6001);\n\n const dayOnMonth = B - D - Math.floor(30.6001 * E) + F;\n const month = E < 14 ? E - 1 : E - 13;\n const year = month > 2 ? C - 4716 : C - 4715;\n const hour = (dayOnMonth - Math.floor(dayOnMonth)) * 24;\n const min = (hour - Math.floor(hour)) * 60;\n const sec = (min - Math.floor(min)) * 60;\n\n return {\n year: Math.floor(year),\n month: Math.floor(month),\n day: Math.floor(dayOnMonth),\n hour: Math.floor(hour),\n min: Math.floor(min),\n sec: Math.floor(sec),\n };\n}\n\nexport function julianDay2julianDay0(jd: number): number {\n return Math.floor(jd + 0.5) - 0.5;\n}\n\nexport function julianDay2ModifiedJulianDay(jd: number): number {\n return jd - 2400000.5;\n}\n\nexport function julianDay2julianCenturiesJ2000(jd: number): number {\n return (jd - 2451545.0) / 36525.0;\n}\n\nexport function julianCenturiesJ20002julianDay(T: number): number {\n return T * 36525.0 + 2451545.0;\n}\n\nexport function julianDay2julianMillenniaJ2000(jd: number): number {\n const T = julianDay2julianCenturiesJ2000(jd);\n\n return T / 10;\n}\n\nexport function julianMillenniaJ20002julianDay(t: number): number {\n const T = t * 10;\n\n return julianCenturiesJ20002julianDay(T);\n}\n\nexport function dayOfYear2time(year: number, dayOfYear: number): Time {\n // Meeus 7\n const K = isLeapYear(year) ? 1 : 2;\n const month = dayOfYear < 32 ? 1 : Math.floor((9 * (K + dayOfYear)) / 275 + 0.98);\n const day = Math.floor(dayOfYear - Math.floor((275 * month) / 9) + K * Math.floor((month + 9) / 12) + 30);\n\n const hourFloat = 24 * (dayOfYear - Math.floor(dayOfYear));\n const hour = Math.floor(hourFloat);\n const minFloat = 60 * (hourFloat - hour);\n const min = Math.floor(minFloat);\n const sec = round(60 * (minFloat - min));\n\n return {year, month, day, hour, min, sec};\n}\n\nexport function getDecimalYear(time: Time): number {\n const daysInYear = isLeapYear(time.year) ? 366 : 365;\n const dayOfYear = getDayOfYear(time) - 1 + time.hour / 24 + time.min / 1440 + time.sec / 86400;\n\n return time.year + dayOfYear / daysInYear;\n}\n\nexport function getDayOfYear(time: Time): number {\n const K = isLeapYear(time.year) ? 1 : 2;\n const M = time.month;\n const D = time.day;\n\n // Meeus 7.f\n return Math.floor((275 * M) / 9) - K * Math.floor((M + 9) / 12) + D - 30;\n}\n\nexport function getDayOfWeek(time: Time): number {\n const jd = time2julianDay(time);\n\n // Meeus 7.e\n return Math.floor((jd + 1.5) % 7);\n}\n\nexport function isLeapYear(year: number): boolean {\n if (year / 4 !== Math.floor(year / 4)) {\n return false;\n } else if (year / 100 !== Math.floor(year / 100)) {\n return true;\n } else if (year / 400 !== Math.floor(year / 400)) {\n return false;\n } else {\n return true;\n }\n}\n\nexport function shortYear2longYear(shortYearString: string): number {\n const currentDate = new Date(Date.now());\n const currentYear = currentDate.getFullYear();\n const currentYearStr = currentYear.toString();\n\n const currentYearFirstDigitsStr = currentYearStr.substr(0, currentYearStr.length - 2);\n const currentYearFirstDigits = parseInt(currentYearFirstDigitsStr, 10);\n\n const year1Str = currentYearFirstDigits + shortYearString;\n const year1 = parseInt(year1Str, 10);\n const year2Str = (currentYearFirstDigits - 1).toString() + shortYearString;\n const year2 = parseInt(year2Str, 10);\n\n return year1 <= currentYear ? year1 : year2;\n}\n","import {DEG} from '@app/constants/math';\nimport {normalizeAngle} from '@app/utils/angle';\nimport * as earth from '@app/utils/earth';\nimport {julianCenturiesJ20002julianDay} from '@package/time/utils/dateTime';\n\nexport function getGreenwichMeanSiderealTime(T: number): number {\n const jd = julianCenturiesJ20002julianDay(T);\n\n // Meeus 12.4\n const GMST = 280.46061837 + 360.98564736629 * (jd - 2451545) + 0.000387933 * T ** 2 + T ** 3 / 38710000;\n\n return normalizeAngle(GMST);\n}\n\nexport function getGreenwichApparentSiderealTime(T: number): number {\n const GMST = getGreenwichMeanSiderealTime(T);\n const p = earth.getNutationInLongitude(T);\n const e = earth.getTrueObliquityOfEcliptic(T);\n const eRad = e * DEG;\n\n // Meeus 12\n return GMST + p * Math.cos(eRad);\n}\n\nexport function getLocalMeanSiderealTime(T: number, lon: number): number {\n const GMST = getGreenwichMeanSiderealTime(T);\n\n const LMST = GMST + lon;\n\n return normalizeAngle(LMST);\n}\n\nexport function getLocalApparentSiderealTime(T: number, lon: number): number {\n const GAST = getGreenwichApparentSiderealTime(T);\n\n // Meeus 12\n return GAST + lon;\n}\n\nexport function getLocalHourAngle(T: number, lon: number, rightAscension: number): number {\n const LAST = getLocalApparentSiderealTime(T, lon);\n\n return normalizeAngle(LAST - rightAscension);\n}\n","export function getDeltaT(year: number, month = 0): number {\n // https://eclipse.gsfc.nasa.gov/SEcat5/deltatpoly.html\n const y = year + (month - 0.5) / 12;\n\n let t: number;\n let deltaT = 0;\n\n if (year < -500) {\n t = (y - 1820) / 100;\n deltaT = -20 + 32 * t ** 2;\n }\n\n if (year >= -500 && year < 500) {\n t = y / 100;\n deltaT =\n 10583.6\n - 1014.41 * t\n + 33.78311 * t ** 2\n - 5.952053 * t ** 3\n - 0.1798452 * t ** 4\n + 0.022174192 * t ** 5\n + 0.0090316521 * t ** 6;\n }\n\n if (year >= 500 && year < 1600) {\n t = (y - 1000) / 100;\n deltaT =\n 1574.2\n - 556.01 * t\n + 71.23472 * t ** 2\n + 0.319781 * t ** 3\n - 0.8503463 * t ** 4\n - 0.005050998 * t ** 5\n + 0.0083572073 * t ** 6;\n }\n\n if (year >= 1600 && year < 1700) {\n t = y - 1600;\n deltaT = 120 - 0.9808 * t - 0.01532 * t ** 2 + t ** 3 / 7129;\n }\n\n if (year >= 1700 && year < 1800) {\n t = y - 1700;\n deltaT = 8.83 + 0.1603 * t - 0.0059285 * t ** 2 + 0.00013336 * t ** 3 - t ** 4 / 1174000;\n }\n\n if (year >= 1800 && year < 1860) {\n t = y - 1800;\n deltaT =\n 13.72\n - 0.332447 * t\n + 0.0068612 * t ** 2\n + 0.0041116 * t ** 3\n - 0.00037436 * t ** 4\n + 0.0000121272 * t ** 5\n - 0.0000001699 * t ** 6\n + 0.000000000875 * t ** 7;\n }\n\n if (year >= 1860 && year < 1900) {\n t = y - 1860;\n\n deltaT = 7.62 + 0.5737 * t - 0.251754 * t ** 2 + 0.01680668 * t ** 3 - 0.0004473624 * t ** 4 + t ** 5 / 233174;\n }\n\n if (year >= 1900 && year < 1920) {\n t = y - 1900;\n deltaT = -2.79 + 1.494119 * t - 0.0598939 * t ** 2 + 0.0061966 * t ** 3 - 0.000197 * t ** 4;\n }\n\n if (year >= 1920 && year < 1941) {\n t = y - 1920;\n deltaT = 21.2 + 0.84493 * t - 0.0761 * t ** 2 + 0.0020936 * t ** 3;\n }\n\n if (year >= 1941 && year < 1961) {\n t = y - 1950;\n deltaT = 29.07 + 0.407 * t - t ** 2 / 233 + t ** 3 / 2547;\n }\n\n if (year >= 1961 && year < 1986) {\n t = y - 1975;\n deltaT = 45.45 + 1.067 * t - t ** 2 / 260 - t ** 3 / 718;\n }\n\n if (year >= 1986 && year < 2005) {\n t = y - 2000;\n deltaT =\n 63.86 + 0.3345 * t - 0.060374 * t ** 2 + 0.0017275 * t ** 3 + 0.000651814 * t ** 4 + 0.00002373599 * t ** 5;\n }\n\n if (year >= 2005 && year < 2050) {\n t = y - 2000;\n deltaT = 62.92 + 0.32217 * t + 0.005589 * t ** 2;\n }\n\n if (year >= 2050) {\n t = (y - 1820) / 100;\n deltaT = -20 + 32 * t ** 2;\n }\n\n return deltaT;\n}\n","import type {LatLon} from '@app/types/LocationTypes';\nimport {pad} from '@app/utils/math';\nimport {\n getGreenwichApparentSiderealTime,\n getGreenwichMeanSiderealTime,\n getLocalApparentSiderealTime,\n getLocalMeanSiderealTime,\n} from '@app/utils/siderealTime';\nimport {\n dayOfYear2time,\n getDayOfWeek,\n getDayOfYear,\n getDecimalYear,\n isLeapYear,\n julianCenturiesJ20002julianDay,\n julianDay2julianCenturiesJ2000,\n julianDay2julianDay0,\n julianDay2julianMillenniaJ2000,\n julianDay2time,\n time2julianDay,\n} from '@package/time/utils/dateTime';\nimport {getDeltaT} from '@package/time/utils/deltaT';\nimport type {Time} from '../types/TimeTypes';\n\nexport default class TimeOfInterest {\n public readonly jd: number = 0.0;\n\n public readonly T: number = 0.0;\n\n public constructor(public readonly time: Time) {\n this.jd = time2julianDay(time);\n this.T = julianDay2julianCenturiesJ2000(this.jd);\n }\n\n public static fromCurrentTime(): TimeOfInterest {\n const date = new Date(Date.now());\n\n return new TimeOfInterest({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n min: date.getUTCMinutes(),\n sec: date.getUTCSeconds(),\n });\n }\n\n public static fromTime(year: number, month: number, day: number, hour = 0, min = 0, sec = 0): TimeOfInterest {\n return new TimeOfInterest({year, month, day, hour, min, sec});\n }\n\n public static fromDate(date: Date): TimeOfInterest {\n return new TimeOfInterest({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n min: date.getUTCMinutes(),\n sec: date.getUTCSeconds(),\n });\n }\n\n public static fromYearOfDay(year: number, dayOfYear: number): TimeOfInterest {\n const time = dayOfYear2time(year, dayOfYear);\n\n return new TimeOfInterest(time);\n }\n\n public static fromJulianDay(jd: number): TimeOfInterest {\n const time = julianDay2time(jd);\n\n return new TimeOfInterest(time);\n }\n\n public static fromJulianCenturiesJ2000(T: number): TimeOfInterest {\n const jd = julianCenturiesJ20002julianDay(T);\n const time = julianDay2time(jd);\n\n return new TimeOfInterest(time);\n }\n\n public getTime(): Time {\n return this.time;\n }\n\n public getString(): string {\n const {year, month, day, hour, min, sec} = this.time;\n\n return `${year}-${pad(month, 2)}-${pad(day, 2)} ${pad(hour, 2)}:${pad(min, 2)}:${pad(sec, 2)}`;\n }\n\n public getDate(): Date {\n const {year, month, day, hour, min, sec} = this.time;\n\n return new Date(Date.UTC(year, month - 1, day, hour, min, sec));\n }\n\n public getDecimalYear(): number {\n return getDecimalYear(this.time);\n }\n\n public getDayOfYear(): number {\n return getDayOfYear(this.time);\n }\n\n public getDayOfWeek(): number {\n return getDayOfWeek(this.time);\n }\n\n public isLeapYear(): boolean {\n return isLeapYear(this.time.year);\n }\n\n public getJulianDay(): number {\n return this.jd;\n }\n\n public getJulianDay0(): number {\n return julianDay2julianDay0(this.jd);\n }\n\n public getJulianCenturiesJ2000(): number {\n return this.T;\n }\n\n public getJulianMillenniaJ2000(): number {\n return julianDay2julianMillenniaJ2000(this.jd);\n }\n\n public getGreenwichMeanSiderealTime(): number {\n return getGreenwichMeanSiderealTime(this.T);\n }\n\n public getGreenwichApparentSiderealTime(): number {\n return getGreenwichApparentSiderealTime(this.T);\n }\n\n public getLocalMeanSiderealTime(location: LatLon): number {\n return getLocalMeanSiderealTime(this.T, location.lon);\n }\n\n public getLocalApparentSiderealTime(location: LatLon): number {\n return getLocalApparentSiderealTime(this.T, location.lon);\n }\n\n public getDeltaT(): number {\n const {year, month} = this.time;\n\n return getDeltaT(year, month);\n }\n}\n"],"mappings":"AAAO,SAASA,EAAMC,EAAeC,EAAW,EAAW,CACvD,IAAMC,EAAI,IAAMD,EAEhB,OAAO,KAAK,MAAMD,EAAQE,CAAC,EAAIA,CACnC,CAEO,SAASC,EAAIC,EAAsBC,EAAsB,CAC5D,IAAIC,EAASF,EAAI,SAAS,EAE1B,KAAOE,EAAO,OAASD,GACnBC,EAAS,IAAIA,CAAM,GAGvB,OAAOA,CACX,CAEO,S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AAM,CAAC,CAAC,IAAIS,EAAIR,EAAK,CAAC,CAAC,IAAIQ,EAAIP,EAAK,CAAC,CAAC,EAChG,CAEO,SAAgB,CACnB,GAAM,CAAC,KAAAL,EAAM,MAAAC,EAAO,IAAAC,EAAK,KAAAC,EAAM,IAAAC,EAAK,IAAAC,CAAG,EAAI,KAAK,KAEhD,OAAO,IAAI,KAAK,KAAK,IAAIL,EAAMC,EAAQ,EAAGC,EAAKC,EAAMC,EAAKC,CAAG,CAAC,CAClE,CAEO,gBAAyB,CAC5B,OAAOQ,EAAe,KAAK,IAAI,CACnC,CAEO,cAAuB,CAC1B,OAAOC,EAAa,KAAK,IAAI,CACjC,CAEO,cAAuB,CAC1B,OAAOC,EAAa,KAAK,IAAI,CACjC,CAEO,YAAsB,CACzB,OAAOC,EAAW,KAAK,KAAK,IAAI,CACpC,CAEO,cAAuB,CAC1B,OAAO,KAAK,EAChB,CAEO,eAAwB,CAC3B,OAAOC,EAAqB,KAAK,EAAE,CACvC,CAEO,yBAAkC,CACrC,OAAO,KAAK,CAChB,CAEO,yBAAkC,CACrC,OAAOC,EAA+B,KAAK,EAAE,CACjD,CAEO,8BAAuC,CAC1C,OAAOC,EAA6B,KAAK,CAAC,CAC9C,CAEO,kCAA2C,CAC9C,OAAOC,EAAiC,KAAK,CAAC,CAClD,CAEO,yBAAyBC,EAA0B,CACtD,OAAOC,EAAyB,KAAK,EAAGD,EAAS,GAAG,CACxD,CAEO,6BAA6BA,EAA0B,CAC1D,OAAOE,EAA6B,KAAK,EAAGF,EAAS,GAAG,CAC5D,CAEO,WAAoB,CACvB,GAAM,CAAC,KAAArB,EAAM,MAAAC,CAAK,EAAI,KAAK,KAE3B,OAAOuB,EAAUxB,EAAMC,CAAK,CAChC,CACJ","names":["round","value","decimals","p","pad","num","size","numStr","sin2","number","cos2","decimal2degreeMinutes","decimal","short","prefixes","sign","getSignPrefix","degPart","min","round","degString","minString","pad","decimal2degreeMinutesSeconds","sec","secParts","secString","normalizeAngle","degrees","baseAngle","angle","getSignPrefix","decimal","prefixes","DEG","RAD","EARTH_AXIS_RATIO","EARTH_FLATTENING","EARTH_ROTATION_DEG_PER_HOUR","EARTH_ARGUMENTS_OF_NUTATION","getDistanceInKm","location1","location2","lat1","lon1","lat2","lon2","F","G","lambda","FRad","DEG","GRad","lambdaRad","S","sin2","cos2","C","omegaRad","R","D","H1","H2","EARTH_FLATTENING","Location","_Location","lat","lon","elevation","decimal2degreeMinutes","decimal2degreeMinutesSeconds","location","getDistanceInKm","getMeanAnomaly","T","M","normalizeAngle","getMeanElongation","T","D","normalizeAngle","getMeanAnomaly","Mmoon","getArgumentOfLatitude","F","getMeanObliquityOfEcliptic","T","U","getTrueObliquityOfEcliptic","eps0","sumEps","getNutationInObliquity","getNutationInLongitude","D","getMeanElongation","Msun","getMeanAnomaly","Mmoon","F","getArgumentOfLatitude","O","sumPhi","EARTH_ARGUMENTS_OF_NUTATION","args","argMmoon","argMsun","argF","argD","argO","argPhi1","argPhi2","tmpSum","DEG","argEps1","argEps2","time2julianDay","time","tmpYear","getDayOfYear","Y","M","D","H","A","B","julianDay2time","jd","Z","F","a","C","E","dayOnMonth","month","year","hour","min","sec","julianDay2julianDay0","julianDay2julianCenturiesJ2000","jd","julianCenturiesJ20002julianDay","T","julianDay2julianMillenniaJ2000","dayOfYear2time","year","dayOfYear","K","isLeapYear","month","day","hourFloat","hour","minFloat","min","sec","round","getDecimalYear","time","daysInYear","getDayOfYear","M","D","getDayOfWeek","jd","time2julianDay","getGreenwichMeanSiderealTime","T","GMST","julianCenturiesJ20002julianDay","normalizeAngle","getGreenwichApparentSiderealTime","p","getNutationInLongitude","eRad","getTrueObliquityOfEcliptic","DEG","getLocalMeanSiderealTime","lon","LMST","getLocalApparentSiderealTime","getDeltaT","year","month","y","t","deltaT","TimeOfInterest","_TimeOfInterest","time","time2julianDay","julianDay2julianCenturiesJ2000","date","year","month","day","hour","min","sec","dayOfYear","dayOfYear2time","jd","julianDay2time","T","julianCenturiesJ20002julianDay","pad","getDecimalYear","getDayOfYear","getDayOfWeek","isLeapYear","julianDay2julianDay0","julianDay2julianMillenniaJ2000","getGreenwichMeanSiderealTime","getGreenwichApparentSiderealTime","location","getLocalMeanSiderealTime","getLocalApparentSiderealTime","getDeltaT"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astronomy-bundle/core",
3
- "version": "8.0.1",
3
+ "version": "9.0.0",
4
4
  "description": "Core astronomy bundle",
5
5
  "keywords": [
6
6
  "astronomy",
@@ -31,6 +31,11 @@
31
31
  "license": "MIT",
32
32
  "main": "./index.js",
33
33
  "types": "./index.d.ts",
34
+ "standard-version": {
35
+ "skip": {
36
+ "changelog": true
37
+ }
38
+ },
34
39
  "module": "./index.mjs",
35
40
  "exports": {
36
41
  ".": {