Trajectory Planing for Cooperating Unmanned Aerial Vehicles in the IoT