## 2 Related Work  
Numerous studies have conducted deep investigations into indoor positioning. For RSS fingerprint direction, the first step is to establish a fingerprint database, followed by the application of various classification algorithms for positioning. The channel state information (CSI) provided more fingerprint information than RSS which could improve the positioning accuracy based on the CSI, but CSI only worked with certain wireless network interface cards (NICs), such as the Intel WiFiLink 5300 MIMO NIC AtherosAR9390 or the Atheros AR9580 chipset [20]. Therefore, RSS remains a popular method for practical scenarios. Various complex algorithms and their variants have been employed to enhance the performance of WiFi-based indoor positioning. Support vector machines (SVMs) [21] are kernel-based classifiers whose use is the common method in WiFi localization. Long short-term memory (LSTM) [22] was proposed as a method for WiFi fingerprinting indoor positioning; this experimental scheme considered the relationship between a series of RSSIs. Seq2 seq [23] based on recurrent neural network (RNN) has been used in WiFi indoor positioning. The localization task can be modeled as a sequence learning problem using a recurrent neural network designed for regression outputs. Convolutional neural network (CNN)-based WiFiNet [24] leveraged the power of CNN in classification problem ability. RSS samples were converted into images and used to train the network. [PERSON] et al. [25] presented a method to improve indoor localization accuracy by utilizing generative adversarial networks (GANs) for data augmentation and semi-supervised learning techniques to effectively train deep neural networks with limited labeled data. [PERSON] et al. [26] proposed a novel indoor localization technique that leveraged graph neural networks (GNNs) to model the spatial relationships between WiFi access points and enhance positioning accuracy by effectively capturing the topological structure of RSSI data. [PERSON] et al. [27] proposed a robust indoor positioning system that used a combination of a convolutional denoising autoencoder (CDAE) and a CNN to improve the accuracy and noise resistance of WiFi fingerprint localization. Machine learning and deep learning methods in the field of WiFi indoor positioning faces challenges such as data dependency, model generalization, difficulty in obtaining labeled data, and feature extraction, affecting their application across different environments. However, with ongoing advancements and improvements in model architectures, these methods hold the potential to become highly effective solutions for indoor positioning in the future. The standard PSO method, applied to indoor fingerprint positioning, demonstrated significantly better positioning results than the WKNN method [28]. The authors presented an enhanced indoor localization method that applied a modified particle swarm optimization algorithm to improve the accuracy and reliability of WiFi-based positioning in 3 GPP indoor office environments [29]. Building on this foundation, we propose the optimized PSO model to optimize the WKNN in the WiFi portion, obtaining a preliminary positioning result. PDR is a positioning method that utilizes inertial sensors to leverage data from a person's gait for accurate location tracking. It primarily consists of three components: step detection, stride length estimation, and attitude estimation. Gait detection involves two methods: peak detection and zero-crossing detection. This paper employs the zero-crossing detection method, specifically the zero-velocity update (ZUPT) [30] technique. [PERSON] et al. [31] proposed a real-time tracking system using an adaptive ZUPT method to enhance PDR accuracy. [PERSON] et al. [32] proposed a WiFi/PDR fusion method using neural networks, leveraging the back-propagation (BP) neural network's nonlinear mapping to correct EKF approximation errors. [PERSON] et al. [33] utilized the PF to integrate WiFi, PDR, and indoor maps including wall line and corner information.