Exemplo n.º 1
0
    def __init__(self):
        super().__init__()
        # Parameters of area
        self.active = False
        self.exp_area = ''
        self.prevconfpairs = set()
        self.ntotal_conf = 0
        self.prevlospairs = set()
        self.ntotal_los = 0
        self.ntotal_ac = 0
        self.log_prefix = ''
        self.stable = True

        self.flst_log = datalog.crelog('FLSTLOG', None, flst_header)
        self.conf_log = datalog.crelog('CONFLOG', None, conf_header)

        with self.settrafarrays():
            self.inside_exp = np.array(
                [], dtype=np.bool)  # In experiment area or not.
            self.distance2D = np.array([])
            self.distance3D = np.array([])
            self.dstart2D = np.array([])
            self.dstart3D = np.array([])
            self.workstart = np.array([])
            self.entrytime = np.array([])
            self.create_time = np.array([])
Exemplo n.º 2
0
    def __init__(self):
        super(Area, self).__init__()
        # Parameters of area
        self.active = False
        self.delarea = ''
        self.exparea = ''
        self.swtaxi = True  # Default ON: Doesn't do anything. See comments of set_taxi function below.
        self.swtaxialt = 1500.0  # Default alt for TAXI OFF
        self.prevconfpairs = set()
        self.confinside_all = 0

        # The FLST logger
        self.flst = datalog.crelog('FLSTLOG', None, flstheader)
        self.conflog = datalog.crelog('CONFLOG', None, confheader)

        with RegisterElementParameters(self):
            self.insdel = np.array([],
                                   dtype=np.bool)  # In deletion area or not
            self.insexp = np.array([],
                                   dtype=np.bool)  # In experiment area or not
            self.oldalt = np.array([])
            self.distance2D = np.array([])
            self.distance3D = np.array([])
            self.dstart2D = np.array([])
            self.dstart3D = np.array([])
            self.workstart = np.array([])
            self.entrytime = np.array([])
            self.create_time = np.array([])
Exemplo n.º 3
0
    def __init__(self):
        super().__init__()

        # Main logarea parameters
        self.active = False
        self.areaname = ''
        self.interval = None
        self.logging = False

        # Logarea geovector parameters
        self.previds = {}
        self.breaches = {}
        self.geovecs = {}

        # Logarea conflict parameters
        self.concount = int(0)
        self.rescount = int(0)
        self.loscount = int(0)
        self.conpairs = []  #list to keep track of conflicts in logging area
        self.respairs = [
        ]  #list to keep track of resolution maneuvers in logging area
        self.lospairs = []  #list to keep track of LoS in logging area
        self.prevconpairs = set()  #already existing conflict pairs
        self.prevrespairs = set()  #already existing resolution pairs
        self.prevlospairs = set()  #already existing LoS pairs
        self.condict = {}
        self.resdict = {}
        self.losdict = {}

        # Loggers
        self.geolog = datalog.crelog('GEOLOG', None, geoheader)
        self.fstlog = datalog.crelog('FSTLOG', None, fstheader)
        self.conlog = datalog.crelog('CONLOG', None, conheader)
        self.reclog = datalog.crelog('RECLOG', None, recheader)

        # Traffic array data
        with self.settrafarrays():
            self.previnside = np.array(
                [], dtype=np.bool)  #bool array indicating previously inside
            self.currinside = np.array(
                [], dtype=np.bool)  #bool array indicating currently inside
            self.tla = np.zeros(traf.ntraf)  #total time in log area
            self.tcr = np.zeros(
                traf.ntraf)  #total time CR is active in logarea
            self.tcrb = np.zeros(
                traf.ntraf
            )  #total time CR is active in logarea while breaching a geovector limit
            self.dist = np.zeros(traf.ntraf)  #total distance flown (3D)
Exemplo n.º 4
0
def init_plugin():
    # Register a sector count logger
    global logger
    logger = datalog.crelog('OCCUPANCYLOG', None, '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
Exemplo n.º 5
0
def init_plugin():
    # Register a sector count logger
    global logger
    logger = datalog.crelog('OCCUPANCYLOG', None, '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
Exemplo n.º 6
0
    def __init__(self):
        super(Area, self).__init__()
        # Parameters of area
        self.active = False
        self.dt     = 0.5     # [s] frequency of area check (simtime)
        self.name   = None
        self.swtaxi = True  # Default OFF: Doesn't do anything. See comments of set_taxi fucntion below.
        self.swtaxialt = 1500.  # Default OFF: Doesn't do anything. See comments of set_taxi fucntion below.

        # The FLST logger
        self.logger = datalog.crelog('FLSTLOG', None, header)

        with RegisterElementParameters(self):
            self.inside      = np.array([],dtype = np.bool) # In test area or not
            self.oldalt      = np.array([])
            self.distance2D  = np.array([])
            self.distance3D  = np.array([])
            self.work        = np.array([])
            self.create_time = np.array([])
Exemplo n.º 7
0
    def __init__(self):
        super(Area, self).__init__()
        # Parameters of area
        self.active = False
        self.dt = 0.5  # [s] frequency of area check (simtime)
        self.name = None
        self.swtaxi = True  # Default OFF: Doesn't do anything. See comments of set_taxi fucntion below.
        self.swtaxialt = 1500.  # Default OFF: Doesn't do anything. See comments of set_taxi fucntion below.

        # The FLST logger
        self.logger = datalog.crelog('FLSTLOG', None, header)

        with RegisterElementParameters(self):
            self.inside = np.array([], dtype=np.bool)  # In test area or not
            self.oldalt = np.array([])
            self.distance2D = np.array([])
            self.distance3D = np.array([])
            self.work = np.array([])
            self.create_time = np.array([])