我找了一个用java写的源代码,如下:
   double radLat1 = rad(lat1);
   double radLat2 = rad(lat2);
   double a = rad(lat1) - rad(lat2);
   double b = rad(lng1) - rad(lng2);
   double s = 2 * Math.Asin(Math.Sqrt(Math.Pow(Math.Sin(a/2),2) + 
    Math.Cos(radLat1)*Math.Cos(radLat2)*Math.Pow(Math.Sin(b/2),2)));
   s = s * EARTH_RADIUS;
   s = Math.Round(s * 10000) / 10000;
其中,rad这个函数在c#中不识别,也不知道该引入什么包,所以~~~~~~~~