@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.
14 lines (13 loc) • 833 B
JavaScript
import { g as m } from "./epoch-nmyjNjKp.js";
import { c as o, e as t } from "./utilities-BM-rBPno.js";
const p = (e, s) => {
const c = (m(e) - 2451545) / 36525, a = (2306.2181 * c + 0.30188 * c ** 2 + 0.017998 * c ** 3) / 3600, i = (2306.2181 * c + 1.09468 * c ** 2 + 0.018203 * c ** 3) / 3600, n = (2004.3109 * c - 0.42665 * c ** 2 - 0.041833 * c ** 3) / 3600, h = Math.cos(o(s.dec)) * Math.sin(o(s.ra + a)), M = Math.cos(o(n)) * Math.cos(o(s.dec)) * Math.cos(o(s.ra + a)) - Math.sin(o(n)) * Math.sin(o(s.dec)), r = Math.sin(o(n)) * Math.cos(o(s.dec)) * Math.cos(o(s.ra + a)) + Math.cos(o(n)) * Math.sin(o(s.dec)), d = t(Math.atan2(h, M)) + i, D = t(Math.asin(r));
return {
ra: d - s.ra,
dec: D - s.dec
};
};
export {
p as getCorrectionToEquatorialForPrecessionOfEquinoxes
};
//# sourceMappingURL=precession.js.map