返回列表 发帖

计算城市间距离lldis.exe

LLDIS.EXE
源码链接: https://pan.baidu.com/s/1qyIp4hdIm9Z4GEGajTiVpA?pwd=rnjf
摘要:
===========================================
计算地球两点经纬度距离。
===========================================

用法:
-----------------------------------------------------------------------------
lldis [经度1] [纬度1] [经度2] [纬度2]
-----------------------------------------------------------------------------
THEOREM:
//Haversine公式(参见球面几何学)
Haversin(Distance/EARTH_R) = Haversin(toRad(latitude2-latitude1))+cos(toRad(latitude2))*cos(toRad(latitude1))* Haversin(toRad(longitude2-longitude1))
-----------------------------------------------------------------------------


示例:
北京的经纬度(116.23,39.54)
纽约的经纬度(-74.00,40.43)
-----------------------------------------------------------------------------
REM 计算北京到纽约的航线距离。
lldis 116.23 39.54 -74.00 40.43
The distance between the two cities is: 11074655.703258 (m)
-----------------------------------------------------------------------------COPY
1

评分人数

返回列表