A New Coverage Flight Path Planning Algorithm Based on Footprint Sweep Fitting for Unmanned Aerial Vehicle Navigation in Urban Environments

: This paper presents a new coverage flight path planning algorithm that finds collision-free, minimum length and flyable paths for unmanned aerial vehicle (UAV) navigation in three-dimensional (3D) urban environments with fixed obstacles for coverage missions. The proposed algorithm significantly reduces computational time, number of turns, and path overlapping while finding a path that passes over all reachable points of an area or volume of interest by using sensor footprints’ sweeps fitting and a sparse waypoint graph in the pathfinding process. We devise a novel footprints’ sweep fitting method considering UAV sensor footprint as coverage unit in the free spaces to achieve maximal coverage with fewer and longer footprints’ sweeps. After footprints’ sweeps fitting, the proposed algorithm determines the visiting sequence of footprints’ sweeps by formulating it as travelling salesman problem (TSP), and ant colony optimization (ACO) algorithm is employed to solve the TSP. Furthermore, we generate a sparse waypoint graph by connecting footprints’ sweeps’ endpoints to obtain a complete coverage flight path. The simulation results obtained from various scenarios fortify the effectiveness of the proposed algorithm and verify the aforementioned claims.


Introduction
Unmanned aerial vehicles (UAVs) are achieving ground-breaking success in many application areas such as temporary infrastructure, monitoring and tracking, data collection and surveying, and delivery of goods [1].The modern UAVs have the ability to carry a variety of payloads' equipment to perform desired missions with realtime processing.The UAV market in experiencing an exponential growth due to the wide range of the practical applications in hazardous, uncertain and threatening areas [2].Recently, due to the integration of internet of things and cloud technologies with the UAV the application scenarios of UAVs are becoming more and more advance [3].The civilian real-life economic applications of UAVs such as traffic monitoring [4], air quality monitoring [5], disaster management [6], communication relays [7], and infrastructure inspection [8], among others, are more attractive applications.Despite having many promising applications in each sector, UAV usage without human control imposes several challenges that need to be resolved.Apart from the physical challenges, in many applications, a UAV needs the ability to compute a path between two pre-determined locations while avoiding various obstacles or to find a path which covers every reachable point of a certain area or volume of interest which is called coverage path planning (CPP).In this work, our focus is on the CPP for UAV's navigation in 3D urban environments with fixed obstacles for coverage missions.
CPP is classified as subtopic of the path planning in robotics where it is necessary to obtain a low cost path that covers the entire free space of a certain area or volume of interest with minimum overlapping [9].CPP is a non-deterministic polynomial time hard (NP-hard) optimization problem.Due to the extensive use of UAVs in many fields for complex missions, the problem of CPP for single and multiple UAVs has been a very active area of research, especially during the last decade [10,11].Depending upon the type of information available for the UAV workspace, the CPP are divided into two major categories global and local.Several CPP algorithms have been proposed for covering a regular or irregular shaped area of interest (AOI) with visual sensor and thermal sensor, etc. mounted on the UAV [12][13][14].The basic approach adopted by most of the offline CPP algorithm is the area decomposition into non-overlapping subregions, determining the visiting sequence of the subregions, and covering decomposed regions individually in a back and forth manner to obtain a complete coverage path.Decomposition-based methods are promising in achieving the complete coverage of the target area.Classical exact cellular decomposition [15], morse based decomposition [16], landmark based topological coverage [17], grid-based methods [18], contact sensor-based coverage [19], and graph based methods [20] are well-known decomposition-based coverage methods.
Most of the existing CPP algorithms for UAVs do not provide thorough insight into complete coverage of the AOI by considering sensor footprints as coverage unit particularly regarding the efficient and complete coverage of the AOI with footprints' sweeps fitting in complex 3D urban environments.The authors of [21] have explained that most of the existing algorithms employ the same sweep direction in all subareas which may not be able to obtain optimal results.Recently, various approaches have been proposed to compute a low cost coverage path such as mirror mapping method [22], viewpoints sampling [23], in-field obstacles classification [24], optimal polygon decomposition [25], and context-aware UAV mobility [26].Despite the success of such techniques, in most cases, either many locations of the target area are covered repeatedly, or computing time degrades [27].In addition, most of the algorithms have limited applicability in relation with the shape of the target area [21,28].When the shape of AOI is changed, the algorithm performance is no longer feasible.Furthermore, the majority of the algorithms do not consider the decomposition of the AOI with relation to the camera/sensor footprints which can significantly increase the number of turns in the path.To overcome the aforementioned limitations, this study proposes a new coverage flight path planning algorithm that fulfil the multiple objectives of CPP.
The rest of the paper is organized as follows; Section 2 explains the background and related work regarding well-known coverage path planning algorithms.Section 3 presents the proposed coverage flight path planning algorithm and explains its principal steps.Section 4 discusses the experiments and simulation results.Finally, conclusions and future directions are offered in Section 5.

