Hostname: page-component-78c5997874-lj6df Total loading time: 0 Render date: 2024-11-17T15:13:13.723Z Has data issue: false hasContentIssue false

A hybrid indoor/outdoor detection approach for smartphone-based seamless positioning

Published online by Cambridge University Press:  26 April 2022

Yuntian Brian Bai*
Affiliation:
School of Science, STEM College, RMIT University, Melbourne, Australia
Lucas Holden
Affiliation:
School of Science, STEM College, RMIT University, Melbourne, Australia
Allison Kealy
Affiliation:
School of Science, STEM College, RMIT University, Melbourne, Australia
Safoora Zaminpardaz
Affiliation:
School of Science, STEM College, RMIT University, Melbourne, Australia
Suelynn Choy
Affiliation:
School of Science, STEM College, RMIT University, Melbourne, Australia
*
*Corresponding author. Yuntian Brian Bai, E-mail: [email protected]
Rights & Permissions [Opens in a new window]

Abstract

Indoor/Outdoor (IO) detection (IOD) using Wi-Fi- and smartphone-based technologies is in high demand and interest in both the industrial and research fields. This paper proposes a novel and effective hybrid IOD (HIOD) approach for detecting a smartphone user's IO location. The HIOD approach uses signals received from both Wi-Fi and GPS as well as the latest positioning technologies such as multilateration, fingerprinting and machine learning. This paper proposes and implements two-level signal-to-noise ratio (SNR) threshold parameters for the first time, which are specifically derived from GPS signals through 42 empirical tests at seven test sites with adequate environmental factors considered. Using the newly derived IOD threshold parameters and a set of IO detection rules, the HIOD approach is then tested at 20 test points (TPs) in a city canyon area, where most of the TPs are under semi-indoor or semi-outdoor conditions. The final test results show that a 100% IOD rate is achieved.

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution, and reproduction in any medium, provided the original work is properly cited.
Copyright
Copyright © The Author(s), 2022. Published by Cambridge University Press on behalf of The Royal Institute of Navigation

1. Introduction

The number of global smartphone users has reached 3⋅8 billion (May 2021), approaching half of the world's population (Deyan, Reference Deyan2021; Turner, Reference Turner2021). This has led to a high demand for smartphone-based positioning applications, particularly since most people carry their smartphones on them throughout their daily activities. The popularity of smartphones has made Wi-Fi technology the single most popular wireless network protocol of the 21st century. In fact, Wi-Fi technology now powers most home and business wireless networks and public hotspot networks (Ta, Reference Ta2018; Mitchell, Reference Mitchell2019). The combination of Global Navigation Satellite System (GNSS) positioning (for outdoors) and Wi-Fi (for indoors) forms the basis of smartphone-based seamless positioning technology. This has become the dominant technology in location-based service (LBS) and other positioning application fields due to unprecedented innovation and demand from both research organisations and the commercial industry (Donovan, Reference Donovan2013; Machowinski, Reference Machowinski2013; Mohapatra et al., Reference Mohapatra, Choudhury and Das2014; Elkhodr et al., Reference Elkhodr, Shahrestani and Cheung2016; Mareco, Reference Mareco2018). In recent years, more and more positioning systems have started to use Wi-Fi instead of GNSS positioning in urban areas due to its free availability and ease of access. The free availability of Wi-Fi makes it even more popular in many urban canyons, where GNSS signals are wholly or partly blocked.

An effective indoor and outdoor positioning system fundamentally requires a robust strategic positioning method. Positioning methods such as the Cell of Origin (COO), multilateration and fingerprinting have become the three most popular and robust positioning methods in the past two decades. Each can be selected according to specific environmental contexts such as (1) Line-Of-Sight (LOS) or None-Line-Of-Sight (NLOS) conditions; (2) the complexity of the environment; (3) the number of connected Access Points (APs) and (4) other device-related characteristics. Recently, the Time-of-Flight (TOF) has become a more accurate and robust ranging technique for Wi-Fi due to the release of the Fine-Time-Measurement (FTM) protocol in the IEEE 802⋅11mc wireless network standard (Yu et al., Reference Yu, Chen, Chen, Guo, Ye and Liu2019; Bai et al., Reference Bai, Kealy, Retscher and Holden2020). This protocol allows a smartphone user to use Wi-Fi Round-Trip-Time (RTT) technology for calculating the distance between an AP and a smartphone user. RTT significantly reduces the ranging error caused by radio signal fluctuations, and the positioning accuracy is therefore improved from approximately 5 m to a meter or sub-meter level, which is well matched with the positioning accuracy obtained from GNSS. This has promoted the integration of indoor and outdoor (IO) positioning techniques or the so-called smartphone-based seamless positioning (Diggelen et al., Reference Diggelen, Want and Wang2018). However, there still remains the challenging issue of distinguishing whether a smartphone user is located in an indoor or outdoor space so that the proper positioning algorithm can be applied accordingly (Okamoto and Chen, Reference Okamoto and Chen2015; Zhu et al., Reference Zhu, Luo, Wang, Zhao, Ning, Ke and Zhang2019). For example, if the user is indoors, then Wi-Fi can be chosen as the positioning technology. Otherwise, in an outdoor setting, GNSS or a combination of GNSS and Wi-Fi needs to be selected as the positioning technology. More detailed descriptions of this concept are illustrated in Figure 1, where only GPS is applied hereafter although other GNSS constellations may also be valid either independently or jointly.

Figure 1. An example of the typical seamless (both indoor and outdoor) positioning process

