本文整理汇总了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