衛星の可視パスを予測するアプリを作成しています。アプリでは、'if' ステートメントを使用して、衛星が見えるかどうかを判断します。
次のように;
if satellite.neverup is False and satellite.circumpolar is False:
observer.next_pass(satellite)
この計算は、ほとんどの LEO 衛星でうまく機能します。しかし、興味深い結果がいくつか見つかりました。前後に使用される next_pass 関数はsatellite.compute(observer)
、異なる値を返します。
次のコードは結果を再現します。
import ephem
line_0 = '0 SL-3 R/B'
line_1 = '1 12904U 81103B 14252.72400340 .00001812 00000-0 13444-3 0 5754'
line_2 = '2 12904 081.1813 349.2718 0030677 147.5032 212.8569 15.02708918340741'
target = ephem.readtle(line_0,line_1,line_2)
site = ephem.Observer()
site.lon = '151:43:00'
site.lat = '-27:26:00'
site.elevation = 400
site.name = 'test facility'
site.horizon = '40:00:00'
site.date = '2014/9/20 00:29:10'
print ephem.__version__
print site.next_pass(target)
target.compute(site)
print [target.neverup,target.circumpolar]
print site.next_pass(target)
結果は次のとおりです。
3.7.5.3
(2014/9/20 01:55:43, 303:49:09.6, 2014/9/20 00:25:02, 30:44:01.7, 2014/9/20 00:30:10, 164:08:09.1)
[False, False]
(None, None, None, None, None, None)
この結果が変化しないようにするにはどうすればよいですか? どこが間違っていますか?
前もって感謝します。