Example #1
0
    def __init__(self, parent=None):
        super().__init__()

        self.__log_flag = True

        dirtrs = os.path.abspath(
            os.path.join(os.path.dirname(__file__), os.pardir))
        self.__logDirectory = dirtrs + '/Results/Logs/'
        self.__log_filename = strftime('%Y-%m-%d_%H-%M-%S', gmtime(
        )) + '.ubx'  #file name as year-month-day hour:minute:second in UTC

        # Setting the elements on the layout
        self.__log_b = QCheckBox("Enable", self)
        self.__log_b.setChecked(self.__log_flag)

        self.__output_edit = MyLineEdit(self.__log_filename)

        # default activated parameters
        self.typeChanged()
        self.__log_b.stateChanged.connect(partial(self.typeChanged))

        #Setting the Layout
        grid = QGridLayout()
        grid.addWidget(self.__log_b, 0, 0)
        grid.addWidget(QLabel('Output File name'), 1, 0)
        grid.addWidget(self.__output_edit, 1, 1)
        self.setLayout(grid)
Example #2
0
    def __init__(self, parent=None):
        super().__init__()

        # Possible values for Correction stream configuration
        self.__corr_flag = False
        self.__corr_type = (['ntripcli', 'tcpcli'])
        self.__corr_index_type = 0
        self.__corr_format = (['rtcm2', 'rtcm3', 'binex', 'ubx'])
        self.__corr_index_format = 1
        self.__corr_user = '******'
        self.__corr_addr = 'adresse.com'
        self.__corr_port = '2101'
        self.__corr_pw = 's3YfJx54C7'
        self.__corr_mp = 'TRS'  #Mountpoint

        #Setting elements of the layout

        self.__corr_b = QCheckBox("Enable", self)
        self.__corr_b.setChecked(self.__corr_flag)

        self.__type_list = QComboBox(self)
        self.__type_list.addItems(['NTRIP Client', 'TCP Client'])
        self.__type_list.setCurrentIndex(self.__corr_index_type)
        self.__type_list.currentIndexChanged.connect(self.typeChanged)

        self.__format_list = QComboBox(self)
        self.__format_list.addItems(['RTCM2', 'RTCM3', 'BINEX', 'UBX'])
        self.__format_list.setCurrentIndex(self.__corr_index_format)

        self.__addr_edit = MyLineEdit(self.__corr_addr, self)
        self.__port_edit = MyLineEdit(self.__corr_port, self)
        self.__mp_edit = MyLineEdit(self.__corr_mp, self)
        self.__user_edit = MyLineEdit(self.__corr_user, self)
        self.__pw_edit = MyLineEdit(self.__corr_pw, self)

        # default activated parameters
        self.typeChanged()
        self.__corr_b.stateChanged.connect(partial(self.typeChanged))
        self.__type_list.currentIndexChanged.connect(self.typeChanged)

        ###### SETTING THE LAYOUT  #######

        grid = QGridLayout()
        grid.addWidget(self.__corr_b, 0, 0)
        grid.addWidget(QLabel('Type/Format'), 0, 1)
        grid.addWidget(self.__type_list, 0, 2)
        grid.addWidget(self.__format_list, 0, 3)
        grid.addWidget(QLabel('Address'), 1, 0)
        grid.addWidget(self.__addr_edit, 1, 1, 1, 4)
        grid.addWidget(QLabel('Port'), 2, 0)
        grid.addWidget(self.__port_edit, 2, 1)
        grid.addWidget(QLabel('Mountpoint'), 2, 2)
        grid.addWidget(self.__mp_edit, 2, 3)
        grid.addWidget(QLabel('User-ID'), 3, 0)
        grid.addWidget(self.__user_edit, 3, 1)
        grid.addWidget(QLabel('Password'), 3, 2)
        grid.addWidget(self.__pw_edit, 3, 3)
        self.setLayout(grid)
