How to calculate the arc lengths of a great circle inclined with the equator at $\phi°$ broken into $12$ arcs by longitudes $30°$ apart? A great circle lies at $\phi°$ inclination to the equator.
Longitudes $30°$ apart are drawn which divides the equator in $12$ equal arcs of size (radius of earth$*30$).
The corresponding arcs on the inclined great circle will have variable lengths. How to calculate their subtended angles for all $12$ arcs?

What I've managed to figure out:

*

*Here is the diagram: Problem description


*$\phi =$ latitudes of the lowest & highest point of the great circle (ignoring signs i.e. $+/-$).


*Arc length for both circles for $90°$ subtended angle is equal to quarter of circumference.


*Tried to solve with Haversine rule & sine rule for spherical trigonometry, but when programmed, the sum of $12$ arcs does not equal circumference of the earth.

Motivation:
The subtended angles of the arcs will vary with latitude & longitude. That calculation is crucial for an astrology software that I'm trying to build. Thanks in advance for any help!
 A: It may be better to work out cumulatrd arc lengths.
Let $A$ be a point where the arc hits the Equator and $B$ be any point to which you move from $A$.  Because $A$ can be either of two points, we may assume without loss of generality than $B$ is displaced by $\le 180°$ longitude from$A$.  Call thus longitude displacement $\theta$.
Draw $\triangle ABP$ where $P$ is either pole.  Then $\angle P$ measures $\theta$, arc $AP$ measures 90°, and $\angle A$ measures $90°-\phi$.
In solving triangles I generally prefer to work with cosines instead of sines.  The cosine function is monotonic and gives unambiguous inverse all the way from $0°$ to $180°$, whereas the sine function doubles back on itself as the argument passes $90°$.  So look to the cosine laws.  When you have two angles and the included side as here, the Second Law of Cosines works best.  For this triangle the law gives the following for the third angle $\angle B$:
$\cos \angle B = -\cos \angle A\cos \angle P+\sin \angle A\sin \angle P\cos AP$
Here, the second term on the right zeroes out as $AP$ measures $90°$.  Plugging in the known angles above then renders
$\cos \angle B = -\sin \phi\cos \theta$
We then apply the same law one more time, this time with $\angle P$ on the left side:
$\cos \angle P = -\cos \angle A\cos \angle B+\sin \angle A\sin \angle B\cos AB$
Plugging in known values and using the fact that $\sin u =+\sqrt{1-\cos^2 u}$ for $0\le u\le 180°$, we get
$\cos \theta = \sin^2 \phi\cos\theta+(\cos \phi)(\sqrt{1-\sin^2\phi\cos^2\theta})(\cos AB)$
$\cos^2 \phi\cos\theta=(\cos \phi)(\sqrt{1-\sin^2\phi\cos^2\theta})(\cos AB)$
and this formula for the arc length $AB$:
$\color{blue}{\cos AB = \dfrac{\cos \phi\cos \theta}{\sqrt{1-\sin^2\phi\cos^2\theta}}} (0°\le\theta\le 180°)$