A critical requirement for the IOD is to find a set of feasible and robust criteria/algorithms that detect if an end-user is indoors or outdoors. In the real world, there are not only pure indoor and outdoor, but also semi-indoor and semi-outdoor environments. Yan et al. (Reference Yan, Diakité and Zlatanova2019) identified the four typical different environmental conditions:

  • Indoor space – broadly, a physically enclosed space, such as a building or house, is referred to as an indoor space;

  • Outdoor space – a space that is not entirely enclosed by walls, windows, doors, etc;

  • Semi-indoor space – a space covered with a roof or canopy that is related to a building and combined with indoor and outdoor climate features, usually a GPS-denied space;

  • Semi-outdoor space (or semi-open space) a space that is not entirely enclosed, including human-made structures, which moderate the effects of outdoor conditions.

Real-world environments can be very complicated. However, once the IOD problem for semi-indoor and semi-outdoor spaces can be solved, it will be much easier for indoor and outdoor environments.

Previous IOD research has attempted to detect the IO status using the Received Signal Strength Indicator (RSSI) and built-in smartphone sensors such as the accelerometer, magnetometer and light sensor (Li et al., Reference Li, Zhou, Zheng, Li and Shen2014; Li et al., Reference Li, Qin, Song, Si, Sun, Yang and Zhang2020). Some have adopted low power i-Beacon technology for IO detection (Zou et al., Reference Zou, Jiang, Luo, Zhu, Lu and Xie2016). Chen et al. presented an IOD approach only using the number of available GPS satellites (Chen and Tan, Reference Chen and Tan2017). Gao et al. described an IOD technique using 25 dB-Hz as a threshold of the carrier-power to the noise-density ratio (CNR: signal-to-noise ratio of a modulated signal) to distinguish the IO conditions (Gao and Groves, Reference Gao and Groves2018). Other researchers have also explored light sensors, machine learning and sound-based reverberation patterns for the IOD process (Bhargava et al., Reference Bhargava, Gramsky and Agrawala2014; Sung et al., Reference Sung, Jung and Han2015; Zhu et al., Reference Zhu, Luo, Wang, Zhao, Ning, Ke and Zhang2019). All these studies have shown that it is relatively easier to conduct the IOD process in a pure outdoor (or so-called open-air) or indoor space but much more challenging in semi-indoor and semi-outdoor areas (Gao and Groves, Reference Gao and Groves2018; Zhu et al., Reference Zhu, Luo, Wang, Zhao, Ning, Ke and Zhang2019). In practice, none of the methods mentioned above are perfect for the IOD process under semi-indoor or semi-outdoor conditions.

This paper presents a hybrid IOD (HIOD) approach using Wi-Fi, GPS and smartphone technologies with careful consideration of the end-users environment. Devices and techniques such as Wi-Fi APs, RSSI, the number of connected APs or satellites and GPS Signal-to-Noise Ratio (SNR) are comprehensively investigated and tested for their suitability in the new approach. This includes an analysis of the RTT-based ranging estimations under the LOS and NLOS conditions. The rest of the paper is outlined as follows: in Section II, the positioning methods and specific technologies involved in this approach are introduced; then, the newly developed IOD approach is presented. Section III proposes two critical threshold parameters, the SNR_I and SNR_O parameters. Their empirical values are determined through 42 experimental tests at seven different sites. Section IV presents the details of testing and evaluation of the HIOD approach at ten outdoor Test Points (TPs) and ten indoor TPs. Conclusions and further work are presented in Section V.

2. Methodology

Several challenging urban canyon sites were selected for this research. Further, before investigating the HIOD approach, selection of the primary positioning methodology (that must be suitable for the environmental conditions) and appropriate positioning technologies were required. In this research, the RTT technology was selected for Wi-Fi-based range measurement (Bai et al., Reference Bai, Kealy and Holden2021; Gentner et al., Reference Gentner, Ulmschneider, Kuehner and Dammann2020), which has been shown to be more straightforward for integration with GPS measurements. A common coordinate system for indoor and outdoor positioning must also be defined. Finally, the most suitable positioning optimisation algorithm that best integrates GPS and Wi-Fi signals must be identified. These considerations, plus a description of the final HIOD approach, will be introduced in the following sections.

2.1 Selecting a primary positioning method

Unless in exceptional cases, multilateration and fingerprinting are the two positioning methods generally selected for indoor positioning applications. Each has benefits and disadvantages in its application. Multilateration is suitable for a relatively open space, usually with a LOS condition between APs and the end user's smartphone. Research has shown that fingerprinting is a better choice for a stable complex space in which the multipath effect and NLOS condition occur (Pathak et al., Reference Pathak, Palaskar, Palaskar and Tawari2014; Bai, Reference Bai2016; Van Haute et al., Reference Van Haute, De Poorter, Crombez, Lemic, Handziski, Wirström and Moreman2016; Yaro et al., Reference Yaro, Sha'ameri and Kamel2018). In this research, multilateration was selected as the positioning method due to the following reasons:

  1. a) relatively open spaces are often available in city canyon areas, which are more suitable for multilateration applications, although the NLOS condition exists for satellite signals detection;

  2. b) it is hard to conduct the training phase of the fingerprinting method in irregular and large outdoor spaces;

  3. c) there is a lack of variation of signal transmission in most outdoor spaces for adequately implementing a fingerprinting-based positioning system.

In practice, different strategic positioning methods and technologies are involved for different positioning scenarios. For example, Wi-Fi RTT-based trilateration is designated for indoor positioning in this project. For outdoors, either GPS alone, Wi-Fi alone or a combination of Wi-Fi and GPS can be involved for positioning. Figure 1 describes this strategy. As the figure shows, the determination of IOD assessment criteria is the main focus of this paper. Some fingerprinting concepts are also used to make the IOD assessment more robust.

2.2 Ranging with Wi-Fi RTT

