你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
扇献隙
捅瓶啡
public static double R_EARTH_EQUATORIAL = 6378137.0; public static double R_EARTH_POLAR = 6356752.3; // The shortest dist between two points on a globe. Lat/lngs are in RADIANS public static double greatCircleDistance(double lat_1, double lng_1, double lat_2, double lng_2) { double d_lat = lat_1 - lat_2; double d_lng = lng_1 - lng_2; double lat_ave = (lat_1 + lat_2) / 2; double h = haversin(d_lat) + Math.cos(lat_1) * Math.cos(lat_2) * haversin(d_lng); return 2 * R_EARTH(lat_ave) * Math.asin(Math.pow(h, 0.5)); } public static double haversin(Double x) { return Math.pow(Math.sin(x/2),2); } // Returns radius of earth at a given latitude public static double R_EARTH(double latitude) { double a = R_EARTH_EQUATORIAL; double b = R_EARTH_POLAR; double x = latitude; double p = Math.pow((Math.pow(a,2) * Math.cos(x)),2); double q = Math.pow((Math.pow(b,2) * Math.sin(x)),2); double r = Math.pow(a * Math.cos(x),2); double s = Math.pow(b * Math.sin(x),2); return Math.pow(((p + q) / (r + s)), 0.5); }
要回复问题请先登录或注册
document.getElementById(\\\'test\\\')
2 个回复
扇献隙
捅瓶啡