Lunar geometry at a TT Julian Date. Elongation is apparent longitude Moon−Sun [0,360).
Phase angle is Sun–Moon–Earth [0,180], using latitude and both geocentric AU distances;
illumination is (1+cos(phaseAngle))/2. Waxing means elongation <180 degrees.
phase is the nearest principal longitude phase, with boundaries at 45,135,225,315 degrees.
phaseName is one of eight names in 45-degree buckets centred on multiples of 45 degrees.
Lunar geometry at a TT Julian Date. Elongation is apparent longitude Moon−Sun [0,360). Phase angle is Sun–Moon–Earth [0,180], using latitude and both geocentric AU distances; illumination is (1+cos(phaseAngle))/2. Waxing means elongation <180 degrees. phase is the nearest principal longitude phase, with boundaries at 45,135,225,315 degrees. phaseName is one of eight names in 45-degree buckets centred on multiples of 45 degrees.