## 4 Simulation
### Simulation Setup  
This addresses a 2D simulation to model UAV remote sensing applications in smart farms. Since this is a 2D simulation, UAV's altitude has no impact on the results of the study. However, in a real scenario, UAV can fly with a constant operational altitude and speed during the whole data collection process. As Figure 1 shows, a 3 \(\times\) 3 km\({}^{2}\) farm is simulated with three types of network nodes, including UAV, SPs and base station in a field of 5 \(\times\) 5 km\({}^{2}\). Through this, the base station is localized in the center of the farm to collect and aggregate remote sensing recordings from the UAV. The central location of the UAV station would enable better accessibility for data collection, more route options, and better flexibility for different directions. Since UAVs are mobile devices, they can move to any other allocated spots for services and maintenance. SPs are either static or mobile (constant speed of 1 m/s) and randomly distributed throughout the farm. They generate a random value as sensory recordings at a particular timestamp.  
According to the simulation deployment, a single base station is localized in the center of a farm, which includes a network of randomly distributed SPs. For this, the SP distribution model generates a number of simulation seeds to randomly localize SPs in the farm. By this, the UAV should fly and visit SPs, which are randomly localized in each simulation iteration. This situation is similar to the simulation scansions, which randomly localize an UAV in a farm with fixed SPs. This minimizes the impact of the UAV's (initial) location on the simulation results and supports a realistic scenario in which the location of SPs randomly changes according to a fixed UAV localization.  
The UAV is mobile (with a constant speed of 20 m/s) and moves using a route planning approach. It starts its journey from the base station and utilizes a battery consumption model according to Matrice 200 (0.055 unit/s in ideal/clear-flight conditions) [45]. The UAV is able to remotely sense targets within a limited range of 200 m. This means each (static or mobile) SP forms a circle of 200 m around as SP zone.  
This simulation supports IEEE 802.11 and Carrier Sense Multiple Access (CSMA/CA) MAC protocol to address a collision-free wireless channel sharing and communication between the base station and the UAV. Yet, this simulation uses a Line-Of-Sight (LOS) wireless signal propagation model, which assumes no wireless interferences caused by an obstacle (e.g., trees) and/or the environment (e.g., weather).  
Statistical power analysis technique [46] is used to compute experiment repetitions required for this experimental design. This technique calculates the number of repetitions according to a target confidence level by measuring the population standard deviation for a (randomly selected) subset of experiments. According to the results, 300 repetitionsare required to achieve a confidence level of 90% confidence based on the simulations of 50 experimental repetitions under this simulation scenario.  
A varying number of SPs including 64, 128 and 256 (of which 25% are mobile and 75% are static) is randomly distributed throughout the farm field. The UAV visits the SP zones to collect the value. Table 2 summarizes the simulation setup parameters: