# How can I map the zenith for an observer at a given time to equatorial coordinates (as would be measured in J2000)?

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.

• 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? – Dean Aug 15 '16 at 13:55
• @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. – sgfw Aug 15 '16 at 14:12
• 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. – Dean Aug 15 '16 at 14:21
• Without actually looking, I'm guessing the ra-dec-to-alt-az formula depends on the "hour angle", which incorporates the local sidereal time. – user21 Nov 17 '16 at 16:47

Zenith right ascension = sidereal time.

Zenith declination = geographic latitude.

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