  The ability to operate virtually anywhere and carry payload makes Unmanned
Aerial Vehicles (UAVs) perfect platforms to carry communications nodes,
including Wi-Fi Access Points (APs) and cellular Base Stations (BSs). This is
paving the way to the deployment of flying networks that enable communications
to ground users on demand. Still, flying networks impose significant challenges
in order to meet the Quality of Experience expectations. State of the art works
addressed these challenges, but have been focused on routing and the placement
of the UAVs as APs and BSs serving the ground users, overlooking the backhaul
network design. The main contribution of this paper is a centralized
traffic-aware Gateway UAV Placement (GWP) algorithm for flying networks with
controlled topology. GWP takes advantage of the knowledge of the offered
traffic and the future topologies of the flying network to enable backhaul
communications paths with high enough capacity. The performance achieved using
the GWP algorithm is evaluated using ns-3 simulations. The obtained results
demonstrate significant gains regarding aggregate throughput and delay.
