I have been struggling to find my mistake in finding the central angle using dot product multiplication:
I have two points: New York (40.7128° N, 74.0060° W) and Miami (25.7617° N, 80.1918° W) on a perfect sphere. I firstly convert this into spherical coordinates (r,v,u) for both points and given that the sphere is unit length:
Miami: (1, -80.1918, 49.2872) New York: (1, -74.0060 ,64.2383)
Then converting this into Cartesian coordinates:
- New York: (sin(-80.1918) cos(49.2872), sin(-80.1918) sin(49.2872), cos(49.2872)) = (-0.6427, -0.74690, 0.65226)
- Miami: (sin(-74.0060) cos(64.2383), sin(-74.0060) sin(64.2383), cos(64.2383)) = (-0.4178, -0.86574, 0.43462)
Thus, now finding the angle between the radii OA (O to Miami) and OB (O to New York) we do the dot product of the position vectors: (-0.6427-0.4178)+(-0.74690-0.86574)+(0.65226*0.43462) = 1.1986265072, However if we do the cos^-1 of this it is undefined or does not exist, so we can't find the central angle.
After numerous attempts, I finally managed to find the correct method to solve this. As @eyeballfrog mentioned, I needed to swap the $\phi$ and $\theta$ and as @blamocur mentioned, the radii was not one, so I needed to divide by the magnitude of vector A and Vector B. Hope this helps anyone in the future.