I want to calculate the distance from a point given by latitude and longitude to a line-segment given by two points (part of a great-circle). All coordinates are given in WGS84.
I know how to calculate this in Cartesian coordinates but not on a sphere. Can somebody please provide the formula?
