Beispiel #1
0
class testEulers(unittest.TestCase):
    def setUp(self):
        self.euler1 = Eulers(10.0, 20.0, 30.0)

    def test_2Quaternion(self):
        q = self.euler1.toQuaternion().unitary()
        np.testing.assert_almost_equal(self.euler1.tolist(), q.toEulers())

    def test_2Rodrigues(self):
        r1 = self.euler1.toQuaternion().toRodrigues()
        r2 = self.euler1.toRodrigues()
        np.testing.assert_almost_equal(r1, r2)

    def test_2OrientationMatrix(self):
        g1 = self.euler1.toQuaternion().toOrientationMatrix()
        g2 = self.euler1.toOrientationMatrix()
        np.testing.assert_almost_equal(g1, g2)
Beispiel #2
0
class testEulers(unittest.TestCase):

    def setUp(self):
        self.euler1 = Eulers(10.0, 20.0, 30.0)

    def test_2Quaternion(self):
        q = self.euler1.toQuaternion().unitary()
        np.testing.assert_almost_equal(self.euler1.tolist(),
                                       q.toEulers())

    def test_2Rodrigues(self):
        r1 = self.euler1.toQuaternion().toRodrigues()
        r2 = self.euler1.toRodrigues()
        np.testing.assert_almost_equal(r1, r2)

    def test_2OrientationMatrix(self):
        g1 = self.euler1.toQuaternion().toOrientationMatrix()
        g2 = self.euler1.toOrientationMatrix()
        np.testing.assert_almost_equal(g1, g2)
Beispiel #3
0
 def orientationMatrix(self):
     phi1, phi, phi2 = self.eulers
     return Eulers(phi1, phi, phi2).toOrientationMatrix()
Beispiel #4
0
 def setUp(self):
     self.euler1 = Eulers(10.0, 20.0, 30.0)
Beispiel #5
0
 def setUp(self):
     self.euler1 = Eulers(10.0, 20.0, 30.0)