本文整理汇总了Python中poliastro.twobody.orbit.Orbit.circular方法的典型用法代码示例。如果您正苦于以下问题:Python Orbit.circular方法的具体用法?Python Orbit.circular怎么用?Python Orbit.circular使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类poliastro.twobody.orbit.Orbit
的用法示例。
在下文中一共展示了Orbit.circular方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_orbit_representation
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import circular [as 别名]
def test_orbit_representation():
ss = Orbit.circular(
Earth, 600 * u.km, 20 * u.deg, epoch=Time("2018-09-08 09:04:00", scale="tdb")
)
expected_str = "6978 x 6978 km x 20.0 deg (GCRS) orbit around Earth (\u2641) at epoch 2018-09-08 09:04:00.000 (TDB)"
assert str(ss) == repr(ss) == expected_str
示例2: test_pqw_for_circular_equatorial_orbit
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import circular [as 别名]
def test_pqw_for_circular_equatorial_orbit():
ss = Orbit.circular(Earth, 600 * u.km)
expected_p = [1, 0, 0] * u.one
expected_q = [0, 1, 0] * u.one
expected_w = [0, 0, 1] * u.one
p, q, w = ss.pqw()
assert_allclose(p, expected_p)
assert_allclose(q, expected_q)
assert_allclose(w, expected_w)
示例3: test_geosync_has_proper_period
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import circular [as 别名]
def test_geosync_has_proper_period():
expected_period = 1436 * u.min
ss = Orbit.circular(Earth, alt=42164 * u.km - Earth.R)
assert_quantity_allclose(ss.period, expected_period, rtol=1e-4)
示例4: test_circular_has_proper_semimajor_axis
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import circular [as 别名]
def test_circular_has_proper_semimajor_axis():
alt = 500 * u.km
attractor = Earth
expected_a = Earth.R + alt
ss = Orbit.circular(attractor, alt)
assert ss.a == expected_a