Data: Converting Alt-Az to RA-Dec – Example

In the last post, we derived equations to demonstrate that the right ascension (α) and declination (δ) of an object can be gotten by knowing four other variables: altitude (a), azimuth (A), sidereal time (ST), and latitude (φ).

In this post, I’ll do an example of using these equations to do just that. For my data, I’ve jumped into Stellarium and selected Altair1 as it’s a nice bright star that I’ll certainly be observing.

I’ve had Stellarium display all the variables necessary but let’s look at them all more carefully so we really make sure we know where they come from.

The altitude is the fundamental value the great quadrant is meant to measure.

The azimuth is one that an instrument could potentially measure. In fact, when I first conceptualized my quadrant, I’d intended to have a rotating disc on the surface of the base to allow it to be aligned with north, and then a pointer on the central column to allow it to be read. However, I have been unable to find any evidence of this being done in period despite how straightforward it is. Rather, the quadrants were fixed on the meridian. But since all objects will at some point transit the meridian, we can essentially eliminate that as a variable since it’s 0º if observed in the northern sky, and 180º if observed in the southern.

The sidereal time is actually the hardest to get. As we discussed briefly in the last post, a sidereal day is the amount of time it takes the Earth to rotate 360º where as for a solar day2 Because our time reckoning is based on solar days, the sidereal system quickly gets out of whack. We can convert between them based on the ratio of their lengths and the number of days that have passed since some date that we arbitrarily decided as our zero point. In modern astronomy that zero point was 1 Jan, 2000. Thus, to convert, we need to know how many days have passed since then, which is a bit of a headache to keep track of. At some point, I’ll probably write a little Java program to figure it out, but in the meantime, it can be looked up online3.

Lastly, we need latitude. During Brahe’s time, many of the astronomers that worked under him, when they ran errands for him or did other excursions, would often determine the latitude of the cities they visited as well as produce more accurate maps. So astronomers full knowing the latitude of their observatories is quite certain, so I wouldn’t feel bad looking it up online. However, it can be determined quite well simply by observing the altitude of the north star, Polaris.

So now we know how all four of our variables would be obtained, so let’s get down to the math.

First let’s write out all our variables:

a: 60º20’24.8″4

A: 180º

ST: 19h51m43s5

φ: 38º35’23”

Those aren’t quite handy for tossing into a calculator, so let’s convert to decimal degrees. Since I don’t think I’ve ever shown an example of that in this blog, I’ll go ahead and do so now.

$$a = 60 + \frac{20}{60} + \frac{24.8}{3600} = 60.34º$$

$$ST = 19 + \frac{51}{60} + \frac{43}{3600} \frac{360}{24} = 297.93º$$

$$\phi = 38 + \frac{35}{60} + \frac{23}{3600} = 38.59º$$

And just in case my calculator doesn’t like degrees and prefers radians, let’s convert to radians. If you’ve forgotten your HS geometry it’s done by multiplying the degrees by $\frac{\pi}{180}$ in which case we get:

$$a = 1.05$$

$$A = \pi$$

$$ST = 5.20$$

$$\phi = 0.67$$

We’ll start by finding the declination as we’ll need it for the next step. First let’s grab the equation (I’m going to assume that we’re ok to use degrees instead of radians):

$$sin(\delta) = sin(\phi)sin(a) + cos(\phi)cos(a)cos(A)$$

Plugging in our variables:

$$sin(\delta) = sin(38.59º)sin(60.34º) + cos(38.59º)cos(60.34º)cos(180º)$$

$$sin(\delta) = .87$$

$$\delta = 8.93º$$

Next up, we’ll use our second equation to get the hour angle:

$$cos(HA) = \frac{sin(a) – sin(\phi)sin(\delta)}{cos(\phi)cos(\delta)}$$

Plugging in our variables:

$$cos(HA) = \frac{sin(60.34º) – sin(38.59º)sin(8.93º)}{cos(38.59º)cos(8.93º)}$$

$$cos(HA) = 1$$

$$HA = 0$$

Lastly, we can get the right ascension from the simple formula:

$$\alpha = ST – HA$$

$$\alpha = 297.92º – 0º$$

$$\alpha = 297.92º$$

But since right ascension is usually expressed in hours, minutes and seconds, let’s convert back. Again, I haven’t done an example of that yet, so let’s do one here. First we’ll convert this to a decimal portion of 360º:

$$\frac{297.92}{360} = 0.828$$

Next, we need to figure out the hours, so multiply by 246:

$$0.828 \cdot 24 = 19.861h$$

So 19 is the hours (out of 24) and the .861 remaining is the decimal portion of an hour, which we need to convert to minutes. So multiply that remainder by 60:

$$0.861 \cdot 60 = 51.68’$$

Again, the 51 is the minutes and the .68 is the decimal minutes which we need to convert to seconds, so we’ll drop the whole number and again work on the remainder:

$$0.68 \cdot 60 = 40.8″$$

So after all that we have the RA to be 19h 51′ 40.8″ and the Dec to be 8.93º

How does that compare to the actual value? It’s very close. From Stellarium, it should be 19h 51 ‘42.03″ for the RA, so slightly off there. Only a few seconds of arc which well below the resolution of even the largest of Tycho’s instruments. In truth, this whole exercise was well beyond the instrumental error as we got down to fractions of arcseconds when Tycho’s instruments, after the averaging of numerous results, had a standard error of about 30-40 arcseconds.

The Dec, meanwhile, is accurate to the number of digits I’ve recorded here.

So what’s the takeaway from all this?

Hopefully you looked at this and realized the math here isn’t particularly hard. I popped all the figures into a spreadsheet. And the handy thing about that is that I can now reuse that spreadsheet for any observation, just swapping out the variables.

But I can certainly say I’m glad to have spreadsheets and computers. All together, we used something like a dozen trig functions, one direction or another. While a computer can do that in a fraction of a second, I can’t imagine the amount of labor it must have taken to do such conversions in period. I can certainly empathize with Kepler when he stated:

I also ask you, my friends, that you do not condemn me to the treadmill of mathematical calculations; allow me time for philosophical speculation, my only delight!

I’ve demonstrated that I can do the math which is the real goal of the project. Torturing myself with endless calculations is not.


  1. This is one of the three stars that makes up the Summer Triangle.
  2. A solar day is the amount of time it takes the Earth to rotate back to having the Sun in the same apparent position. But since Earth’s orbit is 360 and there’s 365.25 days in that full orbit, that means every day, the Earth has to rotate an extra $\frac{360}{365.25}$º which is roughly an extra degree. Thus, a sidereal day is 23h 56m 4.09s long as opposed to 24h.
  3. My version of chrome gives me warnings when trying to display this page because it obviously hasn’t updated to HTTPS, but I assure you it’s safe and it’s not like you’re sending personal information over the connection anyway.
  4. Here, I’ve used the modern notations for degrees, minutes, and seconds. This is perfectly equivalent to how I’ve written things using the more historical notation previously wherein this would be written 60;20,24.8.
  5. Again, this is a modern notation. I have no idea why above we represented minutes with ‘ as opposed to m and ” as opposed to s as we do here, but that’s the convention.
  6. If you were confused as to why I had a $\frac{360}{24}$ earlier when converting to degrees, this is why, but backwards.