本文整理汇总了Python中poliastro.twobody.orbit.Orbit.geostationary方法的典型用法代码示例。如果您正苦于以下问题:Python Orbit.geostationary方法的具体用法?Python Orbit.geostationary怎么用?Python Orbit.geostationary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类poliastro.twobody.orbit.Orbit
的用法示例。
在下文中一共展示了Orbit.geostationary方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_geostationary_non_existence_condition
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import geostationary [as 别名]
def test_geostationary_non_existence_condition(attractor, period, hill_radius):
with pytest.raises(ValueError) as excinfo:
Orbit.geostationary(attractor=attractor, period=period, hill_radius=hill_radius)
assert (
"Geostationary orbit for the given parameters doesn't exist"
in excinfo.exconly()
)
示例2: test_geostationary_input
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import geostationary [as 别名]
def test_geostationary_input(attractor):
with pytest.raises(ValueError) as excinfo:
Orbit.geostationary(attractor=attractor)
assert (
"ValueError: At least one among angular_velocity or period must be passed"
in excinfo.exconly()
)
示例3: test_geostationary_creation_with_Hill_radius
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import geostationary [as 别名]
def test_geostationary_creation_with_Hill_radius(
attractor, period, hill_radius, expected_a
):
ss = Orbit.geostationary(
attractor=attractor, period=period, hill_radius=hill_radius
)
assert_quantity_allclose(ss.a, expected_a, rtol=1.0e-7)
assert_quantity_allclose(ss.period, period, rtol=1.0e-7)
示例4: test_geostationary_creation_from_period
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import geostationary [as 别名]
def test_geostationary_creation_from_period(attractor, period, expected_a):
ss = Orbit.geostationary(attractor=attractor, period=period)
assert_quantity_allclose(ss.a, expected_a, rtol=1.0e-7)
assert_quantity_allclose(ss.period, period, rtol=1.0e-7)
示例5: test_geostationary_creation_from_angular_velocity
# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import geostationary [as 别名]
def test_geostationary_creation_from_angular_velocity(
attractor, angular_velocity, expected_a, expected_period
):
ss = Orbit.geostationary(attractor=attractor, angular_velocity=angular_velocity)
assert_quantity_allclose(ss.a, expected_a, rtol=1.0e-7)
assert_quantity_allclose(ss.period, expected_period, rtol=1.0e-7)