Required inputs
Sun longitude
Moon longitude
Target phase angle
Frame
Angular tolerance
Ordered execution
Work the protocol
- 1
Calculate both longitudes in one frame.
- 2
Form and normalize Moon minus Sun.
- 3
Compute the signed residual to the target.
- 4
Bracket and refine zero across time.
- 5
Keep eclipses outside this ordinary phase test.
Outputs
- Phase residual
- At-target flag
- Root receipt
Done only when
- Residual recomputes.
- Tolerance is explicit.
- Eclipse eligibility remains a separate workflow.
Fail closed
Refusal conditions
- Sun and Moon use different frames.
- An eclipse is inferred from phase alone.
- A rounded calendar label replaces the angular root.
Recomputable fixture
Calculation receipt
The output and digest are derived from the displayed inputs. The fixture demonstrates the operation, not an astrological prediction.
operation lunation-phase-residual
input.sunLongitudeDegrees 10
input.moonLongitudeDegrees 190
input.targetPhaseDegrees 180
input.toleranceDegrees 0.000001
output.phaseResidualDegrees 0
output.atTargetWithinTolerance true
sha256:d1a0298f454f88c02787dc434fdbde4e26dd24c146ad989e0525c39e290355e8
Uncertainty: The zero residual is exact for the fixture values; event-time uncertainty requires a time-dependent ephemeris solve.