DronAway: A Proposal on the Use of Remote Sensing Drones as Mobile Gateway for WSN in Precision Agriculture

: The increase in the world population has led to new needs for food. Precision Agriculture (PA) is one of the focuses of these policies to optimize the crops and facilitate crop management using technology. Drones have been gaining popularity in PA to perform remote sensing activities such as photo and video capture as well as other activities such as fertilization or scaring animals. These drones could be used as a mobile gateway as well, beneﬁting from its already designed ﬂight plan. In this paper, we evaluate the adequacy of remote sensing drones to perform gateway functionalities, providing a guide for choosing the best drone parameters for successful WiFi data transmission between sensor nodes and the gateway in PA systems for crop monitoring and management. The novelty of this paper compared with existing mobile gateway proposals is that we are going to test the performance of the drone that is acting as a remote sensing tool to carry a low-cost gateway node to gather the data from the nodes deployed on the ﬁeld. Taking this in mind, simulations of di ﬀ erent scenarios were performed to determine if the data can be transmitted correctly or not considering di ﬀ erent ﬂying parameters such as speed (from 1 to 20 m / s) and ﬂying height (from 4 to 104 m) and wireless sensor network parameters such as node density (1 node each 60 m 2 to 1 node each 5000 m 2 ) and antenna coverage (25 to 200 m). We have calculated the time that each node remains with connectivity and the time required to send the data to estimate if the connection will be bad, good, or optimal. Results point out that for the maximum node density, there is only one combination that o ﬀ ers good connectivity (lowest velocity, the ﬂying height of 24 m, and antenna with 25 m of coverage). For the other node densities, several combinations of ﬂying height and antenna coverage allows good and optimal connectivity.


Introduction
The continued increase of the world population and its need for food, as well as the decrease in natural resources, has led to the necessity of making great changes in agriculture. Farmers and agricultural workers must implement measures to improve and control the state of crops and to optimize the utilized resources. In many countries, farmers are opting to implement solutions that apply technological means. For example, the European Union (EU) established in its 2020 strategy Drones have been utilized for remote sensing activities for different purposes in vegetated areas. Andrew M. Cunlife et al. presented [10] a remote-sensing dryland vegetation quantification technique. The technique was able to employ structure-from-motion (SfM) photogrammetry of pictures taken from drones to obtain 3D models of the vegetation structure. The technique was able to identify grass tussocks with volumes of a few cm 3 employing canopy height models. The results showed that the technique was able to predict biomass utilizing the detected canopy volume, obtaining coefficients of determination that ranged from 0.64 to 0.95. Moreover, Jian Zhuang et al. [11] proposed the use of lightweight drones for the remote sensing of forests for ecological purposes. The system employed drone-derived canopy variables to detect patterns in the biodiversity of the forest. Results showed a correlation between canopy closure and stand basal area. Niche differentiation was performed utilizing edaphic and topographic variables. Lastly, the authors detected a correlation between canopy variables and light-demanding species. Urbahs et al. [12] described the structural characteristics and the parameters of a UAV developed for its use in environmental monitoring. Paulina Lyubenova Raeva et al. [13] presented a study in which a drone was utilized to obtain vegetation indexes and thermal maps, relating the temperature of the vegetation and the soil. In order to do so, they used multispectral and thermal sensors. Stehr et al. [14] assured that drones could monitor the fields more frequently than the satellites. They also stated that drones could take more detailed photographs, and clouds do not hinder their vision. They also predicted that at the time when the cost of drones decreases and their technology improves, more drones would be used in the field of agriculture. Furthermore, Kurkute et al. [15] described the process of developing a mechanism for spraying from a drone.
Other authors such as Puri et al. [16] made a study where they presented the best drones that can be used in monitoring and observation in agriculture so as to improve crops and prevent damage to the fields.
Valente et al. [17] presented a collaborative system consisting of a WSN and an aerial robot that was used for the real-time monitoring of frost in vineyards. Its solution was a mobile node that transported an aerial robot that ensured communication between the dispersed nodes and the base station of the robot. This method allowed them to overcome the limitations arising from the use of wireless networks.
There are authors, such as the following, who present a classification of UAV applications in PA. Hunt et al. [18] present a classification of the applications of the unmanned aircraft systems (UAS) for precision agriculture. The authors define the following three niches or sectors in their classification: scouting for problems, monitoring to prevent yield loss, and planning crop management operations. Tsouros et al. [19] review recent applications of UAVs for Precision Agriculture. Rao Mogili et al. briefly review the implementation of UAVs for crop monitoring and pesticide spraying. Daponte et al. [20] propose a survey on techniques, applied to precision agriculture monitoring, through the use of drones equipped with multispectral, thermal, and visible cameras. For each application, the main limitations are highlighted, and the parameters that need to be considered before performing a flight are reported.
Authors such as Boehm et al. [21] propose using an IEEE802.11n network to distribute the images captured from a UAV to their ground control station.
Furthermore, fields and remote areas can hinder the progress of other activities such as cultural heritage conservation, and drones have been considered as a solution to implement systems such as the remote-sensing system for an archaeological survey of remains in mountain areas presented by Tesse D. Stek [22]. The author concludes that the use of drones can substantially improve the surveying process of archaeological projects adding to the on-site activities. Furthermore, remote sensing provides advantages such as being non-destructive, reducing the time and cost of the surveyance process, and the ability to access areas located on agricultural fields with difficult access and fields where the farmer or the proprietor must grant the access.
The vegetation can also be in urban environments. For that reason, José Marín et al. presented in [23] a remote sensing system for urban lawn monitoring in smart cities. The system is comprised of an Arduino node with a camera mounted on a drone. Photographs are taken and classified into different grass qualities employing a rule-based algorithm that classify the grass into very low, low, and high coverage. The system was tested with a dataset of grass pictures resulting in success in the classification of 100%. Lastly, the authors concluded that their system reduced the execution time of the process of taking pictures of the garden, compared to the same classification system mounted on a vehicle, for areas larger than 1000 m 2 .
Sensor nodes are a widely spread technology utilized in many agricultural monitoring systems to implement their solutions.
Some authors have presented a review of the state of the art of the use of Wireless Sensor Networks (WSN) in agriculture [24][25][26][27][28]. Tamoghna Ojha et al. [24] studied applications of WSN and its problems and challenges for the improvement of agriculture. Antonis Tzounis et al. [25] presented a survey on the latest IoT technologies and their implementation in the agricultural sector, as well as the challenges that arise in their implementation. Aqeel-ur-Rehman et al. [26] studied the need of using sensors in agriculture and the utilization of WSN in that field. Luis Ruiz-Garcia et al. [27] reviewed wireless sensor technologies and standards for their communications in the agri-food sector, focusing on WSN and Radio Frequency Identification (RFID). Barcelo-Ordinas et al. [28] also presented the state of the art of WSN technology applied to precision agriculture, reporting hardware and software solutions from the technological point of view.
Other authors presented designs for new WSN architectures for agriculture [29][30][31]. Authors such as Srbinovska et al. [29] proposed a WSN architecture for a greenhouse of vegetables, achieving the monitoring of environmental parameters in crops and a reduction in costs. Xiaoqing Yu et al. [30] presented a hybrid WSN architecture applied to agriculture. A hybrid network of wireless sensors consists of wireless sensors that communicate through the ground in addition to wireless terrestrial sensors. Chaudhary et al. [31] have proposed and analyzed a programmable on-chip (PSoC) microcontroller that they integrate into a WSN network and use to monitor and control parameters in greenhouses.
Furthermore, there are authors [32][33][34][35][36][37] that present monitoring systems in agriculture based on WSN. Escolar Díaz et al. [32] proposed a methodology to implement WSN in agriculture and define the phases that cover the life cycle of WSN applications. Yingli Zhu et al. [33] presented the design of a Appl. Sci. 2020, 10, 6668 5 of 23 real-time agricultural monitoring system based on WSN. They also provided the hardware design of the sensors and the software flow diagram. Manijeh Keshtgari and Amene Deljoo [34] also developed a WSN system for agriculture through which they detected environmental data and made control decisions in real time. Hwang et al. [35] proposed a monitoring system for agriculture that used a WSN, which collected soil and environmental information through sensors, image information using CCTV (Closed-Circuit Television), and finally GPS (Global Positioning System) location information. Garcia-Sanchez et al. [36] proposed a new platform called Integrated WSN Solution for Precision Agriculture, in which a WSN is deployed with IEEE 802.15.4 technology. It allowed the monitoring of the crop and its video surveillance. Garcia et al. [37] presented the design of a wireless network that was responsible for monitoring the crops and their irrigation system; the network consisted of a WSN and a wireless mesh network (WMN).
Existing works have studied the use of drones for imaging in precision agriculture [10][11][12][13], the transmission of video images to a ground station [21], and the data acquisition of nodes deployed in remote areas for different types of purposes such as urban lawn monitoring [23] or archaeological projects [22]. Other works focus on the exclusive use of drones as a gateway with specially designed flight plans that determine the shortest flight necessary to fly over all the nodes or has the drone hovering over the node for more than a minute until all the data are transmitted [17]. In our work, we consider the challenge that is generated when combining both functionalities by contemplating the use of remote sensing drones as gateways for WSNs in precision agriculture. A remote sensing drone already has a defined flight plan to map the fields or perform pest or disease detection. Then, the gateway node is presented with the challenge of gathering the data in a short time as the drone does not circle or hover over the node on the field. Considering these restrictions, this work provides a guide to determine the best coverage time for the communication between sensor nodes and a drone where we define the speed and height at which the drone moves so that the collection of data obtained from the sensor nodes is reliable. As far as we know, the combined use of a single drone as a mobile gateway while maintaining the flying parameters previously set for picture gathering has not been presented.

