尝试使用以下PyEphem示例代码:
import ephem
import datetime
import math
name = "SPOT 6";
line1 = "1 38755U 12047A 15104.74620640 .00000406 00000-0 96954-4 0 9999";
line2 = "2 38755 98.1581 172.5167 0001084 90.6537 269.4779 14.58589040138138";
spot6 = ephem.readtle(name, line1, line2)
spot6.compute('2015/4/15')
print('\nLat:%s, Long:%s' % (spot6.sublat, spot6.sublong))
Lat:-70:19:25.5,Long:126:16:41.2
如何解释上面的纬度/经度坐标?如果以十进制度转换为纬度/经度,它会是什么?
答案 0 :(得分:2)
您可以使用PyEphem中的degree
符号将其浮点值以弧度为单位的角度转换为度数:
from ephem import degree
print(spot6.sublat / degree)
print(spot6.sublong / degree)
这将打印PyEphem以弧分和弧秒打印的度数测量的十进制等值:
-70.3237369775
126.278121979