Astronomical Calculations: Sidereal Time

What is Sidereal Time?

The vernal equinox for 2020 was last week (as of this writing) and I had planned on posting this on that day. But there’s a global pandemic spreading through the world right now and, like so many others in North America, I was preoccupied with other things. In any case, in honor of the vernal equinox this post is going to talk about sidereal time. If you’re an amateur astronomer interested in the algorithm for local sidereal time then skip down to the next section. If you’re coming in cold then read on!

Imagine you’re standing on a city sidewalk during the day watching a parade go by. Only the parade consists of a single tuba player. You see him way down the street to your left. He  slowly makes his way up the street and soon he’s right in front of you. Then he crosses over an invisible line directly in front of you and walks slowly off to your right and down the street. That tuba player is like our sun. If you face South, you see it rise in the East off to your left. It slowly rises higher and makes its way across the sky until it is overhead, directly on that invisible line in front of you. Then it crosses that line and moves off to your right, sinks lower and sets in the West. That moment when it is directly in front of you is called solar noon. That imaginary line that it crosses is your local meridian. That’s why we use the phrases “A.M” (ante meridiem) and “P.M” (post meridiem) to split the sky into the two halves we call morning and afternoon.

Now imagine you’re standing on that same sidewalk only at night. This time there are hundreds of people in the parade, all of them carrying very small flashlights that emit only a pinpoint of light. You see lights far off to your left, dozens of others are passing directly in front of you, and many more have already passed and are moving away off to your right. This nighttime parade is the night sky and each person is like a star that appears to move from left to right overhead throughout the night. We’re used to telling time by the tuba player. But there’s another way to tell the time. At night you can set the time as a function of when each star crosses your local meridian. This is called sidereal time.

Sidereal time is different from the civil time we use on our watches, clocks, and smartphones. Civil time follows the apparent motion of just a single star, our sun, as it moves across the sky. I say “apparent” because as we know it is not the Sun that is moving but the Earth’s rotation that makes it appear to be moving. In sidereal time, we’re not keeping time based on a single star. We’re keeping time based on the apparent motion of all of the stars. Each star has a position in the night sky (called a celestial coordinate) and the time is measured from the moment a given star crosses your local meridian. For example, suppose we have two stars: A and B. A has a position assigned to it that is 19:00 hours (I’m using 24-hour time here) and B has a position assigned to it that is 23:00 hours. That means as A crosses your local meridian then your local sidereal time (LST) is 19:00 hours. And later when B crosses your local meridian you would say it is now 23:00 LST.

Before I say anything else about sidereal time I need to say a few words about the celestial sphere. Now instead of a city sidewalk, imagine that you’re standing facing South in the middle of an empty field on a clear night. Now look up at the stars. As I mentioned earlier, if you stand there long enough you’ll see that they rise in the East, appear to move slowly across the sky, and eventually set in the West. The ancients believed that all of the stars were affixed to a giant transparent dome overhead. As the dome rotated it carried all of the stars along with it. This dome is called the celestial sphere. It’s not a real dome as the ancients believed of course. But it’s still useful to think of it that way.

Source: Review of the Universe, Stars, Celestial Sphere on website: universe-review.ca

Still facing South, imagine a line that arcs up from the horizon in front of you and runs all the way up overhead to the very top of the dome’s ceiling. This point overhead is called the zenith from the Arabic samt al-ras or “path above the head”. The arc from horizon to zenith (0° to 90°) is your local meridian. It divides the East half of the dome to your left from the West half to your right. The stars that move from East to West will cross this meridian line. Sidereal time is measured in hours, minutes, and seconds from hour zero (0h) to 23h, 59m, 59s (hours, minutes, seconds). But where on the dome does zero start? Well you could pick any one of your favorite stars and use that as your beginning reference point. But to understand why we use our current system, we have to go back to the ancients for a moment.

Source: Copyright 1975 by Edmund Scientific Corp and used in lecture notes by Professor Robert W. O’Connell

The Babylonians began their calendar year on the first new moon after the vernal equinox, an occasion marked with an elaborate festival as the goddess Ishtar ceremoniously resurrected from the dead after her body spent three days and nights in the shadowy underworld. Perhaps following the Babylonians, the Greek astronomer Hipparchus created his celestial coordinate system and set the vernal equinox as the point where the celestial coordinate system begins. This is “zero hour” and we say that the vernal equinox has a right ascension (or R.A.) of 0h. 

Every star you see in the night sky is assigned an R.A. value (as well as a declination which is like a longitude on the celestial sphere). So if you know the R.A. of a given star and you also know your LST then you can determine whether it is up in the sky right now and even when it will cross your meridian. Suppose you want to see a star that has an R.A. of 01:00 but the current LST is 18:00? Well if you think about it you’ll realize you can’t see it because it has already set. The star is 7 hours ahead of your LST and thus below the horizon in the West. Suppose you want to see Omega Piscium in Pisces that you know has an R.A. of 0h? You’re in luck because it’s 6 hours behind your LST and so just rose in the East. If you wait 6 hours it will be on your local meridian. The R.A. hours increase all the way around the circle of the celestial sphere until we end up back at zero again. We still use Hipparchus’ system today. 

There is a phenomenon called precession and in Hipparchus’ time the constellation Aries was located at the vernal equinox. But that’s a topic for another time. The twelve constellations of the zodiac encircle the Earth across the night sky on an imaginary band called the plane of the ecliptic. There are 360 degrees in a circle. If you’re standing out in the empty field you can only see half of the circle (and the six constellations on it) at any given moment. The rest are below your horizon. So we would say that you can see 12 hours of right ascension. An hour is 15 degrees of a circle. So 24 hours and 360 degrees are the same and we can convert these values back and forth, which we’ll do below when we get to the calculations.

