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 3h47m24s, 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\)):


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


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 18h14m15.5875s. The Navy reckons it at 18h14m15.5860s. 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 18h14m15.5875s gives (after the appropriate conversions) 13h6m8.3875s. The Navy provides an answer of, hey presto, the same thing (give or take the same annoying 0.0015s)! This part of the calculation I can handle.

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


Yay! So, this weekend, if I’m looking for M45 in the sky at midnight local time

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


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!

99 Revolutions

Most of the following are from CODATA 2014 values found here. Some are updated based on recently published data; CODATA 2018 will redefine values and fundamental units (a redefinition of the kilogram, specifically, is anticipated) which will have an effect on the values here.

The numbers:

  • Magnetic constant, \(\mu_0=4\pi\times10^{-7}\quad{{\rm{H}}\over{\rm{m}}}\approx12.566\,370\,614\quad{{\rm{N}}\over{\rm{A}^2}}\)
  • Speed of light in a vacuum, \(c=299\,792\,458\quad{{\rm{m}}\over{\rm{s}}}\)
  • Electric constant/permittivity of free space, \(\varepsilon_0={1\over{\mu_0c^2}}\approx8.854\,187\,817\,620\times10^{-12}\quad{{\rm{F}}\over{\rm{m}}}\)
  • Impedance of free space, \(Z_0=119.916\,983\,2\cdot\pi\quad\Omega\approx376.730\,313\,461\quad\Omega\)
  • Hubble constant, \(H_0=\left(73.00\pm1.75\right)\quad{{\rm{km}}\over{\rm{s}\cdot\rm{Mpc}}}\)
  • Universal gravitational constant, \(G=\left(6.674\,08\pm0.000\,31\right)\times10^{-11}\quad{{\rm{m}^3}\over{\rm{kg}\cdot\rm{s}^2}}\)
  • Planck constant, \(h=\left(6.626\,070\,040\pm0.000\,000\,081\right)\times10^{-34}\quad{{\rm{J}}\over{\rm{s}}}\)
  • Planck length, \(l_P=\left(1.616\,229\pm0.000\,038\right)\times10^{-35}\quad\rm{m}\)
  • Planck mass, \(m_P=\left(2.176\,470\pm0.000\,051\right)\times10^{-8}\quad\rm{kg}\)
  • Plank time, \(t_P=\left(5.391\,16\pm0.000\,13\right)\times10^{-44}\quad\rm{s}\)
  • Planck temperature, \(T_P=\left(1.416\,808\pm0.000\,033\right)\times10^{32}\quad\rm{K}\)
  • Rydberg constant, \(R_\infty=\left(10\,973\,731.568\,508\pm0.000\,065\right)\quad{1\over{\rm{m}}}\)
  • Boltzmann constant, \(k=\left(1.380\,648\,52\pm0.000\,000\,79\right)\times10^{-23}\quad{{\rm{J}}\over{\rm{K}}}\)
  • Avogadro constant, \(N_A=\left(6.022\,140\,857\pm0.000\,000\,074\right)\times10^{23}\quad{1\over{\rm{mol}}}\)
  • Faraday constant, \(F=\left(96\,485.332\,89\pm0.000\,59\right)\quad{{\rm{C}}\over{\rm{mol}}}\)
  • Stefan-Boltzmann constant, \(\sigma=\left(5.670\,367\pm0.000\,013\right)\times10^{-8}\quad{{\rm{W}}\over{\rm{m}^2\cdot\rm{K}^4}}\)
  • Josephson constant, \(K_J=\left(483\,597.852\,5\pm0.003\,0\right)\times10^9\quad{{\rm{Hz}}\over{\rm{V}}}\)
  • Fine-structure constant, \(\alpha=\left(7.297\,352\,566\,4\pm0.000\,000\,001\,7\right)\times10^{-3}\)
  • von Klitzing constant, \(R_K=\left(25\,812.807\,455\,5\pm0.000\,005\,9\right)\quad\Omega\)
  • Molar gas constant, \(R=\left(8.314\,459\,8\pm0.000\,004\,8\right)\quad{{\rm{J}}\over{\rm{mol}\cdot\rm{K}}}\)
  • Elementary charge, \(e=\left(1.602\,176\,620\,8\pm0.000\,000\,009\,8\right)\times10^{-19}\rm{C}\)
  • Dark energy density/vacuum density, \(\Omega_\Lambda=0.691\,1\pm0.006\,2\)