Beispiel #1
0
class QtPlotItem3D(QtPlotItem2D):
    """Use forward instance to not cause import issues if
    not installed."""

    widget = ForwardInstance(gl_view_widget)

    def create_widget(self):
        from pyqtgraph.opengl import GLViewWidget

        if isinstance(self.parent(), AbstractQtPlotItem):
            self.widget = self.parent_widget()
        else:
            self.widget = GLViewWidget(parent=self.parent_widget())
            self.widget.opts["distance"] = 40
            self.widget.raise_()

    def init_signals(self):
        pass

    def _create_grid(self):
        from pyqtgraph.opengl import GLGridItem

        gx = GLGridItem()
        gx.rotate(90, 0, 1, 0)
        gx.translate(-10, 0, 0)
        self.widget.addItem(gx)
        gy = GLGridItem()
        gy.rotate(90, 1, 0, 0)
        gy.translate(0, -10, 0)
        self.widget.addItem(gy)
        gz = GLGridItem()
        gz.translate(0, 0, -10)
        self.widget.addItem(gz)

    def set_z(self, z):
        self._refresh_plot()

    def _refresh_plot(self):
        import numpy as np

        # import pyqtgraph as pg
        from pyqtgraph import opengl as gl

        self._create_grid()
        pts = np.vstack(
            [self.declaration.x, self.declaration.y,
             self.declaration.z]).transpose()
        plt = gl.GLLinePlotItem(
            pos=pts
        )  # , color=pg.glColor((i,n*1.3)), width=(i+1)/10., antialias=True)
        self.widget.addItem(plt)

    def set_grid(self, grid):
        pass
Beispiel #2
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1129, 600)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.graphicsView = GLViewWidget(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.graphicsView.sizePolicy().hasHeightForWidth())
        self.graphicsView.setSizePolicy(sizePolicy)
        self.graphicsView.setMinimumSize(QtCore.QSize(300, 0))
        self.graphicsView.setObjectName("graphicsView")
        self.gridLayout.addWidget(self.graphicsView, 0, 1, 1, 1)
        self.plainTextEdit = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit.setReadOnly(True)
        self.plainTextEdit.setObjectName("plainTextEdit")
        self.gridLayout.addWidget(self.plainTextEdit, 0, 2, 1, 1)
        self.pushButton = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout.addWidget(self.pushButton, 1, 1, 1, 1,
                                  QtCore.Qt.AlignLeft)
        self.plainTextEdit.raise_()
        self.graphicsView.raise_()
        self.pushButton.raise_()
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1129, 20))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.pushButton.setText(_translate("MainWindow", "Start"))
Beispiel #3
0
class QtPlotItem3D(QtPlotItem2D):
    """ Use forward instance to not cause import issues if 
    not installed. """
    widget = ForwardInstance(gl_view_widget)
    
    def create_widget(self):
        from pyqtgraph.opengl import GLViewWidget
        if isinstance(self.parent(),AbstractQtPlotItem):
            self.widget = self.parent_widget()
        else:
            self.widget = GLViewWidget(parent=self.parent_widget())
            self.widget.opts['distance'] = 40
            self.widget.raise_()
            
    def init_signals(self):
        pass

    def _create_grid(self):
        from pyqtgraph.opengl import GLGridItem
        gx = GLGridItem()
        gx.rotate(90, 0, 1, 0)
        gx.translate(-10, 0, 0)
        self.widget.addItem(gx)
        gy = GLGridItem()
        gy.rotate(90, 1, 0, 0)
        gy.translate(0, -10, 0)
        self.widget.addItem(gy)
        gz = GLGridItem()
        gz.translate(0, 0, -10)
        self.widget.addItem(gz)
        
    def set_z(self,z):
        self._refresh_plot()
        
    def _refresh_plot(self):
        import numpy as np
        #import pyqtgraph as pg
        from pyqtgraph import opengl as gl
        
        self._create_grid()
        pts = np.vstack([self.declaration.x,self.declaration.y,self.declaration.z]).transpose()
        plt = gl.GLLinePlotItem(pos=pts)#, color=pg.glColor((i,n*1.3)), width=(i+1)/10., antialias=True)
        self.widget.addItem(plt)
        
    def set_grid(self,grid):
        pass
