How would one calculate the rotation/tilt of the earth to simulate the Night Sky in a self-written tool or app. I am trying to built an app for my telescope to show me on my phone what I am looking at. I can already simulate the exact positions of stars at the 1.1.2000 at 00:00:00 but I dont know how the "earth" should be rotated so I can simulate the sky from my current position and accurate time.

There are App and tools like stellarium that can achive this but I just cant get the angles right: enter image description here

If anyone could point me in the right direction and tell me what I need to change/calculate it would help me a lot.

  • $\begingroup$ Earth rotates wrt stars once every sidereal day, that is about 23h:56m $\endgroup$ Apr 26, 2020 at 22:43
  • 1
    $\begingroup$ If I understand right, you need to convert ra dec (the position of a star around the Earth) to alt az (the position of the star at given time and place). There are some other questions about this here. You do need your time and location. $\endgroup$
    – James K
    Apr 27, 2020 at 2:39
  • $\begingroup$ @JamesK in that case does this answer this question? $\endgroup$
    – uhoh
    Apr 28, 2020 at 11:07

1 Answer 1


If you do not require arcminute precision, you can approximate Greenwich sidereal time as the Earth rotation angle $\theta(t)$. IERS Technical Note 32 §5.4.4 gives $$ \begin{align} \theta(t) &= 2 \pi (0.77905~72732~640 + 1.00273~78119~11354~48~ t) \\ &\approx 280.46^\circ + 360.985612^\circ~ t \end{align} $$ where $t$ is a real number of days since JD 2451545.0 (2000-01-01 12:00 TT ≈ 11:59 UTC).

For an observer at north latitude $\phi$ and east longitude $\lambda$, things should line up like this:

Local sidereal time $ = \mathrm{LST} \approx \theta(t) + \lambda$

Zenith (RA, Dec) $ = (\alpha, \delta) = (\mathrm{LST},~ \phi)$

North horizon $(\alpha, \delta) = \begin{cases} (\mathrm{LST + 12h},~ 90^\circ - \phi) & \mathrm{if}~\phi >= 0 \\ (\mathrm{LST},~ 90^\circ + \phi) & \mathrm{if}~\phi < 0 \end{cases}$

East horizon $(\alpha, \delta) = (\mathrm{LST + 6h},~ 0^\circ)$

The transformation between equatorial and horizontal coordinates can be composed of two rotations, similar but not necessarily identical to those in Wikipedia: Celestial coordinate system. For example, you could:

  1. Start with the north horizon vector pointing at the north celestial pole, and the zenith vector pointing at (0h, 0°).
  2. Rotate the ground counterclockwise as seen from the north horizon vector by LST.
  3. Rotate the ground clockwise as seen from the east horizon vector by $\phi$.
  • $\begingroup$ Great explanation thanks :) $\endgroup$ May 3, 2020 at 19:34

You must log in to answer this question.

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