Wi-Fi-Based Effortless Indoor Positioning System Using IoT Sensors

Wi-Fi positioning based on fingerprinting has been considered as the most widely used technology in the field of indoor positioning. The fingerprinting database has been used as an essential part of the Wi-Fi positioning system. However, the offline phase of the calibration involves a laborious task of site analysis which involves costs and a waste of time. We offer an indoor positioning system based on the automatic generation of radio maps of the indoor environment. The proposed system does not require any effort and uses Wi-Fi compatible Internet-of-Things (IoT) sensors. Propagation loss parameters are automatically estimated from the online feedback of deployed sensors and the radio maps are updated periodically without any physical intervention. The proposed system leverages the raster maps of an environment with the wall information only, against computationally extensive techniques based on vector maps that require precise information on the length and angles of each wall. Experimental results show that the proposed system has achieved an average accuracy of 2 m, which is comparable to the survey-based Wi-Fi fingerprinting technique.


Introduction
The precise indoor location information of a mobile node with ubiquitous resources in an environment is one of the hot topics in the field of geolocation technologies today. Global Navigation Satellite Systems (GNSS) such as Global Positioning System (GPS) can only be used for outdoor location-based services (OLBS), while for indoor environments, satellite signals are strongly attenuated because of multipath effects, etc. and become unreliable for positioning indoors. As a result, many IPS solutions have been proposed so far to enable indoor location-based services (ILBS) for complex indoor environments, including hospitals, airports, shopping malls, and so on. ILBS also helps with resource management, which includes optimal deployment, locating, and monitoring of resources. IPS solutions are classified as infrastructure-based and infrastructure-free technologies. Infrastructure-based solutions primarily include Radio Frequency Identifier (RFID), RF, Bluetooth, and Ultra-Wideband (UWB) based technologies, while infrastructure-free solutions are typically based on Wi-Fi, magnetic field, motion sensors (Inertial Measurement Unit (IMU)) and vision techniques [1]. Infrastructure-free solutions are preferred because of their low cost and ease of use as compared to the infrastructure-based solutions that require costly pre-installation and configuration of specialized hardware in the environment.
Wi-Fi-based techniques are generally divided into calibration techniques and techniques without calibration [2]. An indoor environment is a hybrid environment because of the coexistence of the cases of Line-of-sight (LOS) and NON-line-of-sight (NLOS). This complexity in an indoor environment restricts the use of calibration-free techniques such as trilateration or triangulation. As a result, IPS solutions using the time of arrival (TOA) and time difference of arrival (TDOA) [3] suffer from a propagation error on several paths. In addition, the synchronization of receiver/transmitter-side times and the accuracy of short-range flight time measurements make them more difficult. The angle of arrival (AOA) technique, on the other hand, requires complex hardware for angle calculation. Position estimation using the value of the received signal strength indicator (RSSI) is a solution to avoid time synchronization problems. The Wi-Fi fingerprinting is a calibration-based technique that uses the RSSI value of APs received at a particular location. Fingerprinting is one of the most promising techniques for positioning inside a Wi-Fi environment. In addition, it is independent of the requirements for indoor maps, as well as the location of transmitters and multipath effects [4]. Fingerprinting requires pre-deployment survey of the environment, called the offline training phase, and constitute a calibrated RSSI database received at specific reference points. This calibration database is then used in the estimation of the position, called the online phase of fingerprint matching. Calibration of the fingerprinting database through the survey is a laborious task and limits the widespread adoption of this technique [5]. Numerous solutions have been proposed so far to reduce the intensity of the efforts deployed in the calibration phase of the database. These solutions mainly include crowd-sourcing techniques [6][7][8][9], interpolation to sparse reference points, and so on [10,11]. In contrast, a calibration-free path loss model technique using the map and location information of APs is also proposed in [12] to avoid the tedious task of site survey required by calibration of the Wi-Fi fingerprint database. Similarly, many other variants of fingerprinting techniques have been proposed so far. However, the main problems, namely the creation of the database, its recalibration, alerts on modifications of the infrastructures and the constant precision in position estimation using an assailable measure of the RSSI, are always in the study [13][14][15].
In this study, we are extending our approach from static radio maps generation [12] to the dynamic and effortless technique using Wi-Fi-compatible IoT sensors. Our system automatically estimates the propagation loss parameters from the online feedback of sensors deployed in the environment. Similarly, online radio maps are automatically calibrated at regular intervals using new updates. A complete system that can be implemented is presented, from the configuration to the positioning output. Our system works with simple raster maps of the environment containing only the information on the walls, instead of complex vector maps in which each length and angle must be calculated accurately. Results show that the proposed system achieves a comparable accuracy in position estimation using IoT sensors versus a Wi-Fi survey-based positioning technique. The proposed system is completely effortless and does not require the intensive task of the survey of the environment to estimate the position of a mobile node.
The rest of the document is organized as follows: Section 2 describes details of some existing systems that help Wi-Fi fingerprinting to minimize survey efforts, Section 3 presents an introduction of the proposed system, while Section 4 describes the configuration and calibration of the sensors. Section 5 gives details of the pre-processing phase and Section 6 explains how RSSI maps are generated using configuration information. Then, the experimental setup, the results and discussions, and as well as the conclusion, are provided in Sections 7-9, respectively.

