###### Abstract
LAP drones are becoming increasingly used in a wide variety of cases, such as package delivery [6], surveillance [7], remote sensing [8], providing wireless communications [9], and precision agriculture [10]. From the wireless communications perspective, drones are capable of working as an aerial base station in the cellular network to provide a communication link for terrestrial users [11] or work as a relay in a wireless communication network [12]. However, in wireless sensor networks (WSNs), sensors have low transmission power and may not be able to wirelessly communicate over a long range. In such cases, applications of drones in the IoT have become very beneficial, where drones can operate as relays to enhance the connectivity and coverage in a WSN [13]. Despite promising opportunities to use drones in WSNs, some technical challenges need to be addressed, for instance, providing a reliable aerial communication link between sensor nodes and drones, network planning, sensor positioning, drones' battery limitations, and trajectory optimization. To minimize the need for manual operations, improve the quality of farm monitoring systems, and address some of the aforementioned issues, this study aims to develop a farm monitoring system (FMS) by integrating the IoT, LoRaWide Area Network (LoRaWAN(r)), and drone technologies. The FMS development is split into three main sub-modules, namely: (1) remote sensing development, (2) LoRaWAN(r)-based communication network development, and (3) UAV path planning optimization. The first objective of this study is to develop a wireless-based water inspection system for monitoring five related parameters of water supply on the farm. The second objective is to integrate the LoRa gateway with a vertical take-off and landing (VTOL) drone for data collection from the distributed water quality sensor nodes and livestock collar tags and convey them to the cloud. The third objective is to optimize the drone flight path, based on the locations of sensors, to minimize its flight time and overcome the challenge of drones' battery limitations. Hence, this study is a combination of hardware integration/development, measurement, and simulation. The utilized hardware was mainly based on off-the-shelf sensors and LoRaWAN(r) modules, measurements were performed in real-world scenarios on a campus and in rural environments, and simulations were conducted based on assumptions of a large-scale livestock farm. The key contributions of this study are summarized as follows:  
* As water sources are an essential aspect in livestock development, a water inspection system was developed to gauge the quality of water using long-range wireless IoT technologies. The inspection sensors can collect data on a timely basis and transmit them to the LoRa gateway equipped onboard the drone. * A multi-channel LoRa gateway, that is mounted on the drone, was developed to convey collected data by sensors to the cloud. In offline mode, when internet access is difficult to secure, the developed gateway works as local storage and stores the collected data and then pushes the data to the application server once an internet connection is available. For accurate network planning and implementation, the performance of the communications link was measured in different spreading factors (SFs), LoRa gateway modes, and drone speeds. Additionally, the Doppler effect was investigated at a higher flight speed than previous studies and it was found that LoRa has robust performance with a maximum drone speed of 95 km/h and spreading factor of 12. * All the key technologies, IoT sensors, and the LoRa gateway were successfully integrated into the developed VTOL drone to support farm monitoring operations. As a result, the developed system is a successful development in drone-based aerial data collection systems that provides a solution to tackle critical problems in large and rural farm management, aerial livestock monitoring, and collecting data from various IoT sensors.