def can_operate(cls, available, ac_type=A('Aircraft Type')):
     aircraft = ac_type == helicopter
     gearbox = any_of(
         ('MGB Oil Press', 'MGB (Fwd) Oil Press', 'MGB (Aft) Oil Press'),
         available)
     airborne = 'Airborne' in available
     return aircraft and gearbox and airborne
 def can_operate(cls, available, ac_type=A('Aircraft Type')):
     gog_available = any_of(('Gear (L) On Ground', 'Gear (R) On Ground'), available)
     if gog_available:
         return True
     elif all_of(('Vertical Speed', 'Eng (*) Torque Avg'), available):
         return True
     else:
         return False
    def can_operate(cls, available):
        '''
        We can determine a landing airport in one of two ways:

        1. Find the nearest airport to the coordinates at landing.
        2. Use the airport data provided in the achieved flight record.
        '''
        return any_of(('Approach Information', 'AFR Landing Airport'), available)
Ejemplo n.º 4
0
    def can_operate(cls, available):
        '''
        We can determine a landing airport in one of two ways:

        1. Find the nearest airport to the coordinates at landing.
        2. Use the airport data provided in the achieved flight record.
        '''
        return any_of(('Approach Information', 'AFR Landing Airport'), available)
Ejemplo n.º 5
0
 def can_operate(cls, available):
     vref = 'Vref' in available
     afr = 'Airspeed' in available and any_of(['AFR Vref'], available)
     x = set(available)
     base = ['Airspeed', 'Series', 'Family', 'Approach And Landing',
             'Touchdown', 'Gross Weight Smoothed']
     weight = base + ['Gross Weight Smoothed']
     config = set(weight + ['Flap']).issubset(x)
     return vref or afr or config
 def can_operate(cls, available):
     if ('Training Mode' in available) and \
        not(any_of(('Eng (1) Training Mode', 'Eng (2) Training Mode'), available)):
         return True
     elif all_of(('Eng (1) Training Mode', 'Eng (2) Training Mode'), available) and \
         ('Training Mode' not in available) :
         return True
     else:
         return False
 def can_operate(cls, available, ac_type=A('Aircraft Type')):
     gog_available = any_of(('Gear (L) On Ground', 'Gear (R) On Ground'),
                            available)
     if gog_available:
         return True
     elif all_of(('Vertical Speed', 'Eng (*) Torque Avg'), available):
         return True
     else:
         return False
 def can_operate(cls, available):
     '''
     We can determine a landing runway in a number of ways:
     1. Use the runway data provided in the achieved flight record
        if available and the aircraft does not have precise positioning.
     2. Using airport, heading and coordinates at landing.
     3. Use the runway data provided in the achieved flight record if
        airport or heading is missing or the runway failed to derive.
     '''
     return any_of(('Approach Information', 'AFR Landing Runway'), available)
Ejemplo n.º 9
0
 def can_operate(cls, available):
     vref = 'Vref' in available
     afr = 'Airspeed' in available and any_of(['AFR Vref'], available)
     x = set(available)
     base = [
         'Airspeed', 'Series', 'Family', 'Approach And Landing',
         'Touchdown', 'Gross Weight Smoothed'
     ]
     weight = base + ['Gross Weight Smoothed']
     config = set(weight + ['Flap']).issubset(x)
     return vref or afr or config
    def can_operate(cls, available):
        '''
        We can determine a landing airport in a number of ways:

        1. Find the nearest airport to the coordinates at landing with precise positioning.
        2. Use the airport data provided in the achieved flight record
           if the aircraft does not have precise positioning.
        3. Find the nearest airport to the coordinates at landing without precise positioning.
        4. Use the airport data provided in the achieved flight record as a fallback.
        '''
        return any_of(('Approach Information', 'AFR Landing Airport'), available)