Survey-Based Technique
Survey-based Wi-Fi fingerprinting technique consists of two phases: the offline phase of the database training survey and the online phase of location estimation. The training phase requires a comprehensive analysis of the environment to build an RSSI database with a certain degree of spatial granularity. It takes a lot of time to record the RSSI level at each point of the environment grid and becomes even more challenging in the working environments. Recently, many research efforts have been made to reduce this fastidious and time-consuming training phase of fingerprinting and several solutions have been proposed [2].

Interpolation-Based Systems
Some solutions using interpolation techniques with a modified path loss model at sparse reference points to reduce survey effort to a certain extent are also proposed. In [11], the author proposed a hybrid model that combines the fingerprint prediction model with a calibration procedure and provides comparable location accuracy using a few RSSI samples compared to the traditional method of fingerprinting. Triangular Interpolation and eXtrapolation (TIX) [10] uses only online Wi-Fi RSS values measured at each AP to obtain a linear mapping between RSS decay and distance, which further helps in estimating user's location using the TIX algorithm. Similarly, a Signal-Distance Map (SDM) [16] works on the same principle, whereas the mapping of distance between the AP and RSS measurements is obtained by singular value decomposition (SVD).

Crowd-Sourcing-Based Techniques
Crowd-sourcing systems use active user inputs to create an online radio map database instead of using the tedious task of creating a training database through a survey. The Organic Indoor Localization OIL [17] integrates active user input after the training phase to extend the coverage and accuracy of fingerprint location in particular areas called Voronoi regions. EZ (easy) [18] does not require any prior information about the map and the location of the transmitter and resolves the environment, peripherals' information, and distance parameters by running a genetic algorithm on RSS information reported by a background service running on mobile users. Walkie-Markie [7] also relaxes the prerequisite information of indoor RF infrastructures and attempts to generate maps of the environment using crowd-sourcing. The estimate of the Wifi-Mark in the Walkie-Markie requires a sufficient number of users who report the trajectory information of at least two sides of an AP. This is almost impossible from the point of view of the user and the architecture of the building, with corners and long continuous corridors in which it is generally not possible to move to the other side.
Recent research developments in ILBS technology use data from a wide range of sensors (inertial sensors, accelerometers, gyroscopes, magnetic sensors, etc.) to improve indoor positioning and mapping [19] using data fusion techniques [20][21][22][23]. WILL (Wireless Indoor Localization) and unLoc trace users' movements using an inertial sensor to generate a map of the environment [6,9].

Probabilistic-Packet Transmission Technique
A probabilistic approach to location estimation using the fusion of multiple radio maps is described in the Probability Map Technique (PMT) [24]. The probability map technique uses RF packet transmission to estimate the RSSI value of a transmitting mobile node on multiple receivers. This technique is closely related to our static solution for radio map generation whereas it differs from our technique in the sense, that it uses probability distribution for distance calculation and uses a triangular density function in combination with a technique of geometric correction in the localization procedure.

Model-Based Systems
A model-based indoor positioning algorithm is presented in [25] to address the absorption effects of crowded scenarios on Wi-Fi signals through an indoor canyon environment and crowed sensing is achieved by using a mobile camera with the assistance of deep Convolutional Neural Network (CNN).