Background and Related Work
This section presents the background and related work regarding the AOI decomposition techniques used for UAV CPP, coverage types, different types of the AOI used for coverage missions, geometric flight patterns, path optimization algorithms and application specific CPP methods.Cao et al. [29] defined the six requirements for coverage scenarios.In complex environments, it is not always possible to satisfy all six requirements.Therefore, in some cases, the priority is given to the mission completion with sacrifice on some of the requirements [30].Prior research classified the CPP methods into two major categories: heuristic and cell decomposition-based methods.Heuristic based methods define procedures that should be followed during CPP [31,32].In cell decomposition, the AOI is decomposed into non-overlapping cells of varying shapes and sizes.There exist several kinds of the AOI decomposition techniques in literature [30].Boustrophedon decomposition [33] and trapezoidal decomposition [34] are two well-known exact cellular decomposition techniques that are widely used for coverage applications.Morse-based cellular decomposition is an advance form of the boustrophedon decomposition which is based on critical points of Morse functions [35].The approximate cellular decomposition techniques divide the AOI into a set of regular cells.
Grid-based methods are used over approximate areas to generate coverage paths for the UAVs [36].Convex decomposition transforms the irregular shaped AOI into regular shaped cells in order to reduce the number of turns [37].Each decomposition method varies regarding the cell sizes, cell shapes, degree of computational complexity, and path quality.A pictorial overview of the most widely used AOI decomposition techniques is given in Figure 1.There are two types of coverage: simple and continuous.The shape of the AOI can be a rectangle, square, convex polygon, non-convex polygon, 3D cubes (i.e., buildings) or irregular for coverage missions.The most widely used geometric flight patterns for CPP are back and forth (BF), spiral (SP), zamboni, and hybrid patterns.Andersen et al. [38] compared different types of the geometric flight patterns in his work.The flight patterns are employed considering the UAV mobility constraints, shape of the AOI, coverage type, and application requirements.For example, the BF pattern is suitable when the AOI is rectangular and large in size.Jiao et al. [39] proposed an exact cellular decomposition based approach for concave area coverage.Initially, the concave shaped AOI is decomposed into the convex subareas using the minimum width sum approach [40], and then the BF motion pattern is applied to completely sweep the AOI.Xu et al. [41] proposed an optimal CPP approach for fixed wing UAVs with minimum overlapping and coverage guarantees.The proposed algorithm employs the boustrophedon decomposition to decompose the AOI into a set of cells.Later, the adjacency graph is constructed from the cells, and cells are swept using the BF motion patterns.The order of the cells visit follows the Eulerian circuit having start and end at the same vertex.The proposed approach is able to achieve the complete coverage of the AOI.However, in some cases, it will perform additional sweeps by not considering the sensor's footprint that will significantly affect the solution quality in the presence of complex geometry obstacles.Öst [42] proposed a CPP approach for concave shape AOI with sharp edges without sacrificing the guarantees on complete coverage.
In some scenarios, a UAV needs to visit several spatially distributed points of interests (POIs) in the target area to either collect data or provide wireless charging during the mission.In such cases, the CPP problem is divided into several small start-to-goal subproblems, where UAV needs to visit each POI only once while avoiding collision with the obstacles present in the AOI.Some authors considered the special cases of CPP in which AOI contains many interesting and non-interesting zones [43,44].The interesting zones need careful coverage with higher resolution, so UAV covers such zones with low altitudes and vice versa.A new CPP approach for the aerial remote sensing in agriculture was proposed by Barrientos et al. [45].The proposed approach decomposes the AOI based on the vehicle's capabilities.UAV has to fly at a certain constant height in order to ensure a specific resolution and CPP is performed using a wavefront planner [46].The existing studies used several path optimization algorithms for UAV CPP.The ant colony optimization (ACO) [47], Genetic algorithm (GA) [48], wavefront algorithm [49], A * algorithm [50], theta * algorithm [51], particle swarm optimization (PSO) [52], and their improved versions, among other, are the most widely used path optimization algorithms for CPP.
A number of studies have explored a closely related method used for UAV CPP with coverage guarantees, the boustrophedon cellular decomposition based hierarchal CPP approach (BCDH-CPP) [53], and the related coverage alternatives-based CPP (CA-CPP) algorithm [54].The BCDH-CPP [53] is a cellular decomposition based CPP approach for the UAVs and it is a promising method for CPP in known environments inhabiting arbitrary obstacles.The proposed approach decomposes the AOI into cells, compute a Eulerian circuit traversing through these cells, and finally joins each cell in using seed spreader motion pattern to find a coverage path.The proposed approach determines the coverage path with excessive overlapping in some parts by not considering the UAV sensor/camera footprints as coverage unit.CA-CPP algorithm [54] introduced the four coverage alternatives to perform efficient coverage in both convex and non-convex areas.The proposed approach can reduce the number of turns and path length considering the appropriate directions and optimal line sweep.The proposed approach has very high computational cost.Meanwhile, the authors devised a method to reduce the overheads by enforcing adjacencies.However, due to extensive evaluation of various permutations, the proposed algorithm complexity varies exponentially with problem size.Furthermore, the decomposition-based CPP approaches discard the useful global information about the free spaces geometry which can lead to the excessive number of turns in the path.
The contributions of this research in the field of UAV global CPP can be summarized as follows: (i) it proposes a new coverage flight path planning algorithm that has potentials to obtain the minimum length path that ensures the perfect coverage of the target area with reduced computational time, number of turns, and path overlapping; (ii) it evaluates and selects the best coverage direction(s) by analyzing the span of the AOI, and exploiting free spaces geometry information to reduce the number of turns in the path; (iii) it introduces a novel footprints' sweeps fitting method in which an entire free space of a certain AOI can be swept with fewer and longer sensor/camera footprints' sweeps; (iv) it determines the visiting sequence of the footprints' sweeps in the form of closed path to reduce the global path length; (v) it generates a sparse waypoint graph by connecting the footprint sweeps' endpoints with neighbours' sweeps by taking into account their visiting sequence, UAV maneuverability constraints, and obstacles effect; (vi) it finds a coverage path that fully scan the desired area located in 3D urban environments.

