### Magnetic target bearing vector

A magnetic target can be considered a magnetic diploe when the distance between the target and the measurement array is greater than 2.5 times the size of the target. The magnetic field generated by the magnetic diploe cat be expressed as^{19}

$${mathbf{B}} = frac{{mu_{0} }}{{4pi r^{5} }}[3({mathbf{M}} cdot {mathbf{r}}){mathbf{r}} – r^{2} {mathbf{M}}]$$

(1)

where *µ*_{0}= 4*π* ×10^{-seven} H/m is the permeability of free space. **r**= *rr*_{0} is the bearing vector. **r**_{0} is the unit vector of **r**, *r* is the size of **r**. **M**= *mmm*_{0} is the magnetic moment of the magnetic diploe. *M* is the size of **M**, **m**_{0} is the unit vector of **M** . “**.** ” presents the dot product of the vectors.

The magnitude of **B**can be calculated as

$$left| {mathbf{B}} right| = frac{mu Ms}{{4pi r^{3} }}$$

(2)

where *s* =[1 + 3(*t*)^{2}]^{1/2} and *you*= **r**_{0}**⋅m**_{0}. The magnitude of**B**can be measured by a scalar magnetometer. As can be seen in Eq. (2), |**B** | can be seen as a rotational invariant^{20}. | **B**| understands only the magnitude of**r** and magnetic target bearing information cannot be obtained. In order to understand the bearing information of the magnetic target, furthermore, the parameter *s* is assumed to be a spatial constant, we calculated the gradient of | **B**| as following

$${mathbf{G}} = nabla left| {mathbf{B}} right| = – frac{3mu Ms}{{4pi r^{4} }}{mathbf{r}}_{{mathbf{0}}}$$

(3)

and the magnitude of**g**is

$$left| {mathbf{G}} right| = frac{3mu Ms}{{4pi r^{4} }}$$

(4)

According to Eqs. (3) and (4), the unit bearing vector can be calculated as

$${mathbf{r}}_{{mathbf{0}}} = – frac{{mathbf{G}}}{{left| {mathbf{G}} right|}}$$

(5)

According to Eqs. (2) and (4), the magnitude of the bearing vector can be obtained

$$r = 3frac{{left| {mathbf{B}} right|}}{{left| {mathbf{G}} right|}}$$

(6)

Therefore, the bearing vector can be expressed as

$${mathbf{r}} = r cdot {mathbf{r}}_{{mathbf{0}}} = – frac{{3left| {mathbf{B}} right|}}{{left| {mathbf{G}} right|^{2} }}{mathbf{G}}$$

(seven)

Equation (7) shows that the bearing vector can be calculated by total field | **B**| and its gradient data**g** . | **B**| and**g** both can be measured by an array of scalar magnetometers. But, in fact, the parameter*s* is not a spatial constant. Under these conditions, the gradient of | **B** | is deducted as

$${mathbf{G}} = nabla left| {mathbf{B}} right| = frac{3mu Ms}{{4pi r^{4} }}[k_{2} {mathbf{r}}_{{mathbf{0}}} – k_{1} {mathbf{m}}_{{mathbf{0}}} ]$$

(8)

where *k*_{1}=*you* / *s*^{2}, *k*_{2}= *you*^{2}/ *s*^{2}+ 1. Then the magnitude of **g**can also be obtained

$$left| {mathbf{G}} right| = frac{3mu Ms}{{4pi r^{4} }}k_{3}$$

(9)

where *k*_{3}=[1 + (1 − *t*^{2})*t*^{2}/*s*^{4}]^{1/2}. To obtain the unit bearing vector **r**_{0}we define the unit vector of **g**from eqs. (8) and (9).

$${mathbf{G}}_{{mathbf{0}}} = frac{{mathbf{G}}}{{left| {mathbf{G}} right|}} = frac{{k_{2} {mathbf{r}}_{{mathbf{0}}} – k_{1} {mathbf{m}} _{{mathbf{0}}} }}{{k_{3} }}$$

(ten)

Therefore, the unit bearing vector**r**_{0} can be deduced from Eq. (ten)

$${mathbf{r}}_{{mathbf{0}}} = frac{{k_{1} {mathbf{m}}_{{mathbf{0}}} + {mathbf{ G}}_{{mathbf{0}}} k_{3} }}{{k_{2} }}$$

(11)

The magnitude of the bearing vector can be obtained from the equations. (2) and (9)

$$r = frac{{left| {mathbf{B}} right|}}{{left| {mathbf{G}} right|}}k_{3}$$

(12)

The bearing vector can be expressed as

$${mathbf{r}} = r. {mathbf{r}}_{{mathbf{0}}} = frac{{k_{3} left| {mathbf{B}} right|}}{{left| {mathbf{G}} right|}}frac{{k_{1} {mathbf{m}}_{{mathbf{0}}} + {mathbf{G}}_{{mathbf {0}}} k_{3} }}{{k_{2} }}$$

(13)

### Iteration algorithm

As can be seen in Eq. (13), the bearing vector is determined by *k*_{1} , *k*_{2} , *k*_{3}total field | **B**| and its gradient data **g** . If we know **m**_{0} and**r**_{0}, *k*_{1} , *k*_{2} and *k*_{3}can be calculated by their definition, total field | **B**| and its gradient data **g**can be measured by an array of scalar magnetometers. Generally, the magnetic field of the magnetic target is aggravated by a hard and induced magnetic field^{21}. When the hard magnetic field is small and the induced magnetic field is the main component, the orientation of the magnetic moment of the target is parallel to the orientation of the geomagnetic field. In practice, the induced magnetic field is much more important than the hard magnetic field^{18}. In this study, only the induced magnetic field is considered. Thus, the unit magnetic moment vector **m**_{0} can be calculated based on magnetic inclination and declination, **m**_{0} can be expressed as follows

$${mathbf{m}}_{{mathbf{0}}} = [cos (I)cos (D),cos (I)sin (D),sin (I)]$$

(14)

where, *I*and *D*represent respectively the magnetic inclination and declination of the local geomagnetic field at the measurement position. Their values can be obtained from the International Geomagnetic Reference Field (IGRF).

**r**_{0} and **m**_{0} can be calculated by Eqs. (5) and (14), respectively, therefore,*k*_{1},*k*_{2}and*k*_{3}can be calculated. However, the **r**_{0} calculated by eq. (5) is an approximation because the parameter*s*is assumed to be a spatial constant. In order to improve the accuracy of the bearing vector, an iteration algorithm is used to update the**r**_{0} and the iteration algorithm pseudocode is expressed in Table 1.