Пример #1
0
    def __init__(self, f_control):
        """
        constructor
        
        @param f_control: control manager
        """
        # check input
        assert f_control

        # init super class
        super(CModelPiloto, self).__init__(f_control)

        # herdados de CModelManager
        # self.app           # the application
        # self.control       # control manager
        # self.event         # event manager
        # self.config        # config manager
        # self.dct_config    # dicionário de configuração

        self.control.splash.showMessage(
            "creating coordinate system...",
            QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom, QtCore.Qt.white)

        # obtém as coordenadas de referência
        lf_ref_lat = float(self.dct_config["map.lat"])
        lf_ref_lng = float(self.dct_config["map.lng"])
        lf_dcl_mag = float(self.dct_config["map.dcl"])

        self.control.splash.showMessage(
            "loading cenary...",
            QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom, QtCore.Qt.white)

        # coordinate system
        self.__coords = coords.CCoordSys(lf_ref_lat, lf_ref_lng, lf_dcl_mag)
        assert self.__coords

        # create magnectic converter
        self.__geomag = gm.GeoMag("data/tabs/WMM.COF")
        assert self.__geomag

        # variáveis de instância
        self.__airspace = None

        # dicionário de performances
        self.__dct_prf = {}

        # carrega o cenário (airspace & landscape)
        self.__load_cenario("SBSP")

        self.control.splash.showMessage(
            "creating emulation model...",
            QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom, QtCore.Qt.white)

        # create emula model
        self.__emula = emula.CEmulaPiloto(self, f_control)
        assert self.__emula
Пример #2
0
    def __init__(self, f_control):
        """
        constructor

        @param f_control: control manager
        """
        # check input
        assert f_control

        # init super class
        super(CModelDBEdit, self).__init__(f_control)

        # herdados de CModelManager
        # self.app           # the application
        # self.config        # config manager
        # self.dct_config    # dicionário de configuração
        # self.control       # control manager
        # self.event         # event manager

        # show message
        self.control.splash.showMessage("creating coordinate system...", QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom, QtCore.Qt.white)
        
        # obtém as coordenadas de referência
        lf_ref_lat = float(self.dct_config["map.lat"])
        lf_ref_lng = float(self.dct_config["map.lng"])
        lf_dcl_mag = float(self.dct_config["map.dcl"])
                                
        # coordinate system
        self.__coords = coords.CCoordSys(lf_ref_lat, lf_ref_lng, lf_dcl_mag)
        assert self.__coords
                                                        
        # show message
        self.control.splash.showMessage("loading cenary...", QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom, QtCore.Qt.white)
        
        # airspace
        self.__airspace = None

        # exercício
        self.__exe = None

        # dicionário de exercícios
        self.__dct_exe = {}

        # dicionário de performances
        self.__dct_prf = {}

        # dicionário de sensores
        # self.__dct_sen = {}

        # dicionário de tráfegos
        self.__dct_trf = {}

        # carrega as tabelas do sistema
        self.__load_cenario()
Пример #3
0
    def __init__(self, f_control):
        """
        constructor
        
        @param f_control: control manager
        """
        # init super class
        super(CModelVisil, self).__init__(f_control)

        # herdados de CModelManager
        # self.app           # the application
        # self.config        # config manager
        # self.dct_config    # dicionário de configuração
        # self.control       # control manager
        # self.event         # event manager

        # show message
        self.control.splash.showMessage(
            "creating coordinate system...",
            QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom, QtCore.Qt.white)

        # obtém as coordenadas de referência
        lf_ref_lat = float(self.dct_config["map.lat"])
        lf_ref_lng = float(self.dct_config["map.lng"])
        lf_dcl_mag = float(self.dct_config["map.dcl"])

        # coordinate system
        self._coords = coords.CCoordSys(lf_ref_lat, lf_ref_lng, lf_dcl_mag)
        assert self._coords

        # create magnectic converter
        self._geomag = gm.GeoMag("data/tabs/WMM.COF")
        assert self._geomag

        self.control.splash.showMessage(
            "loading cenary...",
            QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom, QtCore.Qt.white)

        # variáveis de instância
        self._airspace = None

        # carrega as tabelas do sistema
        self._load_cenario()

        self.control.splash.showMessage(
            "creating emulation model...",
            QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom, QtCore.Qt.white)

        # create emula model
        self._emula = emula.CEmulaVisil(self, f_control)
        assert self._emula
Пример #4
0
    def __init__(self, f_control):
        """
        @param  f_control: control manager
        """
        # check input
        assert f_control

        # init super class
        super(CModelNewton, self).__init__(f_control)

        # herdados de CModelManager
        # self.app           # application
        # self.config        # config manager
        # self.dct_config    # dicionário de configuração
        # self.control       # control manager
        # self.event         # event manager

        # obtém as coordenadas de referência
        lf_ref_lat = float(self.dct_config["map.lat"])
        lf_ref_lng = float(self.dct_config["map.lng"])
        lf_dcl_mag = float(self.dct_config["map.dcl"])

        # coordinate system
        self.__coords = coords.CCoordSys(lf_ref_lat, lf_ref_lng, lf_dcl_mag)
        assert self.__coords

        # airspace
        self.__airspace = None

        # dicionário de performances
        self.__dct_prf = {}

        # dicionário de tráfegos
        self.__dct_trf = {}

        # exercício
        self.__exe = None

        # carrega o cenário de simulação (airspace & landscape)
        self.__load_cenario()

        # carrega as tabelas (base de dados)
        self.__load_dicts()

        # create flight emulation model
        self.__emula = emula.CEmulaNewton(self, f_control)
        assert self.__emula

        # set as daemon
        self.__emula.daemon = True
Пример #5
0
    def __init__(self, f_control):
        """
        constructor
        
        @param f_control: control
        """
        # init super class
        super(CModelAdapter, self).__init__(f_control)

        # herdados de CModelManager
        # self.app           # the application
        # self.config        # config manager
        # self.dct_config    # dicionário de configuração
        # self.control       # control
        # self.event         # event manager

        # obtém as coordenadas de referência
        lf_ref_lat = float(self.dct_config["map.lat"])
        lf_ref_lng = float(self.dct_config["map.lng"])
        lf_dcl_mag = float(self.dct_config["map.dcl"])

        # coordinate system
        self.__coords = coords.CCoordSys(lf_ref_lat, lf_ref_lng, lf_dcl_mag)
        assert self.__coords

        # create magnectic converter
        self.__geomag = gm.GeoMag("data/tabs/WMM.COF")
        assert self.__geomag

        # create CORE location
        self.__core_location = cloc.CLocation()
        assert self.__core_location

        # configure reference point
        self.__core_location.configure_values("0|0|{}|{}|2|50000".format(
            lf_ref_lat, lf_ref_lng))