标签:code 表示 class src http down city atl geo
将GPS position (longitude, latitude, altitude) 转换为 local position (north, east, down)
def global_to_local(global_position, global_home):
(east_home, north_home, _, _) = utm.from_latlon(global_home[1], global_home[0])
(east, north, _, _) = utm.from_latlon(global_position[1], global_position[0])
local_position = numpy.array([north - north_home, east - east_home, -global_position[2]])
return local_position
将local position (north, east, down) 转换为 global position (long, lat, up)
def local_to_global(local_position, global_home):
(east_home, north_home, zone_number, zone_letter) = utm.from_latlon(global_home[1], global_home[0])
(lat, lon) = utm.to_latlon(east_home + local_position[1], north_home + local_position[0], zone_number, zone_letter)
global_position = numpy.array([lon, lat, -local_position[2]])
return global_position
标签:code 表示 class src http down city atl geo
原文地址:https://www.cnblogs.com/dm1299/p/11051126.html