@taskdefextract_live_data():# Get the live aircraft vector data around Dulles airport dulles_airport_position = aclib.Position(lat=38.9519444444, long=-77.4480555556) area_surrounding_dulles = aclib.bounding_box(dulles_airport_position, radius_km=200)print("fetching live aircraft data...") raw_aircraft_data = aclib.fetch_live_aircraft_data(area=area_surrounding_dulles)return raw_aircraft_data
@taskdefextract_live_data(airport,radius,ref_data):# Get the live aircraft vector data around the given airport (or none) area =Noneif airport: airport_data = ref_data.airports[airport] airport_position = aclib.Position( lat=float(airport_data["latitude"]), long=float(airport_data["longitude"]) ) area = aclib.bounding_box(airport_position, radius)print("fetching live aircraft data...") raw_aircraft_data = aclib.fetch_live_aircraft_data(area=area)return raw_aircraft_data