# Real-Time Indoor Positioning Approach Using iBeacons and Smartphone Sensors  
Liu Liu  
College of Surveying and GeolInformatics, Tongji University, Shanghai 200092, China; [EMAIL_ADDRESS] (L.L. ); [EMAIL_ADDRESS] (L.Y. ); [EMAIL_ADDRESS] (T.L.) 1  
Bofeng Li  
College of Surveying and GeolInformatics, Tongji University, Shanghai 200092, China; [EMAIL_ADDRESS] (L.L. ); [EMAIL_ADDRESS] (L.Y. ); [EMAIL_ADDRESS] (T.L.) Ling Yang  
College of Surveying and GeolInformatics, Tongji University, Shanghai 200092, China; [EMAIL_ADDRESS] (L.L. ); [EMAIL_ADDRESS] (L.Y. ); [EMAIL_ADDRESS] (T.L.) 1  
Tianxia Liu  
College of Surveying and GeolInformatics, Tongji University, Shanghai 200092, China; [EMAIL_ADDRESS] (L.L. ); [EMAIL_ADDRESS] (L.Y. ); [EMAIL_ADDRESS] (T.L.) 1  
Footnote 1: email: {  
may not meet the requirement of high accuracy. In contrast, current fusion solutions for smartphone include the combinations of WiFi and PDR [6], geomagnetism/WiFi/PDR [7, 8], or WiFi/Bluetooth [9]. Their typical positioning methods include _fingerprinting_ and _trilateration_ based on RSSI of WiFi and/or Bluetooth device. These means are often employed to provide PDR with initial location. Compared to WiFi APs, a Bluetooth Low Energy (BLE) technology named _iBeacon_ has merits in low price, low energy consumption, and no requirement of Internet [10, 11]. It is ideal to support smartphone applications. However, previous research shows positioning based on iBeacon has a relatively lower accuracy than WiFi APs [12], due to the attenuation property of iBeacon signals. Although a group of studies [13, 14] has been reported on the fusion of iBeacon and PDR, the critical problem of signal fluctuation still needs to be addressed for accuracy improvement. Filtering is employed to mitigate the fluctuations of iBeacon signals, but it is only for static reference points [10, 11]. Regarding the key parameters of PDR, some researchers [13] fuse ranging data of iBeacon in an extended Kalman filter to calibrate PDR results, yet without discussion of non-line-of-sight (NLOS) conditions. In this paper, we focus on the accuracy improvement of iBeacon positioning, and also look for another fusion way of iBeacon and PDR to resist data noise. Our objective is to pursue a real-time solution of indoor positioning with a stable accuracy (e.g., 1-3 m). PDR lacks the estimate of initial location, and thus we propose an iBeacon positioning method to provide accurate coordinates (i.e., the baseline result) first. As we seek for a lightweight implementation on smartphone, trilateration is a preferable option due to its simplicity. However, its ranging accuracy often suffers from RSSI fluctuations caused by NLOS conditions. Therefore, we develop a fusion method of fingerprinting and trilateration which can mitigate ranging errors and improve the positioning accuracy of iBeacon RSSI. Another novel issue for the PDR approach is heading estimation. We develop a heading estimation method based on trajectory segmentation and a Kalman Filter (KF) fusing the measurements of heading and angular rate. According to the baseline result, PDR data are fused to correct the pedestrian's trajectory locally, especially on trajectory continuity. More specifically, we propose a fusion workflow to improve localization accuracy of smartphone. It involves received signal strength (RSS) of iBeacon and the data of accelerator and gyroscope for PDR. According to log-distance path loss model, ranging data can be transformed from the RSS between beacons and the measured location. Based on the iterative algorithm of trilateration [15], we add a weight matrix to emphasize the importance of near beacons. Real-time locations are derived by enhancing the trilateration with a specific fingerprinting result, i.e., the _BLE-based method_. During a tracking process, turns are pivotal for positioning since the walking state changes at them. To better estimate locations around turns, we segment pedestrian trajectories into linear motions in terms of turn locations.