The Proposed Coverage Flight Path Planning Algorithm
This section explains the conceptual overview of the proposed CPP algorithm and outlines its procedural steps.Figure 2 shows the conceptual overview of our proposed global CPP algorithm.
To find a path that covers an entire free space of a certain region of interest Q of a 3D urban environment of known geometry, we used the seven principle steps.Brief discussion about each principle step with the equations, procedures and examples are explained below.

Modelling of the UAV Operating Environment
After getting the coverage mission specification, the proposed algorithm models the UAV operating environment.Environment modelling usually refers to the classification of free spaces (Q f ree ) and obstacles regions (Q obstacles ).Q obstacles refers to the parts of the AOI Q where the UAV cannot fly due to the presence of obstacles.In contrast, Q f ree refers to those parts of Q where UAV can operate without collision with obstacles.The obstacles' regions are represented with the geometrical shapes (i.e., squares, cubes, circles, and cylinder, etc.).In this work, we model the UAV operating environment from the raw environment containing the elevation data about the urban environment buildings and apartments, etc. with a set of 3D convex obstacles by calculating the convex hull.Each obstacle has random width, length and altitudes depending upon the real environment geometry.Each obstacle has eight vertices and six faces.The obstacle vertices u in the modelled environment can be represented with three co-ordinates values, u = (x, y, z).All eight vertices of the ith obstacle along with their numerical values can be mathematically expressed as following matrix.
x min y min z min ; x min y min z max x min y max z min ; x min y max z max x max y min z min ; x max y min z max x max y max z min ; x max y max z max The source location is represented with a 3D point p, where p = (x s , y s , z s ) and destination location is represented with a point q, where q = (x t , y t , z t ).In some coverage mission, the source p and destination q are the same because the UAV returns to the starting location after completing the mission.The objective of the proposed algorithm is to find a coverage path ζ that guarantees the perfect coverage of Q.The path ζ consists of nodes set which can be defined as,

Locating Area of Interest on the Modelled Map and Extracting Free Spaces Geometry
This subsection briefly explains about locating the AOI on the modelled map and extracting free spaces geometry from the AOI for coverage mission.

