在球体上找到两点的质心(k-means on a sphere)

Finding two points' center of mass on a sphere (k-means on a sphere)

请帮助我解决编程任务中的子问题(球体上的 k 均值聚类)。

假设地球是一个球体。并且有两个点(我们知道它们的经纬度)上面有质量m_1和m_2。

问题是如果距离测量为the great-circle distance.

,求这两个点在球体上的质心的经纬度

你想找到距离

处的大圆弧上的点
l = L * m1 / (m1 + m2)

从第一个点开始,其中 L 是点之间的完整距离。
您可以使用或
spherical linear interpolation : 将球面坐标转换为笛卡尔坐标系,使用向量,转换回来
或者
测地线方法 - 找到从第一个点到第二个点的方位,找到距离 L,并在找到方位的情况下移动距离 l。所有公式都在这个页面:Destination point given distance and bearing from start point