# Enconv1d Model Based on Pseudolite System for Long-Tunnel Positioning
## 3 Methodology
### Model Framework
#### 3.2.2 Spatial Feature Extraction Module  
In addition to capturing the long-term dependencies in data, as discussed in Section 3.2.1, the self-attention mechanism of Transformers is also capable of modeling global spatial dependencies. Previous studies have successfully applied Transformers in the field of image processing to address vision-related problems from a spatial perspective [28]. Based on this, we hypothesize that the encoder component of Transformers can effectively learn global spatial attributes. However, the Transformer architecture has notable limitations in capturing local features and translation invariance. These weaknesses can be addressed by Convolutional Neural Networks (CNN), which exc  
Figure 3: Multi-head attention mechanism in the encoder layer. Therefore, we incorporated a CNN module to complement the encoder by extracting locally sensitive information. The potential of the CNN for extracting and analyzing complex spatial information has been widely demonstrated in various domains, including remote sensing data analysis [59], traffic prediction [60], and indoor positioning [61]. Compared to 2D convolutions, a 1D CNN is not only better suited to the structure of pseudorange data but also offers a compact configuration that is ideal for positioning tasks requiring high real-time performance [62]. A compact configuration typically involves a shallow architecture. However, most studies suggest that shallow CNN layers can only extract simple local patterns, whereas deeper CNNs are needed to capture more abstract and complex information. To balance abstraction and compactness, we employed a 1D CNN module with multi-scale convolutional kernels to extract spatial features. This approach aims to retain a low layer count while effectively capturing multi-scale, locally sensitive information. For the selection of convolutional kernels in the multi-scale CNN, our goal is to learn spatial local features. Based on commonly used kernel sizes (1, 3, 5, and 7) in spatial feature learning, and after considering the feature extraction requirements, we prioritized the use of 1 \(\times\) 1, 3 \(\times\) 3, and 7 \(\times\) 7 as the kernel sizes, with a stride of 1. The 1-sized kernel can capture fine local features, such as subtle changes in the data. The 7-sized kernel provides a larger receptive field to extract spatial distribution features of the data over a broader range. The 3-sized kernel strikes a balance between the continuity of local features and a specific receptive field range, helping to bridge the gap between small and large scales and ensuring the model can effectively process and integrate features from different scales within local regions. Combining these three kernel sizes allows the model to perform feature extraction on 1D sequence data at multiple scales, providing more comprehensive and richer feature information for subsequent analysis and processing, thereby enhancing the model's performance. In summary, the overall spatial feature extraction module consists of a global information extraction module, a local information extraction module, and an integration output layer (depicted in the brown section of Figure 2). The module for extracting global spatial information has the same composition as the encoder layer in the temporal feature extraction module. The local spatial information extraction module is composed of a 1D CNN module with multi-scale convolutional kernels (shown in Figure 4) and encoder layers. The spatial features of the single-differenced pseudorange \(X_{out}^{Spatial}\) are obtained by concatenating the local and global spatial information, which is then passed through the output layer. Given the input data \(\Delta\rho(t)\in\mathbb{R}^{m}\) at time t, they are fed into both the global information extraction module and the local information extraction module.