<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="331840" data-post-id="331840">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kip" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/120/1440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kip
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ex_cldr Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve just published <a href="https://hex.pm/packages/astro/1.1.0" rel="nofollow">Astro 1.1.0</a> with the following changelog entry. <strong>Please note the breaking change to configuration</strong> (there are no breaking changes to application code).</p>
<h3><a name="p-331840-breaking-change-1" class="anchor" href="#p-331840-breaking-change-1" aria-label="Heading link" rel="nofollow"></a>Breaking Change</h3>
<ul>
<li>
<p><code>:tz_world</code> is no longer a required dependency - it is now an optional dependency. This library is used to resolve a time zone name from a given latitude and longitude. When configured, it becomes the default method of resolving time zone names from a location. However it is no possible to provide alternative implementations for this resolution using the <code>:time_zone_resolver</code> option.</p>
</li>
<li>
<p>To retain the previous behaviour, applications should add <code>{:tz_world, "~&gt; 1.0"}</code> to their dependencies.</p>
</li>
</ul>
<h3><a name="p-331840-enhancements-2" class="anchor" href="#p-331840-enhancements-2" aria-label="Heading link" rel="nofollow"></a>Enhancements</h3>
<ul>
<li>
<p>Adds an option <code>:time_zone_resolver</code> to <code>Astro.sunrise/3</code> and <code>Astro.sunset/3</code> that is a 1-arity function that is invoked to resolve the time zone name from a given latitude and longitude. The default is to use <code>TzWorld.timezone_at/1</code> if <code>TzWorld</code> is configured, otherwise an error is returned.</p>
</li>
<li>
<p>The default time zone database is now detected in the following order:</p>
<ol>
<li>Application.get_env(:elixir, :time_zone_database)</li>
<li>TzData.TimeZoneDatabase if TzData is configured</li>
<li>Tz.TimeZoneDatabase if Tz is configured</li>
</ol>
</li>
</ul>
<p>Thanks to <a class="mention" href="/u/cloud8421" rel="nofollow">@cloud8421</a> for the motivation and encouragement to get this done.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="331840" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/astro-astronomy-calculations-sunrise-sunset-moonrise-moonset-moon-phase-equinox-solstice/27361/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-331840" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="331840"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="384971" data-post-id="384971">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kip" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/120/1440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kip
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ex_cldr Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve just published <a href="https://hex.pm/packages/astro/2.0.0" rel="nofollow">Astro 2.0</a>. Being a new major release there are some breaking changes and some important enhancements. The biggest changes are documented below, see the <a href="https://hexdocs.pm/astro/changelog.html" rel="nofollow">changelog</a> for complete details.</p>
<h2><a name="p-384971-core-algorithm-upgrade-1" class="anchor" href="#p-384971-core-algorithm-upgrade-1" aria-label="Heading link" rel="nofollow"></a>Core Algorithm Upgrade</h2>
<p>The biggest change is a shift from <strong>NOAA/Meeus analytical polynomial series</strong> to <strong>JPL DE440s numerical ephemeris</strong> for sunrise/sunset calculations. <code>Astro.sunrise/3</code> and <code>Astro.sunset/3</code> now use a scan-and-bisect solver with positions computed directly from the JPL DE440s ephemeris file, and bisection tolerance tightened from 1.0s to <strong>0.01s</strong> (sub-second precision).</p>
<h2><a name="p-384971-improved-delta-t-2" class="anchor" href="#p-384971-improved-delta-t-2" aria-label="Heading link" rel="nofollow"></a>Improved Delta-T</h2>
<p>Variable ΔT based on IERS observations (1972–2025) and Meeus polynomials replaces the previous fixed value. This shifts computed times for equinoxes, solstices, and lunar phases by up to ~22 seconds vs 1.x.</p>
<h2><a name="p-384971-new-features-3" class="anchor" href="#p-384971-new-features-3" aria-label="Heading link" rel="nofollow"></a>New Features</h2>
<ul>
<li><strong>Moonrise/moonset</strong>: <code>Astro.moonrise/3</code>, <code>Astro.moonset/3</code>, and <code>Astro.Lunar.MoonRiseSet</code> (fully topocentric, correcting the ~2–3 min RA-parallax error in Meeus Ch.15)</li>
<li><strong><code>Astro.date_time_new_moon_nearest/1</code></strong></li>
<li><strong><code>Astro.Coordinates</code></strong> module for coordinate system conversions</li>
<li><strong><code>Astro.Time.date_from_julian_days/1</code></strong></li>
<li>Improved and more consistent documentation.</li>
</ul>
<h2><a name="p-384971-accuracy-4" class="anchor" href="#p-384971-accuracy-4" aria-label="Heading link" rel="nofollow"></a>Accuracy</h2>
<p>With the new numerical engine, accuracy has improved. The main comparison is with <a href="https://rhodesmill.org/skyfield/" rel="nofollow">Skyfield</a> a well-regarded Astronomy library for Python. Other comparisons are against <a href="https://timeanddate.com" rel="nofollow">timeanddate.com</a> and <a href="https://www.cnmoc.usff.navy.mil/usno/" rel="nofollow">USNO</a>.</p>
<p>A more complete version of the comparison data is <a href="https://hexdocs.pm/astro/rise_and_set_comparisons.html" rel="nofollow">here</a>.</p>
<h3><a name="p-384971-sunrise-sunset-5" class="anchor" href="#p-384971-sunrise-sunset-5" aria-label="Heading link" rel="nofollow"></a>Sunrise / Sunset</h3>
<p>Both Astro and Skyfield use JPL DE440s ephemerides, which explains their near-exact agreement. <a href="http://timeanddate.com" rel="nofollow">timeanddate.com</a> agrees with both to within ±1 minute.</p>
<div class="md-table">
<table>
<thead>
<tr>
<th>Comparison</th>
<th>Max diff</th>
<th>Mean diff</th>
<th>Within ±1 min</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Astro vs Skyfield</strong></td>
<td><strong>7 s</strong></td>
<td><strong>3.8 s</strong></td>
<td>310/310 (100%)</td>
</tr>
<tr>
<td><strong>Astro vs <a href="http://timeanddate.com" rel="nofollow">timeanddate.com</a></strong></td>
<td>61 s</td>
<td>~29 s</td>
<td>308/310 (99.4%)</td>
</tr>
<tr>
<td><strong><a href="http://timeanddate.com" rel="nofollow">timeanddate.com</a> vs Skyfield</strong></td>
<td>61 s</td>
<td>28.5 s</td>
<td>308/310 (99.4%)</td>
</tr>
</tbody>
</table>
</div><h3><a name="p-384971-moonrise-moonset-6" class="anchor" href="#p-384971-moonrise-moonset-6" aria-label="Heading link" rel="nofollow"></a>Moonrise / Moonset</h3>
<p>Both Astro and Skyfield use JPL DE440s ephemerides, which explains their near-exact agreement again. <a href="http://timeanddate.com" rel="nofollow">timeanddate.com</a> agrees with both to within ±1 minute.</p>
<p>The ~16s mean difference against USNO is explained by two factors: USNO uses DE430 (vs the JPL DE440s that Astro uses), and USNO rounds to the nearest minute. Skyfield shows the same ~16s offset against USNO, suggesting this is an ephemeris version difference rather than an<br>
algorithmic error.</p>
<div class="md-table">
<table>
<thead>
<tr>
<th>Comparison</th>
<th>Max diff</th>
<th>Mean diff</th>
<th>Within ±1 min</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Astro vs Skyfield</strong></td>
<td><strong>6 s</strong></td>
<td><strong>2.5 s</strong></td>
<td>240/240 (100%)</td>
</tr>
<tr>
<td><strong>Astro vs USNO</strong></td>
<td>32 s</td>
<td>15.5 s</td>
<td>67/67 (100%)</td>
</tr>
<tr>
<td><strong>Skyfield vs USNO</strong></td>
<td>35 s</td>
<td>15.6 s</td>
<td>67/67 (100%)</td>
</tr>
</tbody>
</table>
</div><h2><a name="p-384971-migration-from-astro-1x-7" class="anchor" href="#p-384971-migration-from-astro-1x-7" aria-label="Heading link" rel="nofollow"></a>Migration from Astro 1.x</h2>
<p>The public API in the <a href="https://hexdocs.pm/astro/Astro.html" rel="nofollow">Astro</a> module is compatible with that in Astro 1.x with any differences being due to the improved numerical engine.  Functions in other modules have changed and are documented in the changelog.</p>
<p>In Astro 2.x, the JPL ephemeris needs to be installed. A new <a href="https://hexdocs.pm/astro/Mix.Tasks.Astro.DownloadEphemeris.html" rel="nofollow">mix astro.download_ephemeris</a> is provided to make this easier.</p>
<h2><a name="p-384971-whats-next-8" class="anchor" href="#p-384971-whats-next-8" aria-label="Heading link" rel="nofollow"></a>What’s next?</h2>
<p>Some of the motivation for this update was to finally deliver moonrise and moonset which are required to support the upcoming implementations of the Islamic <a href="https://webspace.science.uu.nl/~gent0113/islam/ummalqura.htm" rel="nofollow">Umm al-Qura calendar</a> and the <a href="https://en.wikipedia.org/wiki/Hebrew_calendar" rel="nofollow">Hebrew calendar</a>.</p>
<h2><a name="p-384971-feature-requests-and-contributions-9" class="anchor" href="#p-384971-feature-requests-and-contributions-9" aria-label="Heading link" rel="nofollow"></a>Feature requests and contributions</h2>
<p>Astro welcomes feature requests and contributions no matter how big or small. Just head on over to the <a href="https://github.com/kipcole9/astro" rel="nofollow">github repo</a>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="384971" data-batch-url="/posts/batch_likers">
                        7
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/astro-astronomy-calculations-sunrise-sunset-moonrise-moonset-moon-phase-equinox-solstice/27361/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-384971" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="384971"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="392597" data-post-id="392597">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kip" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/120/1440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kip
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ex_cldr Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve published <a href="https://hex.pm/packages/astro/2.5.0" rel="nofollow">Astro version 2.5.0</a>.</p>
<p>The primary goal of this release is to <em>remove the requirement to download the full JPL DE440s ephemeris</em>.</p>
<p>That’s been achieved by vendoring a subset of the JPL ephemeris for the date range 1900 to 2100 which probably meets the requirements of most consumers.  Downloading the full ephemeris automatically opens the range to 1849 to 2150.</p>
<h3><a name="p-392597-enhancements-1" class="anchor" href="#p-392597-enhancements-1" aria-label="Heading link" rel="nofollow"></a>Enhancements</h3>
<ul>
<li>
<p>A compact ephemeris covering 1900 to 2100 now ships with the package, so Astro works immediately after installation with no download step. It is extracted from JPL’s DE440s kernel and yields identical results; <code>mix astro.download_ephemeris</code> remains available for the full 1849 to 2150 range and takes precedence when present.</p>
</li>
<li>
<p><code>mix astro.build_ephemeris</code> builds a compact ephemeris from a JPL DE-series kernel, keeping only the Sun, Moon and Earth segments over a chosen span of years at roughly 42 KB per year. Options include <code>--from</code>, <code>--to</code>, <code>--source</code> and <code>--keep-earth</code>.</p>
</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="392597" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/astro-astronomy-calculations-sunrise-sunset-moonrise-moonset-moon-phase-equinox-solstice/27361/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-392597" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="392597"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>