當前位置: 首頁>>代碼示例>>Python>>正文


Python Orbit.circular方法代碼示例

本文整理匯總了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
開發者ID:poliastro,項目名稱:poliastro,代碼行數:9,代碼來源:test_orbit.py

示例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)
開發者ID:poliastro,項目名稱:poliastro,代碼行數:11,代碼來源:test_orbit.py

示例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)
開發者ID:poliastro,項目名稱:poliastro,代碼行數:8,代碼來源:test_orbit.py

示例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
開發者ID:poliastro,項目名稱:poliastro,代碼行數:8,代碼來源:test_orbit.py


注:本文中的poliastro.twobody.orbit.Orbit.circular方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。