## 2 Materials and Methods
### Experimental Platform  
In the real-world experiments, the low-cost, micro quadrotor Bebop 2 from Parrot company, was used (see Figure 1 and [46]). Since it is equipped in P7 dual-core CPU Cortex 9 processor, 1 GB RAM memory, and 8 GB of flash memory, it is possible to perform on-board state estimation of the UAV using Extended Kalman Filter (EKF) for the data gathered from its on-board sensors listed in Table 3. The Bebop 2 uses the Busybox Linux operating system. Compact sizes of the UAV (\(33\times 38\times 3.6\) cm with hull) and efficient propulsion units (\(4\times 1280\) KV BLDC Motor, 7500-12000 rpm), in combination with 2700 mAh battery provide maximum flight time up to 25 minutes and maximum load capacity up to 550 g (which gives a maximum takeoff mass equal to 1050 g, since the UAV weighs 500 g). All experimental studies discussed in the article were carried out in AeroLab[47], the research space created at the _Institute of Control, Robotics and Information Engineering of Poznan University of Technology_ for testing solutions in the field of UAVs flight autonomy, where ground truth is the OptiTrack motion capture system equipped with 8 Prime 13W cameras (with markers placed on the UAV), and a processing unit (PC) equipped with Motive--OptiTrack's unified motion capture software \begin{table}
\begin{tabular}{c l} \hline \hline
**Parameter** & **Value** \\ \hline accelerometer \& gyroscope & 3-axes MPU 6050 \\ pressure sensor (barometer) & MS5607 (analyses the flight altitude beyond 4.9 m) \\ ultrasound sensor & analyses the flight altitude up to 8 m \\ magnetometer & 3-axes AKM 8963 \\ geolocalization & Furuno GN-87F GNSS module (GPS+GLONASS+Galileo) \\ Wi-Fi Aerials & 2.4 and 5 GHz dual dipole \\ vertical stabilization camera & photo every 16 ms \\ camera & 14 Mpx 3-axis Full HD 1080p with Sunny 180 fish-eye lens: 1/2.3” \\ \hline \hline \end{tabular}
\end{table} 
Table 3: General characteristic of Bebop 2 sensors. platform. The measurement program (Robot Operating System (ROS) node) is executed with the frequency of 100 Hz, control actions with 30 Hz, whereas the tuning methods with 5 Hz. The system is connected to the ground station (Figure 7) to which information about the current position and orientation of the UAV (from motion capture system and UAV) are transmitted. The ground station is the Lenovo Legion Y520 notebook, equipped with Intel Core i7-7700 HQ (2.8 GHz frequency), 32 GB DDR4 RAM memory, SSD hard drive and GeForce GTX 1050 2048 MB under Linux Kinetic 16.04 LTS operating system. Such a powerful computer was proposed for the autonomous control of the Bebop 2 UAV, to conduct all necessary calculations at the ground station, including: path planning, data (measurements) processing, autonomous control, auto-tuning of controllers, safety control, etc. The ground station was also used for tests of the proposed GLD auto-tuning method in simulation environment. These tests were carried out under the control of the ROS, using the open-source flight simulator Sphinx[48] and bebop_autonomy library [49] extended by models of cascade control system enabling simulation of autonomous flights in \(x_{e}\) and \(y_{e}\) axes(flight for the given coordinates). In the external position control loops, the PID-type controllers have been used. During the flights, to ensure the safety, Bebop 2 was equipped with 4 bumpers (12.5 g each, made in 3D printing technology) protecting propellers, and in AeroLab an additional horizontal safety net was installed to protect it against hard crashes to the ground level. In addition, for security reasons, the priority over the autonomous flight of the drone was allocated to the operator equipped with SkyController 2, enabling manual flight control. Furthermore, a safety button was introduced to cut off the UAV power supply in a situation of imminent danger. It supported initial experiments, where additional safety rope was used.