Wi-Fi RTT technology provides a simple and accurate way of ranging calculation, especially in an open space. The round-trip-time and estimated range between a Wi-Fi AP and the end user's smartphone (D est) for a period of mean RTT can be obtained through Equations (1) and (2) (Yu et al., Reference Yu, Chen, Chen, Guo, Ye and Liu2019):

(1)\begin{align}{t_{RTT}} & = \frac{1}{N} \left( {\mathop \sum \limits_{i = 1}^N {t_{4\_i}} - \mathop \sum \limits_{i = 1}^N {t_{1\_i}}} \right) - \frac{1}{N} \left( {\mathop \sum \limits_{i = 1}^N {t_{3{\_ _i}}} - \mathop \sum \limits_{i = 1}^N {t_{2{\_ _i}}}} \right)\end{align}
(2)\begin{align}{D_{\textrm{est}}} & = \frac{1}{2}\mathrm{\ast }{t_{RTT}}\mathrm{\ast }c\end{align}

where ${t_{RTT}}$ is the round-trip-time of the signal transmitted between the smartphone and an AP; $c$ is the signal transmission speed; ${t_{1\_i}}$ is the timestamp when the FTM framework was first sent by a Wi-Fi AP; ${t_{2\_i}}$ is the timestamp when the FTM signal arrives at the smartphone; ${t_{3\_i}}$ is the timestamp when the smartphone returns the acknowledgement signal to the AP; ${t_{4\_i}}$ is the timestamp when the acknowledgement signal is received by the AP; $N$ is the successful burst number (where $N > 0,N< B$) and B is the total burst number (i.e., burst size, B = 8 as the default value in the Android operating system (OS).

Generally, an Android Pie (Android P) or higher Android operating system is required for running the FTM. Other smartphone default settings such as the ACCESS_FINE_LOCATION, location tracking and Wi-Fi scanning permissions need to be enabled on the end-user device (Okamoto and Chen, Reference Okamoto and Chen2015). All the estimated ranges are simplified to horizontal distances in this research. No vertical distance between an access point (AP) and a user is considered in this research (Gao et al., Reference Gao, Tang and Bai2019).

2.3 Combination of the indoor and outdoor coordinate systems

A standard local coordinate system needs to be established for integrating both indoor and outdoor positioning processes seamlessly. First, an East, North and Up (ENU) local coordinate system is defined based on the universal Cartesian system. The ENU coordinates are formed from a plane tangent to the Earth surface fixed to a specific location, and hence it is sometimes known as a local tangent or local geodetic plane (see Figures 2 and 8).

Figure 2. Relationships between the local ENU and the ECEF coordinate systems

For any point (e.g., $P(\phi,\lambda,h))$ received by a smartphone, its local ENU coordinates can be obtained from the point's known latitude $(\phi )$, longitude $(\lambda )$ and height (h). A local XYZ coordinate system is defined using the same initial point of the ENU system, which is for both indoors and outdoors. To simplify the testing process, only ‘EN’ and ‘XY’ coordinates are selected, while ‘Up’ and ‘Z’ coordinates are ignored. Assuming point $P(E^{\prime},\;N^{\prime})$ is a point with known universal Cartesian coordinates $E^{\prime}$ and $N^{\prime}$ (see Figure 2), then the coordinates can be converted geometrically to the local ENU and the local XYZ coordinate systems through Equations (4) and (5).

(3)\begin{equation}(\phi ,\; \lambda ,\; h)\; = > ({X_{ecef}},\; {Y_{ecef}},\; {Z_{ecef}})\; = > (E^{\prime},\; N^{\prime},\; U^{\prime})\; = > (E,\; N,\; U)\end{equation}

The above coordinate transformations are accomplished by Equations (4)–(6); more details can be found in (Deakin and Hunter, Reference Deakin and Hunter2013; PCG, P.C.o.G. and I.C.o.S.a.M.(ICSM), 2018; A Guide to Coordinate Systems in Great Britain Geodesy & Positioning, 2020)):

(4)\begin{align}&\left[ {\begin{array}{@{}c@{}} {{X_{ecef}}}\\ {{Y_{ecef}}}\\ {{Z_{ecef}}} \end{array}} \right] = \left[ {\begin{array}{@{}c@{}} {({v + h} )\textrm{cos}\phi \; \textrm{cos}\lambda }\\ {({v + h} )\textrm{cos}\phi \; \textrm{sin}\lambda }\\ {[{v({1 - {e^2}} )+ h} ]\textrm{sin}\phi } \end{array}} \right]\end{align}
(5)\begin{align}&\left[ {\begin{array}{@{}c@{}} {E^{\prime}}\\ {N^{\prime}}\\ {U^{\prime}} \end{array}} \right] = \left[ {\begin{array}{@{}ccc@{}} { - \textrm{sin}\lambda }& {\textrm{cos}\lambda }& 0\\ { - \textrm{sin}\phi \; \textrm{cos}\lambda }& { - \textrm{sin}\phi \; \textrm{sin}\lambda }& {\textrm{cos}\phi }\\ {\textrm{cos}\phi \; \textrm{cos}\lambda }& {\textrm{cos}\phi \; \textrm{sin}\lambda }& {\textrm{sin}\phi } \end{array}} \right]\left[ {\begin{array}{@{}c@{}} {{X_{ecef}} - {X_{ref}}}\\ {{Y_{ecef}} - {Y_{ref}}}\\ {{Z_{ecef}} - {Z_{ref}}} \end{array}} \right]\end{align}

