Jump to content

Equinox (astronomical) seasons


Recommended Posts

function j2g(julian)
    return math.floor(((julian - 2440587.5) * 86400) + 0.5)
end

local year = os.date("*t").year
local year = (year - 2000) / 1000.0

-- March-equinox (Beginning of the astronomical spring):
local jda = 2451623.80984 + 365242.37404 * year + 0.05169 * (year ^ 2) - 0.00411 * (year ^ 3) - 0.00057 * (year ^ 4)
print("Spring", os.date("%x", j2g(jda)))

-- June-solstice (Beginning of the astronomical summer):
local jda = 2451716.56767 + 365241.62603 * year + 0.00325 * (year ^ 2) + 0.00888 * (year ^ 3) - 0.00030 * (year ^ 4)
print("Summer", os.date("%x", j2g(jda)))

--September-equinox (Beginning of the astronomical autumn)
local jda = 2451810.21715 + 365242.01767 * year - 0.11575 * (year ^ 2) + 0.00337 * (year ^ 3) + 0.00078 * (year ^ 4)
print("Autumn", os.date("%x", j2g(jda)))

-- December-solstice (Beginning of the astronomical winter):
local jda = 2451900.05952 + 365242.74049 * year - 0.06223 * (year ^ 2) - 0.00823 * (year ^ 3) + 0.00032 * (year ^ 4)
print("Winter", os.date("%x", j2g(jda)))

 

Зображення

 

  • Like 1
  • Thanks 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...