Great Circle Distance Advanced

Calculate great-circle distance between two coordinates using the haversine formula.