I would like to calculate the distance between two geographical points (defined by latitude and longitude pair) using the solution described here.
Even though I understand the general concept the part with pre-converting all of your spherical (lat/long) coordinates into 3D unit-length cartesian coordinates first is problematic for me.
Could someone explain the algorithm that needs to we written to achieve the above? Java would be perfect, but pseudocode will do as well.
Update: I'm not interested in Haversine method.