예제 #1
0
    def __init__(self):
        TrafficArrays.__init__(self)

        # Standard self.steepness for descent
        self.steepness = 3000. * ft / (10. * nm)

        # From here, define object arrays
        with RegisterElementParameters(self):

            # FMS directions
            self.trk = np.array([])
            self.spd = np.array([])
            self.tas = np.array([])
            self.alt = np.array([])
            self.vs = np.array([])

            # VNAV variables
            self.dist2vs = np.array([])  # distance from coming waypoint to TOD
            self.swvnavvs = np.array([])  # whether to use given VS or not
            self.vnavvs = np.array([])  # vertical speed in VNAV

            # LNAV variables
            self.qdr2wp = np.array(
                []
            )  # Direction to waypoint from the last time passing was checked
            # to avoid 180 turns due to updated qdr shortly before passing wp

            # Traffic navigation information
            self.orig = []  # Four letter code of origin airport
            self.dest = []  # Four letter code of destination airport

            # Route objects
            self.route = []
예제 #2
0
    def __init__(self):
        TrafficArrays.__init__(self)

        # Standard self.steepness for descent
        self.steepness = 3000. * ft / (10. * nm)

        # From here, define object arrays
        with RegisterElementParameters(self):

            # FMS directions
            self.trk = np.array([])
            self.spd = np.array([])
            self.tas = np.array([])
            self.alt = np.array([])
            self.vs  = np.array([])

            # VNAV variables
            self.dist2vs  = np.array([])  # distance from coming waypoint to TOD
            self.swvnavvs = np.array([])  # whether to use given VS or not
            self.vnavvs   = np.array([])  # vertical speed in VNAV

            # Traffic navigation information
            self.orig = []  # Four letter code of origin airport
            self.dest = []  # Four letter code of destination airport

            # Route objects
            self.route = []
예제 #3
0
 def __init__(self):
     TrafficArrays.__init__(self)
     with RegisterElementParameters(self):
         self.lat = np.array([])  # [deg] Active WP latitude
         self.lon = np.array([])  # [deg] Active WP longitude
         self.nextaltco = np.array(
             [])  # [m] Altitude to arrive at after distance xtoalt
         self.xtoalt = np.array(
             [])  # [m] Distance to next altitude constraint
         self.nextspd = np.array(
             [])  # [CAS[m/s]/Mach] save speed from next wp for next leg
         self.spd = np.array(
             []
         )  # [CAS[m/s]/Mach]Active WP speed (constraint or calculated)
         self.spdcon = np.array(
             [])  # [CAS[m/s]/Mach]Active WP speed constraint
         self.vs = np.array([])  # [m/s] Active vertical speed to use
         self.turndist = np.array(
             [])  # [m] Distance when to turn to next waypoint
         self.flyby = np.array(
             [])  # Flyby switch, when False, flyover (turndist=0.0)
         self.torta = np.array(
             [])  # [s] NExt req Time of Arrival (RTA) (-999. = None)
         self.xtorta = np.array([])  # [m] distance ot next RTA
         self.next_qdr = np.array([])  # [deg] track angle of next leg
예제 #4
0
    def __init__(self):
        TrafficArrays.__init__(self)
        # [m] Horizontal separation minimum for detection
        self.rpz = bs.settings.asas_pzr * nm
        # [m] Vertical separation minimum for detection
        self.hpz = bs.settings.asas_pzh * ft
        # [s] lookahead time
        self.dtlookahead = bs.settings.asas_dtlookahead
        self.dtnolook = 0.0

        # Conflicts and LoS detected in the current timestep (used for resolving)
        self.confpairs = list()
        self.lospairs = list()
        self.qdr = np.array([])
        self.dist = np.array([])
        self.dcpa = np.array([])
        self.tcpa = np.array([])
        self.tLOS = np.array([])
        # Unique conflicts and LoS in the current timestep (a, b) = (b, a)
        self.confpairs_unique = set()
        self.lospairs_unique = set()

        # All conflicts and LoS since simt=0
        self.confpairs_all = list()
        self.lospairs_all = list()

        # Per-aircraft conflict data
        with RegisterElementParameters(self):
            self.inconf = np.array([], dtype=bool)  # In-conflict flag
            self.tcpamax = np.array([]) # Maximum time to CPA for aircraft in conflict