Beispiel #4
0
class Ui_FreeIMUCal(object):
    def setupUi(self, FreeIMUCal):
        FreeIMUCal.setObjectName("FreeIMUCal")
        FreeIMUCal.resize(800, 680)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(FreeIMUCal.sizePolicy().hasHeightForWidth())
        FreeIMUCal.setSizePolicy(sizePolicy)
        FreeIMUCal.setMinimumSize(QtCore.QSize(800, 600))
        FreeIMUCal.setMaximumSize(QtCore.QSize(800, 680))
        FreeIMUCal.setDocumentMode(False)
        self.centralwidget = QtWidgets.QWidget(FreeIMUCal)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
        self.centralwidget.setSizePolicy(sizePolicy)
        self.centralwidget.setObjectName("centralwidget")
        self.line = QtWidgets.QFrame(self.centralwidget)
        self.line.setGeometry(QtCore.QRect(10, 20, 791, 16))
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 0, 837, 30))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.line_2 = QtWidgets.QFrame(self.gridLayoutWidget)
        self.line_2.setFrameShape(QtWidgets.QFrame.VLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName("line_2")
        self.gridLayout.addWidget(self.line_2, 0, 4, 1, 1)
        self.samplingToggleButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.samplingToggleButton.setEnabled(False)
        self.samplingToggleButton.setAutoDefault(False)
        self.samplingToggleButton.setDefault(False)
        self.samplingToggleButton.setFlat(False)
        self.samplingToggleButton.setObjectName("samplingToggleButton")
        self.gridLayout.addWidget(self.samplingToggleButton, 0, 7, 1, 1)
        self.serialPortEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.serialPortEdit.setObjectName("serialPortEdit")
        self.gridLayout.addWidget(self.serialPortEdit, 0, 1, 1, 1)
        self.calibrateButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.calibrateButton.setEnabled(False)
        self.calibrateButton.setObjectName("calibrateButton")
        self.gridLayout.addWidget(self.calibrateButton, 0, 9, 1, 1)
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.calAlgorithmComboBox = QtWidgets.QComboBox(self.gridLayoutWidget)
        self.calAlgorithmComboBox.setEnabled(False)
        self.calAlgorithmComboBox.setObjectName("calAlgorithmComboBox")
        self.calAlgorithmComboBox.addItem("")
        self.gridLayout.addWidget(self.calAlgorithmComboBox, 0, 8, 1, 1)
        self.connectButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.connectButton.setObjectName("connectButton")
        self.gridLayout.addWidget(self.connectButton, 0, 3, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 0, 6, 1, 1)
        self.serialProtocol = QtWidgets.QComboBox(self.gridLayoutWidget)
        self.serialProtocol.setEnabled(True)
        self.serialProtocol.setObjectName("serialProtocol")
        self.serialProtocol.addItem("")
        self.gridLayout.addWidget(self.serialProtocol, 0, 2, 1, 1)
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(0, 30, 801, 631))
        self.tabWidget.setObjectName("tabWidget")
        self.uncalibratedTab = QtWidgets.QWidget()
        self.uncalibratedTab.setObjectName("uncalibratedTab")
        self.gridLayoutWidget_4 = QtWidgets.QWidget(self.uncalibratedTab)
        self.gridLayoutWidget_4.setGeometry(QtCore.QRect(0, 10, 791, 588))
        self.gridLayoutWidget_4.setObjectName("gridLayoutWidget_4")
        self.gridLayout_4 = QtWidgets.QGridLayout(self.gridLayoutWidget_4)
        self.gridLayout_4.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize)
        self.gridLayout_4.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.gridLayout_5 = QtWidgets.QGridLayout()
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget_4)
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.gridLayout_5.addWidget(self.label_2, 0, 1, 1, 1)
        self.accYZ = PlotWidget(self.gridLayoutWidget_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.accYZ.sizePolicy().hasHeightForWidth())
        self.accYZ.setSizePolicy(sizePolicy)
        self.accYZ.setObjectName("accYZ")
        self.gridLayout_5.addWidget(self.accYZ, 1, 0, 1, 1)
        self.accZX = PlotWidget(self.gridLayoutWidget_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.accZX.sizePolicy().hasHeightForWidth())
        self.accZX.setSizePolicy(sizePolicy)
        self.accZX.setObjectName("accZX")
        self.gridLayout_5.addWidget(self.accZX, 1, 1, 1, 1)
        self.accXY = PlotWidget(self.gridLayoutWidget_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.accXY.sizePolicy().hasHeightForWidth())
        self.accXY.setSizePolicy(sizePolicy)
        self.accXY.setObjectName("accXY")
        self.gridLayout_5.addWidget(self.accXY, 0, 0, 1, 1)
        self.gridLayout_4.addLayout(self.gridLayout_5, 1, 0, 1, 1)
        self.gridLayout_3 = QtWidgets.QGridLayout()
        self.gridLayout_3.setSizeConstraint(QtWidgets.QLayout.SetFixedSize)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.magnXY = PlotWidget(self.gridLayoutWidget_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.magnXY.sizePolicy().hasHeightForWidth())
        self.magnXY.setSizePolicy(sizePolicy)
        self.magnXY.setObjectName("magnXY")
        self.gridLayout_3.addWidget(self.magnXY, 0, 0, 1, 1)
        self.magnYZ = PlotWidget(self.gridLayoutWidget_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.magnYZ.sizePolicy().hasHeightForWidth())
        self.magnYZ.setSizePolicy(sizePolicy)
        self.magnYZ.setObjectName("magnYZ")
        self.gridLayout_3.addWidget(self.magnYZ, 1, 0, 1, 1)
        self.magnZX = PlotWidget(self.gridLayoutWidget_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.magnZX.sizePolicy().hasHeightForWidth())
        self.magnZX.setSizePolicy(sizePolicy)
        self.magnZX.setObjectName("magnZX")
        self.gridLayout_3.addWidget(self.magnZX, 1, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget_4)
        self.label_3.setAlignment(QtCore.Qt.AlignCenter)
        self.label_3.setObjectName("label_3")
        self.gridLayout_3.addWidget(self.label_3, 0, 1, 1, 1)
        self.gridLayout_4.addLayout(self.gridLayout_3, 1, 2, 1, 1)
        self.magn3D = GLViewWidget(self.gridLayoutWidget_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.magn3D.sizePolicy().hasHeightForWidth())
        self.magn3D.setSizePolicy(sizePolicy)
        self.magn3D.setObjectName("magn3D")
        self.gridLayout_4.addWidget(self.magn3D, 0, 2, 1, 1)
        self.acc3D = GLViewWidget(self.gridLayoutWidget_4)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.acc3D.sizePolicy().hasHeightForWidth())
        self.acc3D.setSizePolicy(sizePolicy)
        self.acc3D.setObjectName("acc3D")
        self.gridLayout_4.addWidget(self.acc3D, 0, 0, 1, 1)
        self.line_3 = QtWidgets.QFrame(self.gridLayoutWidget_4)
        self.line_3.setLineWidth(1)
        self.line_3.setFrameShape(QtWidgets.QFrame.VLine)
        self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.gridLayout_4.addWidget(self.line_3, 1, 1, 1, 1)
        self.line_3.raise_()
        self.acc3D.raise_()
        self.magn3D.raise_()
        self.tabWidget.addTab(self.uncalibratedTab, "")
        self.calibratedTab = QtWidgets.QWidget()
        self.calibratedTab.setObjectName("calibratedTab")
        self.horizontalLayoutWidget = QtWidgets.QWidget(self.calibratedTab)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 380, 791, 181))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.groupBox = QtWidgets.QGroupBox(self.horizontalLayoutWidget)
        self.groupBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.groupBox.setFlat(False)
        self.groupBox.setCheckable(False)
        self.groupBox.setObjectName("groupBox")
        self.layoutWidget = QtWidgets.QWidget(self.groupBox)
        self.layoutWidget.setGeometry(QtCore.QRect(10, 20, 381, 161))
        self.layoutWidget.setObjectName("layoutWidget")
        self.formLayout_3 = QtWidgets.QFormLayout(self.layoutWidget)
        self.formLayout_3.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
        self.formLayout_3.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow)
        self.formLayout_3.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.formLayout_3.setContentsMargins(0, 0, 0, 0)
        self.formLayout_3.setObjectName("formLayout_3")
        self.label_14 = QtWidgets.QLabel(self.layoutWidget)
        self.label_14.setObjectName("label_14")
        self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_14)
        self.calRes_acc_OSx = QtWidgets.QLineEdit(self.layoutWidget)
        self.calRes_acc_OSx.setObjectName("calRes_acc_OSx")
        self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_OSx)
        self.label_15 = QtWidgets.QLabel(self.layoutWidget)
        self.label_15.setObjectName("label_15")
        self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_15)
        self.calRes_acc_OSy = QtWidgets.QLineEdit(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.calRes_acc_OSy.sizePolicy().hasHeightForWidth())
        self.calRes_acc_OSy.setSizePolicy(sizePolicy)
        self.calRes_acc_OSy.setObjectName("calRes_acc_OSy")
        self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_OSy)
        self.label_16 = QtWidgets.QLabel(self.layoutWidget)
        self.label_16.setObjectName("label_16")
        self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_16)
        self.calRes_acc_OSz = QtWidgets.QLineEdit(self.layoutWidget)
        self.calRes_acc_OSz.setObjectName("calRes_acc_OSz")
        self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_OSz)
        self.label_17 = QtWidgets.QLabel(self.layoutWidget)
        self.label_17.setObjectName("label_17")
        self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_17)
        self.calRes_acc_SCx = QtWidgets.QLineEdit(self.layoutWidget)
        self.calRes_acc_SCx.setObjectName("calRes_acc_SCx")
        self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_SCx)
        self.label_18 = QtWidgets.QLabel(self.layoutWidget)
        self.label_18.setObjectName("label_18")
        self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_18)
        self.calRes_acc_SCy = QtWidgets.QLineEdit(self.layoutWidget)
        self.calRes_acc_SCy.setObjectName("calRes_acc_SCy")
        self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_SCy)
        self.label_19 = QtWidgets.QLabel(self.layoutWidget)
        self.label_19.setObjectName("label_19")
        self.formLayout_3.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_19)
        self.calRes_acc_SCz = QtWidgets.QLineEdit(self.layoutWidget)
        self.calRes_acc_SCz.setObjectName("calRes_acc_SCz")
        self.formLayout_3.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_SCz)
        self.horizontalLayout.addWidget(self.groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(self.horizontalLayoutWidget)
        self.groupBox_2.setObjectName("groupBox_2")
        self.layoutWidget_2 = QtWidgets.QWidget(self.groupBox_2)
        self.layoutWidget_2.setGeometry(QtCore.QRect(10, 20, 381, 161))
        self.layoutWidget_2.setObjectName("layoutWidget_2")
        self.formLayout_5 = QtWidgets.QFormLayout(self.layoutWidget_2)
        self.formLayout_5.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
        self.formLayout_5.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow)
        self.formLayout_5.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.formLayout_5.setContentsMargins(0, 0, 0, 0)
        self.formLayout_5.setObjectName("formLayout_5")
        self.label_27 = QtWidgets.QLabel(self.layoutWidget_2)
        self.label_27.setObjectName("label_27")
        self.formLayout_5.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_27)
        self.calRes_magn_OSx = QtWidgets.QLineEdit(self.layoutWidget_2)
        self.calRes_magn_OSx.setObjectName("calRes_magn_OSx")
        self.formLayout_5.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_OSx)
        self.label_28 = QtWidgets.QLabel(self.layoutWidget_2)
        self.label_28.setObjectName("label_28")
        self.formLayout_5.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_28)
        self.calRes_magn_OSy = QtWidgets.QLineEdit(self.layoutWidget_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.calRes_magn_OSy.sizePolicy().hasHeightForWidth())
        self.calRes_magn_OSy.setSizePolicy(sizePolicy)
        self.calRes_magn_OSy.setObjectName("calRes_magn_OSy")
        self.formLayout_5.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_OSy)
        self.label_29 = QtWidgets.QLabel(self.layoutWidget_2)
        self.label_29.setObjectName("label_29")
        self.formLayout_5.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_29)
        self.calRes_magn_OSz = QtWidgets.QLineEdit(self.layoutWidget_2)
        self.calRes_magn_OSz.setObjectName("calRes_magn_OSz")
        self.formLayout_5.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_OSz)
        self.label_30 = QtWidgets.QLabel(self.layoutWidget_2)
        self.label_30.setObjectName("label_30")
        self.formLayout_5.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_30)
        self.calRes_magn_SCx = QtWidgets.QLineEdit(self.layoutWidget_2)
        self.calRes_magn_SCx.setObjectName("calRes_magn_SCx")
        self.formLayout_5.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_SCx)
        self.label_31 = QtWidgets.QLabel(self.layoutWidget_2)
        self.label_31.setObjectName("label_31")
        self.formLayout_5.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_31)
        self.calRes_magn_SCy = QtWidgets.QLineEdit(self.layoutWidget_2)
        self.calRes_magn_SCy.setObjectName("calRes_magn_SCy")
        self.formLayout_5.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_SCy)
        self.label_32 = QtWidgets.QLabel(self.layoutWidget_2)
        self.label_32.setObjectName("label_32")
        self.formLayout_5.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_32)
        self.calRes_magn_SCz = QtWidgets.QLineEdit(self.layoutWidget_2)
        self.calRes_magn_SCz.setObjectName("calRes_magn_SCz")
        self.formLayout_5.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_SCz)
        self.horizontalLayout.addWidget(self.groupBox_2)
        self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.calibratedTab)
        self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(488, 560, 307, 31))
        self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.saveCalibrationEEPROMButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
        self.saveCalibrationEEPROMButton.setEnabled(False)
        self.saveCalibrationEEPROMButton.setObjectName("saveCalibrationEEPROMButton")
        self.horizontalLayout_2.addWidget(self.saveCalibrationEEPROMButton)
        self.saveCalibrationHeaderButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
        self.saveCalibrationHeaderButton.setEnabled(False)
        self.saveCalibrationHeaderButton.setObjectName("saveCalibrationHeaderButton")
        self.horizontalLayout_2.addWidget(self.saveCalibrationHeaderButton)
        self.horizontalLayoutWidget_3 = QtWidgets.QWidget(self.calibratedTab)
        self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(0, 0, 791, 381))
        self.horizontalLayoutWidget_3.setObjectName("horizontalLayoutWidget_3")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_3)
        self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.tabWidget_2 = QtWidgets.QTabWidget(self.horizontalLayoutWidget_3)
        self.tabWidget_2.setTabPosition(QtWidgets.QTabWidget.South)
        self.tabWidget_2.setTabShape(QtWidgets.QTabWidget.Rounded)
        self.tabWidget_2.setUsesScrollButtons(True)
        self.tabWidget_2.setDocumentMode(False)
        self.tabWidget_2.setTabsClosable(False)
        self.tabWidget_2.setMovable(False)
        self.tabWidget_2.setObjectName("tabWidget_2")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.accXY_cal = PlotWidget(self.tab)
        self.accXY_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.accXY_cal.sizePolicy().hasHeightForWidth())
        self.accXY_cal.setSizePolicy(sizePolicy)
        self.accXY_cal.setObjectName("accXY_cal")
        self.tabWidget_2.addTab(self.tab, "")
        self.tab_4 = QtWidgets.QWidget()
        self.tab_4.setObjectName("tab_4")
        self.accYZ_cal = PlotWidget(self.tab_4)
        self.accYZ_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.accYZ_cal.sizePolicy().hasHeightForWidth())
        self.accYZ_cal.setSizePolicy(sizePolicy)
        self.accYZ_cal.setObjectName("accYZ_cal")
        self.tabWidget_2.addTab(self.tab_4, "")
        self.tab_3 = QtWidgets.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.accZX_cal = PlotWidget(self.tab_3)
        self.accZX_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.accZX_cal.sizePolicy().hasHeightForWidth())
        self.accZX_cal.setSizePolicy(sizePolicy)
        self.accZX_cal.setObjectName("accZX_cal")
        self.tabWidget_2.addTab(self.tab_3, "")
        self.tab_7 = QtWidgets.QWidget()
        self.tab_7.setObjectName("tab_7")
        self.acc3D_cal = GLViewWidget(self.tab_7)
        self.acc3D_cal.setGeometry(QtCore.QRect(0, 0, 389, 351))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.acc3D_cal.sizePolicy().hasHeightForWidth())
        self.acc3D_cal.setSizePolicy(sizePolicy)
        self.acc3D_cal.setObjectName("acc3D_cal")
        self.tabWidget_2.addTab(self.tab_7, "")
        self.horizontalLayout_3.addWidget(self.tabWidget_2)
        self.tabWidget_3 = QtWidgets.QTabWidget(self.horizontalLayoutWidget_3)
        self.tabWidget_3.setTabPosition(QtWidgets.QTabWidget.South)
        self.tabWidget_3.setTabShape(QtWidgets.QTabWidget.Rounded)
        self.tabWidget_3.setUsesScrollButtons(True)
        self.tabWidget_3.setDocumentMode(False)
        self.tabWidget_3.setTabsClosable(False)
        self.tabWidget_3.setMovable(False)
        self.tabWidget_3.setObjectName("tabWidget_3")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.magnXY_cal = PlotWidget(self.tab_2)
        self.magnXY_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.magnXY_cal.sizePolicy().hasHeightForWidth())
        self.magnXY_cal.setSizePolicy(sizePolicy)
        self.magnXY_cal.setObjectName("magnXY_cal")
        self.tabWidget_3.addTab(self.tab_2, "")
        self.tab_5 = QtWidgets.QWidget()
        self.tab_5.setObjectName("tab_5")
        self.magnYZ_cal = PlotWidget(self.tab_5)
        self.magnYZ_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.magnYZ_cal.sizePolicy().hasHeightForWidth())
        self.magnYZ_cal.setSizePolicy(sizePolicy)
        self.magnYZ_cal.setObjectName("magnYZ_cal")
        self.tabWidget_3.addTab(self.tab_5, "")
        self.tab_6 = QtWidgets.QWidget()
        self.tab_6.setObjectName("tab_6")
        self.magnZX_cal = PlotWidget(self.tab_6)
        self.magnZX_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.magnZX_cal.sizePolicy().hasHeightForWidth())
        self.magnZX_cal.setSizePolicy(sizePolicy)
        self.magnZX_cal.setObjectName("magnZX_cal")
        self.tabWidget_3.addTab(self.tab_6, "")
        self.tab_8 = QtWidgets.QWidget()
        self.tab_8.setObjectName("tab_8")
        self.magn3D_cal = GLViewWidget(self.tab_8)
        self.magn3D_cal.setGeometry(QtCore.QRect(0, 0, 389, 351))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.magn3D_cal.sizePolicy().hasHeightForWidth())
        self.magn3D_cal.setSizePolicy(sizePolicy)
        self.magn3D_cal.setObjectName("magn3D_cal")
        self.tabWidget_3.addTab(self.tab_8, "")
        self.horizontalLayout_3.addWidget(self.tabWidget_3)
        self.horizontalLayoutWidget_4 = QtWidgets.QWidget(self.calibratedTab)
        self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(0, 560, 161, 31))
        self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4)
        self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.clearCalibrationEEPROMButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_4)
        self.clearCalibrationEEPROMButton.setEnabled(False)
        self.clearCalibrationEEPROMButton.setObjectName("clearCalibrationEEPROMButton")
        self.horizontalLayout_4.addWidget(self.clearCalibrationEEPROMButton)
        self.tabWidget.addTab(self.calibratedTab, "")
        self.tab_9 = QtWidgets.QWidget()
        self.tab_9.setObjectName("tab_9")
        self.label_4 = QtWidgets.QLabel(self.tab_9)
        self.label_4.setGeometry(QtCore.QRect(290, 270, 261, 16))
        self.label_4.setObjectName("label_4")
        self.tabWidget.addTab(self.tab_9, "")
        FreeIMUCal.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(FreeIMUCal)
        self.statusbar.setObjectName("statusbar")
        FreeIMUCal.setStatusBar(self.statusbar)

        self.retranslateUi(FreeIMUCal)
        self.tabWidget.setCurrentIndex(1)
        self.tabWidget_2.setCurrentIndex(3)
        self.tabWidget_3.setCurrentIndex(3)
        QtCore.QMetaObject.connectSlotsByName(FreeIMUCal)

    def retranslateUi(self, FreeIMUCal):
        _translate = QtCore.QCoreApplication.translate
        FreeIMUCal.setWindowTitle(_translate("FreeIMUCal", "FreeIMU Calibration Application"))
        self.samplingToggleButton.setToolTip(_translate("FreeIMUCal", "Toggle Start/Stop sampling of sensor data from the IMU"))
        self.samplingToggleButton.setText(_translate("FreeIMUCal", "Start Sampling"))
        self.calibrateButton.setToolTip(_translate("FreeIMUCal", "Run calibration algorithm over the data collected"))
        self.calibrateButton.setText(_translate("FreeIMUCal", "Calibrate"))
        self.label.setText(_translate("FreeIMUCal", "Serial Port:"))
        self.calAlgorithmComboBox.setToolTip(_translate("FreeIMUCal", "<html><head/><body><p>Calibration Algorithm used.</p></body></html>"))
        self.calAlgorithmComboBox.setItemText(0, _translate("FreeIMUCal", "Ellipsoid to Sphere"))
        self.connectButton.setToolTip(_translate("FreeIMUCal", "Connect or Disconnect from the Arduino"))
        self.connectButton.setText(_translate("FreeIMUCal", "Connect"))
        self.serialProtocol.setToolTip(_translate("FreeIMUCal", "Serial Protocol to Communicate with IMU"))
        self.serialProtocol.setItemText(0, _translate("FreeIMUCal", "FreeIMU_serial"))
        self.label_2.setText(_translate("FreeIMUCal", "Accelerometer"))
        self.label_3.setText(_translate("FreeIMUCal", "Magnetometer"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.uncalibratedTab), _translate("FreeIMUCal", "Uncalibrated"))
        self.groupBox.setTitle(_translate("FreeIMUCal", "Accelerometer"))
        self.label_14.setText(_translate("FreeIMUCal", "Offset X"))
        self.label_15.setText(_translate("FreeIMUCal", "Offset Y"))
        self.label_16.setText(_translate("FreeIMUCal", "Offset Z"))
        self.label_17.setText(_translate("FreeIMUCal", "Scale X"))
        self.label_18.setText(_translate("FreeIMUCal", "Scale Y"))
        self.label_19.setText(_translate("FreeIMUCal", "Scale Z"))
        self.groupBox_2.setTitle(_translate("FreeIMUCal", "Magnetometer"))
        self.label_27.setText(_translate("FreeIMUCal", "Offset X"))
        self.label_28.setText(_translate("FreeIMUCal", "Offset Y"))
        self.label_29.setText(_translate("FreeIMUCal", "Offset Z"))
        self.label_30.setText(_translate("FreeIMUCal", "Scale X"))
        self.label_31.setText(_translate("FreeIMUCal", "Scale Y"))
        self.label_32.setText(_translate("FreeIMUCal", "Scale Z"))
        self.saveCalibrationEEPROMButton.setToolTip(_translate("FreeIMUCal", "Store the calibration parameters to the microcontroller EEPROM"))
        self.saveCalibrationEEPROMButton.setText(_translate("FreeIMUCal", "Save to EEPROM"))
        self.saveCalibrationHeaderButton.setToolTip(_translate("FreeIMUCal", "Store the calibration parameters in an header .h file. When such header is active the EEPROM calibration storage code is disabled thus saving program and data memory."))
        self.saveCalibrationHeaderButton.setText(_translate("FreeIMUCal", "Save to calibration.h"))
        self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab), _translate("FreeIMUCal", "Acc XY"))
        self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_4), _translate("FreeIMUCal", "Acc YZ"))
        self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_3), _translate("FreeIMUCal", "Acc ZX"))
        self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_7), _translate("FreeIMUCal", "Acc 3D"))
        self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_2), _translate("FreeIMUCal", "Magn XY"))
        self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_5), _translate("FreeIMUCal", "Magn YZ"))
        self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_6), _translate("FreeIMUCal", "Magn ZX"))
        self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_8), _translate("FreeIMUCal", "Magn 3D"))
        self.clearCalibrationEEPROMButton.setToolTip(_translate("FreeIMUCal", "<html><head/><body><p>Clear any calibration parameter from the microcontroller EEPROM</p></body></html>"))
        self.clearCalibrationEEPROMButton.setText(_translate("FreeIMUCal", "Clear EEPROM"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.calibratedTab), _translate("FreeIMUCal", "Calibrated"))
        self.label_4.setText(_translate("FreeIMUCal", "To Be Implemented"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_9), _translate("FreeIMUCal", "Orientation Sensing Test"))