2

我正在尝试使用 Skyfield 绘制轨道,但它不起作用。

这是代码:

import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos, EarthSatellite


text = """
GOCE
1 34602U 09013A   13314.96046236  .14220718  20669-5  50412-4 0   930
2 34602 096.5717 344.5256 0009826 296.2811 064.0942 16.58673376272979
"""
lines = text.strip().splitlines()

sat = EarthSatellite(lines[1], lines[2], lines[0])
print(sat.epoch.utc_jpl())

这是我得到的错误:

  File "orbit_preditor.py", line 21, in <module>
    ISS     = EarthSatellite(L1, L2)
  File "C:\Python\Python36\lib\site-packages\skyfield\sgp4lib.py", line 86, in __init__
    EarthSatellite.timescale = load.timescale()
  File "C:\Python\Python36\lib\site-packages\skyfield\iokit.py", line 232, in timescale
    preds = self('deltat.preds')
  File "C:\Python\Python36\lib\site-packages\skyfield\iokit.py", line 142, in __call__
    expiration_date, data = parser(f)
  File "C:\Python\Python36\lib\site-packages\skyfield\iokit.py", line 309, in parse_deltat_preds
    expiration_date = date(year[0] + 2, month[0], 1)
ValueError: year 58668 is out of range

有任何想法吗?

4

1 回答 1

2

尝试使用 . 升级到新版本的 Skyfield pip install -U skyfield。第三方数据文件更改了格式,因此我们制作了新的 Skyfield 版本来修复它。

于 2019-03-01T02:47:33.647 回答