最近遇到求经纬度的问题,搜索了一下,找到如下的方法
已知一点经纬度和距离,计算另一点的经纬度_清风专栏-CSDN博客
使用python实现该功能,计算的结果存在误差
def trans(lon,lat,distance,amuith):
import math
RE = 6371.393 * 1000 # 赤道半径,单位:m
re =RE*math.cos(lat/180*math.pi)#纬度切面的半径
lon2=lon+distance*math.sin(amuith/180*math.pi)/(re*2*math.pi)*360#求切面长度占比,与已知点经度相加
lat2=lat+distance*math.cos(amuith/180*math.pi)/(re*2*math.pi)*360
return lon2,lat2
a,b=trans(116.367,34.228,150000,135)
print(a,b)