Sundog · Atlas math binding

Phase 3 Test Harness

Assertion-style tests of the phase3 namespace exported from public/js/parhelion-geometry.mjs. The tests pin the altitude-bound formulas — parhelion offset, CZA visibility cutoff, altitude-derived parhelic curvature — to reference altitudes from the multi-photo calibration pass. Failing rows surface as red and mean the altitude bindings have drifted from what the calibration evidence recorded.

running…

parhelion / dagger offset

phase3.daggerOffset(h) = R₂₂ / cos(h). Validated across 0°–60°; the formula is the load-bearing claim of the inverse-inference theorem anchor.
h (°)expected (px)actual (px)|Δ|verdict

CZA visibility

phase3.czaVisible(h) = (h ≤ 32°). Atmospheric-optics rule: the circumzenithal arc exits the visible hemisphere when the sun rises above ~32°.
h (°)expectedactualverdict

parhelic curvature (altitude-derived)

phase3.parhelicCurvature(h) preserves the 25° Phase 2 calibration at c=0.05, then grows for high-sun displays; checked at key altitudes.
h (°)expectedactual|Δ|verdict

structural invariants

Whole-model relationships that must hold regardless of altitude — checked for one-off regressions.
invariantverdict