37.545892, 126.978445 如何找到 90° 方向 100m 处的坐标(纬度、经度)?
最佳答案
找出结论。
public static double[] moveLocation(double latitude, double longitude, double direction, double length){
double distRadians = length / (6372797.6);
double rbearing = direction * Math.PI / 180.0;
double lat1 = latitude * Math.PI / 180;
double lon1 = longitude * Math.PI / 180;
double lat2 = Math.asin(Math.sin(lat1) * Math.cos(distRadians) + Math.cos(lat1)
* Math.sin(distRadians) * Math.cos(rbearing));
double lon2 = lon1 + Math.atan2(Math.sin(rbearing) * Math.sin(distRadians) * Math.cos(lat1),
Math.cos(distRadians) - Math.sin(lat1) * Math.sin(lat2));
lat2 = lat2 * 180 / Math.PI;
lon2 = lon2 * 180 / Math.PI;
return new double[]{ lat2, lon2 };
}
关于java - 如何找到距已知位置 90° 方向 100m 处的坐标(纬度、经度)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56642073/