## 5 Testing and Evaluation
### Lab Testing and Objective Measurements
#### 5.2.2 Positioning Accuracy  
The basic modality of drone tracking calculates the drone's position based on the IMU readings it reports. Even small error from individual reading aggregate over time resulting  
Figure 11: Drone response time measurements according to broker location.  
in IMU drift. Hence, any error correction or compensation can improve the robustness of the system in a span of seconds or minutes.  
To measure IMU positioning accuracy, an experiment was conducted where the drone would move forward close to ground level and the position as calculated from the IMU readings would be compared to the actual distance traveled, measured physically on the ground. The experiment was repeated for different values of pitch, corresponding to different velocities.  
The results of these experiments are presented in Figure 12. The position estimated from the IMU is marked on the horizontal axis, while the ground truth is on the vertical. For reference, the yellow diagonal line marks the ideal of zero error, where IMU measurements equal the ground truth. It can be noted that the error is relatively small for higher pitch values and velocities, increasing when the drone moves slower. This is also evident by the angles of the different linear trendlines. For pitch = 0.3, the trendline is almost parallel to the zero-error line, while for lower pitches, the lines diverge. It may also be noted that IMU measurements steadily report a smaller than the actual distance. Using linear regression, the functions of each trendline can be calculated. In the following, \(GT\) is the ground truth, and \(IMU\) is the distance measured by the IMU readings aggregation:  
\[GT =1.31*IMU+0.20,\;\;for\;pitch=0.05\] \[GT =1.17*IMU+0.27,\;\;for\;pitch=0.1 \tag{7}\] \[GT =0.99*IMU+0.217,\;\;for\;pitch=0.3\]  
The observations of Figure 12 may be used to improve the IMU measurements by compensating for the error. As noted, this compensation must be inversely tied to the pitch value. Performing linear regression on the coefficients of Equation (7), we can approximate them as a function of the respective pitch value as \(1+(1/52.36*pitch)\). As the \(GT=IMU\) equation (with a coefficient of 1) is the ideal (i.e., no error), the \(1/52.36*pitch\) part expresses the error of the measurements.  
Hence, a simple, first-degree estimation of the error \(E\) per distance unit would be:  
\[E=\frac{1}{52.36*pitch} \tag{8}\]  
Therefore, the compensated distance \(D_{comp}\) can be calculated from the measured distance \(D\) as:  
\[D_{comp}=D*(1+E)=D*(1+\frac{1}{52.36*pitch}) \tag{9}\]  
Figure 13 shows the effect of error compensation on IMU measurements. The left graph shows the mean squared error (MSE) of measurements for different pitch values, without compensations (solid lines) and with (dashed lines). The right graph shows the  
Figure 12: IMU measurements vs. ground truth for various pitch values, including linear trendlines and a no-error line for reference. Note how lower pitch values result in greater errors, and how the angle between the trendlines and the no-error line increases for slower speeds.  
average MSE values for the different pitch values, again, with and without compensation. It can be seen that compensation has a huge impact, especially on lower pitches (slower drone speeds).  
Compensation research is still ongoing. Future tests will include combination motions and different drone models, as well as higher-degree error modeling.