コード例 #1
0
    def derive(self,
               liftoff=KTI('Liftoff'),
               rto=S('Rejected Takeoff'),
               off_blocks=KTI('Off Blocks'),
               start_dt=A('Start Datetime')):

        if liftoff:
            # Flight - use first liftoff index
            first_liftoff = liftoff.get_first()
            liftoff_index = first_liftoff.index
            frequency = liftoff.frequency
        elif rto:
            # RTO - use start index of first RTO
            first_rto = rto.get_first()
            liftoff_index = first_rto.slice.start
            frequency = rto.frequency
        elif off_blocks:
            # Ground Only - use first off blocks index
            first_off_blocks = off_blocks.get_first()
            liftoff_index = first_off_blocks.index
            frequency = off_blocks.frequency
        else:
            # Incomplete - use start of data
            liftoff_index = 0
            frequency = 1

        takeoff_dt = datetime_of_index(start_dt.value,
                                       liftoff_index,
                                       frequency=frequency)
        self.set_flight_attr(takeoff_dt)
コード例 #2
0
    def derive(self, liftoff=KTI('Liftoff'), rto=S('Rejected Takeoff'),
               off_blocks=KTI('Off Blocks'), start_dt=A('Start Datetime')):

        if liftoff:
            # Flight - use first liftoff index
            first_liftoff = liftoff.get_first()
            liftoff_index = first_liftoff.index
            frequency = liftoff.frequency
        elif rto:
            # RTO - use start index of first RTO
            first_rto = rto.get_first()
            liftoff_index = first_rto.slice.start
            frequency = rto.frequency
        elif off_blocks:
            # Ground Only - use first off blocks index
            first_off_blocks = off_blocks.get_first()
            liftoff_index = first_off_blocks.index
            frequency = off_blocks.frequency
        else:
            # Incomplete - use start of data
            liftoff_index = 0
            frequency = 1

        takeoff_dt = datetime_of_index(start_dt.value, liftoff_index,
                                       frequency=frequency)
        self.set_flight_attr(takeoff_dt)
コード例 #3
0
 def derive(self, liftoff=KTI('Liftoff'), start_dt=A('Start Datetime')):
     first_liftoff = liftoff.get_first()
     if not first_liftoff:
         self.set_flight_attr(None)
         return
     liftoff_index = first_liftoff.index
     takeoff_dt = datetime_of_index(start_dt.value, liftoff_index,
                                    frequency=liftoff.frequency)
     self.set_flight_attr(takeoff_dt)
コード例 #4
0
 def derive(self, on_blocks=KTI('On Blocks'),
            start_datetime=A('Start Datetime')):
     last_on_blocks = on_blocks.get_last()
     if last_on_blocks:
         on_blocks_datetime = datetime_of_index(start_datetime.value,
                                                 last_on_blocks.index)
         self.set_flight_attr(on_blocks_datetime)
     else:
         self.set_flight_attr(None)
コード例 #5
0
 def derive(self, off_blocks=KTI('Off Blocks'),
            start_datetime=A('Start Datetime')):
     first_off_blocks = off_blocks.get_first()
     if first_off_blocks:
         off_blocks_datetime = datetime_of_index(start_datetime.value,
                                                 first_off_blocks.index)
         self.set_flight_attr(off_blocks_datetime)
     else:
         self.set_flight_attr(None)
コード例 #6
0
 def derive(self, liftoff=KTI('Liftoff'), start_dt=A('Start Datetime')):
     first_liftoff = liftoff.get_first()
     if not first_liftoff:
         self.set_flight_attr(None)
         return
     liftoff_index = first_liftoff.index
     takeoff_dt = datetime_of_index(start_dt.value, liftoff_index,
                                    frequency=liftoff.frequency)
     self.set_flight_attr(takeoff_dt)
コード例 #7
0
 def derive(self, start_datetime=A('Start Datetime'),
            touchdown=KTI('Touchdown')):
     last_touchdown = touchdown.get_last()
     if not last_touchdown:
         self.set_flight_attr(None)
         return
     landing_datetime = datetime_of_index(start_datetime.value,
                                          last_touchdown.index,
                                          frequency=touchdown.frequency)
     self.set_flight_attr(landing_datetime)
コード例 #8
0
 def derive(self, turning=S('Turning On Ground'),
            start_datetime=A('Start Datetime')):
     last_turning = turning.get_last()
     if last_turning:
         on_blocks_datetime = datetime_of_index(start_datetime.value,
                                                last_turning.slice.stop,
                                                turning.hz)
         self.set_flight_attr(on_blocks_datetime)
     else:
         self.set_flight_attr(None)
コード例 #9
0
 def derive(self, start_datetime=A('Start Datetime'),
            touchdown=KTI('Touchdown')):
     last_touchdown = touchdown.get_last()
     if not last_touchdown:
         self.set_flight_attr(None)
         return
     landing_datetime = datetime_of_index(start_datetime.value,
                                          last_touchdown.index,
                                          frequency=touchdown.frequency)
     self.set_flight_attr(landing_datetime)
コード例 #10
0
 def derive(self, turning=S('Turning On Ground'),
            start_datetime=A('Start Datetime')):
     last_turning = turning.get_last()
     if last_turning:
         on_blocks_datetime = datetime_of_index(start_datetime.value,
                                                last_turning.slice.stop,
                                                turning.hz)
         self.set_flight_attr(on_blocks_datetime)
     else:
         self.set_flight_attr(None)