Merge pull request #96 from accius/Modular-Staging

lots of updates
pull/103/head
accius 2 days ago committed by GitHub
commit 4e92e021e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -130,9 +130,9 @@ export const getMoonPosition = (date) => {
export const getMoonPhase = (date) => {
const JD = date.getTime() / 86400000 + 2440587.5;
const T = (JD - 2451545.0) / 36525;
const D = (297.850 + 445267.1115 * T) % 360; // Mean elongation
// Phase angle (simplified)
const phase = ((D + 180) % 360) / 360;
const D = (297.850 + 445267.1115 * T) % 360; // Mean elongation: 0=new, 180=full
// Normalize to 0-1 range (0=new, 0.5=full)
const phase = (((D % 360) + 360) % 360) / 360;
return phase;
};

Loading…
Cancel
Save

Powered by TurnKey Linux.