Vector-Map-Based Techniques
Indoor propagation prediction methods are generally divided into two categories. In the first approach, the free space propagation model is generated by fitting an empirical or statistical propagation to the measurement data. While the second approach is based on ray tracing in which the theory of electromagnetic propagation is applied. Here are some recent techniques that use vector maps of the environment to estimate indoor propagation.

Empirical-Path Loss Technique
Empirical model based propagation predictions are simple in computation and are scalable. Here we discuss an enhanced empirical propagation model, which incorporates much of the propagation phenomena that are suggested by electromagnetic theory such as the uniform theory of diffraction (UTD). In this approach, propagation loss function has two distinct regions, the first region which is similar to free space and the second region where the effects of walls and ceiling become visible on propagation [26]. Each region has its own exponent of path loss. In addition, the dependence of the attenuation with an angle is introduced with the wall attenuation factor and the floor attenuation factor to adjust the loss of attenuation with respect to the incident angle.

Deterministic-Ray Tracing and Radiosity Technique
In deterministic models, ray tracing and radiosity are very attractive due to their accuracy. However, due to the requirement of high computational and memory resources for 3D representation, these approaches are limited to 2D representation only. In [27], the author proposed a 2D approach to optimize the deterministic model of ray tracing by limiting the number of initial rays from the source by modeling the emitter as a circle and dividing it into horizontal elementary segments of the same length. In the case of radiosity [28], for each point of a scene, radiosity is defined as the sum of the radiation emitted plus the radiation reflected and transmitted at such a point from any other point of the scene.
There are also several other techniques proposed for automating propagation prediction to solve the tedious job of the manual survey of the environment. A closely related work is an online path-loss parameter estimation approach which is discussed in [29] where a variant of the particle filter (RBPF-AGB) is used to estimate the position of the target node. In [30], the author has proposed handling LOS and NLOS cases separately using the corresponding path loss model to enhance the positioning accuracy of indoor Wi-Fi environment. In [31], the author has proposed an approach to obtain the optimal deployment pattern of APs in the indoor environment to enhance the accuracy and reduce the calibration time required to survey the environment. The number of APs and their deployment locations are estimated using a technique based on a genetic algorithm that ensures that the quality of the radio map (RM) is not degraded during the generation process of RM. In addition, the radio maps are estimated by the Multi-Wall Extended (MWE) method using an empirically obtained WAF (Wall Attenuation Factor) value to minimize the effort of the survey required for fingerprint DB calibration.
Ray tracing seems to be an attractive solution, whereas, to ensure the rays incident at a certain point we need to increase the number of rays from emitting source which brings scalability issues due to high computational cost. Similarly, radiosity, with its high computational resources, limits the type of objects in the environment and their absorption and refraction properties to control the complexity of the maps in the calculation process. We have selected empirical method as a base model in our proposed solution due to its inherent characteristics of scalability, low computational cost and acceptance of an object of various types. And most importantly, the method based on ray tracing and radiosity requires vector maps while our system works with simple raster maps and requires no information on the angle and length of objects in the environment.

