I have seen the answer to this question - Great arc distance between two points on a unit sphere
However in a fortran program that I have this is the code to calculate spherical distance between two points - presuming lambda is longitude and theta is latitude
arg=$\sin\theta_1$ * $\sin\theta_2$ + $\cos\theta_1$ *$\cos\theta_2$ * $\cos(\lambda_1-\lambda_2)$
$dis=radius*acos(arg)$
The identity referenced in the linked answer is given below. Can these be shown to be equivalent ?
$\cos\theta_1$ $\cos\theta_2$ + $\sin\theta_1$ $\sin\theta_2$ $\cos(\psi_1 - \psi_2)$
Indeed both the formulae are identical. This can be shown in the following manner.
In the spherical polar coordinate system $\theta$ polar angle is the angle between the zenith direction and a line segment OP. But $\theta$ is nothing but the co latitude. Since we do know that latitude
$\theta$ = 90 - colatitude and also $\cos(90 - \theta)$ = $\sin\theta$. Substituting this into the original identity reveals that the identities are equal.