Simple Calculation of Sunset Time required
On Feb 16, 2:30*pm, "OG" wrote:
"tomcee" wrote in message
...
Given a table of sunset times, such as:
Day # * *Sunset (H:M):
--------- * *----------
1 * * * * * *17:10
2 * * * * * * 17:11
. . .
180 * * * * *20:21
...
365 * * * * *17:10
and plotting this data (of course converting H:M to Decimal hours), we
get a somewhat sinusoidal relationship between the Day and time of
Sunset: *Sunset = f(Day); or more specifically: *Sunset = f(A*sin(k*D-
P) *This of course is not a pure sinusoid. *Observation shows that it
has a significant 2nd harmonic component.
My application is that I have an automation controller that has a
calendar, can do calculations (including trig), but is rather memory
limited. *Thus I would like to calculate time of sunset 'on the fly'
rather than store the data table.
I would like an equation that yields Sunset as a function of day
number. *I would like to keep it simpler than the generic formula
given latitude and longitude. *I would like the formula from the
tabular data.
It appears to have the form:
Sunset = K + A1*sin(k*D-P1) + A2*sin(2*k*D-P2) + ???
Whe
D = Day number
K, A1, A2, k, P1, P2 are constants determined by Long/Lat.
Has anyone determined the basic functions contained within this
'Sunset function'? Given the basic functions, I can then calculate the
constants.
Thanks in advance for your help,
TomCee
What level of accuracy are you looking for ?- Hide quoted text -
- Show quoted text -
OG:
Thanks for asking; I had intended to mention this in my original
post. I would like accuracy to within 5 minutes; preferably biased
towards the negative so that if anything, the lights would turn on
early, rather than late.
Thanks in advance for your help,
TomCee
|