2
$\begingroup$

If I know the local time of an observer and her/his latitude and longitude, how can I know which stars are visible?

I'm developing a planetarium software using the Hipparcos Catalogue. I have also implemented all the formulas of the book: "Practical astronomy with your Calculator and Spreadsheet", but I don't know which to use.

I want to know which values of right ascension and declination are visible at that local time and location.

In other words, knowing the RA and DEC from the Hipparcos Catalogue, and knowing the latitude and longitude and the local time of the observer, there must be a formula (or formulas) to know which stars are visible at that moment.

$\endgroup$

2 Answers 2

2
$\begingroup$

The primary equation you want is on P47, conversion of Equatorial to Horizon Coordinates. You will need to loop through every star/object in the catalog, compute the Alt/Az coordinates. It is above the horizon if Alt > 0. The algorithm requires the Hour Angle, which in turn requires Sidereal time, but the text explains how to compute those.

Rather than the equations in his book, I prefer to use these which are based on the equations in Meeus' Astronomical Algorithms. I have modified them so that North is $0^\circ$, and Western longitudes are negative (like GPS). The advantage of these over others is that it allows you to use the atan2() function built in to most languages to get an answer in the correct quadrant.

\begin{aligned} \tan A &= \dfrac{\sin H}{\cos H \sin \varphi - \tan \delta \cos \varphi} \\~\\ \sin h &= \sin \varphi \sin \delta + \cos \varphi \cos \delta \cos H \end{aligned}

Where $H$ is the hour angle, $\delta$ is the declination, $A$ is azimuth, $h$ is altitude, $\varphi$ is the latitude. And $0^\circ$ azimuth is North, and negative latitudes are West.

There are other methods for performing the same calculation. The page Convert RA/Dec to Alt/Az has explanations of a few different ones, and test data to validate correctness and show the other steps.

I'll also add that the Hipparcos catalog values are J2000 coordinates. To get apparent coordinates you have to apply many of the further steps described in the book like precession, nutation, aberration, etc.

$\endgroup$
1
$\begingroup$

A star is visible if its altitude above the horizon is positive. First you need to determine the local sidereal time as in §14 of the book. Then you can use that to convert (RA, Dec) equatorial coordinates to horizon coordinates as in §25.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks a lot! I'm going to try it right now. $\endgroup$
    – VansFannel
    Commented Dec 20, 2022 at 15:55

You must log in to answer this question.

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