当前位置: 首页>>代码示例>>Python>>正文


Python Orbit.geostationary方法代码示例

本文整理汇总了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()
    )
开发者ID:poliastro,项目名称:poliastro,代码行数:10,代码来源:test_orbit.py

示例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()
    )
开发者ID:poliastro,项目名称:poliastro,代码行数:10,代码来源:test_orbit.py

示例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)
开发者ID:poliastro,项目名称:poliastro,代码行数:10,代码来源:test_orbit.py

示例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)
开发者ID:poliastro,项目名称:poliastro,代码行数:6,代码来源:test_orbit.py

示例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)
开发者ID:poliastro,项目名称:poliastro,代码行数:8,代码来源:test_orbit.py


注:本文中的poliastro.twobody.orbit.Orbit.geostationary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。