The angle between the ecliptic and the horizon is given by the equation below:
$$
\begin{align*}
\cos I = \cos \epsilon \sin \phi - \sin \epsilon \cos \phi \sin \theta
\end{align*}
$$
\( \epsilon \) is the obliquity of the ecliptic (e.g. 23.4°), \(\phi\) is latitude, \(\theta\) is the Local Sidereal Time.