Hengefinder: Finding When the Sun Aligns with Your Street
a day ago
- #astronomy
- #software-development
- #geometry
- The project, Hengefinder, was developed to determine when the sun aligns with east-west streets, similar to Manhattanhenge, for any location.
- Three main challenges were tackled: calculating road bearings using spherical geometry, finding the sun's azimuth at sunset with a boundary search, and matching road bearing to sunset azimuth via a two-phase search.
- The corrected approach for road bearing involves scaling longitude by the cosine of latitude to account for Earth's curvature, enabling accurate angle calculation.
- For sunset timing, a binary search was used to find the last moment the sun is above a target altitude, ensuring the sun's disk is fully visible on the horizon.
- A two-phase search (coarse and fine) identifies henge dates by tracking the sun's azimuth curve, avoiding brute-force methods and minimizing API calls.
- The tool includes a website, mobile app (extended by John Pribyl), and an explainer page, with applications beyond Manhattan, such as Amsterdam's Haarlemmertrekvaart canal.
- Henges are geometrically rare but occur globally, often unnoticed, highlighting the interplay between human infrastructure and natural phenomena.