I have a closed region on the unit sphere expressed as a series of azimuth, elevation points $(\theta,\phi)_i$. I need to calculate the solid angle subtended by the enclosed region.
I know that the differential solid angle element in spherical coordinates is $d\Omega=\cos \phi \,d\phi\, d\theta$. This is usually written in terms of the polar angle where $pa=\pi/2-\phi$, and therefore $\sin pa = \cos \phi$.
It 'feels like' I should be able to find the area as a sum of the areas between each segment and the 'equator' -- i.e. a solid angle version of the 'Shoelace Formula'.
I have not been able to find this formulation and I haven't been able to build confidence in my attempts.
I believe the solid angle of a rectangular region bounded by $\theta \in[\theta_1,\theta_2]$ and $\phi \in[\phi_1,\phi_2]$ is $(\theta_2-\theta_1)(\cos \phi_2 - \cos \phi_1)$ (again, this equation is usually given in terms of polar angle, with a $\sin$ instead of the $\cos$.) I could use $\phi_1=0$ and use this equation to form a Riemann sum inspired approach to the area, but I feel I'm missing a correction on the elevation when the start/end elevation of the segment differs. I have not found an expression for the solid angle of a trapezoid in $(\theta,\phi)$ -- or equivalently the solid angle under a $(\theta,\phi)$ line segment.
Any help is appreciated.