where $v = \; (a/\sqrt {(1 - {e^2}\textrm{si}{\textrm{n}^2}\phi )} )$, $\; {e^2} = 2f - {f^2}$ and $a = 6378137.0\;\textrm{m}$ is the semi-major axis of the earth based on the World Geodetic System 1984 (WGS84); f is the flattening and 1/f = 298⋅257223563; $({{X_{ecef}},\; {Y_{ecef}},\; {Z_{ecef}}} )$ are the coordinates in the Earth-Centred, Earth-Fixed (ECEF) Cartesian coordinate system; $({{X_{ref}},\; {Y_{ref}},\; {Z_{ref}}} )$ are the ECEF coordinates of the origin of $E^{\prime}N^{\prime}U^{\prime}$ coordinate system. Assuming the coordinates of the origin of the ENU coordinate system is $({E^{\prime}_0},\; {N_0},\; {U^{\prime}_0})$ in the $E^{\prime}N^{\prime}U^{\prime}$ coordinate system, then

(6)\begin{align}\left[ {\begin{array}{@{}c@{}} E\\ N\\ U \end{array}} \right] & = \left[ {\begin{array}{@{}c@{}} {E^{\prime} - {{E^{\prime}_0}}}\\ {N^{\prime} - {N^{\prime}_0}}\\ {U^{\prime} - {{U^{\prime}_0}}} \end{array}} \right]\end{align}
(7)\begin{align}\left[ {\begin{array}{@{}c@{}} {{x_G}}\\ {{y_G}} \end{array}} \right] & = \left[ {\begin{array}{@{}cc@{}} {\textrm{cos}\theta }& {\textrm{sin}\theta }\\ { - \textrm{sin}\theta }& {\textrm{cos}\theta } \end{array}} \right]\left[ {\begin{array}{@{}c@{}} E\\ N \end{array}} \right]\end{align}

where ${x_G}\;\textrm{and}\;{y_G}$ are the smartphone's GPS location measurements under the local XY coordinate system; E and N is the smartphone's GPS location measurement under the local EN coordinate system.

2.4 LS-based trilateration positioning process

Least-squares (LS) is a commonly used method for trilateration-based positioning, especially when a user is in motion or the motion parameters are untraceable. The coordinates obtained through the LS method are generally more accurate than those obtained by solving all equations algebraically (Gavin, Reference Gavin2020). Apart from the general LS application to Wi-Fi- and smartphone-based multilateration (see its implementation details in (Bai, Reference Bai2016)), it can also be used in the multilateration positioning process combining both GPS and Wi-Fi measurements. When such a combination is involved in the multilateration process, for example the combination of two Wi-Fi and one GPS measurements, the specific LS model becomes (with the assistance of Taylor series to the first-order expansion):

(8)\begin{equation}\left[ {\begin{array}{@{}cc@{}} {{x_G} - x_G^0}& {{y_G} - y_G^0}\\ {\begin{array}{@{}cc@{}} {\dfrac{{{x_{W\!1}} - {x_0}}}{{d_{W\!1}^0}}}\\ {\begin{array}{@{}cc@{}} \vdots \\ {\dfrac{{{x_{wn}} - {x_0}}}{{d_{W\!n}^0}}} \end{array}} \end{array}}& {\begin{array}{@{}cc@{}} {\dfrac{{{y_{W\!1}} - {y_0}}}{{d_{W\!1}^0}}}\\ {\begin{array}{@{}cc@{}} \vdots \\ {\dfrac{{{y_{w\!n}} - {y_0}}}{{d_{W\!n}^0}}} \end{array}} \end{array}} \end{array}}\!\! \right] \left[ {\begin{array}{@{}c@{}} {\Delta x}\\ {\Delta y} \end{array}} \right]\; = \left[ {\begin{array}{@{}c@{}} {\begin{array}{@{}c@{}} {{d_G} - d_G^0}\\ {{d_{W\!1}} - d_{W\!1}^0} \end{array}}\\ \vdots \\ {{d_{wn}} - d_{wn}^0} \end{array}} \right]\end{equation}

where

  • $d_{Wi}^0 = \sqrt {{{({{x_{wi}} - {x_0}} )}^2} + {{({{y_{wi}} - {y_0}} )}^2}}$; $i = 1, \ldots ,n$,

  • $\Delta x = x - {x_0}$;

  • $\Delta y = y - {y_0}$;

where $x\textrm{ and }y$ are the smartphone's coordinates in the local XY coordinate system, ${d_{wi}}({i = 1, \ldots ,n} )$ is the measured distance between the ${i^{th}}$ Wi-Fi AP and the smartphone, ${x_G}$ and ${y_G}$ are the smartphone's GPS location measurements in the local XY coordinate system, and ${x_{wi}}$ and ${y_{wi}}$ $({i = 1, \ldots ,n} )$ are the coordinates of the ${i^{th}}$ Wi-Fi AP in the local XY coordinate system. The initial values of ${x_0}\textrm{ and }{y_0}$ can be obtained from other methods such as simplified LS, as described by Bai et al. (Reference Bai, Kealy, Retscher and Holden2020). The initial pair of $x_G^0\textrm{ and }y_G^0$ values can be assigned to ${x_0}\textrm{ and }{y_0}$ during the first round of iteration for a particular end user's location.

Based on Equation (8), we define

\[\textrm{d}X = \left[ {\begin{array}{@{}c@{}} {\Delta x}\\ {\Delta y} \end{array}} \right];\;B = \left[ {\begin{array}{@{}cc@{}} {{x_G} - x_G^0}& {{y_G} - y_G^0}\\ {\begin{array}{@{}cc@{}} {\dfrac{{{x_{W\!1}} - {x_0}}}{{d_{W\!1}^0}}}\\ {\begin{array}{@{}c@{}} \vdots \\ {\dfrac{{{x_{wn}} - {x_0}}}{{d_{W\!n}^0}}} \end{array}} \end{array}}& {\begin{array}{@{}c@{}} {\dfrac{{{y_{W\!1}} - {y_0}}}{{d_{W\!1}^0}}}\\ {\begin{array}{@{}c@{}} \vdots \\ {\dfrac{{{y_{wn}} - {y_0}}}{{d_{W\!n}^0}}} \end{array}} \end{array}} \end{array}} \right];\;L = \left[ {\begin{array}{@{}c@{}} {\begin{array}{@{}c@{}} {{d_G} - d_G^0}\\ {{d_{W\!1}} - d_{W\!1}^0} \end{array}}\\ \vdots \\ {{d_{wn}} - d_{wn}^0} \end{array}} \right]\]

