# Improvement of Hexacopter UAVs Attitude Parameters Employing Control and Decision Support Systems
## 4 Laboratory and In Situ Measurement Results and Discussion
### Hover Flight Tests
#### 4.3.2 Hexacopter Flight Parameters Extracted from Sensors during Hover Flight  
The drone was raised up to an altitude of 8.5 m. The EKF subsystem is responsible for generating attitude, velocity, position and altitude estimates for the drone so that the navigation and control systems can operate correctly. EKF takes the inputs from IMU, GPS and BARO sensors and integrates them to provide these assessments, one of which is the estimated altitude. This is then passed to the vehicle's altitude control system, which attempts to align to the target altitude in altitude-controlled flight modes. Figure 25 plots the altitude reached by the drone in blue, the commanded altitude in red and the altitude measured by the barometer in green. It can be noticed that there are no significant differences between the three values. The maximum recorded difference between programmed and measured values is less than 1 m, representing less than 10% of the real value. Figure 24: Closed-loop PID scheme—general approach. The graph extracted from the MAVExplorer platform (Figure 26a) depicts the altitude at which the drone was lifted and the ambient temperature at the test site in Fahrenheit degrees. The graph presented in Figure 26b shows the in situ atmospheric pressure (Pa) extracted from the data measured by the barometer with which the drone AP is equipped. For optimal operation of the hexacopter, radio control calibration was initially performed using the GCS mission planner. The minimum maximum PWM signal duration limits for the employed channels by the RadioLink AT10 II radio control, mode 2 (motor stick is located on the left side), operate within the range 1000-2000 us. The channels are assigned as follows: Channel 1 (CH1)--roll, Channel 2 (CH2)--pitch, Channel 3 (CH3)--throttle, Channel 4 (CH4)--yaw, Channel 5 (CH5)--flight modes (stabilize, alt hold and RTL), Channel 6 (CH6)--engine kill switch mode. The PWM signal is utilized to control the pulse width modulation signal for each electronic speed controller that is connected to each of the six motors. The PWM signal is a periodic square wave signal with a period of 20 ms, which means it has a refresh rate of 50 Hz. Each cycle of the PWM signal lasts for 1-2 ms high level (1000-2000 us), which is the control value of that channel. In the case of speed, 1000-1100 us corresponds to 0 speed of the hexacopter, and 1900-2000 us corresponds to maximum speed. Prior to ground and flight manoeuvres, laboratory tests were performed on the motors without propellers to verify their operation within parameters. Figure 27a illustrates the command given by the operator from the radio control, in the range 1083-1916 us, as it was previously calibrated, and Figure 27b shows the response of the ESC-controlled motors in respect to the operator's command to increase speed. It can be noted that the engines operate within the appropriate parameters, with values between 1000-1950 us, and respond directly to the command given by the operator. Figure 25: Hexacopter programmed and recorded altitude. Figure 26: Hexacopter measured parameters. (**a**) Altitude and ambient temperature; (**b**) Ambient atmospheric pressure. Figure 28a depicts the altitude of the test site, which is 79-80 m above sea level (mean sea level). The peaks of the graph represent the altitudes to which the hexacopter was lifted during the manoeuvres. In Figure 28b, the geographic coordinates of the location (maximum altitude of the hexacopter stationary at the fixed point--8.5 m) are illustrated. The results were processed with the mission planner and MAVExplorer platforms. Figure 29a depicts the command given by the ESCs to the drives in response to the operator moving the speed stick in the 50-75% range. The motor increases the rotational speed to a value at which the hexacopter becomes detached from the ground and begins to lift until the operator clamps the stick at a certain percentage of the speed.