do = 367Y - INT{(7/4)[Y+INT((M+9)/12)]} + INT(275M/9) + D -730531.5 [1]
Here does INT indicate the integer part of the value within the
paranthesis, e.g. INT(3.77) = 3. This formula is valid for the
time interval 1900 March 1 to 2100 February 28.
Then we obtain the number of Julian centuries To from J2000.0 from
To = do / 36525 [2]
h h
So = 6.6974 + 2400.0513 To [3]
The sidereal time SG of the Greenwich meridian
for the universal time tUT is
SG = So + (366.2422 / 365.2422) tUT [4]where 365.2422 is the length of the tropical year in days. We finally obtain the local sidereal time S for the geographical longitude L
S = SG + L [5]
d = do + tUT / 24 [6]where do can be found from relation [1]. The number of centuries T from the reference time is
T = d / 36525 [7]We can now find the Sun's mean longitude Lo and its mean anomaly Mo from
o o
Lo = 280.466 + 36000.770 T [8]
o o
Mo = 357.529 + 35999.050 T [9]
The Sun's equation of center C, which accounts for the
eccentrisity of Earth's orbit around the Sun, is given by
o o o
C = (1.915 - 0.005 T) sin Mo + 0.020 sin 2Mo [10]
We can now find the true ecliptical longitude of the Sun
LS by adding C to Lo, i.e.
LS = Lo + C [11]In order to find the Sun's equatorial coordinates, right ascension RS and declination DS, we need to know the value of K, the obliquity of the ecliptic
o o
K = 23.439 - 0.013 T [12]
The Sun's right ascension can now be found from
tan RS = tan LS cos K [13]where it has to be remembered that RS is in the same quadrant as LS.
Finally, the declination is given by
sin DS = sin RS sin K [14]
First we have to know the hour angle of the object H. It is given from the definition of the sidereal time: S = H + RS, i.e.
H = S - RS [15]The true altitude (angular elevation) h of the Sun is found from
sin h = sin B sin DS + cos B cos DS cos H [16]The azimuth A, measured eastward from the North, is given by
- sin H
tan A = --------------------------- [17]
tan DS cos B - sin B cos H
The correct quadrant is found by checking the signs of the nominator
and denominator.
X = 1 / [sin ho + 0.025 exp(-11 sin ho)] [18]where ho is the apparent altitude of the object. This formula can be used all down to the horizon (where it gives X = 40).
References:
Meeus, J., 1991, "Astronomical Algorithms", Willmann-Bell, Richmond,
VA.
[Most of the formulae given here are based on this work.]
Rozenberg, G. V. 1966, "Twilight: A Study in Atmospheric Optics",
Plenum Press, New York.