コード例 #1
0
ファイル: elements.py プロジェクト: yashverma38/poliastro
def coe_rotation_matrix(inc, raan, argp):
    """Create a rotation matrix for coe transformation
    """
    r = rotation_matrix(raan, 2)
    r = r @ rotation_matrix(inc, 0)
    r = r @ rotation_matrix(argp, 2)
    return r
コード例 #2
0
ファイル: elements.py プロジェクト: poliastro/poliastro
def coe_rotation_matrix(inc, raan, argp):
    """Create a rotation matrix for coe transformation
    """
    r = rotation_matrix(raan, 2)
    r = r @ rotation_matrix(inc, 0)
    r = r @ rotation_matrix(argp, 2)
    return r
コード例 #3
0
ファイル: test_core_util.py プロジェクト: wumpus/poliastro
def test_rotation_matrix_z():
    result = rotation_matrix(0.218, 2)
    expected = np.array([[0.97633196, -0.21627739, 0.0],
                         [0.21627739, 0.97633196, 0.0], [0.0, 0.0, 1.0]])
    assert np.allclose(expected, result)
コード例 #4
0
ファイル: test_core_util.py プロジェクト: poliastro/poliastro
def test_rotation_matrix_x():
    result = util.rotation_matrix(0.218, 0)
    expected = np.array(
        [[1.0, 0.0, 0.0], [0.0, 0.97633196, -0.21627739], [0.0, 0.21627739, 0.97633196]]
    )
    assert np.allclose(expected, result)