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


Python Orbit.frozen方法代码示例

本文整理汇总了Python中poliastro.twobody.orbit.Orbit.frozen方法的典型用法代码示例。如果您正苦于以下问题:Python Orbit.frozen方法的具体用法?Python Orbit.frozen怎么用?Python Orbit.frozen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在poliastro.twobody.orbit.Orbit的用法示例。


在下文中一共展示了Orbit.frozen方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_frozen_orbit_altitude

# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import frozen [as 别名]
def test_frozen_orbit_altitude():
    with pytest.raises(ValueError) as excinfo:
        Orbit.frozen(Earth, -1 * u.m)
    assert excinfo.type == ValueError
    assert (
        str(excinfo.value)
        == "The semimajor axis may not be smaller that Earth's radius"
    )
开发者ID:poliastro,项目名称:poliastro,代码行数:10,代码来源:test_orbit.py

示例2: test_frozen_orbit_non_spherical_arguments

# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import frozen [as 别名]
def test_frozen_orbit_non_spherical_arguments():
    with pytest.raises(AttributeError) as excinfo:
        Orbit.frozen(Jupiter, 1 * u.m)
    assert excinfo.type == AttributeError
    assert (
        str(excinfo.value)
        == "Attractor Jupiter has not spherical harmonics implemented"
    )
开发者ID:poliastro,项目名称:poliastro,代码行数:10,代码来源:test_orbit.py

示例3: test_frozen_orbit_venus_special_case

# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import frozen [as 别名]
def test_frozen_orbit_venus_special_case():
    with pytest.raises(NotImplementedError) as excinfo:
        Orbit.frozen(Venus, 1 * u.m)
    assert excinfo.type == NotImplementedError
    assert str(excinfo.value) == "This has not been implemented for Venus"
开发者ID:poliastro,项目名称:poliastro,代码行数:7,代码来源:test_orbit.py

示例4: test_frozen_orbit_non_critical_inclination

# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import frozen [as 别名]
def test_frozen_orbit_non_critical_inclination():
    orbit = Orbit.frozen(Earth, 1e3 * u.km, inc=0 * u.deg)  # Non-critical value
    assert orbit.argp in [np.pi / 2, 3 * np.pi / 2] * u.rad
开发者ID:poliastro,项目名称:poliastro,代码行数:5,代码来源:test_orbit.py

示例5: test_frozen_orbit_with_non_critical_argp

# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import frozen [as 别名]
def test_frozen_orbit_with_non_critical_argp(
    attractor, alt, argp, expected_inc, ecc, expected_ecc
):
    orbit = Orbit.frozen(attractor, alt, argp=argp, ecc=ecc)  # Non-critical value
    assert_allclose(orbit.inc, expected_inc)
    assert_allclose(orbit.ecc, expected_ecc)
开发者ID:poliastro,项目名称:poliastro,代码行数:8,代码来源:test_orbit.py

示例6: test_frozen_orbit_no_args

# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import frozen [as 别名]
def test_frozen_orbit_no_args(attractor, alt, expected_inc, expected_argp):
    orbit = Orbit.frozen(attractor, alt)
    argp = orbit.argp
    inc = orbit.inc
    assert_allclose(argp, expected_argp)
    assert_allclose(inc, expected_inc)
开发者ID:poliastro,项目名称:poliastro,代码行数:8,代码来源:test_orbit.py

示例7: test_frozen_orbit_with_critical_argp_and_critical_inc

# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import frozen [as 别名]
def test_frozen_orbit_with_critical_argp_and_critical_inc(
    attractor, alt, inc, argp, expected_inc, expected_argp
):
    orbit = Orbit.frozen(attractor, alt, inc=inc, argp=argp)
    assert_allclose(orbit.argp, expected_argp)
    assert_allclose(orbit.inc, expected_inc)
开发者ID:poliastro,项目名称:poliastro,代码行数:8,代码来源:test_orbit.py

示例8: test_frozen_orbit_argp

# 需要导入模块: from poliastro.twobody.orbit import Orbit [as 别名]
# 或者: from poliastro.twobody.orbit.Orbit import frozen [as 别名]
def test_frozen_orbit_argp(attractor, alt, argp, expected_argp, expected_inc):
    orbit = Orbit.frozen(attractor, alt, argp=argp)
    assert_allclose(orbit.argp, expected_argp)
    assert_allclose(orbit.inc, expected_inc)
开发者ID:poliastro,项目名称:poliastro,代码行数:6,代码来源:test_orbit.py


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