I found this understandable once I went through it with the debugger. A person can get caught up in the geometry of it. This comes at it with strings. I changed the events to my locality and then switched the location to a point somewhere in bliako's neighborhood:
{
"name" => "Current Moon in the 'Ho",
"date" => "2021-10-09",
"time" => "01:00:00",
"timezone" => "America/Boise",
},
{
"name" => "Scylla and Charybdis",
"date" => "2021-10-09",
"time" => "01:00:00",
"location" => {lon=>38.245833, lat=>15.6325},
},
Current Moon in the 'Ho on 2021-10-09T01:00:00 (1633762800 seconds uni
+x-epoch) timezone: America/Boise
Moon age: 3.16929659167535 days
Moon phase: 10.7 % of cycle (birth-to-death)
Moon's illuminated fraction: 10.9 % of full disc
important moon phases around the event:
New Moon = Wed Oct 6 05:05:44 2021
First quarter = Tue Oct 12 21:27:35 2021
Full moon = Wed Oct 20 08:57:41 2021
Last quarter = Thu Oct 28 14:06:44 2021
New Moon = Thu Nov 4 15:15:26 2021
end event.
Scylla and Charybdis on 2021-10-09T01:00:00 (1633730400 seconds unix-e
+poch) timezone: Africa/Nairobi (lat: 15.6325, lon: 38.245833)
Moon age: 2.74601783357238 days
Moon phase: 9.3 % of cycle (birth-to-death)
Moon's illuminated fraction: 8.3 % of full disc
important moon phases around the event:
New Moon = Wed Oct 6 05:05:44 2021
First quarter = Tue Oct 12 21:27:35 2021
Full moon = Wed Oct 20 08:57:41 2021
Last quarter = Thu Oct 28 14:06:44 2021
New Moon = Thu Nov 4 15:15:26 2021
end event.
These data seem plausible. I don't know why I needed Geo::Location::TimeZone to get this done and also Math::Polygon, but it works as advertised.
In starting this I was not aware that Moon phase for a specific time is more-or-less the same for anywhere on the surface of our planet, irrespective of standpoint. With the caveat that our antipodean fellows will see it, well ... , antipodeanly.
Yeah, so if you freeze time, we all see the same moon, barring obstructions like walls, trees, mountains, clouds, or the earth itself. If you wonder what it was like for someone at one a.m. at the antipode, the answer will differ as the above. The comparison of phase to fraction illuminated is also interesting.
Fun stuff. Thanks for posting.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.