[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
ATM Sun's altaz.
On Thu, 15 May 1997, Kip Larsen wrote:
> I've also got a question that may be slightly off topic but I thought one
> of you atm'ers out there might have the answer to. I have been looking
> for an astronomical formulae to determine the altitude and azimuth of
> the SUN given a particular latitude, longitude, date and time of day.
> Anyone know this formulae or know where I might look to try to find it?
OK, here goes, you saw it first on the ATM newslist:
Input
M month (1..12)
DAY (1..31)
Y year (1900..2099)
U UTC (day (=(h+(min+s/60)/60)/24)
LAT latitude (deg)
LONG longitude (cycle (=deg/360), W-)
J, days from J2000.0
M = M + 1
if M < 4 then
Y = Y - 1
M = M + 12
end if
J = int(365.25*Y) + int( 30.6*M) + DAY + U - 730563.5
int() means chop or truncate to integer
S, local sidereal time (day)
S = .779057 + .002737909*J + J + LONG
The multiplication here needs all 7 digits in the factor. Only
need the fractional part of S.
Sun's position
L = 280.466 + .9856474*J mean longitude (deg)
g = 357.528 + .9856003*J mean anomaly (deg)
l = L + 1.915*sin(g) + .020*sin(2*g) ecliptic longitude (deg)
e = 23.440 - .0000004*J obliquity of ecliptic (deg)
RA = arctan(cos(e)*tan(l)) right ascension (change to cycles)
DEC = arcsin( sin(e)*sin(l)) declination (deg)
Alt & azm
H = S - RA local hour angle (change to deg)
alt = arcsin(sin(LAT)*sin(DEC) + cos(LAT)*cos(DEC)*cos(H))
azm = arctan( x=> tan(DEC)*cos(LAT) - sin(LAT)*cos(H), y=> -sin(H))
This arctan means a change to polar coordinates from rectangular
coordinates x, y.
Hope I got all the "simplifying" numbers right.
-- Jim Burrows: (206)244-2933, fax -0294
-- E-mail: burrjaw@halcyon.com
-- Seattle: WGS84 lat 0.828547, long -2.135692 (rad)