Source: IAU and Sky & Telescope magazine (Roger Sinnott & Rick Fienberg) CC BY 3.0

Currently, the constellation Pisces is at the vernal equinox on hour zero. The star Omega Piscium is exactly at 0h and marks the beginning of a sidereal day. Over the course of a sidereal day the Earth rotates once on its axis, turning 360 degrees or from 0h to 23h 59m 59s. So if I say to you that the current local sidereal time is 00:00 then you know that the constellation Pisces is crossing your meridian at that time.

Source: IAU and Sky & Telescope magazine (Roger Sinnott & Rick Fienberg) CC BY 3.0

The next zodiacal constellation after Pisces is Aries. As you can see in the image above, the first star in Aries to cross your meridian will be the binary star Gamma Arietis (γ Ari). It has a right ascension (R.A.) of 1h 53m. So if I tell you that it is about 02:00 LST then you would know that Aries has just crossed your meridian.

That’s how sidereal time works. You’re watching a parade of stars go by at night. They rise in the East on your left, move slowly across the night sky until they cross your local meridian, then they continue to move to your right until they set in the West. In local sidereal time, the time is always relative to your meridian and the stars, constellations, planets, and deep sky objects parade across that meridian in front of you throughout the night. 

Calculating Your Local Sidereal Time (LST)

By now you can see how useful it would be to know your LST. Of course you can build your own clock or download an app that shows sidereal time (here and here). I have yet to do this but I think it would be way cool. For now, I’ll just write software to do the calculations. I’m going to demo one that takes your current longitude and any given local civil date and time (Pacific Standard Time in my case) and calculates the LST. 

All source code is checked into my GitHub repo. It’s a simple console app written in C#. If you clone the repo look at the project properties (Alt + ENTER) to see where I put in three command line args. The first is my longitude in decimal degrees for Portland, Oregon. The second and third are my local date and time on the vernal equinox. If you build and run the app yourself from a command prompt you should supply the three args yourself.

Here are the steps:

  1. Given the local longitude, date and time.
  2. Convert the date and time to UTC.
  3. Calculate Greenwich mean sidereal time (GMST).
  4. Using the local longitude, shift GMST to LST.
  5. Display LST in hours, minutes, and seconds.

The calculations come in part from the book Astronomical Algorithms by Jean Meeus (2nd Edition). Meeus tells us how to derive mean sidereal time at Greenwich (GMST). Once we have GMST From there I’m going to add my own calculations to convert to LST.

Given the UTC of a given date and moment in time we must first convert it to the Julian Day (JD) and then use that to get Time T (time in Julian centuries). These are standard preliminary calculations that I’ve been doing  throughout this series. See my previous post on the Julian Day.  Of the three formulas Meeus gives I’ll use:

$$\theta_0 = 280.46061837 + 360.98564736629 (JD \space – 2451545.0) + 0.000387933 T^2 – T^3 / \space 38710000 \tag{12.4}$$

This is implemented in C# as follows:

DateTime localDateTime = d + ts;
DateTime utcDateTime = TimeZoneInfo.ConvertTimeToUtc(localDateTime, TimeZoneInfo.Local);

// lines 55 thru 59 are from Meeus, Chap 12 (pp 87-89)             
var moment = new Moment(utcDateTime);
var JD = moment.JulianDay;
var T = ((JD - 2451545.0) / 36525);
var theta0 = 280.46061837 + 360.98564736629 * (JD - 2451545.0) + (0.000387933 * T * T) - (T * T * T / 38710000.0); // (12.4)
var gmstRA = new RightAscension(ReduceAngle(theta0));

I’ve used the Moment struct in previous posts in this series. I also added a RightAscension struct to represent an R.A. and to convert between decimal degrees and hours. Meeus will get us to GMST. From there I’ll use local longitude (L) to convert GMST to LST:

$$LST = GMST  + L$$

My location is West of Greenwich in Portland, Oregon where L = -122.67. This will result in a subtraction. The result is our LST in decimal degrees.  I want to convert that to hours, minutes, and seconds. To calculate that it helps to know that 15 arc degrees (15°) equals a time-measure of one hour (1h). Also, 15 arc minutes (15′) equals one minute and 15 arc seconds (15”) equals 1 second. This logic is encapsulated in my  RightAscensionstruct:

public double ToDecimalDegrees() => (Hours + (Minutes / 60) + (Seconds / 3600)) * 15;

public override string ToString()
{
    var d = ToDecimalDegrees();
    var h = (int)d / 15;
    var m = (int)(((d / 15) - h) * 60);
    var s = ((((d / 15) - h) * 60) - m) * 60;
    var ss = Math.Round(s);
    return $"{h}h {m}m {ss}s";
}

Given our local longitude we can calculate LST in a single line of code:

var lmstRA = new RightAscension(gmstRA.ToDecimalDegrees() + longitude);

And I can call the ToString()override method to display the results:

Which tells me that my LST on the vernal equinox that took place last Thursday was 7h 31m 53s. If I consult my handy-dandy planisphere (or any online resource) I see that the constellation Gemini is at my local meridian at that time. This is the time of year when many astronomy nerds stay up all night to do the Messier Marathon. If I wanted to bag M35 then this would be a good time to do it. Happy hunting!