Proposed Approach
In this study, we extend our approach of static path loss map generation using the raster map to more realistic dynamic online radio maps by adding IoT sensors to the environment, such as shown in Figure 1. The approaches discussed in the previous section are static in nature and generate maps only once using the permanent architecture of the environment (i.e., walls only). Considering that temporal changes and other short-term environmental changes are not addressed. To cope with such short-term changes in the Wi-Fi environment and provide a more realistic assessment of Wi-Fi signal propagation, we need active updates at particular locations in the environment. For such active updates, the proposed system uses IoT sensors equipped with Wi-Fi module as a scanning node uniformly distributed in the environment, as shown in Figure 1. Specifically, a sensor must be placed within 20 m of each AP to avoid parameter estimation based on the region [26]. We placed a sensor node at the center of two APs in a corridor and in selected rooms within the required range to develop proof of concept. These sensors analyze the environment after a defined period of time and send the RSSI scan information vector to an MQTT (Message Queuing Telemetry Transport) broker that publishes these updates to a database update subscriber. When the database subscriber receives updates from the MQTT broker, its job is to parse, format, and insert MQTT messages into the database. Next, the map generation engine collects the database information and using a pre-processed path loss template (metadata), generates a new radio map for each AP registered in the system. The radio maps are generated by estimating the RSSI at each cell of the 1m x 1m square grid on the physical surface. Creating a raster map of the environment is a simple and important step in the proposed system. Pixel maps are created from the floor plans of the real-time test bench sites used in our experiments. First, the floor plan image is resized to a known resolution, e.g., 10 pixels/m. Then, each concrete wall with white lines (RGB 255, 255, 255) and wooden partitions with gray lines (RGB 128, 128, 128) is traced on a black background (RGB 0, 0, 0). For simplicity, only two types of walls are considered. The color value of the wall is an adjustment factor for the corresponding value of WAF induced. The adjustment factor must be carefully selected according to the thickness and material of the walls or obstacles. Finally, a grayscale image map with information on the size, type, orientation, and location of each wall in pixel format is obtained. Figure 1 shows an inverse view of the resulting map for a better view. In addition, the creation of maps and the relevant details have already been explained in our static approach to generating radio maps, so we ignore the further details and refer the reader to [12]. To set up the proposed system, after configuring the IoT sensors, two phases must be performed. Phase I, metadata generation of the path loss model that assists in the efficient generation of maps. Phase II, the online RSSI map generation phase uses the metadata produced during the pre-processing phase and uses new updates from sensors to generate radio maps of the environment for each selected AP. The detailed discussion of each phase is as follows.

Sensor Setup and Calibration
For active updates of Wi-Fi signal strength from certain points in the environment, an economical ESP8266 module that offers Wi-Fi capabilities as an RSSI scan sensor node is selected. Figure 2a shows the ESP8266 module used in our system and part (b) shows the operating cycle of the sensor as a scanning node. Depending on the work cycle, when the sensor is turned on, it scans the environment a specified number of times and averages the RSSI level of each AP in range. After scanning, the sensor format the information in the scan-message shown in Figure 3a. and sends it to the MQTT server before going to sleep for a specified time interval. The configuration of a node can be updated by sending a configuration message, as shown in Figure 3b. The configuration message of the sensor node includes the number of scans (sCount), the standby time in seconds (delay) and the position information (x, y, z).   When the sensor starts sending updates to the system, this information can be used to calibrate the sensors. For sensor calibration, we simply calculate the RSSI reception difference of all sensors and the target mobile device. To this end, all the sensors and the target device are placed side by side, and the updates are saved. During this process, multiple scans of each sensor and mobile device are recorded to find the difference factor ∆p. The difference factor for a particular device is used to correct the measured RSSI value in a scan message before it is stored in the database. A graphical representation of this calibration outcome is presented in Figure 4.

Access Points and Sensor Registration
The preprocessing phase begins with the registration of APs and sensors. In this process, the proposed system needs to collect the location and RSSI information of each AP, including {A, X, Y, P 0 }, where A is the MAC address, X and Y are the location parameters, and P 0 is the RSSI of AP at the distance of 1 m. Similarly, for each sensor, the proposed system requires {A, X, Y, ∆p}, where A is the MAC address, X and Y are the location parameters and ∆p is the RSSI calibration parameter of Wi-Fi Module in the sensor. To configure sensors in the environment and register APs in the system, we have developed a mobile application that facilitates this process for a user to add the required information to the database. Figure 5 shows screenshots of three user interface forms used in the process. Figure 5a shows the image of the map. The map was created from the targeted site plan where indoor positioning is required. First, to register an AP in the system by using the map form, the user moves the cross-wires with the movement command buttons to the corresponding location of the AP and while remaining at a location where AP is deployed, press the middle button (Save Access Point button). When the user presses the middle button, the mobile device scans the environment five times and displays the average results on the AP interface shown in Figure 5b. In the list, the APs are ranked in order of highest to lowest RSSI. The user can select the corresponding AP from the list and save the information using the Add/Update button on the interface. In the same way, the user records the sensor information using the sensor interface form, as shown in Figure 5c. The result of this registration process is shown in Figure 1 where APs are marked in orange color, while the sensors are marked with blue circles.