The vector $\textrm{d}X$ can be estimated using the LS method through Equation (9):

(9)\begin{equation}dX = {({B^T}B)^{ - 1}}{B^T}L\end{equation}

The final estimated end user's coordinates $(\hat{x},\hat{y})$ can then be obtained from Equation (10) when the iteration is not required:

(10)\begin{equation}\left\{ {\begin{array}{@{}c@{}} {\hat{x} = \; {x_0} + \; \Delta x}\\ {\hat{y} = \; {y_0} + \; \Delta y} \end{array}} \right.\end{equation}

2.5 Hybrid indoor and outdoor detection approach

As mentioned previously, successful IOD is critical for seamless smartphone-based positioning systems. This section proposes and describes an HIOD approach, which includes a combined use of Wi-Fi RSSI, Wi-Fi RTT-based range measurements, number of connected APs and number of interconnected satellites, as well as the SNR measurements and some valuable ideas from fingerprinting and machine learning. The hybrid approach includes three main rules ordered according to their reliability and effectiveness. The ultimate goal for all these rules is to find whether the smartphone user is located indoors or outdoors by evaluating the following:

  • Rule 1 – evaluating Wi-Fi-based ranges and RSSI values;

  • Rule 2 – evaluating the number of connected satellites and their SNR values;

  • Rule 3 – evaluating the number of connected APs, the numbers of available satellites and their corresponding SNR values, and comparing the current machine learning model (CML) and the latest machine-learning pattern (MLP).

Each of the rules has its own emphasis, and they are processed orderly during the IOD process. Rule 1 is the most straightforward rule, and it is processed first, followed by Rule 2, then Rule 3 (see Figure 3). Three critical parameters in the HIOD model need to be determined for successful IOD. One is a valid AP selection criterion, and the other two are the threshold values of SNR_I and SNR_O. Other parameters received from the end user's smartphone are also used during the IOD process, such as:

  • the estimated Wi-Fi ranges, RSSI values and AP IDs from all connected APs, including the data received from those FTM-unsupported APs, which can be used for updating the MLP;

  • the SNR values and IDs of all connected satellites;

  • the number of connected APs and satellites (only GPS considered in this research).

A value of −71 dB is selected to be the RSSI threshold (RSS_T) for validating an AP as referred in (Bai, Reference Bai2016). The MLP database is updated each time after Rule 1 or Rule 2 is processed. Previous research has also considered using the combination of SNR and elevation (i.e., SNR_Ele) values as an IOD criterion (Okamoto and Chen, Reference Okamoto and Chen2015). In this research, the elevation was not selected for the following reasons:

  • the orders of the SNR values and elevation values are not perfectly matched, and this leads to three confusing SNR, elevation and SNR*Elevation options for satellite selection;

  • generally, a satellite with a higher elevation value also has a higher SNR value, although exceptional cases exist sometimes. Therefore, the SNR values already reflect the characteristics of signals from different satellite elevations;

  • higher computational efficiency due to the reduced complexity with the usage of SNR only.

These scenarios are explained through the three testing results listed in Table 1, where the orders for SNR, Elevation and SNR*Elevation are not exactly matched.

Figure 3. Principle of the HIOD approach

Table 1. Examples of the SNR values and their corresponding elevation values

Thus, only SNR is selected for the HIOD model. Figure 4 shows an example of the SNR values received by a smartphone, where nine satellites are detected and one SNR value per second is recorded for each satellite. Seven SNR curves are stable and have higher average values (the average SNR values are between 25 and 40 dB), whereas the other two are unstable and have lower average values (the average SNR values are between 21 and 25 dB). The testing results in Figure 4 match the real testing condition, where two satellites are partly blocked by the surrounding buildings; meanwhile, the top seven SNR curves demonstrate a smooth and stable trend even in a short period. These characteristics make the SNR values attractive for end-user's IO detection.

Figure 4. An example of SNR values received by a smartphone (approximately one-minute data collection period with nine satellites connected)

As presented in Figure 3, a unique code for each type of detection path is necessary to represent a specific IOD result. The format of the unique code pattern is R#*_I/O, where ‘R’ represents ‘Rule’; ‘#’ represents rule number; ‘*’ represents a subtype of a particular rule; ‘I’ means ‘indoor result’ and ‘O’ means ‘outdoor result’. Furthermore, two SNR threshold parameters (i.e., SNR_I and SNR_O) for IOD have been designated rather than one SNR threshold. One reason for defining two thresholds is that it is challenging for a single threshold parameter for successful IOD operation in semi-outdoor and semi-indoor environments (Gao and Groves, Reference Gao and Groves2018; Zhu et al., Reference Zhu, Luo, Wang, Zhao, Ning, Ke and Zhang2019). Also, two SNR thresholds allow identification and removal of ambiguous cases and better clarify the whole IOD process. Another reason is to improve the detection rate. Two levels of thresholds practically provide more robust IOD results by using SNR_I as the ‘indoor threshold’ and SNR_O as the ‘outdoor threshold’. Based on the above clarification, a core issue for the success of the HIOD approach is how to determine appropriate SNR_I and SNR_O values. As a novel approach and without sufficient evidence for proving and assigning a specific value to each threshold, it was decided to obtain the SNR_I and SNR_O values through a range of empirical tests (introduced in Section III).

The main principle of the MLP model is derived from pattern recognition. A number of MLP elements are stored in the database and updated continuously during the HIOD process. A comparative analysis is undertaken when an unknown IO case occurs. Each MLP element includes a set of features extracted from the previous IOD process (see Figure 5). The following prerequisite conditions are applied for the feature of MLP element selection:

  1. 1) threshold RSSI value $\ge - 81\; \textrm{dBm}$ (Bai, Reference Bai2016);

  2. 2) a maximum of six RTT-supported APs and six other normal AP's are collected. The range value is the selection criteria for RTT-supported APs, and the RSSI value is the criteria for normal APs.

