Board logo

标题: 计算城市间距离lldis.exe [打印本页]

作者: happy886rr    时间: 2017-3-16 12:28     标题: 计算城市间距离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)
  1. -----------------------------------------------------------------------------
  2. REM 计算北京到纽约的航线距离。
  3. lldis 116.23 39.54 -74.00 40.43
  4. The distance between the two cities is: 11074655.703258 (m)
  5. -----------------------------------------------------------------------------
复制代码





欢迎光临 批处理之家 (http://bathome.net./) Powered by Discuz! 7.2