Calculating the orientation of the night sky 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: 

If anyone could point me in the right direction and tell me what I need to change/calculate it would help me a lot.
If you do not require arcminute precision, you can approximate Greenwich sidereal time as the Earth rotation angle $\theta(t)$.
IERS Technical Note 32 &sect;5.4.4 gives
$$ \begin{align}
   \theta(t) &amp;= 2 \pi (0.77905~72732~640 + 1.00273~78119~11354~48~ t) \\
      &amp;\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 &approx; 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) &amp; \mathrm{if}~\phi &gt;= 0 \\
   (\mathrm{LST},~ 90^\circ + \phi) &amp; \mathrm{if}~\phi &lt; 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:


Start with the north horizon vector pointing at the north celestial pole, and the zenith vector pointing at (0h, 0&deg;).
Rotate the ground counterclockwise as seen from the north horizon vector by LST.
Rotate the ground clockwise as seen from the east horizon vector by $\phi$.