# Energy-Optimized 3D Path Planning for Unmanned Aerial Vehicles
## 8 Results and Analysis  
In order to verify the theoretical results, the authors prepared the above-mentioned (outlined) work area and examined their related assumptions.  
The fastest way to find the path with minimum drone energy demand is by the heuristic A* search method. In this particular case, the basic A* method is extended by the wind conditions, and the weighting of the edges and the nodes is introduced based on the energy demands of the path segments. In the first step, the modelled work space map is embedded in the system, and then the graph search is executed on the given environment.  
In this project, the developed algorithm was tested for three different scenarios. In each situation, the drone and the wind velocities are constant and the wind velocity \(v_{wind}\) = 0.75 * \(v_{drune}\). In the final comparison, where the 3 paths are represented in one diagram (Figure 15), to make it easier to distinguish the individual paths, different START and GOAL coordinates were established in each case. The workspace is identical in all cases and partitioned (scaled) into 15 \(\times\) 15 \(\times\) 15 units. The model works by reading the specified real area (see _Microsoft_, _Google_ 3D maps supports or _Situm_ Technologies) and creating the _class Map_ by the given scaling factor.  
1. In Scenario 1, the tailwind is acting in the direction of the velocity vector of the drone. The energy consumption of the drone is minimal, and the path faces the target position almost directly, see Figure 12. The starting position \(S1\) = [0, 0, 0] and the goal position coordinates \(G1\) = [13, 15, 13], \(v_{wind}\) = 0.75 * \(v_{drune}\).
2. In Scenario 2, the drone's velocity vector and the wind velocity vector were at 90 degrees. It is clear from Figure 13 that while the drone is flying between the houses, near to ground in leeward, wind does not have much effect on the trajectory planning, but  
Figure 15: The sum of calculated optimal trajectories from the START (left bottom corner) to the GOAL positions.  
in an open field it does. The gliding effect can be partially observed. The wind vs. drone velocity ratio remains the same. The start and goal positions: \(S2=[0,\,6,\,0]\); \(G2=[13,\,13,\,13]\).
3. In Scenario 3, the total headwind affects the drone, and the two velocity vectors are opposite to each other. The ratio is \(v_{vind}=0.75\)* \(v_{drone}\). The start and goal positions are identical in both instances, \(S3=[8,-2,\,2]\); \(G3=[15,15,\,15]\). The significant difference between the routes becomes apparent only in the open area, namely, the gliding effect is much more prominent, compared to the previous cases.  
The model's program features object orientation, where first, the _class Map_ is created and embedded into the search algorithm. It has a function called _free()_ that checks if a point in 3D space is occupied or free. It also has a function _heuristic()_ that calculates the absolute value of the distance between current and final points (x,y,z). It further calculates the weighting of the wind from given parameters. The AStarSearch() function itself moves from point to point to check if the current point is the goal, until it actually reaches the final point. It uses the function _heuristic()_ to find the optimal neighbor points. The visited nodes are saved in an array and can be represented visually. The previously described algorithm (Figure 11) considers three different paths under three different wind conditions, as illustrated in Figure 10. The final results of the path planning processes described above can be seen in the figures below, see Figures 12-15. The pseudocodes of the program are given in Appendices A and B.