Materials and Methods
In this section, the parameters and elements considered to perform our guide are explained. In the first subsection, an overview of the available types of drones that can be utilized in PA and the description of the flight plan of the considered scenario is provided. In the second subsection, the characteristics of commercial nodes that can be utilized for our proposed scenario are detailed. In the third subsection, the background on the antenna radiation model and the best antenna types for the scenario are presented. Furthermore, the theoretical framework used to perform the calculations is described.

Drone Parameters
Drones in PA have been mainly used for remote sensing by image gathering. However, drones can be utilized as well for data gathering of nodes deployed on the field. These drones can have fixed or rotary wings, which determines how they fly as well as other parameters such as the ones detailed in Table 1. Fixed-wing drones can fly for hours and long distances on a limited amount of energy [40], which makes them popular for Precision Agriculture purposes, including taking pictures of the fields, as it provides good autonomy. However, stationary flights are not possible with fixed-winged drones. Furthermore, this type of drone requires a drone catapult to launch it if a person cannot do it, and a big enough surface for landing.
On the other hand, rotatory-winged drones are the most common. They can stay in one place to perform inspection activities. This type of drone is available with 3 to 8 motors. They can take off and land vertically. However, these drones have less autonomy with endurance below 1 h. Other solutions opt for using their developed drone [41]. This allows detailed customization of the UAV for the required PA solution.
The intended purpose of the drone will determine its flight plan. For the drone to carry a node that acts as a gateway, the drone must be in the area of coverage of the node long enough for all the data to be transmitted. For small amounts of data, a straight flight plan where the nodes are flown over can work. However, for significant amounts of data, flight plans where the drone circles the node until all the data is transmitted may be necessary [42]. In Figure 1, these two types of flight plans are shown. In the scenario considered in this paper, the flight plan follows straight lines that fly over the nodes deployed on the field. The flight plan that circles the node for a fixed-wing drone or hovering over the nodes for a quadcopter would solve the problem of having enough connection time to perform the connection and transmit all the data before the node is out of the coverage area of the drone. However, as previously stated, in this paper, we consider the challenge presented by the scenario where an imaging drone that has a previously defined flight plan that covers the field following straight lines while carrying the gateway node. Fixed-wing drones can fly for hours and long distances on a limited amount of energy [40], which makes them popular for Precision Agriculture purposes, including taking pictures of the fields, as it provides good autonomy. However, stationary flights are not possible with fixed-winged drones. Furthermore, this type of drone requires a drone catapult to launch it if a person cannot do it, and a big enough surface for landing.
On the other hand, rotatory-winged drones are the most common. They can stay in one place to perform inspection activities. This type of drone is available with 3 to 8 motors. They can take off and land vertically. However, these drones have less autonomy with endurance below 1 h. Other solutions opt for using their developed drone [41]. This allows detailed customization of the UAV for the required PA solution.
The intended purpose of the drone will determine its flight plan. For the drone to carry a node that acts as a gateway, the drone must be in the area of coverage of the node long enough for all the data to be transmitted. For small amounts of data, a straight flight plan where the nodes are flown over can work. However, for significant amounts of data, flight plans where the drone circles the node until all the data is transmitted may be necessary [42]. In Figure 1, these two types of flight plans are shown. In the scenario considered in this paper, the flight plan follows straight lines that fly over the nodes deployed on the field. The flight plan that circles the node for a fixed-wing drone or hovering over the nodes for a quadcopter would solve the problem of having enough connection time to perform the connection and transmit all the data before the node is out of the coverage area of the drone. However, as previously stated, in this paper, we consider the challenge presented by the scenario where an imaging drone that has a previously defined flight plan that covers the field following straight lines while carrying the gateway node. Furthermore, each country has its regulations for drones. Some countries require obtaining a license that may distinguish between recreational and professional use. The height, areas allowed for flights, and weight of the drone may also be restricted depending on the type of license.

