Let A,B and C be points on the Earth, for example. Suppose A and B are joined by a geodesic (so AB is a geodesic segment). How do you calculate the shortest distance from C to AB? I can easily calucate the distance to the great circle plane... simply take
N = A x B / | A x B |
Then, normalize C call it C' and so
C' . N = cos(<CON).
Then 90-<CON yields distance from C to the plane on which AB lives (after multiplying by appropriate radius of course). But this may not be the distance to the segment. For example, take A and B to be points, say (30 E, 0 N) and (30 W, 0 N) (resp.) and C = (180E, 0N). Then the distance of C to the equitorial plane is 0 but that is certainly not the distance from C to geodesic segment AB.