This paper proposes an optimal positioning and trajectory planning algorithm for unmanned aerial vehicles (UAVs) to improve a communication quality of a team of ground mobile nodes (vehicles) in a complex urban environment. In particular, a nonlinear model predictive control (NMPC)-based approach is proposed to find an efficient trajectory for UAVs with a discrete genetic algorithm while considering the dynamic constraints of fixed-wing UAVs. The advantages of using the proposed NMPC approach and the communication performance metrics are investigated through a number of scenarios with different horizon steps in the NMPC framework, the number of UAVs used, heading rates and speeds.