I'm trying to convert an azimuth value into an hour-angle, and would
appreciate some help with the formula and with my algebra. Using
dcl=declination, lat=latitude, azi=azimuth,ha=hour-angle, I started with a
standard formula for azimuth given hour-angle:

tan(azi) = sin(ha)/(sin(lat)*cos(ha) + tan(dcl)*cos(lat))


After multiplying out and rearranging, I got:

sin(lat)*tan(azi)*cos(ha) - sin(ha) = -tan(azi)*tan(dcl)*cos(lat)


Substituting into a standard fromula from my old notes from school, this
solves as:


ha = arctan(-1 / sin(lat)*tan(azi)) + -  arccos( -tan(azi)*tan(dcl)*cos(lat)
/ sqrt( sin(lat)^2 * tan(azi)^2 +1 ))

where + - means plus or minus

Questions:

Is this the correct solution?

If so, how should I interpret the plus or minus element of the solution.
Surely for any given azimuth-latitude-declination there is only one possible
hour-angle, not the two implied by the plus or minus option?

Many thanks, Steve










Reply via email to