WAF and Path Loss Constant Estimation
The next step is to estimate the path loss constant of the environment and the attenuation factor of the walls. To this end, the proposed system uses the Particle Swarm Optimization (PSO) algorithm to estimate the two parameters [32]. Before executing the algorithm, we make sure to have a pixel map with a known resolution (i.e., pixels per meter) that we have created from floor plans of the building under experiment. On the maps, each concrete wall is represented by a white line (RGB 255, 255, 255) and a wooden partition by a gray line (RGB 128, 128, 128) on a black background (RGB 0, 0, 0). Doors and windows are also added with a gray color to display open and closed states to equalize the unpredictability error. The different pixel colors, ranging from 0 to 255 represents the range of materials in the environment. Here, two materials are presumed for the sake of simplicity. Figure 6 shows the lines emerging from each sensor to the corresponding visible APs at both sites. The pixel values beneath these lines help to count the number of walls as an abstraction between the sensor location and the AP location. Figure 6b presents a special case in which two APs are out of the reach of any sensor due to the low reception power of the sensor and the low transmission power of the access points (AP (DRCHO): −38 and AP (hpsetup): −42). Now, to calculate the WAF and the path loss constant (PLC), the following information is used: where, MAP is pixel map, RSSI is the signal strength measure at sensor location, X AP i , Y AP i are locations of AP, P 0 is RSSI of AP at 1 m distance, X S j , Y S j are locations of sensor, X1 is value parameter for path loss constant, X2 is value parameter for wall attenuation factor.
The information given in Equation (1) from each update is passed to the cost function of the PSO algorithm. The cost function is composed of Equation (1) to Equation (6).  PSO algorithm iterates values from 1 to 10 for the unknowns X1 and X2 as path loss constant r and wall attenuation factor WAF and generates the output as the best solution with the lowest cost, as shown in Figure 7. Instead of calculating the single-path loss constant for the whole site, the proposed system calculates separately for each case (LOS and NLOS) to a better control of the estimate of the propagation change in the environment.

Radio Map Metadata Generation
The last step of the first phase is the generation of metadata for the radio map of each AP. In this step, the proposed system defines the coverage area of each sensor and the corresponding AP on the site-map for generating radio maps. And most importantly, the preparation of metadata is done to reduce the computing resources required for Phase II, i.e., the generation of online RSSI maps. To generate a radio map of an AP at a resolution of 1 square meter, the proposed system needs the following information at each cell of the grid (x, y).
where MAC AP is MAC address of AP, P 0 is RSSI at 1 m distance from AP, (X,Y) are position coordinates of center of a grid cell, MAC S , d S i , EPL S i , RSSI S are parameters of a sensor i.e., MAC address, distance from AP, Effective Path Loss, and RSSI recorded by the sensor, respectively. These settings help the RSSI calculation at a particular grid cell. Figure 8 shows the problem of selection of the coverage area in the map estimation between AP and a sensor for points to the LOS criteria for both. There are many ways to choose the coverage area of each sensor in the radio map estimation of an AP, i.e., the shortest distance, the LOS and NLOS criteria, and minimal path loss. In this paper, the minimum path loss is considered. To select the contributing sensor in the RSSI estimate at a particular point, the proposed system calculates a path loss map for each sensor and the corresponding AP. Equations (8) and (9) help to calculate the path loss map, as shown in Figure 9. Similarly, the proposed system calculates path loss map pl Map AP for each AP. Next Equation (10) shows the path loss map which is the combination of the minimum path loss at each cell of the grid, either by a sensor or by an AP. Equations (11)- (14) help find the Mask S i that indicates the contribution area of each sensor radio map corresponding to the AP. Finally, the proposed system gets Mask i using Equation (15) that helps to identify the sensor or AP information to estimate the RSSI at a particular grid cell. It helps to optimize the IT resources required for the online phase of map generation. Figure 10a shows the combination of the minimum path loss and the part (b) represents the mask that defines the coverage area of the AP and sensors to participate in RSSI estimation. In the case of the AP, the RSSI estimation is made using the simple log to distance formula using its power at one meter, while in the case of the sensor, the RSSI estimation is made using the RSSI value present in the sensor's feedback of a particular AP at the sensor location.