Figure 5. Key components of an MLP element

3. Determination of the SNR_I and SNR_O values

It is essential to select diverse test sites to obtain convincing empirical results. Therefore, seven city canyon areas were selected (i.e., within the RMIT University city campus and Melbourne Central Train Station in Melbourne) as specific testing sites. Five of the sites can be classified as semi-indoor or semi-outdoor conditions. Their details are described in Table 2 alongside two photos for each site. The first photo shows a broader site scene and the second shows a more focused location scene. The red arrow in each case points to the smartphone's position. Three different local time periods were chosen for the tests, i.e., 10:30–11:30, 14:00–15:00 and 17:00–18:00. The empirical tests at each site were conducted in a specific period (approximately 1 min for each test). The preliminary test results from the first round of tests are summarised in Figure 6 and Table 3. A repeated round of empirical tests at each test site was also conducted. The test results are summarised accordingly in Figure 7 and Table 4. Thus, there were a total of six SNR results obtained from each TP after the two rounds of tests were completed.

Figure 6. Comparison of the SNR values obtained from the empirical tests

Figure 7. Comparison of the SNR values obtained from the repeated empirical tests

Table 2. The seven testbeds selected for the empirical tests.

Table 3. Preliminary SNR results from the empirical tests based on the seven different sites

Table 4. Preliminary SNR results from the repeated empirical tests based on the seven different sites

A few highlighted points from Figures 6 and 7 are important and can be summarised as follows:

  1. 1) the SNR values from outdoors (see the orange bar charts) are higher than the SNR values from indoors (see the blue bar charts);

  2. 2) the values from semi-indoor spaces are higher than the values from indoor spaces;

  3. 3) the SNR values from the semi-outdoor areas are lower than the value bars from an open space.

According to the above test results, a single SNR value may have higher uncertainty and not present the overall SNR level of the AP. For example, the SNR value from the G03-T4-3 test was 38 dB, much higher than the overall SNR level. This may mislead the IOD process. The average SNR values of three and five GPS connections were also compared, and the average of 5-SNR values was slightly more distinguishable than that of the 3-SNR values. Therefore, the average SNR value of five GPS connections was selected to assist in the SNR_I and SNR_O parameter determination. If the number of connected satellites is less than 5, the average SNR values of all the interconnected satellites is selected. With comprehensive analysis of the empirical results, and also considering the complexity of the semi-indoor conditions (e.g., an SNR value sometimes may be similar to a semi-outdoor SNR level when fewer obstructions exist), 25⋅0 dB and 33⋅0 dB were finally selected as the SNR_I and SNR_O values in this research. Nevertheless, the SNR_I and SNR_O values may be amended in the future when hardware and environmental factors are changed.

4. Experimental test and result discussion

4.1 Experimental IOD test

An experimental test was designated to examine the HIOD approach. The test site was selected from more than six different candidates of venues. The final test site was set up in the roof garden of Building 10, at the city campus of RMIT University, not typical but belonging to a mixed area of both semi-indoor and semi-outdoor. The test site is surrounded by tall buildings on three sides and also contains furniture and parterres here and there. The outdoor garden is under a semi-outdoor condition with parterres, benches and coffee tables. There is also an indoor room connected to the outdoor garden through a corridor. In Figure 8, T1, T2, … T10 represent the ten outdoor TPs, and P1, P2, … P10 represent the ten indoor TPs. The major hardware devices used were six CompuLab WILD routers and a Pixel 3 smartphone. The duration of data collected at each TP was approximately 1 min using an Android-based APP developed in-house. All the APs and the smartphone were placed at a vertical distance of 1⋅72 m above the ground with known X and Y coordinates for each TP. The AP1, 2 and 3 were placed outdoors, and AP 4, 5 and 6 were mounted indoors. Referring to Figure 8, all TPs were located in a semi-outdoor space; T1 through T7 were under a more complex environment, and T2 and T3 were in the worst outdoor condition for signal transmission. P3, P4, P5 and P6 can be considered to be in an indoor space, and the other indoor TPs were all in a semi-indoor space. Among those indoor TPs, as P1 and P7 were located very close to the open entrances, they were considered the hardest points for IO detection.

Figure 8. Sitemap of the test site and indoor and outdoor TPs

The SNR and Wi-Fi-based measurement results are summarised in Tables 5 and 6, respectively. For the indoor TPs, the user's IO locations at P01, 03, 04, 06, 07, 08 and 10 were recognised by Rule 1, and at P02, 05 and 09 were recognised by Rule 2; for the outdoor TPs, the user's IO locations at T01, 04–09 were recognised by Rule 2, and at T02 and T03 were recognised by Rule 3, the IO location at T10 was recognised by Rule 1. All IO detection results from the 20 TPs are shown in Table 7, and the correct detection rate was 100%.

Table 5. SNR measurement results received from the 20 TPs

Table 6. Measurement results of the estimated distances and RSSI values from the 20 TPs

Table 7. The final test results from HIOD

4.2 Discussion

