我想使用以下代码以十进制提取卫星(ISS)的坐标:
from skyfield.api import EarthSatellite, Topos, load
import time
line1 = '1 25544U 98067A 14020.93268519 .00009878 00000-0 18200-3 0 5082'
line2 = '2 25544 51.6498 109.4756 0003572 55.9686 274.8005 15.49815350868473'
satellite = EarthSatellite(line1, line2, name='ISS (ZARYA)')
while True:
ts = load.timescale()
t = ts.now()
geometry = satellite.at(t)
subpoint = geometry.subpoint()
print(subpoint.latitude)
print('\n')
print(subpoint.longitude)
time.sleep(1)
输出是一个字符串:-45deg 44' 13.5"
.
将其转换为以下内容的最简单方法是什么:-77.0089°
?