## 3 Data Collection and Experiment Analysis
### Outliers Detection for the Offline Data Based on K-Means
#### 3.2.1 Cluster Analysis  
Since only four typical feature parameters are used as the input of the machine learning model, there is no need to use methods such as Principal Components Analysis (PCA) for dimension reduction of the sample data. The feature value is normalized by a z-score to ensure that they are in the same order of magnitude. Here, different weights are assigned to the four feature parameters elaborated above for clustering calculation. Due to the possible connectivity and correlation between different GNSS signal types and the potential non-integrity of feature parameters, we will no longer constrain the value of \(k\) to 3 or 2, but judge according to the actual situation. Figure 6 demonstrates the corresponding DBI values for different values of \(k\). It can be revealed that when the value of \(k\) is 3, 4, 5, and 7, the DBI value is small with inconspicuous disparity. Hence, this paper selects the number of clusters from these four groups of values. It is worth noting that due to the incompleteness of feature parameters, the complexity of environmental influences and the fuzzy correlation between signal types, the number of clusters do not necessarily correspond strictly to the type of signal (three types of LOS/Multipath/NLOS); that is, 3 is not necessarily the optimal value of \(k\). Here only the value of DBI is used as a reference for us to determine the value of \(k\). \(k=3\) is great, but if the DBI value of \(k>3\) is also low, we will also consider it. In this case, we can think of them as clusters with varying degrees of signal interference. Due to the existence of inertial measurement data in tightly combined positioning, we do not need to care too much about  
Figure 5: GPS/BDS sky map and observation signal-to-noise ratio. Figure 6: DBI values of clustering results correspond to different \(k\) values. the perfect value of \(k\) as in GNSS alone positioning for the time being. A slightly larger division of GNSS signals into multipath /NLOS will not cause the underdetermination of the tightly combined observation equation. Figure 7 shows the visualization graphics of the clustering results corresponding to different \(k\) values in the three-dimensional feature space. In general, the larger the value of \(k\), the smaller the number of observations in the dataset that are not disturbed by multipath and NLOS signals. For example, when \(k\) is 3, we know from observation in Figure 7, and from experience, that the number of line-of-sight (LOS) observations is 7807, and the number of samples of the other two clusters is 3646 and 1. When \(k\) is 7, the number of LOS observations is reduced to 6563. Since the larger \(k\) is, the smaller is the number of LOS observations, if only the LOS observations are retained during the positioning process, the risk of \(k=3\) lies in missed detection, and the false detection rate will increase when \(k=7\). Considering that there is no extraordinary explicit boundary between the observation data of different characteristics, this paper chooses a relatively compromised method that the value of \(k\) is set to 5. This way can alleviate the probability that observations are contaminated by multipath and NLOS, which are mixed into the LOS clusters during the clustering process; thus, it can avoid a reduction in the accuracy of GNSS/INS tightly coupled positioning. Furthermore, based on the existence of INS observation data, positioning results can be output, despite an insufficient number of LOS satellites. At this time, the number of samples of LOS observations is 7286. Figure 8 further expresses the distribution pattern of the clustering results under four different feature parameters when \(k=5\). The diagonal represents the probability  
Figure 7: Clustering effect illustration based on different \(k\) values. distribution of the sample points of different clusters on the variable. Additionally, the off diagonal represents the horizontal distribution of the sample points on the corresponding two-dimensional feature.