*3.4. 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 *Fl* and width *Fw*, 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.

**Figure 6.** Overview of the sensor footprint on ground and footprint sweep in the AOI.

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, \dots, F\_N\}.\tag{1}$$

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 *ai* and endpoint *bi* of footprint *i* are given as:

$$F\_i = (a\_i, b\_i) = ((\mathbf{x}\_{a\_i \prime} y\_{a\_{i'}} z\_{a\_i}), (\mathbf{x}\_{b\_{i'}} y\_{b\_{i'}} z\_{b\_i})).\tag{2}$$

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 *mi* of the *i*th footprint *Fi* can be computed using the *ai* and *bi* co-ordinates values. A pictorial overview of a footprint in rectangle form and sensor footprint sweep is shown in Figure 6b.

#### *3.5. 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 *nitr* 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):

$$p\_{ij}^k = \left\{ \begin{array}{c} \frac{[\ \boldsymbol{\tau}\_{ij}]^a [\eta\_{ij}]^b}{\sum\limits\_{s \in allowed\_k} [\boldsymbol{\tau}\_{ij}]^a [\eta\_{ij}]^b} \\ 0, \end{array} \;/j \in allowed\_k \right. \tag{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/*dij* (where *dij* is the Euclidian distance between two points), *β* is a parameter used to regulate the influence of *ηij* and *allowedk* 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<sup>k</sup> ij* given by Equation (3). After *nitr* 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 *<sup>K</sup>*/*Lk*, where *K* is a constant and *Lk* 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:

$$
\pi\_{\dot{i}\dot{j}}(t+1) = (1-\rho)\pi\_{\dot{i}\dot{j}}(t) + \Delta\pi\_{\dot{i}\dot{j}}.\tag{4}
$$

$$
\Delta \pi\_{ij} = \sum\_{k=1}^{l} \Delta \pi\_{ij'}^{k} \tag{5}
$$

$$
\Delta \tau\_{ij}^k = \begin{cases}
\ ^{K/L\_{k\epsilon}} & \text{if } ant \, k \, travels \, on \, edge \, (i.j), \\
0, & \text{, otherwise,} \end{cases}
\tag{6}
$$

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 Δ*τ<sup>k</sup> 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), ... ,(*Fn*, *nn*)} of footprint sweeps' visiting sequence that will be used for graph construction. In set *S*, the *ni* refers to the visiting sequence of a particular sweep.
