@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.
3 lines (2 loc) • 695 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./utilities-HBcnbrPA.cjs");function o(i,e){if(i<0)throw new Error("Invalid focal ratio as aperture is negative");if(e<0)throw new Error("Invalid focal ratio as focal length is negative");return`f/${e/i}`}function n(i,e,r){if(i<0)throw new Error("Invalid focal ratio as focal length is negative");if(e<0)throw new Error("Invalid focal ratio as pixel size is negative");if(r.x<0||r.y<0)throw new Error("Invalid focal ratio as resolution is negative");const a=t.convertRadiansToDegrees(e/i);return{x:r.x*a,y:r.y*a}}exports.getFieldOfView=n;exports.getFocalRatio=o;
//# sourceMappingURL=optics.cjs.map