# Calculate which star is at Zenith using my latitude, longitude, and time

I'm developing a Planetarium software and I have no idea about how what stars and planets are visible today (mm/dd/yyyy hh:mm) given a latitude and longitude.

Reading this tutorial, I have found how to use latitude to determinate north celestial pole position.

But I don't know how can I know which stars are visible given longitude in a particular date.

I have searched a lot on Internet but I haven't found anything (maybe because I haven't searched with the right words).

How can I calculate which star is at Zenith given a longitude and a time (i.e. now)?

As you might know, we use RA (Right Ascension) and DEC(declination) to locate the stars in the sky. Now the RA and DEC co-rodinates of any star is fixed.

However, locally to locate a star we use ALT / AZ co-ordinate system. The ALT and AZ of a star depends upon the LAT/LONG of the place you are observing from and the time. There are many online converters which will help you convert from ALT/AZ to RA/DEC and vice verse.

The ALT of a star at the Zenith is 90 degrees. Therefore, look for stars ( trial and error or parse through a list) to find which stars for your present location and time has ALT = 90deg.

• Thanks for your answer. I'm developing a planetarium software and I want know how to draw stars depending on user's location. Jul 21, 2015 at 19:17
• I can't tell you the exact code as I am unaware of planetarium's interface. First find out the RA; DEC of the all the stars that you want to draw. Then convert this is to ALT/AZ with respect the current time and the user's location (using any online tool). And then simply draw that star depending on the ALT/AZ co-ordinate. If I find someone who is well versed in planetarium, i will tag him/her here. Jul 22, 2015 at 2:18
• I'm sure my problem is that I don't know how to explain what I need. Imagine, today I'm in Barcelona, it's 11:00 p.m. I'm looking south. How I can know which stars I'm seeing? Jul 22, 2015 at 14:11
• Okay. Well, practically if you really want to do this, the way is to point your phone's camera at the sky using an app like SkyMap (Android). However, theoretically, what you need to do is find out the ALT/AZ of the star you are looking at & convert this to RA/DEC to find out which star that is exactly. Jul 22, 2015 at 17:45
• If you are in the northern hemisphere, a star which is very easy to begin with (because it is almost at the same position throughout the year) is the pole star... Jul 22, 2015 at 17:48