As shown in Table 7, 70% of the indoor IO locations were recognised by Rule 1, and 30% were recognised by Rule 2. Conversely, 70% of the outdoor IO locations were recognised by Rule 2, 20% by Rule 3, and 10% by Rule 1. Compared to Rule 3, Rules 1 and 2 are computationally simpler but more robust. Fortunately, 90% of the IOD tasks were achieved by Rule 1 and Rule 2, which significantly reduced the processing time and improved the IOD efficiency without complicated calculations (see Table 8). Table 8 also indicates that Rule 1 is generally the principal function for indoor detection, and Rule 2 is for outdoor detection, whereas exceptional cases often exist for those TPs under worse conditions. For example, the HIOD processes at T2, T3 and P2 were not straightforward but required the involvement of additional rules.

Table 8. The HIOD occupation probabilities with Rules 1, 2 and 3

5. Conclusions and further work

This paper presents a novel HIOD approach for recognising whether a smartphone user is located either indoors or outdoors through a set of rules. The HIOD approach provided a feasible and effective user IOD model using the available smartphone sensors, front-edge positioning and range estimation technologies. The HIOD approach mainly adopted the multilateration positioning method, and also considered the ideas from fingerprinting and machine learning. It not only used the latest Wi-Fi ranging measurement technology (i.e., the FTM technology) but also absorbed the essence of traditional Wi-Fi RSSI. Meanwhile, various surrounding environmental factors were also carefully considered, including a two-level SNR threshold concept proposed for the first time. In addition, the received Wi-Fi and GPS signals were also organically integrated. The final experimental results showed that the HIOD approach achieved a 100% IO detection rate.

In the future, the HIOD approach will be further examined using more smartphones and under kinematic status.

Competing interests

None.

Acknowledgements

The authors want to thank Simon Fuller and Jenni Tomkinson for their support during the experimental tests.

References