Low-Cost Nodes for Precision Agriculture Deployments
Nowadays, there is a wide variety of low-cost nodes that can be employed for PA purposes using WiFi communication. Some of the most utilized ones are presented in Table 2. In the scenario contemplated in this paper, low-cost nodes are utilized both for the field monitoring and for the gateway mounted on the drone. As can be seen, the characteristics of the nodes can vary greatly. The weight and size of the nodes should be considered to determine if the chosen drone would be affected by it or if it is able to carry the node without interfering with its flight. If no sensors are connected to the node carried by the drone and big processing capacity is not necessary, nodes such as the WEMOS MINI D1 would be best to reduce the energy consumption due to its low weight and size. Furthermore, each country has its regulations for drones. Some countries require obtaining a license that may distinguish between recreational and professional use. The height, areas allowed for flights, and weight of the drone may also be restricted depending on the type of license.

Low-Cost Nodes for Precision Agriculture Deployments
Nowadays, there is a wide variety of low-cost nodes that can be employed for PA purposes using WiFi communication. Some of the most utilized ones are presented in Table 2. In the scenario contemplated in this paper, low-cost nodes are utilized both for the field monitoring and for the gateway mounted on the drone. As can be seen, the characteristics of the nodes can vary greatly. The weight and size of the nodes should be considered to determine if the chosen drone would be affected by it or if it is able to carry the node without interfering with its flight. If no sensors are connected to the node carried by the drone and big processing capacity is not necessary, nodes such as the WEMOS MINI D1 would be best to reduce the energy consumption due to its low weight and size. Other wireless technologies such as LoRa and 5G would reduce the need for using drones for data collection or completely eliminate it in small fields due to their wider range. However, these technologies are more costly, and therefore, they are less accessible for farmers with lower budgets.
Furthermore, multiple parameters can affect the communication system, such as the transmitted power, the protocol, or the link budget. Regarding the transmitted power parameter, it would fundamentally affect the drone coverage, as it would consume a greater amount of energy, and its flight capacity would be reduced. Using different protocols would affect the total connection time since, depending on the transitions between different states, which are associated with the actions implemented by the nodes, the connection time necessary between the nodes and the drone can be altered. On the other hand, the link budget would be defined as an addition of transmitted power and gains minus the losses. The received power is based on the losses, which occur when the signal is transmitted through the medium and can be affected by aspects such as the weather or the objects that interrupt the line of sight between the emitter and the receiver. However, in the studied scenario, there are no objects between the emitter and the receiver, and the drone would not fly with adverse weather conditions. Therefore, in this scenario, the losses would be constant. Lastly, the transmitted power and the gains will be based on the antennas and their configuration and, therefore, they would not vary unless different types of antennas or nodes with their configuration were used in order to increase the transmitted signal.

Antenna Radiation Model
There are many types of antennas available to transmit at the 2.4 GHz band. However, not all of them are advised for the scenario of a gateway carried on a drone. In Figure 2, the Theoretical WiFi Coverage Area (TWCA) and the Assumed WiFi Coverage Area (AWCA) for both an omnidirectional and a directional antenna are displayed. Common radiation patterns for both antennas are displayed as well. For the scenario, the gateway node is considered to be carried by the drone, placed in a manner so that the antenna emits its energy in a downward direction, toward the earth. For the case of the directional antenna, the radiated energy is focused on a specific direction. Whenever the gain of a directional antenna increases, the coverage distance increases, but the effective angle of coverage decreases [48]. On the other hand, omnidirectional antennas have a radiation pattern that is given based on the directive gain. This type of antenna provides uniform radiation in one of the reference planes. Therefore, regarding directivity, omnidirectional antennas are better suited for the scenario as it allows the node to be in the coverage area of the gateway for a longer time than that of directional antennas. For other scenarios such as that of a flight plan that circled the nodes on the ground, directional antennas would be a better fit as the drone could remain in a zone where the node is inside the coverage area, and the radiated energy would remain on the intended spot.
Furthermore, the antennas can have linear or circular polarization. Depending on the type of polarization, their coverage area will vary. The polarization of the antennas from both the emitter and receiver should match to avoid loses. In our scenario, the antennas are placed at the same position in a horizontal manner with the same polarization for the antennas of the gateway node on the drone and the nodes on the field. Some low-cost nodes incorporate built-in WiFi antennas such as the PCB (Printed Circuit Board) antenna, while others need a communication module or an external antenna, such as a whip antenna, to provide better performance. The antenna gain and the selected transmission power determine the Coverage Radius (CR). Therefore, it is essential to determine the distance that must be covered to select the antenna. For lower flying heights, the required coverage radius is lower, and the built-in PCB antenna has been utilized in IoT (Internet of Things) applications for distances up to 30 m in most low-cost modules for RSSI (Received Signal Strength Indicator) values below −80 dB and up to 120 m for the best performing module [49]. For higher flying heights, the area to be covered is wider, and whip antennas would provide better performance, but its size is bigger, and it should be placed in a manner not to interfere with the flight of the drone.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 8 of 23 based on the directive gain. This type of antenna provides uniform radiation in one of the reference planes. Therefore, regarding directivity, omnidirectional antennas are better suited for the scenario as it allows the node to be in the coverage area of the gateway for a longer time than that of directional antennas. For other scenarios such as that of a flight plan that circled the nodes on the ground, directional antennas would be a better fit as the drone could remain in a zone where the node is inside the coverage area, and the radiated energy would remain on the intended spot. Furthermore, the antennas can have linear or circular polarization. Depending on the type of polarization, their coverage area will vary. The polarization of the antennas from both the emitter and receiver should match to avoid loses. In our scenario, the antennas are placed at the same position in a horizontal manner with the same polarization for the antennas of the gateway node on the drone and the nodes on the field. Some low-cost nodes incorporate built-in WiFi antennas such as the PCB (Printed Circuit Board) antenna, while others need a communication module or an external antenna, such as a whip antenna, to provide better performance. The antenna gain and the selected transmission power determine the Coverage Radius (CR). Therefore, it is essential to determine the distance that must be covered to select the antenna. For lower flying heights, the required coverage radius is lower, and the built-in PCB antenna has been utilized in IoT (Internet of Things) applications for distances up to 30 m in most low-cost modules for RSSI (Received Signal Strength Indicator) values below −80 dB and up to 120 m for the best performing module [49]. For higher flying heights, the area to be covered is wider, and whip antennas would provide better performance, but its size is bigger, and it should be placed in a manner not to interfere with the flight of the drone.
From the point of view of the node in the soil, the radiation pattern of the gateway in the drone can be compared with a sphere. Based on this assumption, we can use a trigonometrical problem to calculate the time for which a single node has a wireless connection to the mobile gateway in different scenarios (different drone flying height, flying velocities, etc.).
The concept of sagitta (s) of a circular arc is widely used in architecture and optics. The sagitta of a circular arc is the distance from the center of the arc to the center of its base; see Figure 3.  From the point of view of the node in the soil, the radiation pattern of the gateway in the drone can be compared with a sphere. Based on this assumption, we can use a trigonometrical problem to calculate the time for which a single node has a wireless connection to the mobile gateway in different scenarios (different drone flying height, flying velocities, etc.).
The concept of sagitta (s) of a circular arc is widely used in architecture and optics. The sagitta of a circular arc is the distance from the center of the arc to the center of its base; see Figure 3.
polarization, their coverage area will vary. The polarization of the antennas from both the emitter and receiver should match to avoid loses. In our scenario, the antennas are placed at the same position in a horizontal manner with the same polarization for the antennas of the gateway node on the drone and the nodes on the field. Some low-cost nodes incorporate built-in WiFi antennas such as the PCB (Printed Circuit Board) antenna, while others need a communication module or an external antenna, such as a whip antenna, to provide better performance. The antenna gain and the selected transmission power determine the Coverage Radius (CR). Therefore, it is essential to determine the distance that must be covered to select the antenna. For lower flying heights, the required coverage radius is lower, and the built-in PCB antenna has been utilized in IoT (Internet of Things) applications for distances up to 30 m in most low-cost modules for RSSI (Received Signal Strength Indicator) values below −80 dB and up to 120 m for the best performing module [49]. For higher flying heights, the area to be covered is wider, and whip antennas would provide better performance, but its size is bigger, and it should be placed in a manner not to interfere with the flight of the drone.
From the point of view of the node in the soil, the radiation pattern of the gateway in the drone can be compared with a sphere. Based on this assumption, we can use a trigonometrical problem to calculate the time for which a single node has a wireless connection to the mobile gateway in different scenarios (different drone flying height, flying velocities, etc.).
The concept of sagitta (s) of a circular arc is widely used in architecture and optics. The sagitta of a circular arc is the distance from the center of the arc to the center of its base; see Figure 3.  The mathematical equations of this problem are Equations (1)- (7). The s can be calculated as the difference between the radius (r) and the apothem (ap); see Equation (1). According to the Pythagorean Theorem, s can also be calculated as a function of r and chord (c); see Equation (2). Moreover, it is possible to apply the versine function to obtain the value of s according to Equation (3) where α is the angle formed by the two r, which forms the triangle with the c. Alternatively, there is one last method to calculate the s; see Equation (4).
In our problem, the ap represents the flying height (fh), r is the radius of the drone coverage (dc), and the chord represents the coverage in the soil. The known variables are fh and dc, and our objective is to calculate the value of c. Therefore, the employed equations in our calculations will be Equations (1)- (2). Combining them, we can obtain Equation (5), which can be expressed as Equation (6) to obtain the value of c. Finally, considering the flying velocity (fv), we can calculate the time (t) during which a single node has coverage from the gateway mounted on the drone (Equation (7)).
Now, we can use Equation (7) to calculate the time during which a node has coverage for different scenarios. In our calculations, we include values of dc, fh, and fv, which can be found in real applications.
The selected values are dc from 200 to 25 m, fh from 5 to 100 m, and fv from 5 to 20 m/s.

