I'm writing a script to generate a star chart for a given observation point (latitude and longitude) at a given time. I've found a database of stars with their right ascension and declination from J2000, and with that written a program that displays a star chart with the center being any right ascension and declination that I feed into it. I've also written a program that will convert local time into local sidereal time. Now I just need to figure out how to determine the zenith for an observer in J2000 right ascension and declination given their longitude, latitude, and local sidereal time.

I've found a wikipedia page that gives formulas for converting between celestial coordinate systems, but the formula for converting equatorial and horizontal coordinates doesn't seem to depend on the sidereal time, which I imagine it should for my case.

I've tried finding a vector that represents the observer's zenith at the given time, then rotating it about the earth's rotation axis by the sidereal time, but that's giving incorrect results.

  • $\begingroup$ Im curious why your writing your own script when there are loads of software packages out there that can do it for you, is it out of your own curiosity? $\endgroup$
    – Dean
    Aug 15, 2016 at 13:55
  • $\begingroup$ @Dean: Yeah, as you can probably tell from my question, I'm more of a programmer dabbling in astronomy than an astronomer dabbling in programming. I found the star database I mentioned online and I thought it would be neat to do something with it. $\endgroup$
    – sgfw
    Aug 15, 2016 at 14:12
  • $\begingroup$ Ah okay cool, well I think what your essentially talking about is converting Right Ascension & Declination (RA/Dec) coordinates into Altitude & Azimuth (Alt/Az) coordinates; this might help with your online searches in the future. I was doing something similar myself until I found a software package that did what I needed, but before I found it I came across this lecture on coordinates which was really useful. $\endgroup$
    – Dean
    Aug 15, 2016 at 14:21
  • $\begingroup$ Without actually looking, I'm guessing the ra-dec-to-alt-az formula depends on the "hour angle", which incorporates the local sidereal time. $\endgroup$
    – user21
    Nov 17, 2016 at 16:47

1 Answer 1


Zenith right ascension = sidereal time.

Zenith declination = geographic latitude.

  • $\begingroup$ Could you develop your answer more? Right now this could fit as a comment. $\endgroup$ Aug 15, 2016 at 21:49
  • 1
    $\begingroup$ Following site instruction "Avoid answering questions in comments." OP has connected the other dots. What's missing? $\endgroup$
    – Mike G
    Aug 16, 2016 at 3:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .