# An Aeromagnetic Compensation Algorithm Based on Radial Basis Function Artificial Neural Network
## 2 Compensation Models and Methods  
### T-L Model  
The conversion relationship between the local coordinate system and the aircraft coordinate system is shown in Figure 1. The center of the magnetometer probe mounted on the drone is set as the origin of the coordinate system \(O\), \(x_{b}\), \(y_{b}\), and \(z_{b}\) are the coordinate axes of the aircraft coordinate system, and their distribution direction is parallel to the direction of the three axes of the magnetometer. \(x\), \(y\), and \(z\) are the spatial axes of the local coordinate system at the same origin as the aircraft coordinate system. The \(y_{c}\) axis is the projection of the \(y_{b}\) axis on the \(xOy\) plane. The flight attitude during the flight of the drone can be divided into three parts: side sliding, roll and pitch. Where, is the angle between xb axis and plane \(xOy\), is the angle between \(y_{b}\) axis and \(y_{c}\) axis, and is the angle between \(y\) axis and \(y_{c}\) axis. The local coordinate system can be rotated according to the sequence of yaws \(\psi\), pitches \(\lambda\) and rolls \(\theta\). The rotation sequence cannot be replaced at will [5]. [PERSON] and [PERSON] divide interference fields into constant interference fields, induced interference fields, and eddy current interference fields, according to their nature and causes [9]. The constant interference field (\(H_{p}\)) is caused by direct current in the ferromagnetic material and wires inside the aircraft, and its value and direction are independent of  
Figure 1: Coordinate system conversion relationship. the flight attitude of the aircraft, and the interference value is constant for the same aircraft. The induced interference field (\(H_{i}\)) is produced by the magnetization of soft magnetic or paramagnetic substances inside the aircraft by the geomagnetic field, and its magnitude and direction are closely related to the flight attitude of the aircraft and the changes of the local geomagnetic field. The eddy current interference field is generated by the metal body cutting the geomagnetic field magnetic induction line during the flight of the aircraft, and its size and direction change with the change of the geomagnetic field gradient, flight acceleration and flight action [5]. They can be represented in the aircraft coordinate system as:  
\[H_{P}=c_{1}u_{1}+c_{2}u_{2}+c_{3}u_{3} \tag{1}\]  
\[H_{i}=T(c_{4}u_{1}^{2}+c_{5}u_{1}u_{2}+c_{6}u_{1}u_{3}+c_{7}u_{2}^{2}+c_{8}u_{2 }u_{3}+c_{9}u_{3}^{2}) \tag{2}\]  
\[ \begin{array}{l}H_{ec}=T(c_{10}u_{1}u_{1}^{\prime}+c_{11}u_{2}u_{1}^{\prime}+ c_{12}u_{3}u_{1}^{\prime}+c_{13}u_{1}u_{3}^{\prime}\\ +c_{14}u_{2}u_{3}^{\prime}+c_{15}u_{3}u_{3}^{\prime}+c_{16}u_{1}u_{2}^{\prime}+ c_{17}u_{2}u_{2}^{\prime}+c_{18}u_{3}u_{2}^{\prime})\end{array}  \tag{3}\]  
\[u_{1}=\frac{T_{bx}}{T_{t}},u_{2}=\frac{T_{by}}{T_{t}},u_{3}=\frac{T_{bz}}{T_{ t}} \tag{4}\]  
\[T_{t}=\sqrt{T_{bx}^{2}+T_{by}^{2}+T_{bz}^{2}}, \tag{5}\]  
where \(T\) represents the geomagnetic field, \(c_{1}\), \(c_{2}\),......, \(c_{18}\) represents the compensation coefficient, \(u_{1}\), \(u_{2}\), and \(u_{3}\) are the cosine values of the angle between the three axes of the aircraft coordinate system and the geomagnetic field direction, \(u_{1}^{\prime}\), \(u_{2}^{\prime}\), \(u_{3}^{\prime}\) are the differentiation of \(u_{1}\), \(u_{2}\), \(u_{3}\) with respect to time \(t\), \(T_{t}\) represents the total geomagnetic field data measured by the optical pump magnetometer, \(T_{bx}\), \(T_{by}\) and \(T_{bz}\) represent the three components of the fluxgate. The accuracy of the measured data of the triaxial fluxgate magnetometer is far inferior to that of the optical pump magnetometer, and it also needs to be corrected accordingly during its installation, resulting in errors in the measured fluxgate three-component data, which indirectly affects the compensation effect. Therefore, this paper needs to make corresponding corrections to the measured fluxgate three-component data, and the correction formula is as follows:  
\[\left[