@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.
27 lines (26 loc) • 748 B
JavaScript
import { c } from "./utilities-BM-rBPno.js";
const a = (n, r = 283.15, o = 101325) => {
const { alt: t } = n;
if (t < 0)
return Number.POSITIVE_INFINITY;
const e = o, s = r;
return 1.02 / Math.tan(c(t + 10.3 / (t + 5.11))) / 60 * (e / 101325) * (283.15 / s);
}, u = (n, r = 283.15, o = 101325) => {
const { alt: t, az: e } = n;
if (t < 0)
return n;
const s = a(n, r, o);
return {
alt: t + s,
az: e
};
}, T = (n) => {
const r = Number.POSITIVE_INFINITY, o = c(n.alt), t = Math.tan(o);
return t === 0 ? r : 1 / (Math.sin(o) + 1184e-7 * (1 / t) + 3188e-6 * (1 / t ** 2));
};
export {
T as getAirmass,
u as getCorrectionToHorizontalForRefraction,
a as getRefraction
};
//# sourceMappingURL=refraction.js.map