User blog comment:Mutethemusic/I feel for you makes my heart lone to be tree/@comment-3582285-20120726023241

Haversine formula: a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2) c = 2.atan2(√a, √(1−a)) d = R.c where R is earth’s radius (mean radius = 6,371km); note that angles need to be in radians to pass to trig functions!