# Livestock Management on Grazing Field: A FANET Based Approach
## 3 Methodology  
This subsection presents the methodology adopted in this research work. Google Map image of a grazing field was first collected using the online Google Earth software. This grazing field represents the area that is set to be covered by the grazing castles. The dimension of the grazing field is employed in the simulation. Also, the parameter of the Tello Edu drone is used during the simulation. This will allow future deployment in the field. The problem formulation assumed that three UAVs are supposed to cover a grazing field area. The choice of three candidate UAVs is because the minimum number of a UAVs that can form an Adhoc network with each other is three. Given that the area to be covered is A, and the flight time for each UAV is 10 min (according to the Tello Edu drone datasheet), each drone has an onboard camera for capturing and sensing. The aim will be to use these drones to sense the entire area using the onboard sensor whilst intercommunicating. The drone is said to fly at the same altitude [26]. Using a larger number of UAVs will lead to a minimum coverage time but increases the chance of collision. Therefore, the problem herein is to specify the path for each UAV to complete its mission. The collected Google Earth map for the grading field is presented in Figure 2.  
Based on the fitted-on board sensor, if the focal distance of the camera's lens is \(F_{L}\), the height between the camera and the ground is \(H_{G}\), which also denotes the flying height. The width of the fitted onboard sensor is \(W_{D}\) the camera's coverage width \(C_{L}\) can be computed as:  
\[C_{L}=H_{G}\frac{W_{D}}{F_{L}} \tag{1}\]  
The coverage concept is depicted using the diagram in Figure 3.  
To properly determine the best direction to calculate the number of rows that can be covered, the measurement on the map area is rotated like a polygon, and the different heights are measured from the ground. The minimum height denoted as H is then used to compute the number of rows to be covered. The number of the rows to be covered is estimated as:  
\[C_{R}=\frac{H}{C_{L}(1-O_{l})} \tag{2}\]  
where \(O_{l}\) is the fraction of overlap between the aerial images. Therefore, the distance between each of the parallel rows can be computed as:  
\[d_{R}=\frac{H}{C_{L}} \tag{3}\]  
The image width and length can be computed using Equations (4) and (5), respectively. \[IM_{W}=2F_{A}\tan\left(\frac{(FOV_{h}/2)\pi}{180}\right) \tag{4}\]  
\[IM_{L}=2F_{A}\tan\left(\frac{(FOV_{V}/2)\pi}{180}\right) \tag{5}\]  
The variables \(F_{A}\), \(FOV_{h}\), \(FOV_{V}\) are the flight altitude, the horizontal field of view, and the vertical field of view, respectively. Therefore, the UAVs are said to move parallel to the x-axis. The coordinate of the take-off point of the UAV is three sets of nodes of the graph  
Figure 3: Coverage Concept Scenario. Figure 2: The Grazing Field. \(G=(V,E)\). The movement scenario is depicted in Figure 4. The GL and GW represent the grazing field length and width, respectively. The graph can be mathematically represented as an \(M\times M\) matrix whereby the distance between two of the UAV nodes a and b, \(d_{ab}\), can be computed using Euclidean distance. Therefore,  
\[C_{L}=H_{G}\frac{W_{D}}{F_{L}} \tag{1}\]0  
The flight time for each the UAV to cover the grazing field can be computed as follows:  
\[C_{L}=H_{G}\frac{W_{D}}{F_{L}} \tag{1}\]1  
where \(V_{ab}\), \(X_{ab}^{k}\) and \(d_{ab}\) are the velocity, position, and distance between the UAVs, respectively. Therefore, the total flight time for three of the UAVs is:  
\[C_{L}=H_{G}\frac{W_{D}}{F_{L}} \tag{1}\]2  
The grazing field coverage algorithm for the implementation is presented in Algorithm 1.