## 4 Simulation Results
### Test Results  
Figure 10 shows the localization results using the derived equations and the proposed polygon detection method.  
The flight started at the arrow in the indicated direction, with the UAV flying one lap under the transmission lines. As was to be expected, good shielding allowed more precise navigation. The quality of localization was obviously very high with a magnetic noise standard deviation of \(\sigma=1\,\upmu\)T. The mean deviation from the specified flight path was 19 mm, with a maximum error of 61 mm. The standard deviation of the pitch angle error was \(0.6^{\circ}\), and its mean was very close to zero, around \(-0.076^{\circ}\). Only the pitch angle is shown here as the yaw angle is of similar quality.  
Figure 11 shows the localization results for the case where poorly shielded electrical drives in the UAV produce magnetic noise with a standard deviation of \(\sigma=8\,\upmu\)T.  
Figure 11: Localization quality, poor shielding: \(\sigma=8\,\upmu\)T.  
Figure 10: Localization quality, good shielding: \(\sigma=1\,\upmu\)T.  
Despite the high magnetic interference, the navigation worked very well near the transmission lines due to the high signal-to-noise ratio (SNR). The deviations increased with greater distance from the transmission lines. Figure 12 shows the deviation from the specified flight path and the specified pitch angle for each waypoint.  
The mean deviation from the specified flight path was 29 mm, where the maximum error was 204 mm. The mean deviation from the specified pitch angle was 0.15\({}^{\circ}\), where the maximum error was 28.4\({}^{\circ}\). The standard deviation of the pitch angle error was 4.4\({}^{\circ}\).  
Figure 13 shows the localization results for the same noise standard deviation of \(\sigma=8\,\upmu\)T when only three sensors were used, i.e., Sensor 4 at \(\vec{p}_{4}\) was excluded.  
The mean deviation from the specified flight path was 34 mm. In areas far from the transmission lines, as in this case, very strong outliers could occur occasionally, so that the maximum error was now about 2202 mm. The outliers occurred very frequently compared to the case with four sensors, as demonstrated by repeated experiments. These were not due to an incorrect calculation of the UAV position, but to an incorrect detection of the polygons. These were extremely distorted by the strong magnetic interference and could therefore hardly be distinguished from each other. This was to be expected, because the more sensors were used, the higher the noise immunity was. In practice, the UAV would carry out aerial manipulations in the vicinity of the transmission lines and would therefore be in an area with a high SNR. Therefore, it may also be possible to use only three sensors, as shown in Figure 14. The UAV started its flight near the transmission lines and then flew between the lines. Only when it then moved away did strong outliers occur. Repeated tests always led to the same result.  
Figure 12: Path and pitch angle errors, poor shielding: \(\sigma=8\,\upmu\)T.  
Figure 13: Localization quality, three sensors, \(\sigma=8\,\upmu\)T.  
In the tests, a current of 700 A was assumed. It should be mentioned that the quality of the localization depended on the current strength in the transmission lines. This in turn depended on the per capita energy consumption of the residents, which may vary from city to city. Thus, for completeness, Figure 15 shows additionally the same case as Figure 10 with a low transmission line current of 100 A.