def field_length(interface): # unpack tofl analysis estimate_tofl = SUAVE.Methods.Performance.estimate_take_off_field_length # unpack data configs = interface.configs analyses = interface.analyses missions = interface.analyses.missions takeoff_airport = missions.base.airport # evaluate tofl = estimate_tofl( configs.takeoff, analyses.configs.takeoff, takeoff_airport ) tofl = tofl[0,0] # pack results = Data() results.takeoff_field_length = tofl return results
def takeoff_field_length(interface): # import tofl analysis module estimate_tofl = SUAVE.Methods.Performance.estimate_take_off_field_length # unpack data analyses = interface.analyses missions = interface.analyses.missions config = interface.configs.takeoff # defining required data for tofl evaluation takeoff_airport = missions.base.airport ref_weight = config.mass_properties.takeoff weight_max = config.mass_properties.max_takeoff weight_min = config.mass_properties.operating_empty # evaluate try: del config.maximum_lift_coefficient except: pass # weight vector to eval tofl weight_vec = np.linspace(weight_min,weight_max,10) takeoff_field_length = np.zeros_like(weight_vec) # loop of tofl evaluation for idw,weight in enumerate(weight_vec): config.mass_properties.takeoff = weight takeoff_field_length[idw] = estimate_tofl(config,analyses, takeoff_airport) # return initial value for takeoff weight config.mass_properties.takeoff = ref_weight # pack results results = Data() results.takeoff_field_length = takeoff_field_length results.takeoff_weights = weight_vec return results