Angle between two position vectors on a sphere

446 Views Asked by At

I'm trying to find a general formula for the dot product of two position vectors of two points on a unit sphere given their latitude and longitude coordinates but I'm not sure how to find the angle between the vectors. Could someone help me figure it out?

1

There are 1 best solutions below

2
On BEST ANSWER

Suppose WLOG the radius of the sphere is 1. Let $(\phi, \theta)$ be the latitude and longitude coordinates.

  1. Convert from latitude/longitude to cartesian coordinates.

$(\phi, \theta) \mapsto (\cos \phi \cos \theta, \cos \phi \sin \theta, \sin \phi)$

  1. Take the dot product in cartesian coordinates.

One can show (exercise) that for points $(\phi_1, \theta_1)$ and $(\phi_2, \theta_2)$ that the answer works out to be $\sin \phi_1 \sin \phi_2 + \cos \phi_1 \cos \phi_2 \cos (\theta_1 - \theta_2)$.