根据给定的 LAT 和 LONG 计算连接到同一本地网络的两个设备的距离

Calculate the distance of two devices that are connected into the same local network base on the given LAT and LONG

有没有人已经完成过这种任务?

我已经搜索了一个小时,除了 "Triangulate".

之外,我没有找到任何符合我要求的东西

我很难过,我想在两个设备 运行 和 Android 操作系统中实现它,但我真的不能再逼迫自己了。

The process will required a Server(ServerSocket) and Client(Socket), both of them are Connected into the same Local Network, the Server will listen for incoming clients, and once they're become connected, the Client will fetch the current LAT and LONG using the GPS and send it to Server, the Server now will calculate the distance of the Client from the Server itself and display it into graphical interface(Basically the interface is just showing two icon and their distance).

我已经完成了 ServerSocketSocketGPS 的事情,唯一的任务是如何计算给定的距离纬度和经度。

当然,根据地理坐标计算距离是一个 well-studied 问题。确保选择适用于小距离的公式版本。