# A Wi-Fi FTM-Based Indoor Positioning Method with LOS/NLOS Identification
## 1 Introduction  
The importance of indoor positioning is reflected by the increasing requirements of location-based services (LBSs). Under such a background, global researchers have proposed a lot of indoor positioning methods based on different technologies, such as wireless fidelity (Wi-Fi) [1, 2], Bluetooth [3], radio frequency identification (RFID) [4], computer vision [5], ultra-wideband (UWB) [6], infrared [7], and inertial navigation systems (INSs) [8], micro-electro-mechanical systems (MEMSs) [9], visible light [10, 11], geomagnetic fields [12, 13], and pseudolites [14, 15], among others. Among these methods, methods based on Wi-Fi have attracted much attention due to their wide distribution. They can be defined as fingerprint-based methods [16] and distance-based methods. The former can reach an accuracy of about 2 m and needs to construct a fingerprint database at the offline stage, which costs more labor and time. The latter can calculate the distance between the transceivers according to the received signal strength indicator (RSSI), then use the least square (LS), trilateral positioning, or other algorithms to derive the location. However, the RSSI, when collected at a fixed place, could be influenced by device heterogeneity and non-line-of-sight (NLOS) errors, so it is difficult to use widely. This phenomenon did not change until 2016. The fine timing measurement (FTM) protocol has been standardized by the Institute of Electrical and Electronics Engineers (IEEE) 802.11-2016 and can provide meter-level positioning accuracy [17] through time of flight (TOF) echo technology [18]. However, just like many other ranging measurements, such as UWB [19, 20] and Global Positioning System (GPS) [21, 22], one of the major challenges for positioning is the mitigation of NLOS effects. If the direct path between a fixed terminal (FT) and a mobile terminal (MT) is obstructed, the time of arrival (TOA) of the signal to the FT will be delayed, which will introduce a positive bias. The use of such TOA estimates may significantly degrade accuracy during the positioning process. Hence, it is necessary to identify NLOS signals. NLOS identification has been extensively discussed for UWB signals [23], while it has rarely been discussed for Wi-Fi signals, as only RSSIs rather than more detailed channel state information (CSI) data can be collected from Wi-Fi devices with mobile phones. Therefore, elucidating how to identify NLOS signals using RSSI has become one of the major difficulties of this work. [PERSON] [24] formulated a theoretical framework where various theoretical tests were developed for known and unknown models of NLOS errors. [PERSON] [25] calculated the distance between the coordinates of the FT and that of MT, which were obtained via pedestrian dead reckoning (PDR). Then, the obtained values were used to build two Gaussian models to identify line-of-sight (LOS) signals and NLOS signals, respectively. Considering that RSSIs will attenuate as they pass through different materials, this method may perform poorly in some environments. [PERSON] [26] determined LOS signals according to the difference of RSSI between a 2.4 GHz signal and that of a 5 GHz signal. However, the new FTM protocol that supports Wi-Fi devices can only send single-frequency signals, so this method is not suitable. Except for identification methods based on received multipath signals, some methods have been designed using the overall mobile network as their basis. [PERSON] [27] used various combinations of ranging results to evaluate the positioning and residual of an MT. The combination with a smaller residual has a larger chance of obtaining a higher accuracy. Some other NLOS error mitigation methods using the mobile network have been reported in [28; 29; 30; 31; 32; 33; 34]. This study proposes a Wi-Fi FTM-based indoor positioning method that uses LOS/NLOS identification. A Gaussian model has been built in order to identify NLOS signals. LOS signals are used to calculate the locations of an MT with an LS algorithm.