public Double Distance(WayPoint target)
{
double R = 6371; // earth radius
double slat = ConvertToRadians(this.Latitude), slong = ConvertToRadians(this.Longitude);
double tlat = ConvertToRadians(target.Latitude), tlong = ConvertToRadians(target.Longitude);
double d = R*
Math.Acos(Math.Sin(slat)*Math.Sin(tlat) +
Math.Cos(slat) * Math.Cos(tlat) *
Math.Cos(slong - tlong));
return d;
}