Пример #1
0
 def derive(self,
            alt_agl=P('Altitude AGL'),
            ias=P('Airspeed'),
            airs=S('Airborne'),
            pitch_rate=P('Pitch Rate')):
     for air in airs:
         lows = np.ma.clump_unmasked(
             np.ma.masked_greater(alt_agl.array[air.slice],
                                  ROTOR_TRANSITION_ALTITUDE))
         for low in lows:
             trans_slices = slices_from_to(ias.array[air.slice][low],
                                           ROTOR_TRANSITION_SPEED_LOW,
                                           ROTOR_TRANSITION_SPEED_HIGH,
                                           threshold=1.0)[1]
             if trans_slices:
                 for trans in trans_slices:
                     base = air.slice.start + low.start
                     ext_start = int(base + trans.start -
                                     20 * ias.frequency)
                     if alt_agl.array[ext_start] == 0.0:
                         trans_start = index_at_value(
                             ias.array,
                             0.0,
                             _slice=slice(base + trans.start, ext_start,
                                          -1),
                             endpoint='first_closing')
                     else:
                         trans_start = np.ma.argmin(
                             pitch_rate.array[ext_start:base +
                                              trans.start]) + ext_start
                     self.create_phase(slice(trans_start,
                                             trans.stop + base))
    def derive(self, alt_agl=P('Altitude AGL'),
               ias=P('Airspeed'),
               airs=S('Airborne'),
               pitch_rate=P('Pitch Rate')):
        for air in airs:
            trans_slices = slices_from_to(ias.array[air.slice],
                                          ROTOR_TRANSITION_SPEED_HIGH,
                                          ROTOR_TRANSITION_SPEED_LOW,
                                          threshold=1.0)[1]

            if trans_slices:
                for trans in shift_slices(trans_slices, air.slice.start):
                    trans_end = index_at_value(ias.array, 0.0,
                                                 _slice=slice(trans.stop, trans.stop+20*ias.frequency),
                                                 endpoint='first_closing')
                    self.create_phase(slice(trans.start, trans_end+1))
Пример #3
0
    def derive(self,
               alt_agl=P('Altitude AGL'),
               ias=P('Airspeed'),
               airs=S('Airborne'),
               pitch_rate=P('Pitch Rate')):
        for air in airs:
            trans_slices = slices_from_to(ias.array[air.slice],
                                          ROTOR_TRANSITION_SPEED_HIGH,
                                          ROTOR_TRANSITION_SPEED_LOW,
                                          threshold=1.0)[1]

            if trans_slices:
                for trans in shift_slices(trans_slices, air.slice.start):
                    trans_end = index_at_value(
                        ias.array,
                        0.0,
                        _slice=slice(trans.stop,
                                     trans.stop + 20 * ias.frequency),
                        endpoint='first_closing')
                    self.create_phase(slice(trans.start, trans_end + 1))
 def derive(self, alt_agl=P('Altitude AGL'),
            ias=P('Airspeed'),
            airs=S('Airborne'),
            pitch_rate=P('Pitch Rate')):
     for air in airs:
         lows = np.ma.clump_unmasked(np.ma.masked_greater(alt_agl.array[air.slice],
                                                          ROTOR_TRANSITION_ALTITUDE))
         for low in lows:
             trans_slices = slices_from_to(ias.array[air.slice][low],
                                           ROTOR_TRANSITION_SPEED_LOW,
                                           ROTOR_TRANSITION_SPEED_HIGH,
                                           threshold=1.0)[1]
             if trans_slices:
                 for trans in trans_slices:
                     base = air.slice.start + low.start
                     ext_start = int(base  + trans.start - 20*ias.frequency)
                     if alt_agl.array[ext_start]==0.0:
                         trans_start = index_at_value(ias.array, 0.0,
                                                      _slice=slice(base+trans.start, ext_start, -1),
                                                      endpoint='first_closing')
                     else:
                         trans_start = np.ma.argmin(pitch_rate.array[ext_start:base+trans.start]) + ext_start
                     self.create_phase(slice(trans_start, trans.stop+base))