Care to reduce?
Reducing this would work too. _-_ (P=cos(θ1−θ2))
By the way, the formula above is the angle ∠AOB where A and B are two points with spherical coordinates (ρ,(π/2)−φ1,θ1) and (ρ,(π/2)−φ2,θ2), ρ≠0, and O is the origin. ((π/2)−φ means that φ is the latitude, not the azimuth.)