Research Article

Online Path Generation and Navigation for Swarms of UAVs

Algorithm 3

Backtracking.
(1)while the UAV is in the backtrack mode do
(2) randomly choose one of the three dimensions
(3) attempt to move the UAV in the opposite direction of its destination
(4)if a collision-hazard is found or the required location is locked by another UAV then
(5)  hover in place
(6)else
(7)  backtrack the UAV by moving it one step away from its destination
(8)end if
(9)if the required number of backtrack steps is successfully completed or the maximum number of backtrack attempts is reached  then
(10)  deactivate the backtrack mode and return to the normal flight mode
(11)end if
(12)end while