Celestial Programming : Angle Between Ecliptic and Horizon

The angle between the ecliptic and the horizon is given by the equation below:






Result: 61.88731019830086°

cosI=cosϵsinϕsinϵcosϕsinθ \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.

//Greg Miller (gmiller@gregmiller.net) 2022
//Released as public domain
//www.celestialprogramming.com

//All angles are input and output in radians
function angleBetweenEclipticAndHorizon(lat,sidereal,obliquity){
    //Meeus 14.3
     return Math.acos(Math.cos(obliquity)*Math.sin(lat) - Math.sin(obliquity)*Math.cos(lat)*Math.sin(sidereal));
}