Example #3
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(341, 219)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.pushButtonStart = QtGui.QPushButton(self.centralwidget)
        self.pushButtonStart.setGeometry(QtCore.QRect(90, 120, 131, 41))
        self.pushButtonStart.setAutoDefault(True)
        self.pushButtonStart.setDefault(True)
        self.pushButtonStart.setObjectName(_fromUtf8("pushButtonStart"))
        self.videoPlayer = phonon.Phonon.VideoPlayer(self.centralwidget)
        self.videoPlayer.setGeometry(QtCore.QRect(90, 540, 300, 200))
        self.videoPlayer.setObjectName(_fromUtf8("videoPlayer"))
        self.lineEditUserName = QtGui.QLineEdit(self.centralwidget)
        self.lineEditUserName.setGeometry(QtCore.QRect(90, 60, 181, 21))
        self.lineEditUserName.setObjectName(_fromUtf8("lineEditUserName"))
        self.lineEditPassword = MyLineEdit(self.centralwidget)
        self.lineEditPassword.setGeometry(QtCore.QRect(90, 90, 181, 21))
        self.lineEditPassword.setEchoMode(QtGui.QLineEdit.Password)
        self.lineEditPassword.setObjectName(_fromUtf8("lineEditPassword"))
        self.labelUserName = QtGui.QLabel(self.centralwidget)
        self.labelUserName.setGeometry(QtCore.QRect(20, 60, 61, 20))
        self.labelUserName.setObjectName(_fromUtf8("labelUserName"))
        self.labelPassword = QtGui.QLabel(self.centralwidget)
        self.labelPassword.setGeometry(QtCore.QRect(30, 90, 61, 20))
        self.labelPassword.setObjectName(_fromUtf8("labelPassword"))
        self.labelStatus = QtGui.QLabel(self.centralwidget)
        self.labelStatus.setGeometry(QtCore.QRect(30, 20, 271, 16))
        self.labelStatus.setText(_fromUtf8(""))
        self.labelStatus.setObjectName(_fromUtf8("labelStatus"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 341, 21))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuHelp = QtGui.QMenu(self.menubar)
        self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
        self.menuMenu = QtGui.QMenu(self.menubar)
        self.menuMenu.setObjectName(_fromUtf8("menuMenu"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actionAbout = QtGui.QAction(MainWindow)
        self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setObjectName(_fromUtf8("actionExit"))
        self.menuHelp.addAction(self.actionAbout)
        self.menuMenu.addAction(self.actionExit)
        self.menubar.addAction(self.menuMenu.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #4
0
    def __init__(self, parent=None):
        super().__init__()

        # Default Base position configuration
        self.__basepos_lat = '48.8'
        self.__basepos_lon = '2.35'
        self.__basepos_hgt = '35'
        self.__basepos_ant_hgt = '0'

        # Setting the elements on the layout
        self.__lat_edit = MyLineEdit(self.__basepos_lat)
        self.__lon_edit = MyLineEdit(self.__basepos_lon)
        self.__hgt_edit = MyLineEdit(self.__basepos_hgt)
        self.__ant_hgt_edit = MyLineEdit(self.__basepos_ant_hgt)

        #Setting the Layout
        grid = QGridLayout()

        grid.addWidget(QLabel('Latitude (deg)'), 0, 0)
        grid.addWidget(self.__lat_edit, 0, 1)

        grid.addWidget(QLabel('Longitude (deg)'), 1, 0)
        grid.addWidget(self.__lon_edit, 1, 1)

        grid.addWidget(QLabel('Height (m)'), 2, 0)
        grid.addWidget(self.__hgt_edit, 2, 1)

        grid.addWidget(QLabel('Antenna Height (m)'), 3, 0)
        grid.addWidget(self.__ant_hgt_edit, 3, 1)

        self.setLayout(grid)
Example #5
0
    def __init__(self, parent=None):
        print(1)
        super().__init__()

        self.__save_conf_flag = True
        self.__conf_flag = False
        self.__filepath = None

        #directory where conf file are saved
        self.__directory = os.path.abspath(
            os.path.join(os.path.dirname(__file__),
                         os.pardir)) + '/saved_conf/'

        #file name as year-month-day hour:minute:second in UTC
        self.__save_conf_filename = strftime('%Y-%m-%d_%H-%M-%S',
                                             gmtime()) + '.conf'

        # setting the elements on the layout
        self.__conf_b = QCheckBox("Enable", self)
        self.__conf_b.setChecked(self.__conf_flag)

        self.__save_conf_b = QCheckBox("Enable", self)
        self.__save_conf_b.setChecked(self.__save_conf_flag)

        self.__browse_b = QPushButton('Browse', self)
        self.__browse_b.clicked.connect(self.getfiles)

        self.__filename_edit = MyLineEdit(self.__save_conf_filename)

        # default activated parameters
        self.typeChanged()
        self.__conf_b.stateChanged.connect(partial(self.typeChanged))
        self.__save_conf_b.stateChanged.connect(partial(self.typeChanged))

        #setting the layout
        grid = QGridLayout()

        grid.addWidget(QLabel('Use existing conf file ?'), 0, 0)
        grid.addWidget(self.__conf_b, 0, 1)
        grid.addWidget(QLabel('Select the conf file to be used'), 1, 0)
        grid.addWidget(self.__browse_b, 1, 1)
        grid.addWidget(QLabel('Save created conf file ?'), 2, 0)
        grid.addWidget(self.__save_conf_b, 2, 1)
        grid.addWidget(QLabel('Filename'), 3, 0)
        grid.addWidget(self.__filename_edit, 3, 1)

        self.setLayout(grid)
Example #6
0
    def __init__(self, parent=None):
        super().__init__()

        self.__sol_flag = True

        dirtrs = os.path.abspath(
            os.path.join(os.path.dirname(__file__), os.pardir))

        self.__solDirectory = dirtrs + '/Results/Solutions/'

        #file name as year-month-day hour:minute:second in UTC
        self.__sol_filename = strftime('%Y-%m-%d_%H-%M-%S', gmtime()) + '.pos'

        # Settings of the output solution file
        self.__sol_type = ['llh', 'xyz', 'enu']
        self.__sol_index_type = 1
        self.__sol_mode = ['all', 'single']
        self.__sol_index_mode = 0

        # Setting the elements on the layout
        self.__sol_b = QCheckBox("Enable", self)
        self.__sol_b.setChecked(self.__sol_flag)

        self.__type_list = QComboBox(self)
        self.__type_list.addItems(['LLH', 'XYZ', 'ENU'])
        self.__type_list.setCurrentIndex(self.__sol_index_type)

        self.__type_mode = QComboBox(self)
        self.__type_mode.addItems(['ALL', 'SINGLE'])
        self.__type_mode.setCurrentIndex(self.__sol_index_mode)

        self.__output_edit = MyLineEdit(self.__sol_filename)

        # default activated parameters
        self.typeChanged()
        self.__sol_b.stateChanged.connect(partial(self.typeChanged))

        #Setting the Layout
        grid = QGridLayout()
        grid.addWidget(self.__sol_b, 0, 0)
        grid.addWidget(QLabel('Coordinates type'), 1, 0)
        grid.addWidget(self.__type_list, 1, 1)
        grid.addWidget(QLabel('Coordinates format'), 2, 0)
        grid.addWidget(self.__type_mode, 2, 1)
        grid.addWidget(QLabel('Output File name'), 3, 0)
        grid.addWidget(self.__output_edit, 3, 1)
        self.setLayout(grid)
Example #7
0
    def __init__(self, parent=None):
        super().__init__()

        # Possible values for Input stream configuration
        self.__number = 3
        self.__dist = 100

        self.nb_edit = MyLineEdit("3")
        self.dist_edit = MyLineEdit("100")

        #Setting the Layout
        layout = QVBoxLayout()
        layout.addWidget(QLabel("Maximum number of stations:"))
        layout.addWidget(self.nb_edit)
        layout.addWidget(QLabel("Maximum distance (km):"))
        layout.addWidget(self.dist_edit)
        self.setLayout(layout)
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(341, 219)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.pushButtonStart = QtGui.QPushButton(self.centralwidget)
        self.pushButtonStart.setGeometry(QtCore.QRect(90, 120, 131, 41))
        self.pushButtonStart.setAutoDefault(True)
        self.pushButtonStart.setDefault(True)
        self.pushButtonStart.setObjectName(_fromUtf8("pushButtonStart"))
        self.videoPlayer = phonon.Phonon.VideoPlayer(self.centralwidget)
        self.videoPlayer.setGeometry(QtCore.QRect(90, 540, 300, 200))
        self.videoPlayer.setObjectName(_fromUtf8("videoPlayer"))
        self.lineEditUserName = QtGui.QLineEdit(self.centralwidget)
        self.lineEditUserName.setGeometry(QtCore.QRect(90, 60, 181, 21))
        self.lineEditUserName.setObjectName(_fromUtf8("lineEditUserName"))
        self.lineEditPassword = MyLineEdit(self.centralwidget)
        self.lineEditPassword.setGeometry(QtCore.QRect(90, 90, 181, 21))
        self.lineEditPassword.setEchoMode(QtGui.QLineEdit.Password)
        self.lineEditPassword.setObjectName(_fromUtf8("lineEditPassword"))
        self.labelUserName = QtGui.QLabel(self.centralwidget)
        self.labelUserName.setGeometry(QtCore.QRect(20, 60, 61, 20))
        self.labelUserName.setObjectName(_fromUtf8("labelUserName"))
        self.labelPassword = QtGui.QLabel(self.centralwidget)
        self.labelPassword.setGeometry(QtCore.QRect(30, 90, 61, 20))
        self.labelPassword.setObjectName(_fromUtf8("labelPassword"))
        self.labelStatus = QtGui.QLabel(self.centralwidget)
        self.labelStatus.setGeometry(QtCore.QRect(30, 20, 271, 16))
        self.labelStatus.setText(_fromUtf8(""))
        self.labelStatus.setObjectName(_fromUtf8("labelStatus"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 341, 21))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuHelp = QtGui.QMenu(self.menubar)
        self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
        self.menuMenu = QtGui.QMenu(self.menubar)
        self.menuMenu.setObjectName(_fromUtf8("menuMenu"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actionAbout = QtGui.QAction(MainWindow)
        self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setObjectName(_fromUtf8("actionExit"))
        self.menuHelp.addAction(self.actionAbout)
        self.menuMenu.addAction(self.actionExit)
        self.menubar.addAction(self.menuMenu.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #9
0
class StationPostProcessing(QWidget):
    '''
        
    '''
    def __init__(self, parent=None):
        super().__init__()

        # Possible values for Input stream configuration
        self.__number = 3
        self.__dist = 100

        self.nb_edit = MyLineEdit("3")
        self.dist_edit = MyLineEdit("100")

        #Setting the Layout
        layout = QVBoxLayout()
        layout.addWidget(QLabel("Maximum number of stations:"))
        layout.addWidget(self.nb_edit)
        layout.addWidget(QLabel("Maximum distance (km):"))
        layout.addWidget(self.dist_edit)
        self.setLayout(layout)

    def apply(self):
        '''
        Changes values to those selected in the UI
        '''

        self.__number = int(self.nb_edit.text())
        self.__dist = int(self.dist_edit.text())

    def getOptions(self):
        '''
        Returns options 
        '''

        self.apply()

        return (self.__number, self.__dist)
Example #10
0
class BasePosConfig_Base(QWidget):
    '''
    Panel where the user can set the position of the base station for the base acquisition
    Inherits from QWidget
    
    Attributes:
        Core :
            private String basepos_lat : latitude of the base posiotion
            private String basepos_lon : longitude of the base position
            private String basepos_hgt : heigth of the base position
            private String basepos_ant_hgt : height of the base antenna
        UI :     
            private MyLineEdit lat_edit
            private MyLineEdit lon_edit
            private MyLineEdit hgt_edit
            private MyLineEdit ant_hgt_edit

    '''
    def __init__(self, parent=None):
        super().__init__()

        # Default Base position configuration
        self.__basepos_lat = '48.8'
        self.__basepos_lon = '2.35'
        self.__basepos_hgt = '35'
        self.__basepos_ant_hgt = '0'

        # Setting the elements on the layout
        self.__lat_edit = MyLineEdit(self.__basepos_lat)
        self.__lon_edit = MyLineEdit(self.__basepos_lon)
        self.__hgt_edit = MyLineEdit(self.__basepos_hgt)
        self.__ant_hgt_edit = MyLineEdit(self.__basepos_ant_hgt)

        #Setting the Layout
        grid = QGridLayout()

        grid.addWidget(QLabel('Latitude (deg)'), 0, 0)
        grid.addWidget(self.__lat_edit, 0, 1)

        grid.addWidget(QLabel('Longitude (deg)'), 1, 0)
        grid.addWidget(self.__lon_edit, 1, 1)

        grid.addWidget(QLabel('Height (m)'), 2, 0)
        grid.addWidget(self.__hgt_edit, 2, 1)

        grid.addWidget(QLabel('Antenna Height (m)'), 3, 0)
        grid.addWidget(self.__ant_hgt_edit, 3, 1)

        self.setLayout(grid)

    def apply(self):
        '''
        Changes values to the those selected in the UI
        '''

        self.__basepos_lat = self.__lat_edit.text()
        self.__basepos_lon = self.__lon_edit.text()
        self.__basepos_hgt = self.__hgt_edit.text()
        self.__basepos_ant_hgt = self.__ant_hgt_edit.text()

    def getOptions(self):
        '''
        Returns Base Position options 
        '''
        self.apply()

        return (self.__basepos_lat, self.__basepos_lon, self.__basepos_hgt,
                self.__basepos_ant_hgt)
Example #11
0
class ConfConfig(QWidget):
    def __init__(self, parent=None):
        print(1)
        super().__init__()

        self.__save_conf_flag = True
        self.__conf_flag = False
        self.__filepath = None

        #directory where conf file are saved
        self.__directory = os.path.abspath(
            os.path.join(os.path.dirname(__file__),
                         os.pardir)) + '/saved_conf/'

        #file name as year-month-day hour:minute:second in UTC
        self.__save_conf_filename = strftime('%Y-%m-%d_%H-%M-%S',
                                             gmtime()) + '.conf'

        # setting the elements on the layout
        self.__conf_b = QCheckBox("Enable", self)
        self.__conf_b.setChecked(self.__conf_flag)

        self.__save_conf_b = QCheckBox("Enable", self)
        self.__save_conf_b.setChecked(self.__save_conf_flag)

        self.__browse_b = QPushButton('Browse', self)
        self.__browse_b.clicked.connect(self.getfiles)

        self.__filename_edit = MyLineEdit(self.__save_conf_filename)

        # default activated parameters
        self.typeChanged()
        self.__conf_b.stateChanged.connect(partial(self.typeChanged))
        self.__save_conf_b.stateChanged.connect(partial(self.typeChanged))

        #setting the layout
        grid = QGridLayout()

        grid.addWidget(QLabel('Use existing conf file ?'), 0, 0)
        grid.addWidget(self.__conf_b, 0, 1)
        grid.addWidget(QLabel('Select the conf file to be used'), 1, 0)
        grid.addWidget(self.__browse_b, 1, 1)
        grid.addWidget(QLabel('Save created conf file ?'), 2, 0)
        grid.addWidget(self.__save_conf_b, 2, 1)
        grid.addWidget(QLabel('Filename'), 3, 0)
        grid.addWidget(self.__filename_edit, 3, 1)

        self.setLayout(grid)

    def getfiles(self):
        '''
        Opens the os file browser at the saved_conf/ directory
        Sets the filepath as the path to the selected file
        '''

        self.__filepath, _ = QFileDialog.getOpenFileName(
            self, 'Single File', self.__directory, '*.conf')

    def typeChanged(self):
        '''
        Check wether the solution is enabled 
        '''
        # use existing conf file
        if self.__conf_b.isChecked() == True:

            self.__browse_b.setDisabled(False)
            self.__save_conf_b.setChecked(False)
            self.__save_conf_b.setDisabled(True)
            self.__filename_edit.setDisabled(True)

        else:

            self.__browse_b.setDisabled(True)
            self.__save_conf_b.setDisabled(False)
            self.__filename_edit.setDisabled(False)

        # save creadted conf file
        if self.__save_conf_b.isChecked() == True:

            self.__filename_edit.setDisabled(False)

        else:

            self.__filename_edit.setDisabled(True)

    def apply(self):
        '''
        Changes values to those selected in the UI
        '''

        self.__conf_flag = self.__conf_b.isChecked()
        self.__save_conf_flag = self.__save_conf_b.isChecked()
        self.__save_conf_filename = self.__filename_edit.text()

    def getOptions(self):
        '''
        Returns Solution options 
        '''

        self.apply()

        return (self.__conf_flag, self.__save_conf_flag, self.__filepath,
                self.__directory + self.__save_conf_filename)
Example #12
0
class CalculusConfig(QWidget):
    '''
    Panel where the user can decide the calculus modes of the rover acquisition 
    It is the most basic parameter to set
    Inherits from QWIdget
    
    Attributes:
        Core : 
            private list calculus_mode : the mode of the acquisition  and treatment (single, dgps, ppp...)
            private int calculus_index_mode
            private String ant_hgt : the height of the antenna
            private list iono : avalaible ionospheric correction 
            private int iono_index
            private list tropo : avalaible tropospheric correction
            private int tropo_index
            private list eph : type of satellites ephemerids used
            private String elv_mask : elevation mask in degrees
        UI :
            private QComboBox calculus_list
            private MyLineEdit ant_hgt_edit
            private QComboBox iono_list
            private QComboBox tropo_list
            private QComboBox eph_list
            private MyLineEdit elv_mask_edit
            
    '''
    def __init__(self, parent=None):
        super().__init__()

        self.__calculus_mode = [
            'single', 'dgps', 'kinematic', 'static', 'movingbase', 'fixed',
            'ppp-kine', 'ppp-static', 'ppp-fixed'
        ]
        self.__calculus_index_mode = 1
        self.__ant_hgt = '0'
        self.__iono = [
            'off', 'brdc', 'sbas', 'dual-freq', 'est-stec', 'ionex-tec',
            'qzs-brdc', 'qzs-lex', 'stec'
        ]
        self.__iono_index = 1
        self.__tropo = ['off', 'saas', 'sbas', 'est-ztd', 'est-ztdgrad', 'ztd']
        self.__tropo_index = 1
        self.__eph = ['brdc', 'brdc+sbas', 'brdc+ssrapc', 'brdc+ssrcom']
        self.__eph_index = 0
        self.__elv_mask = '15.0'  #elevation mask in degrees

        # Setting the elements on the layout

        self.__calculus_list = QComboBox(self)
        self.__calculus_list.addItems([
            'SINGLE', 'DGPS', 'KINEMATIC', 'STATIC', 'MOVING BASE', 'FIXED',
            'PPP KINEMATIC', 'PPP STATIC', 'PPP FIXED'
        ])
        self.__calculus_list.setCurrentIndex(self.__calculus_index_mode)

        self.__iono_list = QComboBox(self)
        self.__iono_list.addItems([
            'OFF', 'BROADCAST', 'SBAS', 'DUAL FREQ', 'EST-STEC', 'IONEX-TEC',
            'QZS-BDRC', 'QZS-LEX', 'STEC'
        ])
        self.__iono_list.setCurrentIndex(self.__iono_index)

        self.__tropo_list = QComboBox(self)
        self.__tropo_list.addItems(
            ['OFF', 'SAAS', 'SBAS', 'EST-ZTD', 'EST-ZTDGRAD', 'ZTD'])
        self.__tropo_list.setCurrentIndex(self.__tropo_index)

        self.__eph_list = QComboBox(self)
        self.__eph_list.addItems(
            ['BROADCAST', 'BRDC+SBAS', 'BRDC+SSRAPC', 'BRDC+SSRCOM'])
        self.__eph_list.setCurrentIndex(self.__eph_index)

        self.__ant_hgt_edit = MyLineEdit(self.__ant_hgt)

        self.__elv_mask_edit = MyLineEdit(self.__elv_mask)

        # Setting the layout

        vbox = QVBoxLayout()
        grid1 = QGridLayout()

        grid1.addWidget(QLabel('Acquisition type'), 0, 0)
        grid1.addWidget(self.__calculus_list, 0, 1)
        grid1.addWidget(QLabel('Antenna height'), 1, 0)
        grid1.addWidget(self.__ant_hgt_edit, 1, 1)
        grid1.addWidget(QLabel('Ionospheric correction'), 2, 0)
        grid1.addWidget(self.__iono_list, 2, 1)
        grid1.addWidget(QLabel('Tropospheric correction'), 3, 0)
        grid1.addWidget(self.__tropo_list, 3, 1)
        grid1.addWidget(QLabel('Satellites ephemerids'), 4, 0)
        grid1.addWidget(self.__eph_list, 4, 1)
        grid1.addWidget(QLabel('Elevation Mask (deg)'), 5, 0)
        grid1.addWidget(self.__elv_mask_edit, 5, 1)

        vbox.addLayout(grid1)

        self.setLayout(vbox)

    def apply(self):
        '''
        Changes values to those selected in the UI
        '''
        self.__calculus_index_mode = self.__calculus_list.currentIndex()
        self.__ant_hgt = self.__ant_hgt_edit.text()
        self.__eph_index = self.__eph_list.currentIndex()
        self.__iono_index = self.__iono_list.currentIndex()
        self.__tropo_index = self.__tropo_list.currentIndex()
        self.__elv_mask = self.__elv_mask_edit.text()

    def getOptions(self):
        '''
        Returns Solution options in a list
        '''

        self.apply()

        return (self.__calculus_mode[self.__calculus_index_mode],
                self.__ant_hgt, self.__iono[self.__iono_index],
                self.__tropo[self.__tropo_index], self.__eph[self.__eph_index],
                self.__elv_mask)
Example #13
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(341, 219)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.pushButtonStart = QtGui.QPushButton(self.centralwidget)
        self.pushButtonStart.setGeometry(QtCore.QRect(90, 120, 131, 41))
        self.pushButtonStart.setAutoDefault(True)
        self.pushButtonStart.setDefault(True)
        self.pushButtonStart.setObjectName(_fromUtf8("pushButtonStart"))
        self.videoPlayer = phonon.Phonon.VideoPlayer(self.centralwidget)
        self.videoPlayer.setGeometry(QtCore.QRect(90, 540, 300, 200))
        self.videoPlayer.setObjectName(_fromUtf8("videoPlayer"))
        self.lineEditUserName = QtGui.QLineEdit(self.centralwidget)
        self.lineEditUserName.setGeometry(QtCore.QRect(90, 60, 181, 21))
        self.lineEditUserName.setObjectName(_fromUtf8("lineEditUserName"))
        self.lineEditPassword = MyLineEdit(self.centralwidget)
        self.lineEditPassword.setGeometry(QtCore.QRect(90, 90, 181, 21))
        self.lineEditPassword.setEchoMode(QtGui.QLineEdit.Password)
        self.lineEditPassword.setObjectName(_fromUtf8("lineEditPassword"))
        self.labelUserName = QtGui.QLabel(self.centralwidget)
        self.labelUserName.setGeometry(QtCore.QRect(20, 60, 61, 20))
        self.labelUserName.setObjectName(_fromUtf8("labelUserName"))
        self.labelPassword = QtGui.QLabel(self.centralwidget)
        self.labelPassword.setGeometry(QtCore.QRect(30, 90, 61, 20))
        self.labelPassword.setObjectName(_fromUtf8("labelPassword"))
        self.labelStatus = QtGui.QLabel(self.centralwidget)
        self.labelStatus.setGeometry(QtCore.QRect(30, 20, 271, 16))
        self.labelStatus.setText(_fromUtf8(""))
        self.labelStatus.setObjectName(_fromUtf8("labelStatus"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 341, 21))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuHelp = QtGui.QMenu(self.menubar)
        self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
        self.menuMenu = QtGui.QMenu(self.menubar)
        self.menuMenu.setObjectName(_fromUtf8("menuMenu"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actionAbout = QtGui.QAction(MainWindow)
        self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setObjectName(_fromUtf8("actionExit"))
        self.menuHelp.addAction(self.actionAbout)
        self.menuMenu.addAction(self.actionExit)
        self.menubar.addAction(self.menuMenu.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

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

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(
            QtGui.QApplication.translate("MainWindow",
                                         "Type Recognition Program v0.2", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.pushButtonStart.setText(
            QtGui.QApplication.translate("MainWindow", "Login", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.pushButtonStart.setShortcut(
            QtGui.QApplication.translate("MainWindow", "Return", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.labelUserName.setText(
            QtGui.QApplication.translate("MainWindow", "User name  :", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.labelPassword.setText(
            QtGui.QApplication.translate("MainWindow", "Password :"******"MainWindow", "Help", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.menuMenu.setTitle(
            QtGui.QApplication.translate("MainWindow", "Menu", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.actionAbout.setText(
            QtGui.QApplication.translate("MainWindow", "About", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.actionExit.setText(
            QtGui.QApplication.translate("MainWindow", "Exit", None,
                                         QtGui.QApplication.UnicodeUTF8))
Example #14
0
    def __init__(self, parent=None):
        super().__init__()

        self.__calculus_mode = [
            'single', 'dgps', 'kinematic', 'static', 'movingbase', 'fixed',
            'ppp-kine', 'ppp-static', 'ppp-fixed'
        ]
        self.__calculus_index_mode = 1
        self.__ant_hgt = '0'
        self.__iono = [
            'off', 'brdc', 'sbas', 'dual-freq', 'est-stec', 'ionex-tec',
            'qzs-brdc', 'qzs-lex', 'stec'
        ]
        self.__iono_index = 1
        self.__tropo = ['off', 'saas', 'sbas', 'est-ztd', 'est-ztdgrad', 'ztd']
        self.__tropo_index = 1
        self.__eph = ['brdc', 'brdc+sbas', 'brdc+ssrapc', 'brdc+ssrcom']
        self.__eph_index = 0
        self.__elv_mask = '15.0'  #elevation mask in degrees

        # Setting the elements on the layout

        self.__calculus_list = QComboBox(self)
        self.__calculus_list.addItems([
            'SINGLE', 'DGPS', 'KINEMATIC', 'STATIC', 'MOVING BASE', 'FIXED',
            'PPP KINEMATIC', 'PPP STATIC', 'PPP FIXED'
        ])
        self.__calculus_list.setCurrentIndex(self.__calculus_index_mode)

        self.__iono_list = QComboBox(self)
        self.__iono_list.addItems([
            'OFF', 'BROADCAST', 'SBAS', 'DUAL FREQ', 'EST-STEC', 'IONEX-TEC',
            'QZS-BDRC', 'QZS-LEX', 'STEC'
        ])
        self.__iono_list.setCurrentIndex(self.__iono_index)

        self.__tropo_list = QComboBox(self)
        self.__tropo_list.addItems(
            ['OFF', 'SAAS', 'SBAS', 'EST-ZTD', 'EST-ZTDGRAD', 'ZTD'])
        self.__tropo_list.setCurrentIndex(self.__tropo_index)

        self.__eph_list = QComboBox(self)
        self.__eph_list.addItems(
            ['BROADCAST', 'BRDC+SBAS', 'BRDC+SSRAPC', 'BRDC+SSRCOM'])
        self.__eph_list.setCurrentIndex(self.__eph_index)

        self.__ant_hgt_edit = MyLineEdit(self.__ant_hgt)

        self.__elv_mask_edit = MyLineEdit(self.__elv_mask)

        # Setting the layout

        vbox = QVBoxLayout()
        grid1 = QGridLayout()

        grid1.addWidget(QLabel('Acquisition type'), 0, 0)
        grid1.addWidget(self.__calculus_list, 0, 1)
        grid1.addWidget(QLabel('Antenna height'), 1, 0)
        grid1.addWidget(self.__ant_hgt_edit, 1, 1)
        grid1.addWidget(QLabel('Ionospheric correction'), 2, 0)
        grid1.addWidget(self.__iono_list, 2, 1)
        grid1.addWidget(QLabel('Tropospheric correction'), 3, 0)
        grid1.addWidget(self.__tropo_list, 3, 1)
        grid1.addWidget(QLabel('Satellites ephemerids'), 4, 0)
        grid1.addWidget(self.__eph_list, 4, 1)
        grid1.addWidget(QLabel('Elevation Mask (deg)'), 5, 0)
        grid1.addWidget(self.__elv_mask_edit, 5, 1)

        vbox.addLayout(grid1)

        self.setLayout(vbox)
Example #15
0
class OutputConfig(QWidget):
    '''
    Panel where the user can decide if he wants the output of the base acquisition to be sent to the rover through 
    a cloud (NTRIP or TCP)
    If yes, the user can set the parameters for the connection to the caster
    Has default parameters
    Inherits from QWidget
    
    Parameters:
        Core :
            private Boolean output_flag : wether the output shall be transmited through a cloud
            private list output_type : choose between NTRIP and TCP protocol
            private int output_index_type
            private liste output_format : wich format shall be applied (rtcm or ubx)
            private int output_index_format
            private String output_user : gives the user name to connect with
            private String output_addr : gives the cloud address to connect to
            private String output_port : gives the port to connect to
            private String output_pw : gives the password to connect with
            private String output_mp : gives the mountpoint to connect to
        UI :
            private QCheckBox output_b
            private QComboBox type_list
            private QComboBox format_list
            private MyLineEdit addr_edit
            private MyLineEdit mp_edit
            private MyLineEdit user_edit
            private MyLineEdit pw_edit
        
    '''
    
    def __init__(self,parent=None):
        super().__init__()
        
        
        # Default Input stream configuration
        self.__output_flag = False
        self.__output_type=(['tcpcli','ntripcli'])
        self.__output_index_type = 1
        self.__output_format=(['ubx','rtcm3'])
        self.__output_index_format = 0
        self.__output_user = '******'
        self.__output_addr = 'rgp-ip.ign.fr'
        self.__output_port = '2101'
        self.__output_pw = 's3YfJx54C7'
        self.__output_mp = 'FORC2'


        # Setting the elements on the layout
        self.__output_b = QCheckBox("Enable",self)
        self.__output_b.setChecked(self.__output_flag)
        
        self.__type_list=QComboBox(self)
        self.__type_list.addItems(['TCP Server','NTRIP Server'])
        self.__type_list.setCurrentIndex(self.__output_index_type)
        
        self.__format_list=QComboBox(self)
        self.__format_list.addItems(['UBX','RTCM3'])
        self.__format_list.setCurrentIndex(self.__output_index_format)
        
        self.__addr_edit=MyLineEdit(self.__output_addr,self)
        
        self.__port_edit=MyLineEdit(self.__output_port,self)
        
        self.__mp_edit=MyLineEdit(self.__output_mp,self)
        
        self.__user_edit=MyLineEdit(self.__output_user,self)
        
        self.__pw_edit=MyLineEdit(self.__output_pw,self)
        
        # default activated parameters
        self.typeChanged()
        self.__output_b.stateChanged.connect(partial(self.typeChanged))
        self.__type_list.currentIndexChanged.connect(self.typeChanged)
        



        #Setting the Layout
        grid=QGridLayout()
        grid.addWidget(self.__output_b,0,0)
        grid.addWidget(QLabel('Type/Format'),0,1)
        grid.addWidget(self.__type_list,0,2)
        grid.addWidget(self.__format_list,0,3)
        grid.addWidget(QLabel('Address'),1,0)
        grid.addWidget(self.__addr_edit,1,1,1,4)
        grid.addWidget(QLabel('Port'),2,0)
        grid.addWidget(self.__port_edit,2,1)
        grid.addWidget(QLabel('Mountpoint'),2,2)
        grid.addWidget(self.__mp_edit,2,3)
        grid.addWidget(QLabel('User-ID'),3,0)
        grid.addWidget(self.__user_edit,3,1)
        grid.addWidget(QLabel('Password'),3,2)
        grid.addWidget(self.__pw_edit,3,3)
        self.setLayout(grid)
        

        
        ######  FUNCTIONS  #######

    def typeChanged(self):  
        '''
        Check the transmission type selected and disables/displays the corresponding
        parameters on the UI
        '''

        
        if self.__output_b.isChecked() == True:
            
            self.__type_list.setDisabled(False)  
            self.__format_list.setDisabled(False) 
            self.__port_edit.setDisabled(False)
            self.__addr_edit.setDisabled(False)
           
            
            if self.__type_list.currentIndex() == 0: # TCP Server
                
                self.__addr_edit.setText(self.getIpAddress())
                self.__output_addr = self.getIpAddress()
                self.__mp_edit.setDisabled(True)
                self.__user_edit.setDisabled(True)
                self.__pw_edit.setDisabled(True)

                
            if self.__type_list.currentIndex() == 1: # NTRIP Server
                
                self.__mp_edit.setDisabled(False)
                self.__user_edit.setDisabled(False)
                self.__pw_edit.setDisabled(False)


                
        else:
            self.__type_list.setDisabled(True)  
            self.__format_list.setDisabled(True)   
            self.__addr_edit.setDisabled(True)
            self.__mp_edit.setDisabled(True)
            self.__user_edit.setDisabled(True)
            self.__pw_edit.setDisabled(True)
            self.__port_edit.setDisabled(True)
            


    def getIpAddress(self):
        '''
        Return IP adress of the system
        
        returns:
            String IP address
            
        '''

        host=check_output(['hostname', '-I'])
        hosts=host.split()
        if len(hosts)==0:
            return '127.0.0.1'
        else:
            return hosts[0].decode()
        
        
    
    def apply(self):
        '''
        Changes values to those selected in the UI
        '''      

        self.__output_flag = self.__output_b.isChecked()
        self.__output_index_type = self.__type_list.currentIndex()
        self.__output_index_format = self.__format_list.currentIndex()
        self.__output_user = self.__user_edit.text()
        self.__output_addr = self.__addr_edit.text()
        self.__output_port = self.__port_edit.text()
        self.__output_pw = self.__pw_edit.text()
        self.__output_mp = self.__mp_edit.text()

        
        
    def getOptions(self):
        '''
        Returns Input options 
        '''
        
        self.apply()
        
        
        return (self.__output_flag,
                self.__output_type[self.__output_index_type],
                self.__output_format[self.__output_index_format], 
                self.__output_user,
                self.__output_addr,
                self.__output_port,
                self.__output_pw,
                self.__output_mp)
Example #16
0
class CorrectionConfig(QWidget):
    '''
    Panel where the user can set the parameters of the correction of a cloud (NTRIP or TCP) transmission from the base
    if he is using it. Otherwise he can disable it
    !!!! those parameters shall be equal to those set on the Output option for the base
    Has default parameters
    Inherits from QWidget
    
    Attributes:
        Core : 
            private Boolean corr_flag : wether correction from the base are transmitted to a NTRIP or TCP protocol 
            private list corr_type : wether it follows a NTRIP or TCP protocol
            private int corr_index_type
            private list corr_format : in wich format is it sent (rtcm or ubx)
            private int corr_index_format
            private String output_user : gives the user name to connect with
            private String output_addr : gives the cloud address to connect to
            private String output_port : gives the port to connect to
            private String output_pw : gives the password to connect with
            private String output_mp : gives the mountpoint to connect to
        UI : 
            private QCheckBox corr_b
            private QComboBox type_list
            private QComboBox format_list
            private MyLineEdit addr_edit
            private MyLineEdit port_edit
            private MyLineEdit mp_edit
            private MyLineEdit pw_edit
            private MyLineEdit user_edit
    '''
    def __init__(self, parent=None):
        super().__init__()

        # Possible values for Correction stream configuration
        self.__corr_flag = False
        self.__corr_type = (['ntripcli', 'tcpcli'])
        self.__corr_index_type = 0
        self.__corr_format = (['rtcm2', 'rtcm3', 'binex', 'ubx'])
        self.__corr_index_format = 1
        self.__corr_user = '******'
        self.__corr_addr = 'adresse.com'
        self.__corr_port = '2101'
        self.__corr_pw = 's3YfJx54C7'
        self.__corr_mp = 'TRS'  #Mountpoint

        #Setting elements of the layout

        self.__corr_b = QCheckBox("Enable", self)
        self.__corr_b.setChecked(self.__corr_flag)

        self.__type_list = QComboBox(self)
        self.__type_list.addItems(['NTRIP Client', 'TCP Client'])
        self.__type_list.setCurrentIndex(self.__corr_index_type)
        self.__type_list.currentIndexChanged.connect(self.typeChanged)

        self.__format_list = QComboBox(self)
        self.__format_list.addItems(['RTCM2', 'RTCM3', 'BINEX', 'UBX'])
        self.__format_list.setCurrentIndex(self.__corr_index_format)

        self.__addr_edit = MyLineEdit(self.__corr_addr, self)
        self.__port_edit = MyLineEdit(self.__corr_port, self)
        self.__mp_edit = MyLineEdit(self.__corr_mp, self)
        self.__user_edit = MyLineEdit(self.__corr_user, self)
        self.__pw_edit = MyLineEdit(self.__corr_pw, self)

        # default activated parameters
        self.typeChanged()
        self.__corr_b.stateChanged.connect(partial(self.typeChanged))
        self.__type_list.currentIndexChanged.connect(self.typeChanged)

        ###### SETTING THE LAYOUT  #######

        grid = QGridLayout()
        grid.addWidget(self.__corr_b, 0, 0)
        grid.addWidget(QLabel('Type/Format'), 0, 1)
        grid.addWidget(self.__type_list, 0, 2)
        grid.addWidget(self.__format_list, 0, 3)
        grid.addWidget(QLabel('Address'), 1, 0)
        grid.addWidget(self.__addr_edit, 1, 1, 1, 4)
        grid.addWidget(QLabel('Port'), 2, 0)
        grid.addWidget(self.__port_edit, 2, 1)
        grid.addWidget(QLabel('Mountpoint'), 2, 2)
        grid.addWidget(self.__mp_edit, 2, 3)
        grid.addWidget(QLabel('User-ID'), 3, 0)
        grid.addWidget(self.__user_edit, 3, 1)
        grid.addWidget(QLabel('Password'), 3, 2)
        grid.addWidget(self.__pw_edit, 3, 3)
        self.setLayout(grid)

    def typeChanged(self):
        '''
        Check wether the correction is enabled 
        If yes, check wether TCP or NTRIP is chosen for correction and activate/deactivate corresponding parameters
        arg ind : int (index of the corr_type parameter)
        '''
        if self.__corr_b.isChecked() == True:

            self.__type_list.setDisabled(False)
            self.__format_list.setDisabled(False)
            self.__addr_edit.setDisabled(False)
            self.__port_edit.setDisabled(False)

            if self.__type_list.currentIndex() == 0:  # NTRIP Client
                self.__mp_edit.setDisabled(False)
                self.__user_edit.setDisabled(False)
                self.__pw_edit.setDisabled(False)

            elif self.__type_list.currentIndex() == 1:  # TCP Client
                self.__mp_edit.setDisabled(True)
                self.__user_edit.setDisabled(True)
                self.__pw_edit.setDisabled(True)
        else:
            self.__mp_edit.setDisabled(True)
            self.__user_edit.setDisabled(True)
            self.__pw_edit.setDisabled(True)
            self.__type_list.setDisabled(True)
            self.__format_list.setDisabled(True)
            self.__addr_edit.setDisabled(True)
            self.__port_edit.setDisabled(True)

    def apply(self):
        '''
        Changes values to those selected in the UI
        '''

        self.__corr_flag = self.__corr_b.isChecked()
        self.__corr_index_type = self.__type_list.currentIndex()
        self.__corr_index_format = self.__format_list.currentIndex()
        self.__corr_addr = self.__addr_edit.text()
        self.__corr_port = self.__port_edit.text()
        self.__corr_mp = self.__mp_edit.text()
        self.__corr_user = self.__user_edit.text()
        self.__corr_pw = self.__pw_edit.text()

    def getOptions(self):
        '''
        Returns Corrections options in a list
        '''

        self.apply()

        return (self.__corr_flag, self.__corr_type[self.__corr_index_type],
                self.__corr_format[self.__corr_index_format], self.__corr_user,
                self.__corr_pw, self.__corr_port, self.__corr_mp,
                self.__corr_addr)
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(341, 219)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.pushButtonStart = QtGui.QPushButton(self.centralwidget)
        self.pushButtonStart.setGeometry(QtCore.QRect(90, 120, 131, 41))
        self.pushButtonStart.setAutoDefault(True)
        self.pushButtonStart.setDefault(True)
        self.pushButtonStart.setObjectName(_fromUtf8("pushButtonStart"))
        self.videoPlayer = phonon.Phonon.VideoPlayer(self.centralwidget)
        self.videoPlayer.setGeometry(QtCore.QRect(90, 540, 300, 200))
        self.videoPlayer.setObjectName(_fromUtf8("videoPlayer"))
        self.lineEditUserName = QtGui.QLineEdit(self.centralwidget)
        self.lineEditUserName.setGeometry(QtCore.QRect(90, 60, 181, 21))
        self.lineEditUserName.setObjectName(_fromUtf8("lineEditUserName"))
        self.lineEditPassword = MyLineEdit(self.centralwidget)
        self.lineEditPassword.setGeometry(QtCore.QRect(90, 90, 181, 21))
        self.lineEditPassword.setEchoMode(QtGui.QLineEdit.Password)
        self.lineEditPassword.setObjectName(_fromUtf8("lineEditPassword"))
        self.labelUserName = QtGui.QLabel(self.centralwidget)
        self.labelUserName.setGeometry(QtCore.QRect(20, 60, 61, 20))
        self.labelUserName.setObjectName(_fromUtf8("labelUserName"))
        self.labelPassword = QtGui.QLabel(self.centralwidget)
        self.labelPassword.setGeometry(QtCore.QRect(30, 90, 61, 20))
        self.labelPassword.setObjectName(_fromUtf8("labelPassword"))
        self.labelStatus = QtGui.QLabel(self.centralwidget)
        self.labelStatus.setGeometry(QtCore.QRect(30, 20, 271, 16))
        self.labelStatus.setText(_fromUtf8(""))
        self.labelStatus.setObjectName(_fromUtf8("labelStatus"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 341, 21))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuHelp = QtGui.QMenu(self.menubar)
        self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
        self.menuMenu = QtGui.QMenu(self.menubar)
        self.menuMenu.setObjectName(_fromUtf8("menuMenu"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actionAbout = QtGui.QAction(MainWindow)
        self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setObjectName(_fromUtf8("actionExit"))
        self.menuHelp.addAction(self.actionAbout)
        self.menuMenu.addAction(self.actionExit)
        self.menubar.addAction(self.menuMenu.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

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

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Type Recognition Program v0.2", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButtonStart.setText(QtGui.QApplication.translate("MainWindow", "Login", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButtonStart.setShortcut(QtGui.QApplication.translate("MainWindow", "Return", None, QtGui.QApplication.UnicodeUTF8))
        self.labelUserName.setText(QtGui.QApplication.translate("MainWindow", "User name  :", None, QtGui.QApplication.UnicodeUTF8))
        self.labelPassword.setText(QtGui.QApplication.translate("MainWindow", "Password :"******"MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))
        self.menuMenu.setTitle(QtGui.QApplication.translate("MainWindow", "Menu", None, QtGui.QApplication.UnicodeUTF8))
        self.actionAbout.setText(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
Example #18
0
class LogConfig(QWidget):
    '''
    Panel where the user can decide wether to save or not the log files
    Inherits from QWIdget
    
    Attributes:
        Core : 
            private Boolean log_flag : wether logs shall be saved or not
            private String log_filename : name of the file where logs shall be saved
            private String logDirectory : path of the file where logs shall be saved
        UI :
            private QCheckBox log_b
            private MyLineEdit output_edit
    
    '''
    def __init__(self, parent=None):
        super().__init__()

        self.__log_flag = True

        dirtrs = os.path.abspath(
            os.path.join(os.path.dirname(__file__), os.pardir))
        self.__logDirectory = dirtrs + '/Results/Logs/'
        self.__log_filename = strftime('%Y-%m-%d_%H-%M-%S', gmtime(
        )) + '.ubx'  #file name as year-month-day hour:minute:second in UTC

        # Setting the elements on the layout
        self.__log_b = QCheckBox("Enable", self)
        self.__log_b.setChecked(self.__log_flag)

        self.__output_edit = MyLineEdit(self.__log_filename)

        # default activated parameters
        self.typeChanged()
        self.__log_b.stateChanged.connect(partial(self.typeChanged))

        #Setting the Layout
        grid = QGridLayout()
        grid.addWidget(self.__log_b, 0, 0)
        grid.addWidget(QLabel('Output File name'), 1, 0)
        grid.addWidget(self.__output_edit, 1, 1)
        self.setLayout(grid)

    def typeChanged(self):
        '''
        Check wether the log is enabled 
        '''

        if self.__log_b.isChecked() == True:
            self.__output_edit.setDisabled(False)

        else:
            self.__output_edit.setDisabled(True)

    def apply(self):
        '''
        Changes values to those selected in the UI
        '''

        self.__log_flag = self.__log_b.isChecked()
        self.__log_filename = self.__output_edit.text()

    def getOptions(self):
        '''
        Returns Logs options 
        '''

        self.apply()

        return (self.__log_flag, self.__logDirectory + self.__log_filename)
Example #19
0
    def __init__(self,parent=None):
        super().__init__()
        
        
        # Default Input stream configuration
        self.__output_flag = False
        self.__output_type=(['tcpcli','ntripcli'])
        self.__output_index_type = 1
        self.__output_format=(['ubx','rtcm3'])
        self.__output_index_format = 0
        self.__output_user = '******'
        self.__output_addr = 'rgp-ip.ign.fr'
        self.__output_port = '2101'
        self.__output_pw = 's3YfJx54C7'
        self.__output_mp = 'FORC2'


        # Setting the elements on the layout
        self.__output_b = QCheckBox("Enable",self)
        self.__output_b.setChecked(self.__output_flag)
        
        self.__type_list=QComboBox(self)
        self.__type_list.addItems(['TCP Server','NTRIP Server'])
        self.__type_list.setCurrentIndex(self.__output_index_type)
        
        self.__format_list=QComboBox(self)
        self.__format_list.addItems(['UBX','RTCM3'])
        self.__format_list.setCurrentIndex(self.__output_index_format)
        
        self.__addr_edit=MyLineEdit(self.__output_addr,self)
        
        self.__port_edit=MyLineEdit(self.__output_port,self)
        
        self.__mp_edit=MyLineEdit(self.__output_mp,self)
        
        self.__user_edit=MyLineEdit(self.__output_user,self)
        
        self.__pw_edit=MyLineEdit(self.__output_pw,self)
        
        # default activated parameters
        self.typeChanged()
        self.__output_b.stateChanged.connect(partial(self.typeChanged))
        self.__type_list.currentIndexChanged.connect(self.typeChanged)
        



        #Setting the Layout
        grid=QGridLayout()
        grid.addWidget(self.__output_b,0,0)
        grid.addWidget(QLabel('Type/Format'),0,1)
        grid.addWidget(self.__type_list,0,2)
        grid.addWidget(self.__format_list,0,3)
        grid.addWidget(QLabel('Address'),1,0)
        grid.addWidget(self.__addr_edit,1,1,1,4)
        grid.addWidget(QLabel('Port'),2,0)
        grid.addWidget(self.__port_edit,2,1)
        grid.addWidget(QLabel('Mountpoint'),2,2)
        grid.addWidget(self.__mp_edit,2,3)
        grid.addWidget(QLabel('User-ID'),3,0)
        grid.addWidget(self.__user_edit,3,1)
        grid.addWidget(QLabel('Password'),3,2)
        grid.addWidget(self.__pw_edit,3,3)
        self.setLayout(grid)
Example #20
0
class SolConfig(QWidget):
    '''
    Panel where the user can decide wether to save or not the solutions files
    And to wich format, type and location
    Inherits from QWIdget
    
    Attributes:
        Core :
            private Boolean sol_flag : wether solutions shall be saved or not
            private list sol_type : type of the coordinates in the solution file
            private int sol_index_type
            private list sol_mode : all or single lines in the solution file
            private int sol_index_mode
            private String sol_filename : name of the file where solutions shall be saved
            private String solDirectory : path of the file where solutions shall be saved
            private String sol_format : format of the solutions (llh,xyz,enu)
        UI : 
            private QCheckBox sol_b 
            private QComboBox type_list
            private QComboBox type_mode
            private MyLineEdit output_edit        
    '''
    def __init__(self, parent=None):
        super().__init__()

        self.__sol_flag = True

        dirtrs = os.path.abspath(
            os.path.join(os.path.dirname(__file__), os.pardir))

        self.__solDirectory = dirtrs + '/Results/Solutions/'

        #file name as year-month-day hour:minute:second in UTC
        self.__sol_filename = strftime('%Y-%m-%d_%H-%M-%S', gmtime()) + '.pos'

        # Settings of the output solution file
        self.__sol_type = ['llh', 'xyz', 'enu']
        self.__sol_index_type = 1
        self.__sol_mode = ['all', 'single']
        self.__sol_index_mode = 0

        # Setting the elements on the layout
        self.__sol_b = QCheckBox("Enable", self)
        self.__sol_b.setChecked(self.__sol_flag)

        self.__type_list = QComboBox(self)
        self.__type_list.addItems(['LLH', 'XYZ', 'ENU'])
        self.__type_list.setCurrentIndex(self.__sol_index_type)

        self.__type_mode = QComboBox(self)
        self.__type_mode.addItems(['ALL', 'SINGLE'])
        self.__type_mode.setCurrentIndex(self.__sol_index_mode)

        self.__output_edit = MyLineEdit(self.__sol_filename)

        # default activated parameters
        self.typeChanged()
        self.__sol_b.stateChanged.connect(partial(self.typeChanged))

        #Setting the Layout
        grid = QGridLayout()
        grid.addWidget(self.__sol_b, 0, 0)
        grid.addWidget(QLabel('Coordinates type'), 1, 0)
        grid.addWidget(self.__type_list, 1, 1)
        grid.addWidget(QLabel('Coordinates format'), 2, 0)
        grid.addWidget(self.__type_mode, 2, 1)
        grid.addWidget(QLabel('Output File name'), 3, 0)
        grid.addWidget(self.__output_edit, 3, 1)
        self.setLayout(grid)

    def typeChanged(self):
        '''
        Check wether the solution is enabled 
        '''

        if self.__sol_b.isChecked() == True:

            self.__type_list.setDisabled(False)
            self.__type_mode.setDisabled(False)
            self.__output_edit.setDisabled(False)

        else:

            self.__type_list.setDisabled(True)
            self.__type_mode.setDisabled(True)
            self.__output_edit.setDisabled(True)

    def apply(self):
        '''
        Changes values to those selected in the UI
        '''

        self.__sol_flag = self.__sol_b.isChecked()
        self.__sol_index_type = self.__type_list.currentIndex()
        self.__sol_index_mode = self.__type_mode.currentIndex()
        self.__sol_filename = self.__output_edit.text()

    def getOptions(self):
        '''
        Returns Solution options 
        '''

        self.apply()

        return (self.__sol_flag, self.__sol_type[self.__sol_index_type],
                self.__sol_mode[self.__sol_index_mode],
                self.__solDirectory + self.__sol_filename)