Пример #1
0
 def test_import_polulu(self):
     # Get data, with a specified input from a POLULU system
     inFile = r'data\data_polulu.txt'
     data = imus.import_data(inFile, type='polulu', paramList=['rate', 'acc', 'omega', 'mag'])
     rate = data[0]
     acc = data[1]
     omega = data[2]
     
     self.assertAlmostEqual((rate - 125), 0)
     self.assertAlmostEqual( (acc[0,1] + 0.004575), 0)
Пример #2
0
 def test_import_yei(self):
     # Get data, with a specified input from a YEI system
     inFile = r'data\data_yei.txt'
     data = imus.import_data(inFile, type='yei', paramList=['rate', 'acc', 'omega', 'mag'])
     rate = data[0]
     acc = data[1]
     omega = data[2]
     
     self.assertAlmostEqual((rate - 109.99508526563774), 0)
     self.assertAlmostEqual( (omega[0,2] - 0.0081446301192045212), 0)
Пример #3
0
 def test_import_xio(self):
     # Get data, with a specified input from an XIO system
     inFile = r'data\data_xio\00033_CalInertialAndMag.csv'
     data = imus.import_data(inFile, type='xio', paramList=['rate', 'acc', 'omega', 'mag'])
     rate = data[0]
     acc = data[1]
     omega = data[2]
     
     self.assertAlmostEqual((rate - 256), 0)
     self.assertAlmostEqual( (omega[0,2] -10.125), 0)
Пример #4
0
 def test_import_xsens(self):
     # Get data, with a specified input from an XSens system
     inFile = r'data\data_xsens.txt'
     data = imus.import_data(inFile, type='XSens', paramList=['rate', 'acc', 'omega'])
     rate = data[0]
     acc = data[1]
     omega = data[2]
     
     self.assertEqual(rate, 50.)
     self.assertAlmostEqual( (omega[0,2] - 0.050860000000000002), 0)
Пример #5
0
    def test_import_polulu(self):
        # Get data, with a specified input from a POLULU system
        inFile = r'data\data_polulu.txt'
        data = imus.import_data(inFile,
                                type='polulu',
                                paramList=['rate', 'acc', 'omega', 'mag'])
        rate = data[0]
        acc = data[1]
        omega = data[2]

        self.assertAlmostEqual((rate - 125), 0)
        self.assertAlmostEqual((acc[0, 1] + 0.004575), 0)
Пример #6
0
    def test_import_yei(self):
        # Get data, with a specified input from a YEI system
        inFile = r'data\data_yei.txt'
        data = imus.import_data(inFile,
                                type='yei',
                                paramList=['rate', 'acc', 'omega', 'mag'])
        rate = data[0]
        acc = data[1]
        omega = data[2]

        self.assertAlmostEqual((rate - 109.99508526563774), 0)
        self.assertAlmostEqual((omega[0, 2] - 0.0081446301192045212), 0)
Пример #7
0
    def test_import_xio(self):
        # Get data, with a specified input from an XIO system
        inFile = r'data\data_xio\00033_CalInertialAndMag.csv'
        data = imus.import_data(inFile,
                                type='xio',
                                paramList=['rate', 'acc', 'omega', 'mag'])
        rate = data[0]
        acc = data[1]
        omega = data[2]

        self.assertAlmostEqual((rate - 256), 0)
        self.assertAlmostEqual((omega[0, 2] - 10.125), 0)
Пример #8
0
    def test_import_xsens(self):
        # Get data, with a specified input from an XSens system
        inFile = r'data\data_xsens.txt'
        data = imus.import_data(inFile,
                                type='XSens',
                                paramList=['rate', 'acc', 'omega'])
        rate = data[0]
        acc = data[1]
        omega = data[2]

        self.assertEqual(rate, 50.)
        self.assertAlmostEqual((omega[0, 2] - 0.050860000000000002), 0)
Пример #9
0
 def test_calc_QPos(self):
     # Get data
     inFile = r'data\data_xsens.txt'
     data = imus.import_data(inFile, type='XSens', paramList=['rate', 'acc', 'omega', 'mag'])
     rate = data[0]
     acc = data[2]
     omega = data[3]
     
     initialPosition = array([0,0,0])
     R_initialOrientation = rotmat.R1(90)
     
     q1, pos1 = imus.calc_QPos(R_initialOrientation, omega, initialPosition, acc, rate)
     plt.plot(q1)
     plt.show()
Пример #10
0
    def test_calc_QPos(self):
        # Get data
        inFile = r'data\data_xsens.txt'
        data = imus.import_data(inFile,
                                type='XSens',
                                paramList=['rate', 'acc', 'omega', 'mag'])
        rate = data[0]
        acc = data[2]
        omega = data[3]

        initialPosition = array([0, 0, 0])
        R_initialOrientation = rotmat.R1(90)

        q1, pos1 = imus.calc_QPos(R_initialOrientation, omega, initialPosition,
                                  acc, rate)
        plt.plot(q1)
        plt.show()
Пример #11
0
 def test_import_empty(self):
     # Get data, with an empty input
     data = imus.import_data()
Пример #12
0
 def test_import_empty(self):
     # Get data, with an empty input
     data = imus.import_data()