Online RSSI Map Generation (Phase II)
The second phase begins when the proposed system has collected the information given in the Equation (7) for each 1-m square RSSI block (grid cell) on the map, except the last RSSI S value that is reported by a sensor at a particular time interval. This live RSSI feedback from each sensor on the APs present in the environment brings the online feature of radio maps generation that avoids the need to calibrate and recalibrate the RSSI database required for the fingerprinting technique. Equation (16) represents the radio map of an AP as a matrix of the function f (x, y) to m × n cells of the grid. The online RSSI estimation function is determined using the Equation (17).
Moreover, to further optimize the online computations required by f (x, y), the MASK i from Equation (16) helps in reducing the decision process specified in Equation (17) to select the sensor parameters for "otherwise" case. Finally using Equation (18), the fresh radio maps of selected APs are obtained to generate the fingerprinting database of a Wi-Fi environment for positioning purpose.

Experimental Setup
Two different office sites including Information and Communication Engineering (ICE) Department and Computer Science (CS) Department are selected as real-time test-bed for our experimentation with an area of 60 × 24 m 2 and 50 × 36 m 2 , respectively, with ceiling height 3 m each. Each site area is divided at a resolution of 1 m × 1 m square per grid cell and 10 pixels/m on the pixel maps of both sites. Moreover, 13 and 14 APs permanently installed are selected in each environment and 5 and 8 sensors connected to the ceiling are deployed, respectively for the ICE and CS departments. Since the height of the ceiling at the two test sites is 3 m, the non-significant value of z-axis in our test environments, the z-axis is not considered in the calculation of the distance between the access point, the sensors and the reference points. However, for access points installed at high altitude, the z-axis must be taken into account for a correct calculation of the distance. Samsung Galaxy Tab2, Galaxy S9 + and LG G7 mobile devices are used for real-time data collection and position estimation. The Galaxy Tab2 device is used as the default target device. Fingerprinting Server is an Intel machine equipped with a Core i7 processor and 16 GB of RAM on Windows Server Edition with PostgreSQL database server.

Data Collection and Setup
To begin the experiment, first, the sensors and target mobile devices are calibrated. All devices are placed side by side at the same location and 30 scan updates are collected, with each update averaging 5 scans. The RSSI level from 15 APs in the ascending order are compared, as previously reported in Figure 4. Table 1 shows the difference between sensors and mobile devices. Afterward, sensors are deployed into the environment and selected APs are registered in the system, as explained in Section 5.1. Each sensor sends information to the system every 5 min. The time-stamped feedback of the sensors is stored in the Raw DB using the MQTT broker, as shown in Figure 11.  Figure 11. System flow diagram.
Before the system begins to create the fingerprint database (radio maps), it estimates environmental pathway loss and the WAF as described in Section 5.2. For the estimation of these attenuation parameters, the feedbacks of the sensors during the hours when the displacements are less pedestrian are selected, for example, 12 a.m. to 1 a.m. This time selection is only a precaution to calculate the parameters in a static environment in the absence of any movement of people and logistics. When the parameter estimator completes its estimate, the metadata generator produces the metadata as explained in Section 5.3 using the estimated values of the propagation parameters. Finally, the map generator starts using the metadata generated for the day and the feedback of the sensors and generates a database of fingerprints for positioning purposes. In addition, the system continues to update the radio maps at the specified interval during working hours. Each update includes the parameters calculated for a particular day once in the first hour and new RSSI updates from deployed sensor locations. The minimum maps generation interval is directly proportional to the size of the environment, the number of APs, and the minimum time required for the map generation process. Table 2 shows statistics on map generation time for both sites using the experimental setup without any optimization of the programming. The statistics clearly show that the proposed technique requires relatively few computing and memory resources, as well as good scalability.

Path Loss and Attenuation Parameters Validation
To validate the evaluation of path loss and attenuation parameters, the RSSI values estimated from the proposed system and the empirical approach are compared with the actual RSSI values collected for both LOS and NLOS cases. The Figure 12 shows the comparison of some selected access points that remain in LOS or NLOS mode along a straight path in the corridor, part (a,c) and (b,d), respectively. For this validation and comparison purpose, the real-time data at 1 × 1 m 2 grid points are collected on both sites. The graph clearly shows that the proposed system estimated RSSI values correlates better to the real time values in both cases as compare to estimation done using empirical values. The correction of the RSSI estimate using fresh sensor updates is highlighted using dark circles in Figure 12. Furthermore, to justify the accuracy of the radio maps generated using the automatically obtained environment parameters, compared to the radio maps generated using empirical parameters, the real-time RSSI values of each access point are compared to the corresponding estimated RSSI values of the empirical and proposed approach. The Table 3 summarizes the error statistics of the two techniques in the RSSI estimate against the real-time RSSI collected at particular grid points on both sites. Figure 13, shows the 2-Dimensional comparison of radio maps generated using the proposed approach and survey-based approach of selected APs for the Sites A and B, respectively. It is clear from the figure that the proposed approach works and allows the radio map to be estimated in places where access is restricted.