System Description
One of the main problems in the considered scenario is that the drones may face collisions between the sensor nodes located within the coverage range of the drone. To solve this problem, in this section, we propose a data acquisition system for precision agriculture deployments where the sensor nodes forward the data to one sole mobile gateway mounted on a remote sensing drone. The architecture of the specific precision agriculture scenario is discussed as well.

Architecture
The architecture of the precision agriculture scenario is divided into four layers, which are the Sensor Node Layer, the Drone Layer, the Internet Layer, and the Data Center Layer. Figure 4 shows the different layers.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 10 of 23 store the obtained information, is located at the remote location. This information can be processed using Artificial Intelligence (AI) to ensure that decision making is optimal.

Algorithm
In this subsection, the functioning algorithm for both the drone and the field nodes is explained. Furthermore, the message exchange between the elements of the architecture is presented as well.
The PA scenario is comprised of multiple sensor nodes deployed in several agricultural fields. No networking structure is established among the nodes. Thus, the nodes do not communicate in any way among themselves. A sensor network where the nodes deployed on the field forward the data through relay nodes located in between the soil monitoring nodes would address the problem of sending the information to the base station, but it would significantly elevate the cost of the deployment-more so for node densities where large distances separate the nodes. The nodes incorporate various soil monitoring sensors that are able to obtain data on the physical parameters The Sensors Node Layer is the bottom layer. All the sensor nodes deployed in the crops are located in this layer. The layer immediately above is the Drone Layer. It is comprised of the remote sensing drone that is responsible for obtaining images of the crops and collecting the information stored by the nodes through its wireless interface, the location where the drone has their base station, the IT equipment where the information that the drone has collected during its flight is stored, and the network devices that allow us to connect to the Internet. The connection to the Internet is performed by employing a Service Provider. Depending on the location of the crop fields, the technology used to connect to the Internet may vary, choosing among cable or wireless technologies to establish the connections. The following layer is the Internet. The Internet is accessed through the Operator to send all the acquired data to a remote location, where the information will be processed. The connection to the remote location is made by establishing a Virtual Private Network (VPN). This way, the data will be protected when crossing the Internet. Finally, the Data Center Layer, where we store the obtained information, is located at the remote location. This information can be processed using Artificial Intelligence (AI) to ensure that decision making is optimal.

Algorithm
In this subsection, the functioning algorithm for both the drone and the field nodes is explained. Furthermore, the message exchange between the elements of the architecture is presented as well.
The PA scenario is comprised of multiple sensor nodes deployed in several agricultural fields. No networking structure is established among the nodes. Thus, the nodes do not communicate in any way among themselves. A sensor network where the nodes deployed on the field forward the data through relay nodes located in between the soil monitoring nodes would address the problem of sending the information to the base station, but it would significantly elevate the cost of the deployment-more so for node densities where large distances separate the nodes. The nodes incorporate various soil monitoring sensors that are able to obtain data on the physical parameters necessary to manage and monitor the crops. Depending on the node model, similar to the ones previously presented in Table 2, the node may use an embedded antenna to communicate, or it may need a separate communication module from the ones available on the market. The data are stored in the SD (Secure Digital) cards connected to each one of the nodes until the remote sensing drone retrieves the information. Figure 5 presents an example of a soil monitoring drone with a temperature and a humidity sensor.