Bai, Y. B. (2016). Development of a Wi-Fi and RFID Based Indoor Location and Mobility Tracking System. Melbourne, Australia: RMIT University.Google Scholar
Bai, Y. B., Kealy, A. and Holden, L. (2021). Evaluation and correction of smartphone-based fine time range measurements. International Journal of Image and Data Fusion, 12(3), 185202.Google Scholar
Bai, Y. B., Kealy, A., Retscher, G. and Holden, L. (2020). A Comparative Evaluation of Wi-Fi RTT and GPS Based PositioningSydney, Australia.Google Scholar
Bhargava, P., Gramsky, N. and Agrawala, A. (2014). Senseme: A System for Continuous, On-Device, and Multi-Dimensional Context and Activity Recognition. In Proceedings of the 11th international conference on Mobile and ubiquitous systems: Computing. Networking and Services.Google Scholar
Chen, K. and Tan, G. (2017). SatProbe: Low-Energy and Fast Indoor/Outdoor Detection Based on raw GPS Processing. In IEEE INFOCOM 2017-IEEE Conference on Computer Communications. IEEE.CrossRefGoogle Scholar
Deakin, R. E. and Hunter, M. N. (2013). Geometric Geodesy Part A. Melbourne, Australia: Geospatial Science, RMIT University, 8797.Google Scholar
Deyan, G. (2021). 67+ Revealing Smartphone Statistics for 2021. Techjury. Available from: https://techjury.net/blog/smartphone-usage-statistics/#grefGoogle Scholar
Diggelen, F. V., Want, R. and Wang, W. (2018). How to achieve 1-meter accuracy in android. In: GPS World, 3. Cleveland, OH: North Coast Media. Available from: https://www.gpsworld.com/how-to-achieve-1-meter-accuracy-in-android/.Google Scholar
Donovan, F. (2013). WLAN market to grow 57 percent by 2017. In: D. O. Group (ed.). eeNews Europe. Available from: https://www.eenewsanalog.com/en/wlan-market-to-grow-57-percent-by-2017/.Google Scholar
Elkhodr, M., Shahrestani, S. and Cheung, H. (2016). Emerging wireless technologies in the internet of things: A comparative study. International Journal of Wireless & Mobile Networks (IJWMN), 8(5), 6782.CrossRefGoogle Scholar
Gao, H. and Groves, P. D. (2018). Environmental context detection for adaptive navigation using GNSS measurements from a smartphone. NAVIGATION. Journal of the Institute of Navigation, 65(1), 99116.CrossRefGoogle Scholar
Gao, L., Tang, S. and Bai, Y. B. (2019). A New Approach for Wi-Fi-Based People Localisation in a Long Narrow Space. Wireless Communications and Mobile Computing. Available from: https://doi.org/10.1155/2019/9581401.Google Scholar
Gavin, H. P. (2020). The Levenberg-Marquardt Method for Nonlinear Least Squares Curve-Fitting Problems Department of Civil and Environmental Engineering, Duke University19. Available from: https://people.duke.edu/~hpgavin/ce281/lm.pdf.Google Scholar
Gentner, C., Ulmschneider, M., Kuehner, I. and Dammann, A. (2020). Wifi-rtt Indoor Positioning. In 2020 IEEE/ION Position, Location and Navigation Symposium (PLANS) (10291035). IEEE.CrossRefGoogle Scholar
Li, M., Zhou, P., Zheng, Y., Li, Z. and Shen, G. (2014). IODetector: A generic service for indoor/outdoor detection. ACM Transactions on Sensor Networks (TOSN), 11(2), 129.CrossRefGoogle Scholar
Li, S., Qin, Z., Song, H., Si, C., Sun, B., Yang, X. and Zhang, R. (2020). A lightweight and aggregated system for indoor/outdoor detection using smart devices. Future Generation Computer Systems, 107, 988997.CrossRefGoogle Scholar
Machowinski, M. (2013). New high of $4 billion for wireless LAN market in 2012. In: Wireless LAN Equipment and Wi-Fi Phones, Infonetics Research, California, USA, 5 March. Available from: https://www.ciol.com/new-usd4-bn-wireless-lan-market-2012/.Google Scholar
Mareco, D. (2018). Wi-Fi Planning: Preparing for Growth in a Mobile-First World. Charlotte, NC, USA: SecurEdge Networks. Available from: https://www.securedgenetworks.com/blog/wi-fi-planning-preparing-for-growth-in-a-mobile-first-world.Google Scholar
Mitchell, B. (2019). Introduction to Wi-Fi Wireless Networking. Lifewire (part of the Dotdash): 1500 Broadway, New York, NY 10036. p. 1–3.Google Scholar
Mohapatra, S. K., Choudhury, R. R. and Das, P. (2014). The future directions in evolving Wi-Fi: Technologies, applicaitons and services. International Journal of Next-Generation Networks (IJNGN), 6(3), 1322.CrossRefGoogle Scholar
Okamoto, M. and Chen, C. (2015). Improving GPS-Based Indoor-Outdoor Detection with Moving Direction Information From Smartphone. In UbiComp/ISWC'15 Adjunct: Adjunct Proceedings of the 2015 ACM International Joint Conference on Pervasive and Ubiquitous Computing and Proceedings of the 2015 ACM International Symposium on Wearable Computers. The Association for Computing Machinery.Google Scholar
OSGM15. A Guide to Coordinate Systems in Great Britain Geodesy & Positioning. Vol. 3.6. (2020). Southampton, United Kingdom SO16 0AS: Ordnance Survey. Available from: https://www.ordnancesurvey.co.uk/documents/resources/guide-coordinate-systems-great-britain.pdf.Google Scholar
Pathak, O., Palaskar, P., Palaskar, R. and Tawari, M. (2014). Wi-Fi indoor positioning system based on RSSI measurements from Wi-Fi access points—a trilateration approach. International Journal of Scientific & Engineering Research, 5(4), 12341238.Google Scholar
PCG, P.C.o.G. and I.C.o.S.a.M. (ICSM). (2018). Geocentric Datum of Australia 2020 Technical Manual (Version 1.2). ANZLIC COMMITTEE ON SURVEYING & MAPPING (ICSM), 22–26.Google Scholar
Sung, R., Jung, S.-h. and Han, D. (2015). Sound based indoor and outdoor environment detection for seamless positioning handover. ICT Express, 1(3), 106109.CrossRefGoogle Scholar
Ta, V. C. (2018). Smartphone-based Indoor Positioning Using Wi-Fi, Inertial Sensors and Bluetooth (Doctoral dissertation, Hanoi University of sciences (Hanoi)).Google Scholar
Turner, A. (2021). September 2021 Mobile User Statistics: Discover the Number of Phones in The World & Smartphone Penetration by Country or Region. Available from: https://www.bankmycell.com/blog/how-many-phones-are-in-the-world.Google Scholar
Van Haute, T., De Poorter, E., Crombez, P., Lemic, F., Handziski, V., Wirström, N. and Moreman, I. (2016). Performance analysis of multiple Indoor Positioning Systems in a healthcare environment. International Journal of Health Geographics, 15(1), 1–15.CrossRefGoogle Scholar
Yan, J., Diakité, A. A. and Zlatanova, S. (2019). A generic space definition framework to support seamless indoor/outdoor navigation systems. Transactions in GIS, 23(6), 12731295.CrossRefGoogle Scholar
Yaro, A. S., Sha'ameri, A. Z. and Kamel, N. (2018). Position estimation error performance model for a minimum configuration 3-D multilateration. International Journal on Electrical Engineering and Informatics, 10(1), 153169.CrossRefGoogle Scholar
Yu, Y., Chen, R., Chen, L., Guo, G., Ye, F. and Liu, Z. (2019). A robust dead reckoning algorithm based on Wi-Fi FTM and multiple sensors. Remote Sensing, 11(5), 504.CrossRefGoogle Scholar
Zhu, Y., Luo, H., Wang, Q., Zhao, F., Ning, B., Ke, Q. and Zhang, C. (2019). A fast indoor/outdoor transition detection algorithm based on machine learning. Sensors, 19(4), 786.CrossRefGoogle ScholarPubMed
Zou, H., Jiang, H., Luo, Y., Zhu, J., Lu, X. and Xie, Lx. (2016). Bluedetect: An ibeacon-enabled scheme for accurate and energy-efficient indoor-outdoor detection and seamless location-based service. Sensors, 16(2), 268.CrossRefGoogle ScholarPubMed
Figure 0

Figure 1. An example of the typical seamless (both indoor and outdoor) positioning process

Figure 1

Figure 2. Relationships between the local ENU and the ECEF coordinate systems

Figure 2

Figure 3. Principle of the HIOD approach

Figure 3

Table 1. Examples of the SNR values and their corresponding elevation values

Figure 4

Figure 4. An example of SNR values received by a smartphone (approximately one-minute data collection period with nine satellites connected)

Figure 5

Figure 5. Key components of an MLP element

Figure 6

Figure 6. Comparison of the SNR values obtained from the empirical tests

Figure 7

Figure 7. Comparison of the SNR values obtained from the repeated empirical tests

Figure 8

Table 2. The seven testbeds selected for the empirical tests.

Figure 9

Table 3. Preliminary SNR results from the empirical tests based on the seven different sites

Figure 10

Table 4. Preliminary SNR results from the repeated empirical tests based on the seven different sites

Figure 11

Figure 8. Sitemap of the test site and indoor and outdoor TPs

Figure 12

Table 5. SNR measurement results received from the 20 TPs

Figure 13

Table 6. Measurement results of the estimated distances and RSSI values from the 20 TPs

Figure 14

Table 7. The final test results from HIOD

Figure 15

Table 8. The HIOD occupation probabilities with Rules 1, 2 and 3