With the rapid development of Internet technology,people began to advocate the pursuit of convenience and information lifestyle.In recent years,the demand for indoor precision positioning services has continued to grow,how to provide accurate location information for emergency assistance,traffic management and target positioning is an inevitable problem that must be solved by social progress.WiFi has gradually become the main research field of indoor positioning technology due to its advantages such as simple deployment,low cost and high universality.The movement of indoor users will affect the strength of the WiFi signal collected.For the problem that WiFi location fingerprint positioning cannot accurately track the trajectory of pedestrians,this paper uses the Inverse Distance Weighted(IDW)interpolation algorithm,when the point K(WKNN algorithm based on weighted Euclidean distance)takes different values,to estimate at the corresponding weighted coordinates signal strength value.Through the acceleration value obtained by the three-axis acceleration sensor built in the smartphone,the moving distance between the points to be located when the pedestrian moves indoors is estimated.The weighted coordinate position with a greater signal similarity to the point to be located and satisfying the distance constraint is selected as the position to be located.The main tasks are as follows:(1)The average value of the signal strength of 3 seconds continuously collected during the indoor movement is used as the signal strength value of the position of the point to be located at the intermediate time,which simplifies the calculation and improves the positioning accuracy.Through simulation comparison,it is found that the 3-second data average processing scheme improves the positioning error of the to-be-located point by 0.228 m compared with when only the 1-second signal strength value is collected at the to-be-located point for positioning.(2)For the WKNN algorithm based on weighted Euclidean distance and the WKNN positioning algorithm of adaptive K can not guarantee that the optimal value is obtained at each point to be located,this paper designs an optimal K WKNN algorithm.Using the inverse distance weight interpolation algorithm,the signal strength value at the weighted coordinates when K is a different value is estimated,and the weighted coordinate value with the highest signal strength similarity to the point to be located is used as the position of the point to be located.Through simulation,it is found that the optimal K WKNN positioning algorithm improves the average positioning error by 9.3% ~ 22.5% compared with the previous two algorithms when the sampling interval is 1.2 meters.(3)Using the built-in acceleration sensor of the smartphone to obtain the acceleration data when the pedestrian moves indoors,estimating the number of steps,step length and time of each step of the pedestrian,and calculating the moving distance corresponding during the 3-second interval,and use this distance as the pedestrian Constraint of distance between points to be located when moving indoors.(4)Since indoor pedestrians are restricted by time and space,the paper uses the obtained acceleration data to estimate the moving distance between points to be located.On the basis of the optimal K WKNN algorithm,the moving distance between the points to be located is used as the constraint condition of the weighted coordinates.This paper fully excavates the correlation between the position coordinates of pedestrians before and after indoor movement,and improves the positioning accuracy,with a sampling interval of 1.2 meters,the average positioning error is 1.5222 m,and the positioning accuracy is improved by 12.03% ~ 34.54%.The research content of this paper can provide theoretical and practical support for sensor-assisted WiFi indoor positioning system,laid the foundation for the practical application of WiFi positioning system. |