Algorithm
In this subsection, the functioning algorithm for both the drone and the field nodes is explained. Furthermore, the message exchange between the elements of the architecture is presented as well.
The PA scenario is comprised of multiple sensor nodes deployed in several agricultural fields. No networking structure is established among the nodes. Thus, the nodes do not communicate in any way among themselves. A sensor network where the nodes deployed on the field forward the data through relay nodes located in between the soil monitoring nodes would address the problem of sending the information to the base station, but it would significantly elevate the cost of the deployment-more so for node densities where large distances separate the nodes. The nodes incorporate various soil monitoring sensors that are able to obtain data on the physical parameters necessary to manage and monitor the crops. Depending on the node model, similar to the ones previously presented in Table 2, the node may use an embedded antenna to communicate, or it may need a separate communication module from the ones available on the market. The data are stored in the SD (Secure Digital) cards connected to each one of the nodes until the remote sensing drone retrieves the information. Figure 5 presents an example of a soil monitoring drone with a temperature and a humidity sensor.
The drone is located on a base station, where the route begins and ends. The drone takes photographs of the fields and the terrain during its flight. When the drone reaches the base station, all the retrieved information is forwarded to the data center where the information is stored on a database for further analysis.
A connection between the sensor node and the drone, with a good enough quality to ensure that the data is transmitted successfully, is one of the requirements of a PA system that employs a drone to gather data from the sensor nodes deployed on the field. Other requirements include low energy consumption for the drone to complete its route, the availability of the operating frequency band, and good weather conditions to avoid signal attenuation and damages to the drone and sensor nodes.  The drone is located on a base station, where the route begins and ends. The drone takes photographs of the fields and the terrain during its flight. When the drone reaches the base station, all the retrieved information is forwarded to the data center where the information is stored on a database for further analysis.
A connection between the sensor node and the drone, with a good enough quality to ensure that the data is transmitted successfully, is one of the requirements of a PA system that employs a drone to gather data from the sensor nodes deployed on the field. Other requirements include low energy consumption for the drone to complete its route, the availability of the operating frequency band, and good weather conditions to avoid signal attenuation and damages to the drone and sensor nodes.
Regarding the data rate, it is crucial to consider that the parameters measured in PA systems vary at a slow pace. Therefore, continuous monitoring is not necessary, and the data can be captured each minute or at larger time intervals such as 5, 10, or 30-min intervals. Therefore, the information stored in the SD card is not a large amount, and the necessary data rate would hardly surpass 1 Mbps. Furthermore, works such as [50] show real data rates obtained at different flying heights and distances that surpassed 1 Mbps for heights of 20 m and distances of 45 m, with the drone acting as an intermediary node and therefore having more chances of experiencing interference and signal attenuation. A fixed-winged drone is utilized in [39] to capture images from the fields and forward them using WiFi, where a UDP (User Datagram Protocol) throughput up to 176 Mbps was obtained from real experiments. Therefore, although parameters such as flying height and speed are undoubtedly determinant in the success of the data transmission, once the connection between the sensor node and the drone is established, the necessary data rate is not high.
Low energy consumption should be sought on both the drone and the sensor nodes. The sensor nodes can go into sleep mode during idle time to reduce energy consumption. Furthermore, if the settings of the drone indicate a fixed time for the drone to gather the data from the sensor nodes, the nodes can activate at that time to avoid being in sleep mode when the drone flies over them. Lastly, the lifetime of sensing nodes can surpass a year if the energy consumption and battery choice are optimized. Using solar panels to power the sensor nodes would even nearly cease the problem of battery-less sensor nodes. Choosing between using batteries or solar power would be determined by the type of crop or the desired size for the sensor node. Trees remain productive each year without needing to plant new ones, but other crops are not used after the harvest, where the field is left to rest until the planting season. Therefore, the nodes could be fixed or be removed and deployed again according to the type of crop and its characteristics.
Most fields are far from populated areas, and interferences from other networks are lower than industrial or urban environments. However, testing the area for other networks is a good practice to choose the best settings and communication technology for the PA system.
Lastly, extreme weather conditions are unavoidable, but some measures can be taken to reduce the damage that can be caused by the elements of the PA system. For example, if a weather station is incorporated into the PA system, the drone could decide whether it is safe or not to fly. The sensor nodes should have a protective encapsulation and be able to store the data of several days to ensure no data is lost. Furthermore, if the drone were to be lost due to extreme wind or rain, the SD cards in the sensor nodes would ensure that the data can be accessed manually.
The information monitored in each one of the sensors is unique, and as we have previously commented, it must be forwarded to a remote location where the data center is deployed. Due to the limitations intrinsic to the deployed network which has a limited processing and storage capacity, limited power availability, and a short time interval for the communication between the node and the drone, we consider a system comprised of soil monitoring nodes. These remote sensing drones obtain video and photographs of the fields and gather the data from the nodes, the base station of the node that includes a gateway to send the data to the remote location, and the data center situated in a remote location where the data is stored and analyzed.
The functioning algorithm of the drone is presented in Figure 6. Firstly, the drone loads the flight plan, which can be designed using the existing software for flight plan designs and considering crop requirements. After the setup, the drone asks for the weather information gathered by the weather station. If the wind speed is greater than the threshold value (wth), the flight is cancelled, and the drone waits until the next scheduled flight. If the wind speed is correct, the rain amount is then checked. If the threshold value (rth) is surpassed, the flight is cancelled as well. If everything is correct, the drone checks the available energy. If there is enough energy, the drone begins the route through the fields. If there is not enough energy, the drone cancels the flight. Then, the drone checks if a node is asking for a connection. If there is no node to connect with, a photo of the field is taken, and the available energy is re-evaluated. When a node is detected, a connection is established, and the drone receives the data. When all the data has been received, the drone sends a disconnect message to the node to indicate that the connection is terminated and that the node should go to sleep mode and should not try to connect to the drone for the time determined in the settings. By doing this, the possible interferences caused by other nodes deployed in the fields in the coverage range of the drone are avoided. Although interferences among the nodes for the configurations of node coverages for orchards of fruit-bearing trees, as contemplated in this scenario, would only be possible with the case of 1 node per 60 m 2 of node density. The detailed explanation of the different node densities considered for different types of crops is presented in Section 5.1. After that, an oblique photo of the field is retaken, and the drone looks for another node. When the route was finalized, the drone goes to the base station and forwards the data to the database at the remote location for further analysis. Then, the drone waits at the station until the scheduled time for the next flight is reached.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 12 of 23 mode and should not try to connect to the drone for the time determined in the settings. By doing this, the possible interferences caused by other nodes deployed in the fields in the coverage range of the drone are avoided. Although interferences among the nodes for the configurations of node coverages for orchards of fruit-bearing trees, as contemplated in this scenario, would only be possible with the case of 1 node per 60 m 2 of node density. The detailed explanation of the different node densities considered for different types of crops is presented in Section 5.1. After that, an oblique photo of the field is retaken, and the drone looks for another node. When the route was finalized, the drone goes to the base station and forwards the data to the database at the remote location for further analysis. Then, the drone waits at the station until the scheduled time for the next flight is reached. The functioning algorithm of the node is presented in Figure 7. After the setup has been completed, the node starts gathering the data from the nodes and storing it on an SD card. If it is the scheduled time for the drone flight, the node gets activated to wait for the drone. If it is not the scheduled time, the node goes into sleep mode for the time specified in the setup parameters. If a drone is detected, all the data stored on the SD card are forwarded to the drone. When the node receives a disconnect message, the node disconnects from the drone and deletes all the data stored in the SD card. Then, the node goes into sleep mode for the time stipulated on the settings so as to save energy and to avoid the drone having interferences with other nodes. While the node does not detect the drone, it checks if the maximum time activated time is reached to determine if it needs to go to sleep mode. This way, the node is not constantly activated if the drone decides to cancel the flight due to weather conditions. Then, it keeps gathering the data from the sensors each time the time interval between measures loaded from the setup has been reached.
The message exchange between the elements of the architecture is presented in Figure 8. The drone sends beacons so the nodes can detect it and ask for a connection. When the connection establishment is performed, the node sends the data to the drone. The drone then sends an Acknowledgment (ACK) and a Disconnect message to indicate that the node should go into sleep mode for the stipulated time. After that, the node sends an ACK to the drone to indicate that the Disconnect message has been received correctly. The process is repeated with all the nodes deployed on the field within the coverage area of the drone as it follows its route. When the node reaches the base station, the data are forwarded to the database, and the database confirms the reception of the data with an ACK. The functioning algorithm of the node is presented in Figure 7. After the setup has been completed, the node starts gathering the data from the nodes and storing it on an SD card. If it is the scheduled time for the drone flight, the node gets activated to wait for the drone. If it is not the scheduled time, the node goes into sleep mode for the time specified in the setup parameters. If a drone is detected, all the data stored on the SD card are forwarded to the drone. When the node receives a disconnect message, the node disconnects from the drone and deletes all the data stored in the SD card. Then, the node goes into sleep mode for the time stipulated on the settings so as to save energy and to avoid the drone having interferences with other nodes. While the node does not detect the drone, it checks if the maximum time activated time is reached to determine if it needs to go to sleep mode. This way, the node is not constantly activated if the drone decides to cancel the flight due to weather conditions. Then, it keeps gathering the data from the sensors each time the time interval between measures loaded from the setup has been reached.
The message exchange between the elements of the architecture is presented in Figure 8. The drone sends beacons so the nodes can detect it and ask for a connection. When the connection establishment is performed, the node sends the data to the drone. The drone then sends an Acknowledgment (ACK) and a Disconnect message to indicate that the node should go into sleep mode for the stipulated time. After that, the node sends an ACK to the drone to indicate that the Disconnect message has been received correctly. The process is repeated with all the nodes deployed on the field within the coverage area of the drone as it follows its route. When the node reaches the base station, the data are forwarded to the database, and the database confirms the reception of the data with an ACK.

