Astro version 2.1.0
Bug Fixes
-
Fix application startup when neither
:tznor:tzdatais configured.Astro.default_options/0now falls back totime_zone_database: nilinstead of raisingCondClauseError. Calls that do not require a time zone database (e.g.time_zone: :utc) now work without any time zone library installed. -
Fix
Astro.Supervisor.start_link/2to gracefully handle the case where:tz_worldis not installed. Previously the supervisor unconditionally referencedTzWorld.Backend.DetsWithIndexCacheand crashed at startup when the optional dependency was missing.
Enhancements
-
Add
Astro.new_visible_crescent/3to predict the visibility of the new crescent moon at a given location on a given date. Three published criteria are supported via themethodargument:-
:odeh(default) — Odeh (2006) empirical criterion based on 737 observations using topocentric ARCV and a Danjon limit of 6.4°. -
:yallop— Yallop (1997) empirical criterion based on 295 observations using geocentric ARCV. -
:schaefer— Schaefer (1988/2000) physics-based model computing the contrast between crescent brightness and twilight sky brightness against the human contrast detection threshold.
-
-
Add
Astro.new_visible_crescent/4accepting atmospheric options for the Schaefer method (:extinctionparameter). -
Add
Astro.Ephemeris.Downloaderwhich automatically downloads the JPL DE440s ephemeris file (~32 MB) from NASA NAIF on first application start and caches it under the user cache directory. The download URL and cache path can be overridden with the:ephemeris_urland:ephemerisapplication environment keys. If the download fails,Astro.Application.start/2now returns a clear error message explaining how to install the file manually.