• No results found

Fusing Different Location Sources

4.2 Using Six Contexts to Represent Life

4.2.3 Location Context

4.2.3.1 Fusing Different Location Sources

To detect location context, WiFi is mainly used alongside GPS, Bluetooth and the Base Station data. Choosing these sensors is based on the consideration of cost, range, granularity and requirements by this study such as detecting location context using GPS sensor. WiFi consumes less power than GPS. We thus would like to use more WiFi than GPS. However, WiFi has less accuracy than GPS. To save the power and improve the accuracy, we designed an approach to combine the WiFi with GPS.

The Media Access Control address (MAC address) is a unique identifier for the WiFi network. In this study, we do not transmit WiFi MAC addresses to physical

93

locations on smartphone, but only when they are uploaded to the server. The GPS receiver stays off when WiFi hotspots are available or the user is not moving. The system will turn the GPS receiver on when the user begins to move or when a new WiFi MAC address is detected. When the server receives the WiFi and GPS data, it will match the WiFi with the GPS automatically. The process of matching the WiFi and the GPS is shown in Figure 4.4. By applying the process on WiFi data, each WiFi will match a GPS point and the accuracy will be improved when more data is received.

Figure 4.4: The progress to find coordinates for WiFi hotspots

Note: The code is implemented as SQL storage function. It runs weekly on the server. It will achieve better accuracy for each WiFi when more data collected.

Source: The author (2013)

In a study of a total of 19,147 unique WiFi MAC addresses collected by five users in a three-month period in 2011, 7,136 WiFi hotspots were obtained with the

94

latitude and longitude in less than one second and 3,754 in less than two seconds. A total of 14,628WiFi hotspots show less than one minute time gap with nearest GPS point and are used in this study.

There are two types of WiFi. One is fixed, such as the wireless network at one house. The other one is embedded in portable devices which can move, such as laptops and smartphones called “portable hotspot”. Obviously, the portable WiFi hotspots cannot be used for detecting location context. They need to be separated from fixed WiFi hotspots. In this system, two approaches are used to detect portable WiFi hotspots.

Firstly, we use the distance threshold. For each WiFi MAC address, GPS may be collected more than three times at different time points (usually on different days). Three distances are calculated between two GPS locations out of three. If two distances values are larger than 200 meters, this WiFi is seen as a portable WiFi hotspot. It is put in the portable WiFi list which will not be used for location context detection. That WiFi hotspot will be ignored when it appears next time.

Secondly, we compare the adjacent WiFi hotspots. For each WiFi hotspot, its adjacent WiFi hotspot list is collected twice at two time points (usually on different days). If its adjacent WiFi list is completely different from the other one, this WiFi hotspot is seen as a portable WiFi hotspot. Similarly, its MAC address will be put in the portable WiFi hotspot list and will be ignored when it appears next time.

In past research, some scientists have tried to use Blutooth to detect a user’s location (Mizuno et al., 2007). In this study, 17,090 unique Bluetooth data was collected as shown in Table 4.2. In the Bluetooth data, only 245 Bluetooth in desktops are used to detect location context in this study as they are fixed to a place.

95

9,784 Bluetooth data were found to be embedded on 4,114 smartphones. 570 laptops were detected. As smartphones and laptops are movable, these Bluetooth data are not used in this study.

Table 4.2: The statistics of all types of collected Bluetooth data

Number Device Type Number Device Type

59 0(MISC) 87 528(MODEM_OR_GATEWAY) 1 1344(Unknown) 1 16 (Unknown) 3 768(NETWORKING ) 12 1408 (Unknown) 13 256(UNCATEGORIZ ED ) 1 1024(AUDIO OR VIDEO UNCATEGORIZED) 4 1600(Unknown) 245 260(DESKTOP) 108 1028(WEARABLE_H EADSET ) 39 1664(Unknown) 3 264(COMPUTER_SE RVER ) 1,738 1032(AUDIO OR VIDEO HANDSFREE) 1 1796(WEARABLE_W RIST_WATCH ) 570 268(LAPTOP) 1 1044(LOUDSPEAKE R) 2 3584(Unknown) 17 272(HANDHELD_PC

_PDA) 12 1052(PORTABLE AUDIO)

1 4352(Unknown) 24 276(PDA) 2 1060(SET_TOP_BOX ) 1 5544(Unknown) 9,784 516(PHONE_CELLU LAR) 70 1084(DISPLAY AND LOUDSPEAKER) 98 7936(UNCATEGORI ZED) 75 520(PHONE_CORDLESS) 1 1280(PERIPHERAL) 4,114 524(PHONE_SMART) 3 1288(Unknown)

Note: The “Unknown” types of data can be distinguished according to their ID number in the front. They were collected from the devices which are not defined on

developer.android.com

Previous research has shown that locating using mobile phone Base Stations is not very accurate especially when only one Base Station is acquired (Liu et al.,

96

2007). However, mobile phone Base Station signals can cover most of a country. Therefore, in this study, when other locating sources are not available, mobile phones’ Base Stations are used. The steps to identify the user’s location using Base Stations are described below:

1. List all the location clusters (cluster algorithm will be described in the next section) which have the same mobile phone Base Station ID.

2. Order all selected clusters by the total duration of user linger time.

3. The centre point of the cluster where the user spent the longest time will be chosen as the location.