예제 #5
0
    def __init__(self):
        TrafficArrays.__init__(self)
        # From here, define object arrays
        with RegisterElementParameters(self):
            # Most recent broadcast data
            self.lastupdate = np.array([])
            self.lat        = np.array([])
            self.lon        = np.array([])
            self.alt        = np.array([])
            self.trk        = np.array([])
            self.tas        = np.array([])
            self.gs         = np.array([])
            self.vs         = np.array([])

        self.setnoise(False)
 def __init__(self):
     TrafficArrays.__init__(self)
     with RegisterElementParameters(self):
         self.lat = np.array([])  # [deg] Active WP latitude
         self.lon = np.array([])  # [deg] Active WP longitude
         self.nextaltco = np.array(
             [])  # [m] Altitude to arrive at after distance xtoalt
         self.xtoalt = np.array(
             [])  # [m] Distance to next altitude constraint
         self.nextspd = np.array(
             [])  # [CAS[m/s]/Mach] save speed from next wp for next leg
         self.spd = np.array(
             []
         )  # [CAS[m/s]/Mach]Active WP speed (constraint or calculated)
         self.spdcon = np.array(
             [])  # [CAS[m/s]/Mach]Active WP speed constraint
         self.vs = np.array([])  # [m/s] Active vertical speed to use
         self.turndist = np.array(
             [])  # [m] Distance when to turn to next waypoint
         self.flyby = np.array(
             [])  # Flyby switch, when False, flyover (turndist=0.0)
         self.flyturn = np.array(
             []
         )  # Flyturn switch, when False, when Fkase, use flyby/flyover
         self.turnrad = np.array(
             [])  # Flyturn turn radius (<0 => not specified)
         self.turnspd = np.array(
             []
         )  # [m/s, CAS] Flyturn turn speed for next turn (<=0 => not specified)
         self.oldturnspd = np.array(
             []
         )  # [TAS, m/s] Flyturn turn speed for previous turn (<=0 => not specified)
         self.turnfromlastwp = np.array(
             []
         )  # Currently in flyturn-mode from last waypoint (old turn, beginning of leg)
         self.turntonextwp = np.array(
             []
         )  # Currently in flyturn-mode to next waypoint (new flyturn mode, end of leg)
         self.torta = np.array(
             [])  # [s] NExt req Time of Arrival (RTA) (-999. = None)
         self.xtorta = np.array([])  # [m] distance ot next RTA
         self.next_qdr = np.array([])  # [deg] track angle of next leg
예제 #7
0
    def __init__(self):
        TrafficArrays.__init__(self)
        # [-] switch to activate priority rules for conflict resolution
        self.swprio = False  # switch priority on/off
        self.priocode = ''  # select priority mode
        self.resopairs = set()  # Resolved conflicts that are still before CPA

        # Resolution factors:
        # set < 1 to maneuver only a fraction of the resolution
        # set > 1 to add a margin to separation values
        self.resofach = bs.settings.asas_mar
        self.resofacv = bs.settings.asas_mar

        with RegisterElementParameters(self):
            self.resooffac = np.array([], dtype=np.bool)
            self.noresoac = np.array([], dtype=np.bool)
            # whether the autopilot follows ASAS or not
            self.active = np.array([], dtype=bool)
            self.trk = np.array([])  # heading provided by the ASAS [deg]
            self.tas = np.array([])  # speed provided by the ASAS (eas) [m/s]
            self.alt = np.array([])  # alt provided by the ASAS [m]
            self.vs = np.array([])  # vspeed provided by the ASAS [m/s]