def init_plugin(): # Register a sector count logger global logger logger = datalog.defineLogger('OCCUPANCYLOG', 'Sector count log') # Configuration parameters config = { 'plugin_name': 'SECTORCOUNT', 'plugin_type': 'sim', 'update_interval': 3.0, 'update': update } stackfunctions = { # The command name for your function 'SECTORCOUNT': [ # A short usage string. This will be printed if you type HELP <name> in the BlueSky console 'SECTORCOUNT LIST OR ADD sectorname or REMOVE sectorname', # A list of the argument types your function accepts. For a description of this, see ... 'txt,[txt]', # The name of your function in this plugin sectorcount, # a longer help text of your function. 'Add/remove/list sectors for occupancy count' ] } # init_plugin() should always return these two dicts. return config, stackfunctions
def init_plugin(): # Register a sector count logger global logger logger = datalog.defineLogger('OCCUPANCYLOG', 'Sector count log') # Configuration parameters config = { 'plugin_name': 'SECTORCOUNT', 'plugin_type': 'sim', 'update_interval': 3.0, 'update': update } stackfunctions = { # The command name for your function 'SECTORCOUNT': [ # A short usage string. This will be printed if you type HELP <name> in the BlueSky console 'SECTORCOUNT LIST OR ADD sectorname or REMOVE sectorname', # A list of the argument types your function accepts. For a description of this, see ... 'txt,[txt]', # The name of your function in this plugin sectorcount, # a longer help text of your function. 'Add/remove/list sectors for occupancy count'] } # init_plugin() should always return these two dicts. return config, stackfunctions
def __init__(self): super(Area, self).__init__() # Parameters of area self.active = False self.dt = 5.0 # [s] frequency of area check (simtime) self.name = None self.swtaxi = False # Default OFF: Doesn't do anything. See comments of set_taxi fucntion below. # The FLST logger self.logger = datalog.defineLogger('FLSTLOG', header) with RegisterElementParameters(self): self.inside = np.array([], dtype=np.bool) # In test area or not self.distance2D = np.array([]) self.distance3D = np.array([]) self.work = np.array([]) self.create_time = np.array([])
def __init__(self): super(Area, self).__init__() # Parameters of area self.active = False self.dt = 5.0 # [s] frequency of area check (simtime) self.name = None self.swtaxi = False # Default OFF: Doesn't do anything. See comments of set_taxi fucntion below. # The FLST logger self.logger = datalog.defineLogger('FLSTLOG', header) with RegisterElementParameters(self): self.inside = np.array([],dtype = np.bool) # In test area or not self.distance2D = np.array([]) self.distance3D = np.array([]) self.work = np.array([]) self.create_time = np.array([])
def __init__(self): super(Area, self).__init__() # Parameters of area self.active = False self.dt = traf.asas.dtasas # [s] frequency of area check (simtime) self.name = None self.swtaxi = False # Default OFF: Doesn't do anything. See comments of set_taxi fucntion below. self.inconf = traf.asas.inconf # The FLST logger self.logger = datalog.defineLogger('FLSTLOG', header) self.data_collection_count = 0 self.count_relevancy = 0 #Clean ASAS variables traf.asas.clearconfdb() with RegisterElementParameters(self): #self.inside = np.array([],dtype = np.bool) # In test area or not self.distance2D = np.array([]) #self.distance3D = np.array([]) self.work = np.array([])