Drone technology is undoubtedly part of our everyday life these days. The business and industrial use of unmanned aerial vehicles (UAV) can provide favorable solutions in many areas of life, and they are also great for emergency situations and for reaching hard-to-reach places. However, there are many technological and regulatory challenges to overcome in their application. One of the weak links in the operation of UAVs is the limited availability of energy. In order to address this issue authors develop a novel trajectory planning method for UAVs to optimize the energy necessity during flight. For this, an “energy map”, which serves as the basis for trajectory planning, must first be prepared, i.e., the energy consumption of the individual components must be determined. This is followed by configuring the 3D environment including partitioning of the work space (WS), i.e. the definition of free spaces, occupied spaces (obstacles) and semi-occupied/free spaces. On the basis of the partitioned space, the corresponding graph-like path(s) has to be generated, where a graph search-based heuristic trajectory planning can be started, taking into account the most important wind conditions, e.g. velocity and direction. Finally, in order to test the theoretical results, some sample environment will be created, where the proposed path generations will be tested and analyzed. The suggested method is able to find the optimal path in terms of energy consumption.