By pressing the ‘‘ADD LOCATION’’ button in Fig. 6, we can establish an indoor or outdoor location (manually selected by the user). Figure 7 shows a snapshot of adding an indoor location. The message box over the up-right corner displays the number of detected Wi-Fi APs at the location. After the user enters the name of the indoor location and presses the ‘‘Save’’ button, this location is then established in the INDOOR table. Note that during this process, users are not hassled by the problem of selecting appropriate Wi-Fi APs to be associated with the current location—the application will do it automatically. When doing Wi-Fi AP scanning, we will measure the received signal strength indicator (RSSI) of each Wi-Fi AP, which is a measurement of the power present in the received radio signal. In our current implementation, the measured RSSI of the Wi-Fi AP must be over -70 dBm to be eligible for being associated with an indoor location. The reason is that if the measured RSSI of a Wi-Fi AP is lower than -70 dBm, it normally means that the AP is far away from the Wi-Fi client (i.e., the user), and in this case, the measured RSSI can fluctuate severely. For this reason, we only associate those APs that are closer to the user, so the measured RSSI will typically be more stable. We have also measured the behavior of RSSI versus distance, which will be shown later in Sect. 4.2. Furthermore, in order to make indoor locationing more accurate, the measured RSSI values of the selected Wi-Fi APs during the location establishment procedure are saved in the AP table of the database (shown in Fig. 5c). When performing location sensing, a specific Wi-Fi AP is declared to be matched only when the measured RSSI value of this AP falls into the zone of ‘‘saved RSSI ± d’’. For simplicity, currently we use a fixed d value of 5 dBm. The concept of this methodology resembles that of the location fingerprinting approach [13], which utilizes a radio map built in the offline phase to assist locationing. That is,