@observerly/astrometry
Version:
observerly's lightweight, zero-dependency, type safe astrometry library written in Typescript for calculating the position of celestial objects in the sky.
4 lines (3 loc) • 2.15 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./astrometry.cjs"),l=require("./constants.cjs"),C=require("./earth.cjs"),F=require("./epoch-BuLOjzKu.cjs"),R=require("./moon.cjs"),v=require("./sun.cjs"),o=require("./utilities-HBcnbrPA.cjs");// @license Copyright © 2021-2025 observerly
const A=(n,r)=>{const e=o.convertDegreesToRadians(r.ra),t=o.convertDegreesToRadians(r.dec),c=(F.getJulianDate(n)-2451545)/36525,g=R.getLunarMeanEclipticLongitudeOfTheAscendingNode(n),i=v.getSolarMeanGeometricLongitude(n),d=R.getLunarMeanGeometricLongitude(n),T=9.2*Math.cos(o.convertDegreesToRadians(g))+.57*Math.cos(o.convertDegreesToRadians(2*i))+.1*Math.cos(o.convertDegreesToRadians(2*d))-.09*Math.cos(o.convertDegreesToRadians(2*g)),s=o.convertDegreesToRadians(q.getObliquityOfTheEcliptic(n)+T/3600),h=o.convertDegreesToRadians(20.49552/3600),D=C.getEccentricityOfOrbit(n),M=o.convertDegreesToRadians(102.93735+1.71953*c+46e-5*c**2),u=o.convertDegreesToRadians(v.getSolarTrueGeometricLongitude(n)),b=-h*(Math.cos(e)*Math.cos(u)*Math.cos(s)+Math.sin(e)*Math.sin(u)/Math.cos(t))+D*h*(Math.cos(e)*Math.cos(M)*Math.cos(s)+Math.sin(e)*Math.sin(M)/Math.cos(t)),L=-h*(Math.cos(u)*Math.cos(s)*(Math.tan(s)*Math.cos(t)-Math.sin(e)*Math.sin(t))+Math.cos(e)*Math.sin(t)*Math.sin(u))+D*h*(Math.cos(M)*Math.cos(s)*(Math.tan(s)*Math.cos(t)-Math.sin(e)*Math.sin(t))+Math.cos(e)*Math.sin(t)*Math.sin(M));return{ra:o.convertRadiansToDegrees(b),dec:o.convertRadiansToDegrees(L)}},E=(n,r,e)=>{const t=o.convertDegreesToRadians(e.dec),a=o.convertDegreesToRadians(r.latitude),c=q.getHourAngle(n,r.longitude,e.ra),i=7292115e-11*l.EARTH_RADIUS*Math.cos(a),d=i/l.c*(Math.cos(a)*Math.sin(c))/Math.cos(t),T=i/l.c*(Math.sin(a)*Math.cos(t)-Math.cos(a)*Math.sin(t)*Math.cos(c));return{ra:o.convertRadiansToDegrees(d),dec:o.convertRadiansToDegrees(T)}},O=(n,r,e)=>{const t=A(n,e),a=E(n,r,e);return{ra:t.ra+a.ra,dec:t.dec+a.dec}};exports.getCorrectionToEquatorialForAberration=O;exports.getCorrectionToEquatorialForAnnualAberration=A;exports.getCorrectionToEquatorialForDiurnalAberration=E;
//# sourceMappingURL=aberration.cjs.map