Astro

screenshot of Astro

Astronomical functions in Elixir focused on sun, moon and calendrical calculations

Overview

AstroHex is an innovative library designed to simplify astronomical calculations, particularly for those interested in solar, lunar, and lunisolar calendars. This tool is invaluable for enthusiasts of the Chinese, Hebrew, and Persian calendars, providing a robust set of features to ensure accurate celestial event tracking. From determining sunrise and sunset times to tracking lunar phases, AstroHex equips users with the necessary functions to navigate the cosmos effectively.

The library is built with usability in mind, allowing users to specify locations easily and retrieve data tailored to specific geographical coordinates. Whether you're an amateur astronomer, a calendar enthusiast, or simply curious about the celestial movements, AstroHex offers a straightforward way to integrate astronomy into your daily life.

Features

  • Solar Functions: Access essential solar events like sunrise, sunset, solstices, equinoxes, and hours of daylight easily with designated Astro functions.

  • Lunar Functions: Track the moon’s position, illuminated fraction, and new moon dates, offering comprehensive insights into lunar phases.

  • Location Specification: Specify geographical locations using tuples of latitude and longitude or even elevation to ensure accurate astronomical event calculations.

  • Time Zone Integration: The library supports time zone conversions, requiring installation of a time zone database like tzdata or tz to operate efficiently.

  • Testing Accuracy: AstroHex's calculations are rigorously tested to yield results within one minute of trusted online resources, ensuring high precision.

  • Optional Enhancements: Enhance functionality by optionally configuring the tz_world library, which offers detailed geojson data for accurate event timing in various locales.

  • Ease of Installation: Astro can be easily added to projects as a dependency, simplifying integration without overwhelming setup requirements.

  • Rich References: The library includes thoughtful references to canonical texts and online resources, enriching users' understanding of the subject matter.