View raw

1 import random 2 3 def get_drag(aircraft, drag): 4 # Transform semi-span integer into list 5 semi_span = [x for x in range(0, aircraft.wing.semi_span)] 6 7 # Drag increases after 80% of the semi_span 8 cutoff = round(0.8 * aircraft.wing.span) 9 10 # Drag increases by 25% after 80% of the semi_span 11 F_x = [drag for x in semi_span[0:cutoff]] 12 F_x.extend([1.25 * drag for x in semi_span[cutoff:]]) 13 return F_x 14 15 16 def get_drag_total(aircraft): 17 """Get total drag force acting on the aircraft.""" 18 return random.random() * 100 19