# A New Scene Sensing Model Based on Multi-Source Data from Smartphones
## 2 Materials and Methods
### Satellite Information Data Mining
\(num_{k-N}\) indicates the number of visible satellites at moment \(k-N\), and N refers to the number of calendar elements, which also determines the size of the sliding window. When processing time-series data, the selection of the time window plays a critical role, as the features in the time series depend on the window size. As shown in Figure 4b, a small time window captures finer, localized features, while a larger time window reveals broader, global changes. This approach helps provide more useful information for scene classification by capturing multi-scale data. Consequently, time-series information is typically processed using multiple time windows to capture both small- and large-scale features, which are then used for scene classification. \[\text{D\_num\_sateN}=\frac{\text{num}_{\text{k}}-\text{num}_{\text{k-N}}}{\text {N}} \tag{3}\]  
To evaluate the quality of a satellite signal, the most commonly used indicator is the carrier-to-noise ratio (CNR). The CNR is the ratio of the carrier signal power to the noise power spectral density, which is typically expressed in dBHz. This measure is crucial for assessing signal quality and the performance of the receiver. The CNR can vary significantly across different scenarios, such as indoor and outdoor environments, leading to different changes and results. Figure 5 illustrates the variation in carrier-to-noise ratio (CNR) and the difference in CNR (DCNR) of three satellites during the indoor-outdoor state switching process. In the figure, T1, T2, and T3 represent the outdoor, semi-indoor, and indoor states, respectively. The analysis of Figure 5a reveals that when transitioning from the outdoor state to the indoor state, there is a noticeable time delay in the satellite CNR with a consistent downward trend observed over a certain period. Figure 5b further indicates that during the transition from outdoor to indoor, the DCNR primarily consists of negative values for an extended duration. Conversely, in the transition from indoor to outdoor shown in Figure 5a, there is also a noticeable hysteresis effect with a steep increase in the CNR. This change results in several peaks in the DCNR, ranging from 30 to 40, as illustrated in Figure 5b. Since different satellites exhibit varying trends, amplitudes, and timings in their CNR, it is essential to minimize the impact of these inconsistencies on scene classification. To address this, the algorithm analyzes the CNR and DCNR of all visible satellites to establish a comprehensive trend. By examining the peaks in DCNR changes, the algorithm can more accurately assess the transitions between indoor and outdoor states. Additionally,  
Figure 5: Satellite signal quality map: (**a**) CNR variation and (**b**) DCNR variation. it considers the influence of sliding window size on this judgment. The definitions of the relevant formulas are as follows:  
\[\text{f(x,x+N)}=\text{sign}\Big{(}\text{cnr}_{\text{i}}^{\text{x+N}}-\text{cnr}_{ \text{i}}^{\text{x}}\Big{)}\mid\text{i}=0,1,\cdots,\text{n} \tag{4}\]  
\[\text{Peak (x,x+N)}=\text{max}\Big{(}\text{cnr}_{\text{i}}^{\text{x+N}}-\text{cnr }_{\text{i}}^{\text{x}}\Big{)}\mid\text{i}=0,1,\cdots,\text{n} \tag{5}\]  
where \(cnr_{i}^{x+N}\) denotes the CNR of the ith star at moment x, N denotes the sliding window size as well as the statistics of the percentage of ascending features, the percentage of descending features and the percentage of flat features within the sliding window. The formula can be expressed as  
\[\text{P( down )}=\frac{\text{n}-\sum_{i=1}^{\text{n}}\text{sign}(f(x,x+N )+1)}{\text{n}} \tag{6}\]  
\[\text{P}_{1}=\frac{\sum_{i=1}^{\text{n}}\text{abs}(\text{sign}(\text{f}(\text {x},\text{x+N})))}{\text{n}} \tag{7}\]  
\[\text{P( up )}=\text{P}_{1}-\text{P( down )} \tag{8}\]  
\[\text{P( hold )}=1-\text{P( up )}-\text{P( down )} \tag{9}\]