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
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
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))