Locating Area of Interest on the 3D Modelled Map
The AOI can be represented with the sequence of n vertices {v 1 , v 2 , v 3 , . . ., v n }.Each vertex v i has three co-ordinates values (v x (i), v y (i), v z (i)).Considering v i as the first vertex of the AOI, the next vertex to v i will be v next(i) , where next(i) = i(mod n) + 1.The edge e i connecting two vertices v i and v next(i) has length l i , where l i = v i − v next(i) .The AOI can contain many obstacles and no-Fly Zones (NFZ) of varying geometries.The AOI boundary is set of collision free vertices and edges.In some cases, the AOI vertices, edges or both can intersect with obstacles as shown in Figure 3.

Extracting Free Spaces Geometry
After locating the AOI in an enclosed form on the map, we extract free spaces geometry from the AOI.To do so, we first perform the obstacles' existence checks in the AOI.With the help of these checks, the AOI can be classified into three categories such as obstacles-free environment, obstacles inhibiting environment and area boundary obstacles only.We simplify the AOI boundary by considering the obstacles that intersect with the AOI edges or vertices and lying in close proximity of the AOI edges by shrinking the AOI inward considering the UAV size.
Those obstacles which are on the boundary of the AOI or in close proximity that can impact the UAV safety are removed and configuration space (CS) is simplified for mission.Later, we draw a line from one vertices of the AOI to its nearest adjacent vertices and rotate it to all n vertices to determine the obstacles' existence.If no obstacles intersect with the line, then the AOI can be regarded as the obstacle-free.Meanwhile, if the obstacles exist, the proposed algorithm determines whether the obstacles are part of the area boundary obstacles only or in-field obstacles.In the former case, the proposed algorithm performs the coverage in simplified CS where the AOI is obstacle-free.In the latter case, the obstacles' enlargement (i.e., pushing the intersections by a D sa f e out of obstacles.)and clustering are carried out to extract the free spaces geometry from the AOI.We enlarge the obstacles by safe distance D sa f e and cluster the nearby obstacles which overlap each other due to D sa f e addition or become so close to each other that UAV can collide.D sa f e is an integer number whose value can be adjusted considering the UAV size, operating environment and obstacles shape.A pictorial overview of the enlarged obstacle by D sa f e addition is shown in Figure 4b.We apply the minimum UAV altitude limits H min to discard the obstacles that fall below the H min and UAV can go over safely.Through the above-mentioned process, the AOI can be classified into traversable and non-traversable parts.In the traversal parts, we fit UAV sensor footprints' sweeps considering the appropriate coverage direction for the coverage missions.

Selecting the Best Coverage Direction (s) by Analyzing the Span of the Area of Interest and Exploiting Free Spaces Geometry Information
Selecting the best coverage direction is extremely important to reduce the number of turns in the flight path to preserve the UAV resources.The turns are costly in terms of the energy, mission time, and path length because the UAV has to reduce the speed, perform turn, and increase speed again.Figure 5 presents the overview of the coverage path obtained from the same AOI with two different directions.The path on the left has only three turns and the path on the right has eleven turns.In this work, we select the best coverage direction (s) by analyzing the span D of the AOI and exploiting free spaces' geometry information.We compute the horizontal span H s and vertical span V s of the AOI for the best coverage direction selection for regular shaped AOI.Additionally, we exploit the free spaces' geometry knowledge to select the appropriate coverage direction (s).The coverage direction is chosen parallel to the maximal span axis and considering the free spaces tendency.We employ either one or multiple coverage directions depending upon the AOI complexity to reduce the number of turns.For the irregular shaped AOI, we compute the convex-hull and transform it to some approximate regular shape for the span calculation and best coverage direction selection.When both spans of the AOI are equal, the appropriate coverage direction is chosen considering the obstacles placement and free spaces tendency.By utilizing the global information about the AOI and following the procedure explained above, the best coverage direction can be selected which yields a smaller number of turns in the path.The proposed method utilizes the cumulative knowledge of the several parts of the AOI to find the best coverage direction which reduces the number of turns significantly.

