Consensus-Based Algorithms for Controlling Swarms of Unmanned Aerial Vehicles