Smartphone-based indoor navigation systems are becoming increasingly popular in a variety of applications. However, localization accuracy has always been a challenge. The Kalman filter (KF) is a well-known estimation in the Bayesian framework, but can only deal with linear problems and Gaussian models. A particle filter (PF) is another essential estimation tool in a Bayesian system. However, a critical challenge with PF is the problem of particle degradation after resampling. To mitigate the particle degradation problem in PF, unsupervised learning based on k-means clustering is proposed in this paper. It forms clusters of similar particles based on the sum of weights. Also, we present enhancing the PF by utilizing a map constraint and k-means clustering (PFMK) and integrating Bluetooth low energy (BLE) along with pedestrian dead reckoning (PDR) for positioning. BLE and PDR-based positioning with a map constraint lead to an increase in accuracy of at least 20% compared with a traditional PF. Moreover, the proposed unsupervised k-means approach increases the accuracy by an additional 20%, whereas the overall performance of PFMK achieves a mean error of <1.5 m in the test environments.INDEX TERMS Bluetooth low energy (BLE) beacons, indoor navigation, map constraints, particle filter, unsupervised learning.