I have a project that is currently exists as no more than an idea in my head and a few equations in a Python script. The idea is to fix my telescope up with a couple of stepper motors and control where it’s pointing with my phone, including the ability to follow particular objects in the sky like the moon during an eclipse or Mars now near opposition.

Thing is, if I ask someone (e.g. “the Internet”) where, say, M45 is, I’ll get “RA 3^{h}47^{m}24^{s}, D+24°07′00″”. This, unfortunately, doesn’t help me much. So I need to convert these equatorial coordinates to horizontal coordinates, which consist of the azimuth and altitude—the direction to point the telescope and how high it needs to be angled. In order to do *that*, though, I have to go through a bunch of other math.

Taking it a step at a time, I look at the equations to turn the equatorial coordinates (right ascension is \(\alpha\), declination is \(\delta\), hour angle is \(h\)) to horizontal (azimuth is \(A\), altitude is \(a\)):

\(A=\arctan{{\sin{h}}\over{\cos{h}\sin{\phi_0}-\tan{\delta}\cos{\phi_0}}}\\

a=\arcsin\left({\sin{\phi_0}\sin{\delta}+\cos{\phi_0}\cos{\delta}\cos{h}}\right)

\)

Hang on a second, though, what’s hour angle \(h\)? I get that from local siderial time \(\theta_L\), apparently. And where do I get that? From Greenwich siderial time \(\theta_G\). And where do I get that? The best equation I can find is

\(J_0=367y-\lfloor{\frac{7}{4}(y+\lfloor{\frac{M+9}{12}}\rfloor)}\rfloor+\lfloor{275\frac{M}{9}}\rfloor+1721013.5\\

T=J_0+{{h+m/60+s/3600}\over{24}}\\

\theta_G=\left({100.4606184+36000.77004T+0.000387933T^2-(2.583\times10^{-8})T^3}\right)+360.98564724{{h+m/60+s/3600}\over{24}}

\)

where \(y\) is year, \(M\) is month, \(d\) is day, \(h\) is hour, \(m\) is minute, and \(s\) is second.

Using this information, for 25 June 2016 I get a \(\theta_G\) of 18^{h}14^{m}15.5875^{s}. The Navy reckons it at 18^{h}14^{m}15.5860^{s}. That isn’t too bad, but I am curious as to where the difference of 15/10000 comes from. I’ve tried a few other formulae that take slightly different approaches to the problem, and while they all agree at least down to the tenths place of the second value, they are further from this number. At this point, though, the difference is only annoying my overly mathematical brain, its practicality for a tiny telescope like mine and for the stepper motors that I’ll be using mean that such a difference is effectively irrelevant. In fact, I calculated the worst-case TFOV of my current scope and lenses and come up with 14 arcminutes. So if I’m off by 0.000025 arcminutes, it’d be impossible for me to notice.

Anyway, that’s step 1. I need *local* siderial time. This is a simple matter of adjusting it for where I am on the surface of Earth relative to the Greenwich meridian. Since it’s convenient for testing purposes, I used the same US Navy website’s default of Washington D.C. to test my own calculations for “local” siderial time. Subtracting 77°1’48.0″ from 18^{h}14^{m}15.5875^{s} gives (after the appropriate conversions) 13^{h}6^{m}8.3875^{s}. The Navy provides an answer of, hey presto, the same thing (give or take the same annoying 0.0015^{s})! This part of the calculation I can handle.

So, back to hour angle \(h\).

\(h=\theta_L-\alpha\)Yay! So, this weekend, if I’m looking for M45 in the sky at midnight local time

\(

h=\theta_L-\alpha\\

=10^h54^m29.1677^s-3^h47^m24^s\\

=7^h7^m5.1677^s

\)

Futzing with the formulae above—oops!—while I get an azimuth of 127.6850°, I get an altitude of −6.7445°, so the Pleiades, from near my house this weekend at midnight, would be below the horizon in the ESE sky. A more useful use of these formulae would be to determine how high in the sky a particular object would actually get, and at what time. My first method, before doing the algebra of rearranging these so I can more easily maximize \(a\), is to just stick in values for local time until I see the highest result. I find M45 will be at an altitude of 76.4255°, in the northern sky (azimuth just −0.0606°), but at 15:59, when the sun is still well above the horizon.

I want to make the hour angle offset the right ascension completely, so that \(h=\theta_L-\alpha=0\), to find the exact time M45 is highest in the sky. Rearranging, I get

\(\theta_l=\alpha\\\theta_G-\lambda_0=\alpha\\

\theta_G=\alpha+\lambda_0=3^h47^m24^s+-6^h28^m32.9^s=21^h18^m51.1^s\)

Working backwards to get UT (a time I can actually read), well, this is much, much harder. The *only* formula I found to do this is based on J1900.0, which is more annoying than a dealbreaker (the code I’ve written to implement this is based on J2000.0), but for any given sidereal time, there are two times each day with that value (or so it seems).

For instance, if I grab the sidereal time corresponding to a UT of 2016-06-25T15:21:21, the GST comes out 144.45° or 9h37m46.88s. When I go hunting for the UT that corresponds to that GST, I come up with 2016-06-25T15:11:19.602000. Converting each of these back to GST gives me the same result to the 14th decimal place. Obviously, however, something like M45 cannot be at its zenith twice in the space of 12 minutes (twice in 24 hours, on the other hand, certainly). Mathematically, this is extremely frustrating.

More (probably) to come!