本文整理匯總了Python中skyfield.timelib.JulianDate.ut1方法的典型用法代碼示例。如果您正苦於以下問題:Python JulianDate.ut1方法的具體用法?Python JulianDate.ut1怎麽用?Python JulianDate.ut1使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類skyfield.timelib.JulianDate
的用法示例。
在下文中一共展示了JulianDate.ut1方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_appendix_c_satellite
# 需要導入模塊: from skyfield.timelib import JulianDate [as 別名]
# 或者: from skyfield.timelib.JulianDate import ut1 [as 別名]
def test_appendix_c_satellite():
lines = appendix_c_example.splitlines()
sat = EarthSatellite(lines, earth)
jd_epoch = sat._sgp4_satellite.jdsatepoch
three_days_later = jd_epoch + 3.0
jd = JulianDate(tt=three_days_later)
jd.ut1 = array(three_days_later)
# First, a crucial sanity check (which is, technically, a test of
# the `sgp4` package and not of Skyfield): are the right coordinates
# being produced by our Python SGP4 propagator for this satellite?
rTEME, vTEME = sat._position_and_velocity_TEME_km(jd)
assert abs(-9060.47373569 - rTEME[0]) < 1e-8
assert abs(4658.70952502 - rTEME[1]) < 1e-8
assert abs(813.68673153 - rTEME[2]) < 1e-8
assert abs(-2.232832783 - vTEME[0]) < 1e-9
assert abs(-4.110453490 - vTEME[1]) < 1e-9
assert abs(-3.157345433 - vTEME[2]) < 1e-9