## 3 Materials and Methods
### 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 \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Controller** & **FLASH** & **RAM** & **EEPROM** & **Weight** & **Size** & **Operating Voltage** & **Reference** \\ \hline WEMOS MINI D1 & 4 MB & - & - & 3 g & 34.2 \(\times\) 25.6 mm & 3.3 V & [43] \\ Node MCU & 4 MB & 520 kB & - & 10 g & 48 \(\times\) 25.1 \(\times\) 11.5 mm & 3.3 V & [44] \\ Arduino Mega & 256 kB & 8 kB & 4 kB & 37 g & 101.52 \(\times\) 53.3 mm & 5 V & [45] \\ Arduino UNO & 32 kB & 2 kB & 1 kB & 25 g & 68.6 \(\times\) 53.4 mm & 7–12 V & [46] \\ Raspberry Pi 3 Model B+ & - & 1 GB & - & 50 g & 85 \(\times\) 56 \(\times\) 17 mm & 5 V & [47] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Characteristics of popular nodes for Precision Agriculture (PA) systems. 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.).