예제 #1
0
def test2_jac_kinematic_angular_eqs():

    time = 0
    euler_angles = np.array([0, np.pi / 2, 0])
    angular_vel = np.array([0, 1, 0], dtype=float)

    expected_sol = np.zeros([3, 3], dtype=float)
    expected_sol[0, 1] = - 1
    expected_sol[1, 0] = 1

    sol = jac_kinematic_angular_eqs(time, euler_angles, angular_vel)

    assert(np.allclose(expected_sol, sol))
예제 #2
0
def test2_jac_kinematic_angular_eqs():

    time = 0
    euler_angles = np.array([0, np.pi / 2, 0])
    ang_vel = np.array([0, 1, 0], dtype=float)

    expected_sol = np.zeros([3, 3], dtype=float)
    expected_sol[0, 1] = -1
    expected_sol[1, 0] = 1

    sol = jac_kinematic_angular_eqs(time, euler_angles, ang_vel)

    assert (np.allclose(expected_sol, sol))
예제 #3
0
def test1_jac_kinematic_angular_eqs():

    time = 0
    euler_angles = np.array([np.pi / 4, np.pi / 4, 0])
    angular_vel = np.array([1, 1, 1], dtype=float)

    expected_sol = np.zeros([3, 3])
    expected_sol[0, 1] = - 2 ** 0.5
    expected_sol[1, 0] = 2 * 2 ** 0.5
    expected_sol[2, 0] = 2

    sol = jac_kinematic_angular_eqs(time, euler_angles, angular_vel)

    assert(np.allclose(expected_sol, sol))
예제 #4
0
def test1_jac_kinematic_angular_eqs():

    time = 0
    euler_angles = np.array([np.pi / 4, np.pi / 4, 0])
    ang_vel = np.array([1, 1, 1], dtype=float)

    expected_sol = np.zeros([3, 3])
    expected_sol[0, 1] = -2**0.5
    expected_sol[1, 0] = 2 * 2**0.5
    expected_sol[2, 0] = 2

    sol = jac_kinematic_angular_eqs(time, euler_angles, ang_vel)

    assert (np.allclose(expected_sol, sol))