# An Efficient Indoor Positioning Method with the External Distance Variation for Wireless Networks
## 3 External Distance Variation Methods  
In the selection mechanism, Figure 3 shows that nodes \(A\), \(B\), and \(C\) are reference nodes and that the dashed line is the external distance variation. In order to calculate positioning, four or more reference nodes are selected with closest to the positioning node and three reference nodes are finally selected. After selecting three suitable reference nodes, to calculate the average distance, \(D_{Outer}\) for any three reference nodes is shown by  
\[D_{Outer}=\frac{D_{AB}+D_{BC}+D_{AC}}{3} \tag{10}\]  
where the \(D_{AB}\), \(D_{BC}\), and \(D_{AC}\) are the distances from the three reference nodes of \(A\), \(B\), and \(C\) to the positioning node, respectively. These three reference nodes with the smallest \(\sigma_{Outer}^{2}\) are selected as the positioning estimation [23]. Then, the variation of the outer distance \(\sigma_{Outer}^{2}\) is calculated by  
\[\sigma_{Outer}^{2}=\frac{(D_{AB}-D_{Outer})^{2}+(D_{BC}-D_{Outer})^{2}+(D_{AC }-D_{Outer})^{2}}{3} \tag{11}\]  
Since the external variation is selected, unsuitable nodes may be selected to increase the probability of MSE. Figure 4 is considered for the external variation that the distances from the reference nodes deployed on the circle to the center of the circle are all the same. This model is used to explore the influence of the MSE caused by the distribution of the deployment. Figure 4 shows that four reference nodes are randomly deployed on the circle, and the smallest amount of variation and the corresponding three reference nodes will be selected through the four-to-three mechanism. The circled circle is the selected reference node. These three reference nodes are the smallest by calculating the variation and the MSE is very high here [23]. In Figure 5, there are two reference nodes that are very close to each other, and the MSE is also very high. Therefore, how to deploy the reference node to reduce the MSE is one of the key points in this paper. The MSE of the reference node deployed in Figure 6 is greatly reduced after the selection mechanism. As seen from Figures 4-6, when two of the reference nodes are very close, the value of MSE is higher. A judgment type is added to strengthen the function of the selection mechanism and to avoid selecting unsuitable deployments. Therefore, this paper proposes two conditions: first, the distance of \(\overline{AB}\), \(\overline{BC}\), and \(\overline{AC}\) is less than the threshold value \(D_{m}\); and second, the average distance of the three segments is less than the threshold value \(D_{av}\). If the selected three points of A, B, and C meet any one of the conditions, the reference points of A, B, and C are selected and eliminated. Figure 3: External distance for the external distance variation. Figure 4: Deploy four reference nodes on the circle, and select three of them. * stands for that node is not selected. Figure 5: Implementation of the four-to-three mechanism on the circle. * stands for that node is not selected. Figure 7 indicates that the selected three reference nodes are very close to each other and that the distance variation is small with higher MSE. Therefore, a conditional expression should be added to reduce the probability of this. Figure 8 supposes that the conditions are \(D_{m}\leq 20\) and \(D_{av}\leq 70\). When the distance variation is greater, the probability of relative MSE is increased. When the four reference  
Figure 6: The MSE of the reference node is greatly reduced after selection. * stands for that node is not selected. Figure 7: The relationship between the variation and MSE before conditions are added. nodes are selected through the selection mechanism, the variation of the distance between the selected three reference nodes is the smallest. The variance value of the distance can determine the deployment status of the three reference nodes.