CNEOT - Estimate the Equation of Time
Description: Estimates the Equation of Time (EoT) for a given day of the year.
Inputs:
| Year | Year |
| Month | Month of the year (1-12) |
| Day | Day of the month (1-31) |
| Hour | Hour of the day (0-23) |
Outputs:
| EoT | The estimated equation of time using a simple formula |
| EoT2 | A more accurate estimated equation of time using Astronomical Algorithms |
Sample execution:
Year? 2024 Month(1-12)? 5 Day(1-31)? 14 Hour(0-23)? 12 EoT: 3m 41s EoT2: 3m 39s
(For explanation of notation, conventions etc, see python-programs).
Copyright (C) 2024 Ian Staniforth
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
https://www.gnu.org/licenses/.
# CNEOT - Calculate Equation of Time (EoT) for a given date
from math import *
from CN_LIB import *
year = int(input("Year? "))
month = int(input("Month(1-12)? "))
day = int(input("Day(1-31)? "))
hour = stot("Hour(0-23)? ")
x = hour/24
# Simple estimate
EoT = eot(year,month,day+x) # see CN_LIB
# Astronomical Algorithms estimate
EoT2 = eot2(year,month,day+x) # see CN_LIB
print(EoT)
print(EoT2)
print("")
print("EoT: "+ttosm(EoT))
print("EoT2: "+ttosm(EoT2))