Ejemplo n.º 11
0
 def can_operate(cls, available, manufacturer=A('Manufacturer')):
     baro_setting_sel = True
     if manufacturer and manufacturer.value == 'Airbus':
         baro_setting_sel = any(
             (any_of(('Baro Setting Selection', 'Baro Correction (ISIS)'),
                     available),
              all_of(('Baro Setting Selection (Capt)',
                      'Baro Setting Selection (FO)'), available)))
     two_baro = all_of(('Baro Correction (Capt)', 'Baro Correction (FO)'),
                       available)
     return two_baro and baro_setting_sel
Ejemplo n.º 12
0
 def can_operate(cls, available):
     return any_of(('Approach Information', 'AFR Landing Runway'),
                   available)
Ejemplo n.º 13
0
 def can_operate(cls, available, ac_type=A('Aircraft Type')):
     return any_of(('MGB Oil Press (1)', 'MGB Oil Press (2)'), available) \
            and ac_type == helicopter
 def can_operate(cls, available):
     return any_of(cls.get_dependency_names(), available)
Ejemplo n.º 15
0
 def can_operate(cls, available, ac_type=A('Aircraft Type')):
     return 'Landing' in available and any_of(('Airspeed True', 'Groundspeed'), available) \
            and ac_type == aeroplane
 def can_operate(cls, available):
     return 'Go Around And Climbout' in available and any_of((
         'Flap Lever',
         'Flap Lever (Synthetic)',
     ), available)
Ejemplo n.º 17
0
 def can_operate(cls, available):
     # Can operate with a any combination of parameters available
     return any_of(cls.get_dependency_names(), available)
 def can_operate(cls, available):
     # Can operate with a any combination of parameters available
     merge_position = any_of(('Gear (L) Position', 'Gear (N) Position',
                              'Gear (R) Position', 'Gear (C) Position'),
                             available)
     return merge_position
 def can_operate(cls, available):
     return any_of(('Flap Lever', 'Flap Lever (Synthetic)'), available)
Ejemplo n.º 20
0
 def can_operate(cls, available):
     return any_of(['Destination', 'AFR Destination Airport'], available)
 def can_operate(cls, available):
     return 'Eng Start' in available and (any_of(
         ('Eng (%d) N1' % n for n in range(1, 5)), available) or any_of(
             ('Eng (%d) N2' % n for n in range(1, 5)), available))
 def can_operate(cls, available):
     return any_of(('Latitude (1)', 'Latitude (2)', 'Latitude (3)'),
                   available)
 def can_operate(cls, available):
     # Can operate with a any combination of parameters available
     return any_of(cls.get_dependency_names(), available)
 def can_operate(cls, available):
     merge_position = any_of(('Gear (L) Position', 'Gear (N) Position',
                              'Gear (R) Position', 'Gear (C) Position'),
                             available)
     return merge_position
 def can_operate(cls, available, ac_type=A('Aircraft Type')):
     return ac_type and ac_type.value == 'helicopter' and \
            any_of(cls.get_dependency_names(), available)
Ejemplo n.º 26
0
 def can_operate(cls, available):
     return any_of(('Approach Information', 'AFR Landing Runway'), available)
 def can_operate(cls, available, ac_type=A('Aircraft Type')):
     return any_of(('MGB Oil Press (1)', 'MGB Oil Press (2)'), available) \
            and ac_type == helicopter
 def can_operate(cls, available):
     return 'Airborne' in available and any_of((
         'Flap Lever',
         'Flap Lever (Synthetic)',
     ), available)
Ejemplo n.º 29
0
 def can_operate(cls, available):
     return any_of(('Latitude (1)', 'Latitude (2)', 'Latitude (3)'),
                   available)
 def can_operate(cls, available, ac_type=A('Aircraft Type')):
     return ac_type == helicopter and any_of(cls.get_dependency_names(), available)
Ejemplo n.º 31
0
 def can_operate(cls, available):
     return any_of(cls.get_dependency_names(), available)
Ejemplo n.º 32
0
 def can_operate(cls, available):
     return any_of(['Destination', 'AFR Destination Airport'], available)