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)$


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)$

  • $\begingroup$ It would be useful if you included here the formula you're interested in from the referenced post. $\endgroup$ Dec 20, 2015 at 3:59

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.