## 4 Elastic Fusion Location Algorithm  
In the multiscene-switching and complex electromagnetic environment, the navigation and positioning signals received by the receiving terminal are not all direct signals. In the process of multisource fusion positioning, it is necessary to judge the availability of the current received signals and the participation rate of fusion positioning so as to complement each other and so as to achieve better navigation and positioning effects and realize seamless coverage indoors and outdoors. In the process of multisource fusion positioning, the selection of multisource data is very important. It is necessary to eliminate the positioning sources or positioning data greatly affected by the environment in order to achieve better navigation and positioning performance. For homologous data, we can analyze whether there is a large jump in the data by comparing with the previous data so as to judge whether the current data are available, that is:  
\[e_{mk}=\left\|\phi_{mk}-\phi_{m(k-1)}\right\|\text{, }e_{m(k-1)}=\left\|\phi_{mk(k-1)}- \phi_{m(k-2)}\right\| \tag{11}\]  
\(\phi_{mk}\) represents the observation of the \(m\)th sensor at time \(k\) and \(e_{mk}\) represents the observed change rate of the data of the \(m\)th sensor from time \(k-1\) to time \(k\). Our hypothesis is:  
\[Q_{mk}=\left\|e_{mk}-e_{m(k-1)}\right\| \tag{12}\]  
Compare \(Q_{mk}\) with the set threshold \(\eta_{T}\). If \(Q_{mk}\geq\eta_{T}\), it is considered that there is a jump in the data of the \(m\)th sensor at time \(k\), which needs to be eliminated; otherwise, it is available. Threshold \(\eta_{T}\) setting is related to carrier status and external environment. In the multisource elastic fusion navigation algorithm, each navigation source is regarded as a variable node, and the variable node realizes local fusion at the function node. Finally, the navigation positioning of elastic fusion is realized by constructing a weighted constraint function. Suppose the positioning result of the multisource sensor at time \(k\) is \(A_{k}=\left[a_{k1},\ldots,\allowbreak a_{km},\ldots a_{kM}\right]^{T}\), \(M\) is the number of sensors and \(a_{km}=\left[x_{km}\quad y_{km}\quad z_{km}\right]\) is the positioning result of the \(m\)th sensor at time \(k\). Suppose the fusion location result at \(k-1\) is \(a_{k-1}=\left[x_{k-1}\quad y_{k-1}\quad z_{k-1}\right]^{T}\). Set the threshold value \(\eta_{th1}\) according to the carrier moving speed and positioning time. Calculate the distance between the positioning results of \(M\) sensors at time \(k\) and the fusion positioning results at time \(k-1\), that is,  
\[b_{km}=\sqrt{\left(x_{km}-x_{k-1}\right)^{2}+\left(y_{km}-y_{k-1}\right)^{2}+ \left(z_{km}-z_{k-1}\right)^{2}} \tag{13}\]  
Compare \(b_{km}\) with the set threshold \(\eta_{th1}\). If \(b_{km}-\eta_{th1}<0\), it is considered that the positioning result of the \(m\)th sensor is available; if \(b_{km}-\eta_{th1}\geq 0\), it is considered that the positioning result of the \(m\)th sensor is not available, so the location results of unavailable sensors in the fusion location are eliminated. In the fusion location, eliminate the location results of unavailable sensors, and change the number of available sensors to \(M_{1}\). Calculate the centroid \(g_{k}\) of the positioning results of the remaining \(M_{1}\) sensors, that is:  
\[g_{k}= \begin{bmatrix}x_{k}^{\prime}\\ y_{k}^{\prime}\\ z_{k}^{\prime}\end{bmatrix} = \begin{bmatrix}\frac{x_{k+1}\cdots x_{k}+\cdots x_ {kM_{1}}}{y_{k+1}\cdots y_{kM_{1}}\cdots y_{kM_{1}}}\\ \frac{x_{k+1}\cdots x_{k}+\cdots z_{kM_{1}}}{\frac{x_{k+1}\cdots x_{kM_{1}}}{ \frac{x_{k+1}\cdots x_{kM_{1}}}{K}}}\end{bmatrix}