<p>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 &gt; 0.  The algorithm requires the Hour Angle, which in turn requires Sidereal time, but the text explains how to compute those.</p>
<p>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 <span class="math-container">$0^\circ$</span>, 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.</p>
<p><span class="math-container">\begin{aligned}
\tan A &amp;= \dfrac{\sin H}{\cos H \sin \varphi  - \tan \delta \cos \varphi}
\\~\\
\sin h &amp;= \sin \varphi \sin \delta + \cos \varphi \cos \delta \cos H
\end{aligned}</span></p>
<p>Where <span class="math-container">$H$</span> is the hour angle, <span class="math-container">$\delta$</span> is the declination, <span class="math-container">$A$</span> is azimuth, <span class="math-container">$h$</span> is altitude, <span class="math-container">$\varphi$</span> is the latitude.
And <span class="math-container">$0^\circ$</span> azimuth is North, and negative latitudes are West.</p>
<p>There are other methods for performing the same calculation.  The page <a href="https://www.celestialprogramming.com/convert_ra_dec_to_alt_az.html" rel="nofollow noreferrer">Convert RA/Dec to Alt/Az</a> has explanations of a few different ones, and <a href="https://www.celestialprogramming.com/radec_to_altaz_testtdata.html" rel="nofollow noreferrer">test data</a> to validate correctness and show the other steps.</p>
<p>I'll also add that the Hipparcos catalog values are J2000 coordinates.  To get <strong>apparent</strong> coordinates you have to apply many of the further steps described in the book like precession, nutation, aberration, etc.</p>

CC BY-SA 4.0
2022-12-20T15:56:22.387Z
2022-12-20T17:51:40.933Z
2022-12-20T17:51:40.933Z
Greg Miller
<p>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.</p>

CC BY-SA 4.0
2022-12-20T15:55:52.700Z
Thanks a lot! I'm going to try it right now.
VansFannel
CC BY-SA 4.0
2022-12-20T15:40:26.063Z
2022-12-20T15:40:26.063Z
Mike G
<p>If I know the local time of an observer and her/his latitude and longitude, how can I know which stars are visible?</p>
<p>I'm developing a planetarium software using the Hipparcos Catalogue. I have also implemented all the formulas of the book: &quot;<a href="https://www.cambridge.org/gb/academic/subjects/physics/amateur-and-popular-astronomy/practical-astronomy-your-calculator-or-spreadsheet-4th-edition?format=PB&amp;isbn=9781108436076" rel="nofollow noreferrer">Practical astronomy with your Calculator and Spreadsheet</a>&quot;, but I don't know which to use.</p>
<p>I want to know which values of right ascension and declination are visible at that local time and location.</p>
<p><strong>In other words</strong>, 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.</p>

<observational-astronomy><declination><right-ascension>
Right ascension and declination visible at that local time and location
VansFannel
# Right ascension and declination visible at that local time and location

(Asked by: username_0 on 2022-12-20)

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](https://www.cambridge.org/gb/academic/subjects/physics/amateur-and-popular-astronomy/practical-astronomy-your-calculator-or-spreadsheet-4th-edition?format=PB&isbn=9781108436076)", 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.

**Tags:** observational-astronomy, declination, right-ascension


---

## 2 answers

### Answer by username_1 on 2022-12-20. Score: 2 | Accepted answer

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](https://www.celestialprogramming.com/convert_ra_dec_to_alt_az.html) has explanations of a few different ones, and [test data](https://www.celestialprogramming.com/radec_to_altaz_testtdata.html) 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.


---

### Answer by username_2 on 2022-12-20. Score: 1

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.

> **Comments:**
> **username_0**: Thanks a lot! I'm going to try it right now.  

---

