# GPS-Based Indoor/Outdoor Detection Scheme Using Machine Learning Techniques
## 3 Data Analysis
### Data Analysis  
As mentioned previously, raw GPS signals vary relative to time and place, which makes the input data complex and difficult for analyzing. The machine learning technique requires simpler input data  
Figure 1: Illustration of a 24 GPS satellite constellation in motion relative to the Earth’s rotation (Source: Wikipedia [5]). in order to extract unique features and find similar patterns. Therefore, in this study, the preprocessing phase is the most important part. We will investigate some features of raw GPS signals to identify the best way to deal with input data. * GPS signals are always available. Of the 31 GPS satellites in Earth orbit, 27 are in use. The minimum number of GPS satellites required for normal operation is 24, which means that at least seven satellites are redundant. In practice, in a defined position on the Earth's surface, at least nine satellites always available to send GPS signals to receivers. Due to this redundancy, receivers can obtain stable GPS signals anywhere on Earth, and at least two or three signals will be sufficiently strong for data collection and analysis. However, the satellites always moving; thus, tracking signals from a fixed GPS satellite is impractical. A large number of satellites is also a challenge. The transmission satellites ID changes frequently; therefore, GPS sensors cannot obtain a fixed set of satellite IDs at one time. Due to these problems, a practical approach is to measure all GPS satellites signals and ignore the individual IDs. This technique will provide at least two or three strong GPS signals in an outdoor environment and weak signals in an indoor environment in an unorganized order. * GPS signal transmission is radio-based. The GPS is a satellite-based radio navigation system; therefore, solid obstacles, such as mountains and tall buildings, can weaken and even block the signal. If the GPS sensor is in an indoor environment, the signal will be weakened and may even disconnect (Figure 2a). Based on this characteristic, indoor environments will be detected easily because the GPS signal is weakened dramatically. In the indoor environment, the GPS signal is weakening, so the navigation cannot be done with lacking information. However, that is not the case of proposed I/O detection scheme, since it based on the weakened signal of GPS satellites to identify the indoor environment. Detecting signals in an outdoor environment is more difficult because the signal may be blocked by tall buildings or mountains (Figure 2a). As shown in Figure 2b, the GPS signal is blocked by a tall building. Therefore, if we use signals from that satellite, we cannot determine if the device is indoors or outdoors. A similar situation is shown in Figure 3. Here the GPS sensor can receive signals from a satellite, even indoors. Considering these problems, we investigated another approach and determined that stronger GPS signals are more important than weak signals, and the number of GPS signals we collect is not significant. Figure 2: (**a**) GPS signal is blocked inside the building and (**b**) GPS signal is blocked by a tall building. Every mobile device has a GPS sensor. Every mobile device has a GPS sensor that receives many active GPS positions constantly. Therefore, the input data for an I/O detection application is always redundant. In addition, GPS sensors are consistent among mobile devices; thus, we can apply offline learning for our application, leading to a simple and fast calculation model. Machine learning techniques are most suitable for I/O detection. As mentioned previously, machine learning is a robust classifier technique to identify the input pattern on I/O detection applications. Machine learning has high accuracy, can use all types of input data, and is adaptable to complex input patterns. Furthermore, compared to traditional approaches, redundant GPS input data also increases the accuracy of machine learning techniques.