如何解读 PyEphem lat/long

How to interpret PyEphem lat/long

尝试使用以下 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))

纬度:-70:19:25.5, Long:126:16:41.2

如何解释上面的lat/long坐标?如果换算成十进制的lat/long会是多少?

您可以使用 PyEphem 中的 degree 符号将浮点值以弧度为单位的角度转换为度数:

from ephem import degree
print(spot6.sublat / degree)
print(spot6.sublong / degree)

这将打印 PyEphem 以弧分和弧秒为单位打印的度数测量值的十进制等效值:

-70.3237369775
126.278121979