Sensor Footprints Sweeps Fitting in Free Spaces of the Area of Interest
UAV carries a specific tool to cover the AOI in coverage missions.The tool can be a visual sensor, transmitter, digital camera, or spray tank depending upon the mission.In this work, we assume that UAV carries a visual sensor to cover the AOI during coverage.The attached tool has different sensing characteristics and varying footprint sizes depending upon the UAV height.If the UAV altitude is low, the footprint size is small and image resolution is high.In contrast, when the UAV altitude is high, the footprint size is bigger, and resolution is low.The sensing parameters are adjusted and usually taken at the start of the mission to achieve the desired objectives.UAV generally flies at constant altitude in coverage missions.However, in some cases, it pays attention to the priority of regions.The important regions are covered with low altitudes and vice versa.The sensor footprint F is of rectangular shape with fixed length F l and width F w , respectively.However, the size of the footprint keeps changing with the UAV altitude during the mission.After determining the sensor footprint size on the ground as shown in Figure 6a, we fit N sensor footprints' sweeps in such a way that maximal coverage can be achieved with fewer footprints' sweeps.The N sensor footprints fitted in the AOI can be mathematically expressed as a set as shown in Equation ( 1): R = {F 1 , F 2 , F 3 , . . ., F N }.
Each footprint sweep has two parts: one is on the ground (i.e., 2D in rectangular form) and the other is from a certain height (i.e., 3D in a line segment form) similar to the sample shown in Figure 6b.The 3D one passes from the middle of the ground one and it is used as an actual path on which UAV moves during the mission.Considering the footprint as line segment, the start point a i and endpoint b i of footprint i are given as: ( After fitting the footprints' sweeps, we find the midpoint of each footprint line segment part utilizing a and b values to find the visiting sequence of footprints' sweeps.The midpoint m i of the ith footprint F i can be computed using the a i and b i co-ordinates values.A pictorial overview of a footprint in rectangle form and sensor footprint sweep is shown in Figure 6b.

Determining the Footprints' Sweeps Visiting Sequence
After fitting the footprints' sweeps, the next step is to determine the sequence in which the footprints' sweeps will be visited to ensure the complete coverage.To find the low cost footprints' sweeps visiting sequence, we formulate it as a travelling salesman problem (TSP), and the ant colony optimization algorithm is employed to solve the TSP.Given M points set originally calculated from the footprint sweeps, endpoints are used to calculate a close path that visits each point exactly once.We specify the basic parameters of ACO according to problem size.After the parameter setting, the distance and sight matrix are computed between points.Then, l ants are deployed on random points and the computation is carried out for the pre-defined n itr iterations.During the computation, each ant calculates the tour by remembering the vertices which have already been explored and choosing the nearby points from their current position based on action choice rule.The probability that point j will be visited by an ant k which is currently at point i can be computed from Equation (3): where τ ij represents the intensity of the pheromones trial between point i and j, α is a parameter used to regulate the influence of τ ij , the variable η ij represents the visibility between point j and i, which is computed as 1 /d ij (where d ij is the Euclidian distance between two points), β is a parameter used to regulate the influence of η ij and allowed k represents the points that have not been visited by an ant k yet, respectively.At the start, l ants are deployed to the m points randomly.Later, each ant makes the decision to choose the next point based on the transition probability p k ij given by Equation (3).After n itr of this whole process, every ant computes a complete tour by visiting each point once.It is desirable to reinforce good solutions and the ant with the shortest tour should deposit more pheromones to find the low cost solution compared to other ants.Thus, the trail levels are updated, and each ant leaves a quantity of pheromones given by K /L k , where K is a constant and L k is the length of the tour.Meanwhile, the pheromones' quantity will decrease as time goes by.Therefore, the update rule of the τ ij can be written as follows: where variable t represents the iteration counter, ρ is the parameter to regulate the influence of τ ij , ∆τ ij represents the total increase of trial level on a particular edge (i, j), and ∆τ k ij represents the increase of trial level on the two respective edges (i, j) caused by an ant k.While determining the visiting sequence, we do not consider the obstacles' effect to find the minimum length global path.We consider the obstacles 'effect in the waypoint graph construction stage.With the help of ACO, we can get the set S, where S = {(F 1 , n 1 ), (F 2 , n 2 ), . . ., (F n , n n )} of footprint sweeps' visiting sequence that will be used for graph construction.In set S, the n i refers to the visiting sequence of a particular sweep.

Waypoints Graph Generation by Connecting Footprints' Sweeps
The waypoint graph (WG) is constructed by connecting the footprint sweeps' endpoints for the pathfinding.Mathematically, WG is a double edge graph Γ of inter-reachable locations: Γ = {W, E}, where W represents the nodes set and E represents the edge set.The nodes of the Γ are the footprints' sweeps endpoints, while edges are straight lines for each sweep and connection from one sweep to another.Each footprint sweep is a line segment with the two endpoints a and b (i.e., F i = ab) as shown in Figure 6b.We connect the footprints' sweeps endpoint with the coincident (i.e., neighbours) sweeps endpoints to form a WG.Furthermore, in the WG construction process, we consider the obstacles' effect, UAV manoeuvrability constraints and footprints sweep visiting sequence to form the connected Γ.We devise a strategy to avoid obstacles by applying three avoidance options (i.e., left, right, top) in footprints' sweeps inter-connection.Given N footprints' sweeps in the form of line segments, we compute the collision-free connections between footprints' sweeps.While constructing the WG, the proposed algorithm evaluates and selects the best obstacles' avoidance option from the candidate options.For the appropriate options selection, the distance is computed between two sweeps by introducing the two points on three sides of the obstacles.The selection of the appropriate obstacle's avoidance option AOAO for an obstacle O i is carried out on the basis of following equation: where d le f t , d right and d top represent the minimum distance required to avoid an obstacle i from left, right, and top, respectively.The value of d for each option can be computed between two sweeps with the help of two intermediate points.For example, the distance required to find the collision-free connection between two footprints' sweeps F i and F i+1 is the sum of the three individual distances (i.e., d{(a, b), c), (c, d), (d, (a, b))}.The value of each option can be calculated with the help of following equation: where d j represents the minimum distance needed to connect two footprints' sweeps by bypassing an obstacle safely from left.Similarly, the distance values for the other two options are calculated and evaluated for the low cost connection formation.Meanwhile, if no obstacle exists between the footprints' sweeps, and collision can be avoided, then footprints' sweeps are connected with each other via straight lines.The waypoint graph Γ obtained from the AOI possess all properties of a roadmap.A pictorial overview of the waypoint graph Γ obtained by connecting endpoints of the N footprints' sweeps from the AOI having size 1500 × 1500 × 400 is shown in Figure 7a.In Figure 7a, the yellow lines represent the footprints' sweeps and blue lines represent the collision-free connection between sweeps.Meanwhile, the black colour represents the area scanned by sensor footprints' sweeps.The proposed approach is applicable for both types of the UAVs, rotary-wing and fixed-wing.The rotary-wing UAVs present maneuverability advantages when making turns during the flight compared to the fixed wing UAVs.The WG produced by connecting the footprints' sweeps endpoints is directly usable for the rotary-wing UAV.Meanwhile, the fixed-wing UAV has strong maneuverability restrictions, demanding a bigger space to make turns.Therefore, the back-and-forth/zamboni flight pattern can be adopted to generate the WG, where the sweeps will be connected as shown in Figure 7b.In the BF/Zamboni flight pattern, the adjacent sweeps can be connected with the gap g of two or three depending upon the complexity of the AOI and sweeps placements.The suggested pattern can simplify the turn and UAV doesn't need to slow down while making the turn.However, the BF/Zamboni flight pattern can lead to the excessive path overlapping in the complex scenarios.The proposed approach simplifies the turns to the extent possible for the easier adoption using both types of the UAVs.The proposed approach generates a sparse WG with minimum nodes and edges to reduce the computational complexity of pathfinding process.The complete pseudo-code used to generate a waypoint graph from AOI is given in Algorithm 1.In Algorithm 1, the AOI Q containing N number of obstacles, footprint sweeps set R, footprint sweeps visiting sequence set S, and footprint connection gap g are provided as an input.Waypoint graph Γ, where (Γ = {W, E}) is obtained as an output.Line 2 implements the finding of appropriate footprint sweep to be connected with footprint sweep F i out of N − 1 candidates based on optimized visiting sequence and sweeps connection gap.Line 3 implements the identification of the relevant endpoint's pairs through which two sweeps F i and F j will be connected with each other.Line 4 performs the check for the obstacle(s) existence between two sweeps to form the collision-free connection C i .Lines 5-6 implement the connection formation in the presence of obstacle(s) between two sweeps while avoiding the obstacle with low cost option.Line 8 implements the connection formation if no obstacles exist between two sweeps.Furthermore, the same process continues until the complete waypoints is constructed.Finally, waypoint graph Γ of footprints' sweeps connection is returned as an output (line 11).
Algorithm 1: Waypoint graph generation from the AOI located in a 3D map.
(4) Sweeps connection gap (g).Output : Way point graph Γ Procedure : for each footprint sweep F i , where Find next footprint sweep F j considering the g value and optimized visiting sequence.Identify the relevant endpoint pair using Evaluate and select the appropriate obstacle o i avoidance option using Equation (7).
Connect the footprints' sweeps F i and F j with the relevant endpoints.else Connect the footprints' sweeps F i and F j with the relevant endpoints.End if End for return Γ

Path Searching on the Waypoints Graph
After constructing the WG, the path searching is carried out to find the complete coverage path from the pre-determined location of the UAV.The source point p represents the point from where the UAV starts the mission and point q represents the endpoint of the mission.Once the complete graph is constructed, the pathfinding process starts from the point p and continues until the complete coverage is achieved.We used the ACO algorithm generated order for the collision-free pathfinding over WG with minimum overlapping and informed search.The proposed algorithm keeps track of the locations to be visited along the path by using the order generated for footprints' sweeps visits and their connections.We assume that UAV is able to take turns with sufficient accuracy while switching from one sweep to another during the mission.The proposed approach is able to find the minimum length path with less path overlapping, less number of turns, and reduced computation time compared to the existing methods in most scenarios.

Simulation Results and Discussion
This section presents the simulation results and key findings about the proposed concept.The improvements of the proposed algorithm were compared using four criteria; the improvements in computation time, path lengths, path overlapping, and number of turns with the existing closely related algorithms.To benchmark the proposed algorithm, we compared the proposed algorithm results with decomposition-based CPP methods, BCDH-CPP [53] and CA-CPP algorithm [54].The simulation results were produced and compared on a PC running Windows 10, with a CPU Intel Core i5 of 2.6 GHz and 8.00 GB of RAM, using MATLAB version 9.4.0.81 (R2018a).In simulations of the proposed CPP algorithm, we consider a 25-kg UAV similar to our previous study [55].We considered both global constraints that are related to the UAV operating environment and local constraints that are related to the UAV.The numerical values related to the local constraints are: maximum steering angle: p/6 radius and wing span: 1 m.We assumed a zero-wind scenario in our simulations and assumed that there exists no external inference that can impact the established path.We assumed that a UAV has sufficient power to finish the mission successfully in one round.The minimum and maximum UAV flight height limits are 25 m and 150 m (h min = 25 m, h max = 150 m).The safe distance value for collision avoidance with obstacles is set to 10 m (D sa f e = 10 m).The ACO parameters were specified considering the problem size (i.e., no. of sweeps).The sensor footprint sweep width is set to 20 m (F w = 20 m) and footprint sweep length is set to 30 m (F l = 30 m).We present the overview of the 3D maps used in the experiments and two exemplary coverage path results visually in Figure 8a,b.We compared the proposed algorithm results with the existing methods on two grounds: the varying obstacles densities and shape of the AOI.The relevant details about AOI sizes, obstacles' densities, and the shape of the AOI used in experiments are explained in Sections 4.1 and 4.

Comparisons with the Existing Algorithms Based on Obstacles' Densities
The number of obstacles and their placement in the AOI significantly impact the performance of any CPP algorithm.To validate the proposed algorithm feasibility for coverage missions in 3D urban environments, we compared the proposed algorithm path lengths, computing time and path overlapping results with existing methods using five maps with varying obstacles' densities.For the evaluation, we compared the proposed algorithm results using three obstacles' density values (low, medium and high) on regular shaped AOI.All obstacles were placed randomly in the AOI in all cases.The low density obstacles' AOI has less number of obstacles and most parts of the area are traversable.In such areas, the most parts can be covered with fewer and longer sensor footprints' sweeps.In contrast, the high density obstacles AOI has less traversable parts and the path overlapping can increase due to complex obstacle geometry.The medium density obstacles areas have uniform distribution of obstacles and almost half of the spaces can be covered with the sweeps.The complete description about the AOI sizes used in experiments, and average running time and path length results' comparisons of the proposed CPP algorithm are shown in Table 1.The computing time, path length, and path overlapping results are the average of five runs in Tables 1-3.(i.e., the first two cases), the CA-CPP algorithm yields shortest length path compared to proposed algorithm.Meanwhile, as the AOI size and obstacle densities grow, the performance of the proposed algorithm improves on both metrics (i.e., path lengths and computing time).Apart from the path lengths and computing time comparisons, we compared the proposed algorithm path overlapping results with the two closely related algorithms in each map (listed in Table 1).The proposed algorithm path overlapping results in average and its comparison with the existing methods are shown in Table 2.The proposed algorithm on average gives 9.98 % improvements compared to the existing algorithms on five different maps of varying AOI size and obstacles densities.Furthermore, in all cases, the proposed algorithm gives the coverage ratio C ratio of 1.0 that represents the perfect coverage (i.e., 100%).The proposed approach can be applied in indoor and outdoor environments for a variety of applications specifically for the aerial inspection in urban environments.In the proposed algorithm, the footprints' sweeps fitting and final paths are calculated offline.Meanwhile, the proposed algorithm can be applied in two phases: offline and online.The sweeps can be fitted in an offline phase and path searching can be done in an online phase.

Comparisons with the Existing Algorithms Based on the Shape of the Area of Interest
Apart from the obstacle's densities, the shape of the area of intreat is also a relevant factor that can significantly impact the CPP algorithm performance.CPP over the regular shaped AOI is relatively easy compared to the irregular shaped AOI.The regular shaped AOI coverage can be obtained with the simple BF pattern.Meanwhile, the irregular shaped AOI coverage requires the concavities modification and hybrid motion patterns to achieve the full coverage.The CPP complexity varies with the shape of the target area and it requires obstacles' geometry knowledge to find the low cost solution for the coverage missions.To address this concern, we compared the proposed algorithm performance with the existing methods over five different types of the AOI to support generality.We performed rigorous experiments to verify the algorithm performance in relation with the shape of the AOI.The average computation time, path length and path overlapping are shown in Table 3. From a path length point of view, it reduces path length by 8.98%.Additionally, the proposed algorithm has less path overlapping compared to the existing algorithms.We further compare our approach results of turning maneuvers with two existing methods in ten representative scenarios.Figure 9 shows the number of turns' comparisons between proposed and two existing algorithms.The proposed method shows 12.1% and 7.03% improvements in the number of turns as compared to BCDH-CPP and CA-CPP algorithm, respectively.Apart from the numerical result, the proposed algorithm uses less number of sweeps compared to the decomposition based methods.Figure 10 shows the number of sweeps used by the proposed algorithm and decomposition based methods for the coverage of three cells (i.e., 5 to 7) of the AOI.From the results, it can be observed that when the cell size is small and sufficient attention has not been paid to sensor/camera footprints size in area decomposition, the BCDH-CPP [53] and CA-CPP [54] algorithms (Figure 10b) need more sweeps compared to the proposed algorithm which can increase the path length in complex scenarios.In contrast, the proposed algorithm (Figure 10c) considers the sensor footprint as a coverage unit in the CPP and uses less sweeps to guarantee the perfect coverage.

Conclusions and Future Work
In this paper, we proposed a new coverage flight path planning algorithm based on footprints' sweeps fitting and a sparse waypoint graph for unmanned aerial vehicles' (UAVs) navigation in three-dimensional (3D) urban environments with fixed convex obstacles.The main goals of the proposed algorithm are to reduce the computational time, number of turns, and path overlapping while finding a minimum length path that passes over all reachable points of an area or volume of interest for UAVs flying at low-altitudes in 3D urban environments.We devised a novel footprints' sweeps fitting method by considering the UAV sensor footprint as a coverage unit that guarantees complete coverage of the AOI with fewer and longer sensor footprints' sweeps.Furthermore, we generate a sparse waypoint graph by connecting footprints' sweeps endpoints by considering footprints' sweeps visiting sequence, obstacles' effect, and maneuverability constraints to obtain a complete coverage flight path.Simulation results have shown that the proposed algorithm can achieve better performance compared to the closely related global coverage flight path planning algorithms.It finds a feasible path from the urban environments inhabiting substantial number of obstacles without sacrificing the guarantees on computing time, number of turns, perfect coverage, path overlapping, and path length.

Figure 1 .
Figure 1.Most widely used areas of interest decomposition techniques for coverage path planning.

Figure 2 .
Figure 2. Conceptual overview of the proposed coverage flight path planning algorithm.

Figure 3 .
Figure 3. Different obstacles' intersections with the area of interest boundary.

Figure 4 .
Figure 4. Overview of the enlarged obstacle by D sa f e value.

Figure 5 .
Figure 5. Overview of the coverage path obatined through two different sweep directions.

Figure 6 .
Figure 6.Overview of the sensor footprint on ground and footprint sweep in the AOI.
(a) Waypoint graph obtained by connecting sweeps.(b) BF/Zamboni flight pattern with simplified turns.

Figure 7 .
Figure 7. Pictorial overview of the waypoint graph and Back and forth/Zamboni flight pattern.
2. (a) Path from the square shaped area of interest.(b) Path from non-convex polygon shaped area of interest.

Figure 8 .
Figure 8. Coverage path planning results from two different types of the area of interest.

Table 1 .
Proposed coverage path planning algorithm performance comparisons with the two existing algorithms.

Table 2 .
Path overlapping comparison between three algorithms for the same area of interest.

Table 3 .
Proposed algorithm performance comparisons with varying shapes of the area of interest.