Results
In this section, we are going to analyze the theoretical values obtained after applying the equations described in Section 3.3. Furthermore, the energy consumption of the drone is analyzed as well.

Coverage Analysis
In this subsection, we first calculate the time during which a node has coverage from the gateway. Then, we calculate from those cases and with different bandwidth the amount of exchanged

Results
In this section, we are going to analyze the theoretical values obtained after applying the equations described in Section 3.3. Furthermore, the energy consumption of the drone is analyzed as well.

Coverage Analysis
In this subsection, we first calculate the time during which a node has coverage from the gateway. Then, we calculate from those cases and with different bandwidth the amount of exchanged

Results
In this section, we are going to analyze the theoretical values obtained after applying the equations described in Section 3.3. Furthermore, the energy consumption of the drone is analyzed as well.

Coverage Analysis
In this subsection, we first calculate the time during which a node has coverage from the gateway. Then, we calculate from those cases and with different bandwidth the amount of exchanged information between the node and the gateway and evaluate if this is enough to send the data stored in the node during the day.
Before starting to analyze the theoretical results, some assumptions must be made related to the connection and the density of nodes on the soil.

•
First, we must consider the time required to establish the connection. We performed tests in real environments to determine the time required by Arduino nodes to establish the connection between each other. The results showed connection establishment times ranging between 2 and 4 s. To ensure the connection of the nodes, we will consider the worst-case scenario of connection time of 4 s. Since the data are forwarded after the connection establishment, we will consider 5 s of total required time for connection establishment and data transmission. Therefore, all the combinations of dc and fh that give, as a result, a time in coverage equal to or less than 5 s are considered as unfeasible scenarios for connection. Since the current velocities in WiFi have increased in the last years and the gathered data by the sensors are small, we can consider that all the information can be sent in this period of 5 s. Finally, regarding the density of nodes, we must consider the number of nodes that will be able to connect to the drone at the same moment and that have to share their time in coverage. There is a different type of scenario regarding node density in precision agriculture. The densest cases are related to the intensive agriculture of fruit-bearing trees such as orchards. The farmers used to grow their trees in a density of one tree each 16 to 20 m 2 . In the case that we have one node per tree, the node density will be one node each 16 to 20 m 2 . Nonetheless, this is not usual, since the conditions of the soil and irrigation techniques are relatively homogeneous. Therefore, we can expect that in the densest networks, we have one node every three or four trees, having a density of one node each 60 m 2 . Other scenarios can include cereal or energetic crops. In these cases, the crops create a uniform soil coverage, and it is not possible to differentiate the individual plants. Moreover, as the outcomes of these crops are much lower than in the case of fruit-bearing trees, the investment in precision agriculture is lower. In addition, if we consider that most of the cereals and energetic crops do not need irrigation, the node density can be further lower. It is no exaggeration to say that in these cases, we can have only one node in each field having node densities of one each 5000 m 2 or even more. In between both cases, we can find another example of fruit-bearing trees as olive trees. The density of trees in the field is lower than in the case of orchards. Moreover, since no irrigation systems are used in the culture of olive trees, the monitoring requirements are lower. Thus, we can expect densities of one node each 750 m 2 in the cropping of this type of crop. Nevertheless, the final density will be a factor that the farmer will define. To select the density of the nodes, the farmer will consider the environmental parameters (soil proprieties, homogeneity of the terrain, and past climate events), culture parameters (crop resilience, irrigation requirements, and susceptibility to specific diseases or pests among others), and economic constraints (benefits of the crops and the required investment).
Therefore, and to facilitate the comprehension of the results section, we detail the included parameters and their range in our model in Table 3. In Table 3, we describe if the parameter is considered as a fixed parameter or not, which indicates whether this parameter is previously defined by the scenario or not. The defined parameters are the node density, the flying parameters (velocity and height), and the required time for communication. Furthermore, we have detailed the calculated parameters in our model based on the abovementioned variables. Now, we are going to analyze the results of applying the equations to calculate the time in coverage for different scenarios. The time in coverage of a node placed on the soil when the drone is moving at 20 m/s can be seen in Figure 9.  Now, we are going to analyze the results of applying the equations to calculate the time in coverage for different scenarios. The time in coverage of a node placed on the soil when the drone is moving at 20 m/s can be seen in Figure 9. Following, the time in coverage for fv = 15 m/s is presented in Figure 10. Compared with Figure  9, as the drone is moving slowly, the time in coverage increases. The highest time in coverage for this scenario is 27 s, which is 7 s more than in the previous case. The results of time in coverage when the drone flies at 10 m/s can be seen in Figure 11. In this case, the maximum time in coverage is 40 s. On the other hand, form the minimum dc and fh, the time in coverage is 5 s and can be used for receiving data from one node. With this fv, the maximum fh for different dc values increases significantly compared with previous velocities; for dc = 25, 5 m, the maximum fh are 14, 44 m. Nonetheless, for dc values of 75 and 100 m, the maximum fh is the same as in the previous velocities, and for dc values higher than 100 m, the communication is feasible at all the fh.  Following, the time in coverage for fv = 15 m/s is presented in Figure 10. Compared with Figure 9, as the drone is moving slowly, the time in coverage increases. The highest time in coverage for this scenario is 27 s, which is 7 s more than in the previous case. For the minimum dc, the time in coverage when the fh is the lesser is the same as in the previous case, 4 s.  In Figures 2-12, we presented the time in coverage of a single node and evaluated if this node will be able to transmit the information or not according to the required time to establish the connection and send data, which has been set in 5 s. Next, we are going to analyze for each combination of dc and fh the area in the soil which has coverage. Then, according to the aforementioned node densities in Table 3, we calculate the number of nodes that will have coverage in a certain period and need to send their data to the gateway. According to the time in coverage, the minimum required time to establish a connection, send the data, and close the connection, and the number of nodes, we estimate if the drone can be used to receive all the data of the WSN or not. The summary of different considered scenarios and the results in terms of the success or not of the connection are presented in Figure 13. In Figure 13, we can identify in different rectangles the different scenarios, which combine different node densities and fv. In each scenario, we can consider the combination of dc and fh in the x and y-axis. Thus, we cover all the parameters that affect the success or not of the gathering of all data stored in the nodes placed in the soil. The success of the connection is indicated in colors; the area colored in gray indicates that there is no coverage (NC) for this combination of fh and dc. This is found when the fh is higher than the dc. The areas in red represent combinations of dc and fh when even that we have coverage, the time in coverage is too short for ensuring the transmission of data from all the nodes. It means that the time in coverage of the nodes contained in the area in coverage is lower than 5 s for each one and the gathering of data contained in the nodes cannot be attained. Combinations colored in yellow represent the combination of dc and fh that can be used to receive the data but with very adjusted time. Therefore, if an unexpected problem such as punctual loss of connection appears during the communications, it can endanger the collection of the data of certain nodes. In green, we present the optimal combination of dc and fh that ensure the data gathering.
According to Figure 13, we can determine for a given fv, fh, and node density if we will be able to communicate and receive the data from all of our nodes or not with different types of dc. Now, we are going to analyze the different scenarios; for the scenario with the maximum node density (1 node each 60 m 2 ), there is only one combination that allows the communication. This combination is found for the lowest fv (1 m/s) at fh = 24 m and dc = 25 m. The result of this combination of parameters is good coverage (yellow). For the other node densities, we can find more combinations. For node densities of one node every 750 m 2 and the maximum fv, no combination allows the communication.  Finally, for the scenario with the lowest density of nodes (one node every 5000 m 2 ), we can identify some combinations that allow optimal connection even with the highest fv with fh equal or smaller than 100 m. For the other fv (15 to 1 m/s), several combinations of fh and dc ensure that the drone can act as a mobile gateway and gather the data of nodes placed in the soil.
In case that none of the combinations of the given parameters (fh, fv, and node density) with different dc values offer us a good (yellow) or optimal (green) solution, it will be necessary to evaluate if the possibility to modify the given parameters (fixed parameters) exists. For example, decreasing the fv or increasing the fh can be useful to ensure communication; meanwhile, we maintain the original purpose of the drone. These adjustments must be carefully considered to guarantee that the original purpose of the drone surveillance of the crop is possible. To do so, it will be necessary to evaluate the loss of image resolution due to the increment in the fh and the reduction of overlapping between obtained images due to fh.
Otherwise, in case there is no possibility to change the given parameters, it will be necessary to use some other communication process in the nodes placed on the soil. For example, it will be possible to use a clustering algorithm to communicate all the gathered data from the cluster to the cluster head, and this cluster head sends the data to the node. This will minimize the time consumed to send the data, as fewer processes of communication establishment must be done. Nonetheless, this solution is limited to the coverage of WiFi antennas of nodes placed in the soil, and it can only be applied in cases with high node densities.   In Figures 2-12, we presented the time in coverage of a single node and evaluated if this node will be able to transmit the information or not according to the required time to establish the connection and send data, which has been set in 5 s. Next, we are going to analyze for each combination of dc and fh the area in the soil which has coverage. Then, according to the aforementioned node densities in Table 3, we calculate the number of nodes that will have coverage in a certain period and need to send their data to the gateway. According to the time in coverage, the minimum required time to establish a connection, send the data, and close the connection, and the number of nodes, we estimate if the drone can be used to receive all the data of the WSN or not. The summary of different considered scenarios and the results in terms of the success or not of the connection are presented in Figure 13. In Figure 13, we can identify in different rectangles the different scenarios, which combine different node densities and fv. In each scenario, we can consider the combination of dc and fh in the x and y-axis. Thus, we cover all the parameters that affect the success or not of the gathering of all data stored in the nodes placed in the soil. The success of the connection is indicated in colors; the area colored in gray indicates that there is no coverage (NC) for this combination of fh and dc. This is found when the fh is higher than the dc. The areas in red represent combinations of dc and fh when even that we have coverage, the time in coverage is too short for ensuring the transmission of data from all the nodes. It means that the time in coverage of the nodes contained in the area in coverage is lower than 5 s for each one and the gathering of data contained in the nodes cannot be attained. Combinations colored in yellow represent the combination of dc and fh that can be used to receive the data but with very adjusted time. Therefore, if an unexpected problem such as punctual loss of connection appears during the communications, it can endanger the collection of the data of certain nodes. In green, we present the optimal combination of dc and fh that ensure the data gathering.
use some other communication process in the nodes placed on the soil. For example, it will be possible to use a clustering algorithm to communicate all the gathered data from the cluster to the cluster head, and this cluster head sends the data to the node. This will minimize the time consumed to send the data, as fewer processes of communication establishment must be done. Nonetheless, this solution is limited to the coverage of WiFi antennas of nodes placed in the soil, and it can only be applied in cases with high node densities.   According to Figure 13, we can determine for a given fv, fh, and node density if we will be able to communicate and receive the data from all of our nodes or not with different types of dc. Now, we are going to analyze the different scenarios; for the scenario with the maximum node density (1 node each 60 m 2 ), there is only one combination that allows the communication. This combination is found for the lowest fv (1 m/s) at fh = 24 m and dc = 25 m. The result of this combination of parameters is good coverage (yellow). For the other node densities, we can find more combinations. For node densities of one node every 750 m 2 and the maximum fv, no combination allows the communication. For other fh of 15 and 10 m/s, few combinations allow a good connection. Meanwhile, when the fv decrease to 5 m/s, we can identify some combinations of fh and dc that result in an optimal connection (fh = 24 m and dc = 25 m). For the lowest fv, several combinations allow good and optimal connectivity. Finally, for the scenario with the lowest density of nodes (one node every 5000 m 2 ), we can identify some combinations that allow optimal connection even with the highest fv with fh equal or smaller than 100 m. For the other fv (15 to 1 m/s), several combinations of fh and dc ensure that the drone can act as a mobile gateway and gather the data of nodes placed in the soil.
In case that none of the combinations of the given parameters (fh, fv, and node density) with different dc values offer us a good (yellow) or optimal (green) solution, it will be necessary to evaluate if the possibility to modify the given parameters (fixed parameters) exists. For example, decreasing the fv or increasing the fh can be useful to ensure communication; meanwhile, we maintain the original purpose of the drone. These adjustments must be carefully considered to guarantee that the original purpose of the drone surveillance of the crop is possible. To do so, it will be necessary to evaluate Otherwise, in case there is no possibility to change the given parameters, it will be necessary to use some other communication process in the nodes placed on the soil. For example, it will be possible to use a clustering algorithm to communicate all the gathered data from the cluster to the cluster head, and this cluster head sends the data to the node. This will minimize the time consumed to send the data, as fewer processes of communication establishment must be done. Nonetheless, this solution is limited to the coverage of WiFi antennas of nodes placed in the soil, and it can only be applied in cases with high node densities.

