## 2 Smoothing paths for 3D planning. As for the application of the smoothing algorithm to 3D paths, by including the Z coordinate and working on as much space as possible, the qualitative result of the algorithm is more evident, being the smoothing of paths more ostensible in 3D paths than in 2D paths, as can be seen when comparing Figure 9a, which contains the original solution generated for a swarm of 5 UAVs, considering only the distance traveled as a parameter to optimize, with Figure 9b, which shows the smoothed solution of those paths, adding to the distance optimization a better dynamic behavior of the system. The comparison shows how the change in trajectories is quite significant, eliminating the pattern in Zig-Zag and, generating trajectories in which long paths predominate in a straight line, thus improving, too, the response times of swarm performance. As in 2D planning, a quantitative analysis of the use of this algorithm is collected as smoothing paths with Zig-Zag pattern analyzing their impact in aspects such as the number of path points included in the final solution, the total distance traveled by the swarm or the computation time required to generate trajectories that improve the dynamic behavior of the different UAVs. As for the number of path points that are part of each of the paths, in the case in 3D it can be observed, as shown in Table 2, that for each of the participating UAVs the reduction carried out is considerable, which highlights the need for post-processing algorithms for the elimination of intermediate nodes. Figure 8: Comparison of the computation time used for the generation of original and smoothed trajectories in 2D for a swarm of 5 UAVs. Individually the reduction of path points is considerable, but if you analyze their impact on the set of paths created for swarm, it is observed that the overall impact is very significant, as shown in Figure 10, from which it can be extracted that in some \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**Test 1**} & \multicolumn{2}{c}{**Test 2**} & \multicolumn{2}{c}{**Test 3**} & \multicolumn{2}{c}{**Test 4**} & \multicolumn{2}{c}{**Test 5**} \\ \hline
**Paths** & **O** & **S** & **O** & **S** & **O** & **S** & **O** & **S** & **O** & **S** \\ \hline \(UAV_{1}\) & 15 & 3 & 15 & 4 & 15 & 3 & 15 & 3 & 16 & 3 \\ \hline \(UAV_{2}\) & 13 & 3 & 13 & 3 & 13 & 3 & 13 & 3 & 13 & 3 \\ \hline \(UAV_{3}\) & 15 & 4 & 15 & 3 & 15 & 3 & 15 & 3 & 14 & 4 \\ \hline \(UAV_{4}\) & 12 & 3 & 11 & 4 & 12 & 4 & 13 & 3 & 13 & 3 \\ \hline \(UAV_{5}\) & 11 & 3 & 11 & 3 & 10 & 3 & 11 & 4 & 10 & 3 \\ \hline \hline \end{tabular} O = Original Path, \(\text{S}\) = Smooth Path.  
\end{table} 
Table 2: Comparison of waypoints entered in the original paths and smoothed in 3D for each swarm agent. Figure 9: Example of 3D path smoothing. cases the reduction reaches 76% of the path points and, that the average is 75.38% of nodes eliminated, which undoubtedly represents a significant improvement both from the point of view of the dynamic behavior of UAVs, and the total time spent in navigation, since, when following the default paths, the speed of the UAV is reduced by approaching a path point in order to gain precision in the passage through it. In addition, as in the 2D case, it should be considered that from the set of nodes that make up each of the paths, one corresponds to the location of the target and, this node can never be deleted. Therefore, by bypassing this node and considering the percentage of reduction on which they can be eliminated, it is obtained that with the proposed algorithm a reduction of intermediate path points of 81.57% is achieved. The next aspect to be analyzed is how the reduction of intermediate nodes affects or does not affect the reduction of the total distance traveled by the set of UAVs and thus also a reduction in the time spent reaching the destination.