From 9524157914004da41f59babfeff75fbef1e688cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Foellmi?= Date: Wed, 24 Apr 2024 13:43:21 +0200 Subject: [PATCH] Fixing last Moon issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: CeĢdric Foellmi --- src/earth/moon/details.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/earth/moon/details.ts b/src/earth/moon/details.ts index 52685a6..92e1b52 100644 --- a/src/earth/moon/details.ts +++ b/src/earth/moon/details.ts @@ -40,7 +40,7 @@ export function getPhaseAngle (jd: JulianDay): Degree { const Delta: Kilometer = getRadiusVectorInKilometer(jd) // kilometer!!! // Distance Earth-Sun const R: Kilometer = getEarthRadiusVector(jd) * ONE_UA_IN_KILOMETERS - return Math.atan2(R * Math.sin(psi), Delta - (R * Math.cos(psi))) * RAD2DEG + return Math.atan2(R * Math.sin(psi), Delta - R * Math.cos(psi)) * RAD2DEG } /** @@ -77,7 +77,7 @@ export function getPositionAngleOfTheBrightLimb (jd: JulianDay): Degree { */ export function getIlluminatedFraction (jd: JulianDay): number { const phaseAngle = getPhaseAngle(jd) * DEG2RAD - return 1 + Math.cos(phaseAngle) / 2 + return (1 + Math.cos(phaseAngle)) / 2 } /**