Energy Consumption
In this subsection, the energy consumption of the drone is presented. The energy consumption of a quadcopter drone is presented in Equation (8), where the minimum flight power for hovering at the lowest height (β) is 30, the multiplier for the velocity of the motor (α) is 10.5, and the maximum power that the motor can achieve (P max ) is 85, according to [51]. The flying time (t) will be set to 20 min as it is the typical nominal endurance for quadcopter drones.
For quadcopter drones, the energy consumption of the drone is highly dependent on the flying height. To increase the coverage time, some authors have presented proposals for flight plans where the drone circles the node on the ground until all the data are transmitted. In our case, we consider the transmission of small amounts of data gathered from soil monitoring sensors. Therefore, that type of flight plan is not necessary for our scenario.
The energy consumption of the quadcopter drone for a flying time of 20 min is presented in Figure 14. The energy consumption is height dependent, and the speed of the drone barely creates a difference in energy consumption. Considering that flying heights between 15 and 25 m provide better coverage, the selection of a flying height within that range would minimize the energy consumption while maximizing the coverage of the node placed at the drone.

Energy Consumption
In this subsection, the energy consumption of the drone is presented. The energy consumption of a quadcopter drone is presented in Equation (8), where the minimum flight power for hovering at the lowest height (β) is 30, the multiplier for the velocity of the motor (α) is 10.5, and the maximum power that the motor can achieve (Pmax) is 85, according to [51]. The flying time (t) will be set to 20 min as it is the typical nominal endurance for quadcopter drones.
For quadcopter drones, the energy consumption of the drone is highly dependent on the flying height. To increase the coverage time, some authors have presented proposals for flight plans where the drone circles the node on the ground until all the data are transmitted. In our case, we consider the transmission of small amounts of data gathered from soil monitoring sensors. Therefore, that type of flight plan is not necessary for our scenario.
The energy consumption of the quadcopter drone for a flying time of 20 min is presented in Figure 14. The energy consumption is height dependent, and the speed of the drone barely creates a difference in energy consumption. Considering that flying heights between 15 and 25 m provide better coverage, the selection of a flying height within that range would minimize the energy consumption while maximizing the coverage of the node placed at the drone. Considering the different node densities studied in this paper, the approximated number of nodes that the drone can cover in a flight of 20 min at different fv values is presented in Table 4. This calculation was performed determining the space covered by the drone at each fv taking into account that the nodes are placed at the center of a square sector of 60 m 2 , 750 m 2 or 5000 m 2 , according to the node density, and the drone flies over them in a straight line to gather the information. Therefore, for a node density of one node per 60 m 2 the number of nodes that can be covered is considerably greater than that of the other two configurations. Considering the different node densities studied in this paper, the approximated number of nodes that the drone can cover in a flight of 20 min at different fv values is presented in Table 4. This calculation was performed determining the space covered by the drone at each fv taking into account that the nodes are placed at the center of a square sector of 60 m 2 , 750 m 2 or 5000 m 2 , according to the node density, and the drone flies over them in a straight line to gather the information. Therefore, for a node density of one node per 60 m 2 the number of nodes that can be covered is considerably greater than that of the other two configurations.

