# UAV Path Optimization for Precision Agriculture Wireless Sensor Networks
## 5 Results
Thus, in this scenario, the average distance traveled by UAVs is close to the pre-calculated route at the beginning of the reconfiguration phase, with exceptions for substitutions due to the UAV autonomy. In \(S_{4}\), with the Prohibition List disabled, it traveled longer distances in comparison to \(S_{1}\), as expected. The most significant difference was found in environments with 15 and 20 SNs. Finally, for \(S_{5}\), we can see a huge difference in comparison to the other scenarios due to the reduction of the SN active time. This makes it harder for the SN and the UAV to connect with each other and forces the UAV to fly over longer distances between SNs in hibernation mode. It is important to highlight that there are scenarios with lower SN density that generate larger UAV path length, and some other scenarios with higher SN density that create smaller route lengths due to SN grouping. Figure 16 shows the average UAV flight time for each scenario during the SN reconfiguration phase. The flight time in \(S_{2}\) (with shared timeslots) did not differ significantly for 5 SNs in comparison with \(S_{1}\); however, for 10, 15, and 20 SNs, we can see a significant difference on UAV flight time, due to its flying pattern over the other SNs even on timeslots that already been located other SNs. For \(S_{3}\) (where the UAV waits over each SN), the average flight time of the UAVs is higher in comparison to \(S_{1}\) for 10, 15, and 20 SNs as the UAV waits hovering over the SN as the timeslots pass by. For \(S_{4}\), we recall that the UAV learning strategy is disabled; thus, it has higher average flight times when compared to \(S_{1}\), for cases from 10 to 20 SNs. As for \(S_{5}\), where the active SN transmission time is reduced to a single timeslot, the average flight time presents much higher values when compared to other scenarios; due to the difficulty of matching the SN active time, the UAV flies for longer. Figure 14: Number of decisions taken by the UAVs. The parameters presented in Table 1 for Scenario \(S_{1}\) offered us the best performance based on our results compared to the other scenarios, so we performed some individual analysis to understand the behavior of our strategy. In Figure 17, we present the average distances covered by the UAVs during the reconfiguration phase along with the optimized route distance after the reconfiguration phase, for \(S_{1}\). As we can see, for 10 SNs, the UAV needs to fly over an average of 12 km to locate them in proper timeslots; after this, the UAV can reduce its route to approximately 2 km. Still, according to the same figure, the difference is even more significant for denser scenarios: for 20 SNs, the UAVs traveled on average 27 km until reconfiguring all SNs. In contrast, after the reconfiguration phase, the route is reduced to just 4 km. Figure 18 compares the reduction in traveled distance obtained in scenario \(S_{1}\) when compared to \(S_{4}\), in order to measure the impact of the UAV decision-making strategy. The reduction in traveled distance is as great as 20% for scenarios with 15 and 20 SNs. In scenarios where the UAV can make a decision, it flies to another SN if it determines that the arrival TS is restricted to that destination. Figure 16: Flight time for each scenario. Figure 15: Flight path for each scenario. If it has no possible destination, the UAV simply waits on its current position until the next TS, avoiding unnecessary traveling. Figure 19 presents a flight time comparison between scenarios \(S_{1}\) and \(S_{4}\), taking into account the use or not of the learning system based on the Prohibition List that the UAV feeds during the SN reconfiguration phase. Considering the case of 20 SNs, we can observe a reduction in the average flight time from 46 min to 17 min (savings of 63%) to complete the reconfiguration phase. Even for less dense cases, such as with 5 and 10 SNs, we obtain more than 53% of reduction in the UAV flight time.