The Vincenty formula give very accurate results when working with earth latitude and longitude coordinates.
The Vincenty Direct version calculates the latlon coordinates for a given bearing and distance from reference latlon coordinates.
The Vincenty Inverse formula will determine bearing and distance between two sets of coordinates.
The results are more accurate than when applying a more simple formula like Haversine.
What this formula doesn't consider is altitude above sea level. It will calculate as if the earth was one flat ocean surface.
This code is a port to tsql from Chris Veness' Java code that can be found in http://www.movable-type.co.uk/scripts/latlong-vincenty-direct.html.
The licence is also on that site, and he kindly granted permission to post this port here.
This integrates well with Google Earth.
Enjoy, Peter