Map Validation
Finally, now to verify the accuracy of our radio maps, we generated the fingerprint database of both environments using the estimated RSSI values of the APs at each cell of 1 m × 1 m square grid. For the test, we selected a path that includes three lab rooms, a common room, a corridor and a stairway area for Site A, while for Site B, the selected path includes 3 corridors, a common room, and an area for stairs, as shown in Figure 14, Figure 14a,b as ground truth, respectively. Online scans are collected one meter apart along each path to verify the positioning accuracy of the system. The Table 4 shows the positioning accuracy statistics of the proposed system measured at 2nd quartile (50%), 3rd quartile (75%) and at a mean level compared to other systems. In addition, the standard deviation represents the uncertainty and the maximum error is also calculated for both sites. To the best of our knowledge the survey-based fingerprinting is the most accurate method of fingerprint database generation, therefore, Survey-based fingerprinting in combination with Enhanced Weighted K-Nearest Neighbour (EWKNN) algorithm [33] is selected to compare the position estimation accuracy of the proposed system. In addition, our static approach LOCALI [12] using empirically obtained values of r = 2 and WAF = 3.5 parameters, Crowdsourcing [6], and Ranked based [34] approaches are also included in comparison. Figure 14a,b show the ground truth, the estimated positions, and the corresponding error distance line, while parts (c) and (d) indicate the positioning error probability of the proposed system for sites A and B, respectively. The results of Table 4 and Figure 14 confirms the successful presentation of an effortless fingerprinting based positioning system, which has a precision comparable to that of a survey-based technique and surpasses performance by limiting deviation and maximum positioning error. Furthermore, the expected accuracy of our proposed system by exploiting the automatically obtained values of WAF and PLC parameters validates the correctness of the process of estimating parameter values.

Plug and Play Solution
The strength of the proposed system lies in its "plug and play" features, works with simple raster maps and does not require detailed vector-based maps in which each length and angle must be calculated accurately. Secondly, the proposed system automatically estimates the propagation parameter of the environment and takes into account the temporal propagation loss through the online feedback of the sensors. Furthermore, changing Wi-Fi configurations, such as replacing, adding, or removing APs, requires a simple update of the registration list of APs instead of a recalibration survey of the complete environment. The correct configuration information of the location and power of the transmit/receive signal of the peripherals during the recording process may be considered a weakness of the proposed system. In Table 5, the proposed solution is compared with other automatic map generation solutions to highlight the advantages and disadvantages of the proposed approach. It is clear from the supported features that the proposed approach is more robust, practical in nature, and does not require significant computing resources or human effort to create radio maps. The proposed system works with simple raster maps and automatically estimates environment-specific attenuation parameters using IoT sensor online feedback. In addition, the positioning accuracy of the proposed system is also tested by using different mobile devices on the same paths at both sites and the data collection points that were followed previously while comparing the accuracy of the proposed system to other techniques. The results in Figure 15 show that the accuracy of the system in position estimation is consistent with different mobile devices.

Conclusions
In this paper, we investigated how the proposed system uses IoT sensors for automatic assessment of path loss and attenuation parameters in a Wi-Fi environment and for estimating signal propagation in a complex indoor environment by exploiting the architecture information provided in simple raster maps. In this way, the proposed system generates and updates the fingerprint database to enable indoor position estimation for fingerprint matching algorithms. In addition, a complete system that works from registration of devices and acquisition of online feedback from IoT sensors to the generation of the fingerprinting database is presented without any survey of the whole environment, in particular for an office like environments. Results show that the proposed technique is successful in automatic generation and calibration of the fingerprinting database and provides comparable accuracy in position estimation without doing any tedious job of the survey of the real environment. Possible directions for future work are, automated registration of AP with the location, radiant power of AP at 1 m, and directional path loss parameter assessment to improve the accuracy of fingerprinting.
Incorporating deep learning based estimation of the propagation of the electromagnetic signal is another direction.