Conclusions and Future Work
The EU has among its 2020 policies a Common Agricultural Policy to ensure food availability for the population of the EU. Precision Agriculture (PA) is encompassed in these policies, as it aids in optimizing the crops and facilitating crop management using technology. Sensor nodes and drones are some of the technologies that can be utilized in PA to monitor the crops in real time. In this paper, we have considered the use of remote sensing drones as mobile gateways to provide a guide to determine the best drone parameters for successful data transmission between sensor nodes and the gateway in PA systems to monitor and manage crops. The drone gathers the data from the sensor nodes by flying over them and connecting wirelessly to them using WiFi.
We have defined some parameters such as the fh or the fv as fixed parameters, while others such as the antenna (or dc) might be adapted to reach the connectivity. Different scenarios were simulated to determine the optimal drone parameters for the drone to be able to gather the data from the sensor nodes. The results indicate that for the highest node density, there is only one case in which the drone can be used when the drone has a flying height of 24 m or lower and velocities equal or lower to 1 m/s, and we include an antenna with a coverage of 25 m. For the rest of the node densities, we can find several combinations that ensure that the drone can be efficiently used as a mobile gateway. Nonetheless, in maximum flying velocity, no connectivity is achieved for the medium node density.
For future work, we will perform real tests with different nodes, different wireless technologies such as ZigBee, and different soil node settings. We will also evaluate the performance of remote sensing drones utilized as mobile gateways with the implementation of fault-tolerance and energy-saving algorithms for its use in smart irrigation systems, as it is detailed in [52]. In addition, we will measure how the extra weight due to the node and antenna affects the flying capabilities of different drones.