astronomy-bundle
Version:
Bundle for astronomical calculations such as position of moon, sun and planets, sunrise, sunset or solar eclipses. Most of the calculations are based on Jean Meeus 'Astronomical Algorithms' book and the VSOP87 theory.
18 lines (17 loc) • 832 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.correctProperMotion = void 0;
const epoch_1 = require("../../constants/epoch");
const timeCalc_1 = require("../../time/calculations/timeCalc");
const angleCalc_1 = require("../../utils/angleCalc");
function correctProperMotion(coords, properMotion, jd, startingEpoch = epoch_1.EPOCH_J2000) {
const t = (0, timeCalc_1.getEpochInterval)(jd, startingEpoch) * 100;
const rightAscension = coords.rightAscension + properMotion.rightAscension * t;
const declination = coords.declination + properMotion.declination * t;
return {
rightAscension: (0, angleCalc_1.normalizeAngle)(rightAscension),
declination: declination,
radiusVector: coords.radiusVector,
};
}
exports.correctProperMotion = correctProperMotion;