CN104703130B - Localization method based on indoor positioning and its device - Google Patents
Localization method based on indoor positioning and its device Download PDFInfo
- Publication number
- CN104703130B CN104703130B CN201410766028.6A CN201410766028A CN104703130B CN 104703130 B CN104703130 B CN 104703130B CN 201410766028 A CN201410766028 A CN 201410766028A CN 104703130 B CN104703130 B CN 104703130B
- Authority
- CN
- China
- Prior art keywords
- positioning
- user
- coordinates
- bluetooth base
- base station
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 230000004807 localization Effects 0.000 title 1
- 230000001133 acceleration Effects 0.000 claims abstract description 33
- 238000006073 displacement reaction Methods 0.000 claims abstract description 10
- 238000004364 calculation method Methods 0.000 claims description 25
- 238000001914 filtration Methods 0.000 claims description 23
- 238000012937 correction Methods 0.000 claims description 9
- 238000012935 Averaging Methods 0.000 claims description 5
- 230000001568 sexual effect Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 11
- 238000012545 processing Methods 0.000 description 6
- 230000001427 coherent effect Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000007429 general method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006641 stabilisation Effects 0.000 description 2
- 238000011105 stabilization Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Position Fixing By Use Of Radio Waves (AREA)
- Navigation (AREA)
Abstract
一种基于室内定位的定位方法包括:(a)接收至少两个蓝牙基站发送的数据包,以获取数据包所包含的信号强度值;(b)根据信号强度值计算至少两个蓝牙基站至一移动终端的距离值;(c)根据计算出的距离值获得持有移动终端的用户相对于蓝牙基站的定位点坐标;(d)根据加速度传感器获得用户的移动距离,且根据地磁传感器获得用户的移动方向,以获得用户的相对位移所对应的惯导定位点坐标;(e)判断用户当前是否处于移动,若是则执行步骤(f),否则执行步骤(g);(f)通过用户相对于蓝牙基站的定位点坐标对惯导定位点坐标进行多次动态补偿;(g)通过用户相对于蓝牙基站的定位点坐标替换惯导定位点坐标,以一次性补偿惯导定位点坐标。
A positioning method based on indoor positioning includes: (a) receiving data packets sent by at least two Bluetooth base stations to obtain signal strength values contained in the data packets; (b) calculating at least two Bluetooth base stations according to the signal strength values to a The distance value of the mobile terminal; (c) obtain the positioning point coordinates of the user holding the mobile terminal relative to the Bluetooth base station according to the calculated distance value; (d) obtain the user's moving distance according to the acceleration sensor, and obtain the user's location according to the geomagnetic sensor Move direction, to obtain the inertial navigation positioning point coordinates corresponding to the relative displacement of the user; (e) determine whether the user is currently moving, if so, execute step (f), otherwise execute step (g); (f) through the user relative to The positioning point coordinates of the Bluetooth base station perform multiple dynamic compensations on the inertial navigation positioning point coordinates; (g) replace the inertial navigation positioning point coordinates with the positioning point coordinates of the user relative to the Bluetooth base station, so as to compensate the inertial navigation positioning point coordinates at one time.
Description
技术领域technical field
本发明涉及室内定位技术领域,尤其涉及一种基于室内定位的定位方法及其装置,以及采用所述定位装置的一种移动终端。The present invention relates to the technical field of indoor positioning, in particular to a positioning method and device based on indoor positioning, and a mobile terminal using the positioning device.
背景技术Background technique
随着当前的科技技术的发展,GPS和手机基站的定位技术逐渐在移动终端上得到普及和使用。用户通过使用定位与导航的应用,以获得相关的便利。With the development of current technology, the positioning technology of GPS and mobile phone base stations has gradually been popularized and used on mobile terminals. Users obtain related conveniences by using positioning and navigation applications.
GPS定位技术是一种基于多个卫星发送的同步时钟进行定位的技术,而能够准确定位的前提在于,需要用户位于一能够接收卫星信号的室外开阔环境;手机基站的定位技术是一种利用多个基站发射的信号所形成的信号差进行定位的技术,该技术可适用于室内或室外,但是手机基站的定位技术存有以下问题:其定位精度不高。GPS positioning technology is a positioning technology based on synchronous clocks sent by multiple satellites. The premise of accurate positioning is that the user needs to be located in an outdoor open environment that can receive satellite signals; the positioning technology of mobile phone base stations is a technology that uses multiple This technology can be applied indoors or outdoors, but the positioning technology of mobile phone base stations has the following problems: its positioning accuracy is not high.
故,亟需提供一种适用于室内精确定位装置及方法。Therefore, there is an urgent need to provide an indoor precise positioning device and method.
发明内容Contents of the invention
本发明的目的在于,提供一种基于室内定位的定位方法,其能够通过在室内部署一定数量的蓝牙基站,以实现比较准确的室内定位,弥补了GPS和手机基站定位技术的缺陷。为了提高定位的稳定性,对获得的蓝牙基站的数据包进行过滤,鉴于过滤在改善定位稳定性的同时会引起定位延时问题,故采用蓝牙基站和惯性导航相结合的方式,以解决所存在的问题。The object of the present invention is to provide a positioning method based on indoor positioning, which can achieve relatively accurate indoor positioning by deploying a certain number of Bluetooth base stations indoors, and makes up for the defects of GPS and mobile phone base station positioning technologies. In order to improve the stability of positioning, the data packets obtained from the Bluetooth base station are filtered. In view of the fact that filtering will cause positioning delay while improving the positioning stability, a combination of Bluetooth base station and inertial navigation is used to solve the existing problems. The problem.
为了实现上述目的,本发明提供了一种基于室内定位的定位方法,其包括以下步骤:(a)接收至少两个蓝牙基站所发送的数据包,以获取所述数据包所包含的信号强度值;(b)根据信号强度值计算所述至少两个蓝牙基站至一移动终端的距离值;(c)根据计算出的距离值获得持有所述移动终端的一用户相对于蓝牙基站的定位点坐标;(d)根据一加速度传感器获得用户的移动距离,并且根据一地磁传感器获得用户的移动方向,以获得用户的相对位移所对应的惯导定位点坐标;(e)判断用户当前是否处于移动,若是,则执行步骤(f),否则执行步骤(g);(f)通过所述用户相对于蓝牙基站的定位点坐标对所述惯导定位点坐标进行多次动态补偿;(g)通过所述用户相对于蓝牙基站的定位点坐标替换所述惯导定位点坐标,以对所述惯导定位点坐标进行一次性补偿。In order to achieve the above object, the present invention provides a positioning method based on indoor positioning, which includes the following steps: (a) receiving data packets sent by at least two Bluetooth base stations to obtain the signal strength value contained in the data packets (b) calculating the distance value from the at least two bluetooth base stations to a mobile terminal according to the signal strength value; (c) obtaining the positioning point of a user holding the mobile terminal relative to the bluetooth base station according to the calculated distance value coordinates; (d) obtain the moving distance of the user according to an acceleration sensor, and obtain the moving direction of the user according to a geomagnetic sensor, so as to obtain the coordinates of the inertial positioning point corresponding to the relative displacement of the user; (e) judge whether the user is currently moving , if so, then execute step (f), otherwise execute step (g); (f) carry out multiple dynamic compensations to the inertial navigation anchor point coordinates by the anchor point coordinates of the user relative to the Bluetooth base station; (g) pass The coordinates of the positioning point of the user relative to the Bluetooth base station replace the coordinates of the positioning point of the inertial navigation, so as to perform a one-time compensation for the coordinates of the positioning point of the inertial navigation.
作为可选的技术方案,在步骤(f)中进一步包括:(f1)计算所述惯导定位点坐标与所述用户相对于蓝牙基站的定位点坐标之间的定位差值;(f2)根据一设定系数,以获得所述定位差值对应的补偿值;(f3)根据所述补偿值对所述惯导定位点坐标进行补偿修正。As an optional technical solution, step (f) further includes: (f1) calculating the positioning difference between the coordinates of the inertial navigation positioning point and the coordinates of the positioning point of the user relative to the Bluetooth base station; (f2) according to A setting coefficient to obtain a compensation value corresponding to the positioning difference; (f3) Compensating and correcting the coordinates of the inertial navigation positioning point according to the compensation value.
作为可选的技术方案,在步骤(f)中进一步包括:在一第一时间阈值内,重复依次执行步骤(f1)至步骤(f3)。As an optional technical solution, step (f) further includes: within a first time threshold, repeatedly executing step (f1) to step (f3) in sequence.
作为可选的技术方案,当所述蓝牙基站为至少三个蓝牙基站时,在步骤(c)中进一步包括:通过平面定位法和最小二乘逼近法以获得用户相对于蓝牙基站的定位点坐标。As an optional technical solution, when the bluetooth base station is at least three bluetooth base stations, step (c) further includes: obtaining the coordinates of the positioning point of the user relative to the bluetooth base station by the plane positioning method and the least squares approximation method .
作为可选的技术方案,在步骤(e)中进一步包括:通过加速度传感器获得用户的当前移动距离的变化量,以确定用户当前是否处于移动。As an optional technical solution, step (e) further includes: obtaining a change amount of the user's current moving distance through an acceleration sensor, so as to determine whether the user is currently moving.
作为可选的技术方案,在步骤(a)和步骤(b)之间进一步包括:(b1)过滤所述数据包的信号强度值;As an optional technical solution, between step (a) and step (b), further include: (b1) filtering the signal strength value of the data packet;
作为可选的技术方案,在步骤(b1)中进一步包括:(b11)建立一存储管道,以使所述数据包暂存于其中;(b12)当经过一第二时间阈值后,从所述存储管道中获取相应的第一数据包,并且获取所述第二时间阈值至一第三时间阈值期间所对应的第二数据包,其中所述第二时间阈值发生在所述第三时间阈值之后;(b13)通过平均法对第一数据包和第二数据包所形成的第三数据包进行过滤,以获取过滤后的信号强度值。As an optional technical solution, step (b1) further includes: (b11) establishing a storage pipeline, so that the data packet is temporarily stored therein; (b12) after a second time threshold, from the Acquire the corresponding first data packet in the storage pipeline, and obtain the second data packet corresponding to the period from the second time threshold to a third time threshold, wherein the second time threshold occurs after the third time threshold ; (b13) Filtering the third data packet formed by the first data packet and the second data packet by the averaging method to obtain a filtered signal strength value.
本发明还提供一种基于室内定位的定位装置,其包括:一数据包接收模块,用以接收至少两个蓝牙基站所发送的数据包,以获取所述数据包所包含的信号强度值;一距离值计算模块,与所述数据包接收模块相连,用以根据信号强度值计算所述至少两个蓝牙基站至一移动终端的距离值;一蓝牙基站定位点获取模块,与所述距离值计算模块相连,用以根据计算出的距离值获得持有所述移动终端的一用户相对于蓝牙基站的定位点坐标;一惯导定位点获取模块,用以根据一加速度传感器获得用户的移动距离,并且根据一地磁传感器获得用户的移动方向,以获得用户的相对位移所对应的惯导定位点坐标;一用户移动判断模块,分别与所述蓝牙基站定位点获取模块和惯导定位点获取模块相连,用以判断用户当前是否处于移动,若是,则调用一多次动态补偿模块,否则,调用一一次性补偿模块;所述多次动态补偿模块,与所述用户移动判断模块相连,用以通过所述用户相对于蓝牙基站的定位点坐标对所述惯导定位点坐标进行多次动态补偿;所述一次性补偿模块,与所述用户移动判断模块相连,用以通过所述用户相对于蓝牙基站的定位点坐标替换所述惯导定位点坐标,以对所述惯导定位点坐标进行一次性补偿。The present invention also provides a positioning device based on indoor positioning, which includes: a data packet receiving module, used to receive data packets sent by at least two Bluetooth base stations, so as to obtain the signal strength value contained in the data packets; The distance value calculation module is connected with the data packet receiving module to calculate the distance value from the at least two bluetooth base stations to a mobile terminal according to the signal strength value; a bluetooth base station positioning point acquisition module is calculated with the distance value The modules are connected to obtain the positioning point coordinates of a user holding the mobile terminal relative to the Bluetooth base station according to the calculated distance value; an inertial navigation positioning point acquisition module is used to obtain the user's moving distance according to an acceleration sensor, And obtain the moving direction of the user according to a geomagnetic sensor, so as to obtain the corresponding inertial navigation positioning point coordinates of the user's relative displacement; a user movement judgment module is connected with the Bluetooth base station positioning point acquisition module and the inertial navigation positioning point acquisition module respectively , to determine whether the user is currently moving, if so, call a dynamic compensation module for multiple times, otherwise, call a one-time compensation module; the multiple dynamic compensation module is connected to the user movement judgment module for The coordinates of the inertial navigation positioning point are dynamically compensated multiple times through the coordinates of the positioning point of the user relative to the Bluetooth base station; the one-time compensation module is connected with the user movement judgment module to pass the user relative to The positioning point coordinates of the Bluetooth base station replace the inertial navigation positioning point coordinates, so as to perform one-time compensation for the inertial navigation positioning point coordinates.
作为可选的技术方案,所述多次动态补偿模块进一步包括:一定位差值计算单元,用以计算所述惯导定位点坐标与所述用户相对于蓝牙基站的定位点坐标之间的定位差值;一补偿值获取单元,与所述定位差值计算单元相连,用以根据一设定系数,以获得所述定位差值对应的补偿值;一惯导定位点修正单元,与所述补偿值获取单元相连,用以根据所述补偿值对所述惯导定位点坐标进行补偿修正。As an optional technical solution, the multiple dynamic compensation module further includes: a positioning difference calculation unit, used to calculate the positioning between the coordinates of the inertial navigation positioning point and the coordinates of the positioning point of the user relative to the Bluetooth base station difference; a compensation value acquisition unit connected to the positioning difference calculation unit for obtaining a compensation value corresponding to the positioning difference according to a set coefficient; an inertial navigation positioning point correction unit connected to the The compensation value acquisition unit is connected to compensate and correct the coordinates of the inertial navigation positioning point according to the compensation value.
作为可选的技术方案,所述多次动态补偿模块进一步包括:一重复调用单元,用以在一第一时间阈值内,重复依次调用所述定位差值计算单元、所述补偿值获取单元和所述惯导定位点修正单元。As an optional technical solution, the multiple dynamic compensation module further includes: a repeated calling unit, used to repeatedly call the positioning difference calculation unit, the compensation value acquisition unit and the compensation value acquisition unit in sequence within a first time threshold The inertial navigation positioning point correction unit.
作为可选的技术方案,所述用户移动判断模块进一步包括一用户移动确定单元,用以通过加速度传感器获得用户的当前移动距离的变化量,以确定用户当前是否处于移动。As an optional technical solution, the user movement judging module further includes a user movement determining unit, configured to obtain a change amount of the user's current moving distance through an acceleration sensor, so as to determine whether the user is currently moving.
作为可选的技术方案,所述定位装置进一步包括一过滤模块,所述过滤模块分别与所述数据包接收模块和所述距离值计算模块相连,用以过滤所述数据包的信号强度值。As an optional technical solution, the locating device further includes a filtering module, the filtering module is respectively connected with the data packet receiving module and the distance value calculation module, and is used for filtering the signal strength value of the data packet.
作为可选的技术方案,所述过滤模块进一步包括:一存储管道建立单元,用以建立一存储管道,以使所述数据包暂存于其中;一数据包获取单元,与所述存储管道建立单元相连,用以当经过一第二时间阈值后,从所述存储管道中获取相应的第一数据包,并且获取所述第二时间阈值至一第三时间阈值期间所对应的第二数据包,其中所述第二时间阈值发生在所述第三时间阈值之后;一数据包过滤单元,与所述数据包获取单元相连,用以通过平均法对第一数据包和第二数据包所形成的第三数据包进行过滤,以获取过滤后的信号强度值。As an optional technical solution, the filtering module further includes: a storage pipeline establishment unit, configured to establish a storage pipeline, so that the data packets are temporarily stored therein; a data packet acquisition unit, established with the storage pipeline The units are connected to obtain the corresponding first data packet from the storage pipeline after a second time threshold, and obtain the second data packet corresponding to the period from the second time threshold to a third time threshold , wherein the second time threshold occurs after the third time threshold; a data packet filtering unit, connected to the data packet acquisition unit, is used to form the first data packet and the second data packet through the average method Filter the third packet to obtain the filtered signal strength value.
本发明还提供一种移动终端,其包含上述任一所述基于室内定位的定位装置。The present invention also provides a mobile terminal, which includes any one of the positioning devices based on indoor positioning described above.
作为可选的技术方案,所述移动终端进一步包含一三轴加速度传感器和一三轴地磁传感器;所述三轴加速度传感器用以获取用户的移动距离,所述三轴地磁传感器用以获取用户的移动方向。As an optional technical solution, the mobile terminal further includes a three-axis acceleration sensor and a three-axis geomagnetic sensor; the three-axis acceleration sensor is used to obtain the user's moving distance, and the three-axis geomagnetic sensor is used to obtain the user's direction of movement.
作为可选的技术方案,所述移动终端进一步包含三轴陀螺仪,所述三轴陀螺仪用以惯导定位。As an optional technical solution, the mobile terminal further includes a three-axis gyroscope, and the three-axis gyroscope is used for inertial navigation and positioning.
作为可选的技术方案,所述移动终端通过蓝牙4.0协议接收蓝牙基站所发送的数据包。As an optional technical solution, the mobile terminal receives the data packet sent by the Bluetooth base station through the Bluetooth 4.0 protocol.
本发明的优点在于,基于蓝牙基站和移动终端的惯性导航的方法可适用于GPS定位技术所无法覆盖的室内环境,尤其对于地形复杂的大型室内综合体(例如,大型商场、大型室内停车场等)具有其重要的应用意义。本发明在保证定位精度和蓝牙基站低功耗的情况下,能够进一步提高定位的实时性,使得室内定位可以满足用户的连贯导航和精确定位的高需求。另外,本发明室内定位方法通过采用移动终端的惯性导航和蓝牙基站的定位相结合方式,并且进一步利用蓝牙基站获得的绝对位置,以对惯性导航获得的相对位置进行动态补偿,从而不仅实现准确的室内定位,而且实现连贯的导航应用。The advantage of the present invention is that the method of inertial navigation based on the Bluetooth base station and mobile terminal can be applied to indoor environments that cannot be covered by GPS positioning technology, especially for large indoor complexes with complex terrain (such as large shopping malls, large indoor parking lots, etc.) ) has its important application significance. The present invention can further improve the real-time performance of positioning while ensuring positioning accuracy and low power consumption of the bluetooth base station, so that indoor positioning can meet the high demands of users for coherent navigation and precise positioning. In addition, the indoor positioning method of the present invention combines the inertial navigation of the mobile terminal with the positioning of the Bluetooth base station, and further uses the absolute position obtained by the Bluetooth base station to dynamically compensate the relative position obtained by the inertial navigation, thereby not only realizing accurate positioning Indoor positioning, but also to achieve coherent navigation applications.
附图说明Description of drawings
图1是本发明一实施方式中所述基于室内定位的定位方法的步骤流程示意图。Fig. 1 is a schematic flowchart of the steps of the positioning method based on indoor positioning in an embodiment of the present invention.
图2是本发明一实施方式中所述基于室内定位的定位装置的结构框图。Fig. 2 is a structural block diagram of the positioning device based on indoor positioning in an embodiment of the present invention.
图3是本发明一实施方式中所述移动终端的结构框图。Fig. 3 is a structural block diagram of the mobile terminal in an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图对本发明提供的基于室内定位的定位方法及其装置的具体实施方式做详细说明。Specific implementations of the positioning method and device based on indoor positioning provided by the present invention will be described in detail below with reference to the accompanying drawings.
参见图1所示,本发明一实施方式中所述基于室内定位的定位方法,包括:步骤S110、接收至少两个蓝牙基站所发送的数据包,以获取所述数据包所包含的信号强度值;步骤S120、根据信号强度值计算所述至少两个蓝牙基站至一移动终端的距离值;步骤S130、根据计算出的距离值获得持有所述移动终端的一用户相对于蓝牙基站的定位点坐标;步骤S140、根据一加速度传感器获得用户的移动距离,并且根据一地磁传感器获得用户的移动方向,以获得用户的相对位移所对应的惯导定位点坐标;步骤S150、判断用户当前是否处于移动,若是,则执行步骤S160,否则执行步骤S170;步骤S160、通过所述用户相对于蓝牙基站的定位点坐标对所述惯导定位点坐标进行多次动态补偿;步骤S170、通过所述用户相对于蓝牙基站的定位点坐标替换所述惯导定位点坐标,以对所述惯导定位点坐标进行一次性补偿。Referring to Fig. 1, the positioning method based on indoor positioning in one embodiment of the present invention includes: step S110, receiving data packets sent by at least two Bluetooth base stations, so as to obtain the signal strength value contained in the data packets ; Step S120, calculate the distance value from the at least two Bluetooth base stations to a mobile terminal according to the signal strength value; Step S130, obtain the positioning point of a user holding the mobile terminal relative to the Bluetooth base station according to the calculated distance value Coordinates; step S140, obtain the moving distance of the user according to an acceleration sensor, and obtain the moving direction of the user according to a geomagnetic sensor, so as to obtain the coordinates of the inertial positioning point corresponding to the relative displacement of the user; step S150, judge whether the user is currently moving , if so, execute step S160, otherwise execute step S170; step S160, perform multiple dynamic compensations to the coordinates of the inertial navigation anchor point through the coordinates of the anchor point of the user relative to the Bluetooth base station; step S170, through the relative The coordinates of the positioning point of the Bluetooth base station are replaced by the coordinates of the positioning point of the inertial navigation, so as to perform a one-time compensation for the coordinates of the positioning point of the inertial navigation.
以下将进一步详细说明每一步骤。Each step will be described in further detail below.
步骤S110、接收至少两个蓝牙基站所发送的数据包,以获取所述数据包所包含的信号强度值。Step S110, receiving data packets sent by at least two Bluetooth base stations, so as to obtain signal strength values included in the data packets.
在此步骤中,若用户的移动路径为固定路线,在一定条件下可以只需接收两个蓝牙基站(例如Beacon基站)所发送的数据包即可。若进行平面定位,需要接收至少三个蓝牙基站所发送的数据包。当然,接收更多蓝牙基站所发送的数据包,更有利于对用户的精确定位,但是需大量的数据处理及计算,以至使得相关设备/终端需承载较大的负荷。因此,优选的,接收三个至五个蓝牙基站所发送的数据包即可,也就是说,在室内部署三个至五个蓝牙基站为较佳方案。在部分其他实施方式中,所述蓝牙基站的数量可以根据现场实际情况而定。In this step, if the user's moving path is a fixed route, under certain conditions, it may only need to receive the data packets sent by two Bluetooth base stations (such as Beacon base stations). For plane positioning, it is necessary to receive data packets sent by at least three Bluetooth base stations. Of course, receiving more data packets sent by the Bluetooth base station is more conducive to accurate positioning of the user, but requires a large amount of data processing and calculation, so that the relevant equipment/terminal needs to bear a relatively large load. Therefore, preferably, it is enough to receive the data packets sent by three to five Bluetooth base stations, that is to say, it is a better solution to deploy three to five Bluetooth base stations indoors. In some other implementation manners, the number of the Bluetooth base stations may be determined according to actual conditions on site.
当接收到蓝牙基站所发送的数据包之后,可以从该数据包获得相应的信号强度值(或称RSSI值)以及相应蓝牙基站所对应的识别码。其中,所述识别码用以标识所述蓝牙基站。After receiving the data packet sent by the Bluetooth base station, the corresponding signal strength value (or RSSI value) and the corresponding identification code of the corresponding Bluetooth base station can be obtained from the data packet. Wherein, the identification code is used to identify the Bluetooth base station.
由于无线信号容易受到外界干扰,当接收到蓝牙基站所发送的数据包之后,所述数据包所包含的信号强度值有较大的波动。为了使蓝牙基站定位具有稳定的信号,以能够准确定位,因此需要对所接收到的信号强度值进行过滤处理。故在步骤S110和步骤S120之间可以进一步执行以下步骤:过滤所述数据包的信号强度值。在该步骤中,可以进一步包括:(11)建立一存储管道,以使所述数据包暂存于其中;(12)当经过一第二时间阈值后,从所述存储管道中获取相应的第一数据包,并且获取所述第二时间阈值至一第三时间阈值期间内所对应的第二数据包,其中所述第二时间阈值发生在所述第三时间阈值之后;(13)通过平均法对第一数据包和第二数据包所形成的第三数据包进行过滤,以获取过滤后的信号强度值。其中,考虑到蓝牙基站的低功耗,每一秒钟发送数据包数量较少的情况,本发明通过执行上述步骤(11)至步骤(13),以采用FIFO(先进先出)定时差定数据量的过滤方式来解决在设定时间间隔下的过滤数据不足而导致过滤效果不佳的问题,从而能够在保证蓝牙基站低功耗的情况下达到较好的过滤效果。举例而说,在现有技术中,若采用大功率基站每一秒钟发送100数据包,并且对该100个数据包采用平均法进行过滤。为了到达相同过滤效果或更加的过滤效果,本发明通过以下方式来实现过滤:首先,建立一可容纳100个数据包的存储管道(或称FIFO管道),以使所述数据包暂存于其中,当有数据包进入所述存储管道时,将数据包按时间先后顺序放置于所述存储管道中。当经过一第二时间阈值(例如一秒钟)后,从所述存储管道中获取相应(最新的)10个第一数据包,并且获取所述第二时间阈值至一第三时间阈值(即前九秒钟)期间所对应的90个第二数据包,然后将上述10个第一数据包和上述90个数据包组合为100个第三数据包,再通过平均法对所述100个第三数据包进行过滤。通过采用上述过滤方式会产生一定时间(例如3秒钟)的延时,而在下文中会进一步说明如何消除该延时问题。Since the wireless signal is susceptible to external interference, after receiving the data packet sent by the Bluetooth base station, the signal strength value included in the data packet fluctuates greatly. In order to enable the Bluetooth base station to have a stable signal for accurate positioning, it is necessary to filter the received signal strength values. Therefore, the following step may be further performed between step S110 and step S120: filter the signal strength value of the data packet. In this step, it may further include: (11) establishing a storage pipeline, so that the data packet is temporarily stored therein; (12) after a second time threshold, obtaining the corresponding first time threshold from the storage pipeline. A data packet, and obtain the second data packet corresponding to the period from the second time threshold to a third time threshold, wherein the second time threshold occurs after the third time threshold; (13) by averaging The method filters the third data packet formed by the first data packet and the second data packet, so as to obtain a filtered signal strength value. Wherein, considering the low power consumption of the Bluetooth base station, the situation that the number of data packets sent per second is small, the present invention uses FIFO (first in first out) timing difference to determine The data volume filtering method is used to solve the problem of poor filtering effect due to insufficient filtering data at the set time interval, so as to achieve better filtering effect while ensuring low power consumption of the Bluetooth base station. For example, in the prior art, if a high-power base station is used to send 100 data packets every second, and the 100 data packets are filtered by an average method. In order to reach the same filtering effect or better filtering effect, the present invention realizes filtering in the following manner: first, set up a storage pipeline (or claim FIFO pipeline) that can hold 100 data packets, so that the data packets are temporarily stored therein , when a data packet enters the storage pipeline, place the data packets in the storage pipeline in chronological order. After a second time threshold (such as one second), obtain the corresponding (latest) 10 first data packets from the storage pipeline, and obtain the second time threshold to a third time threshold (that is, The corresponding 90 second data packets during the first nine seconds), then the above-mentioned 10 first data packets and the above-mentioned 90 data packets are combined into 100 third data packets, and then the 100 first data packets are analyzed by the average method Three packets are filtered. A delay of a certain period of time (for example, 3 seconds) will be generated by adopting the above filtering method, and how to eliminate the delay problem will be further described below.
步骤S120:根据信号强度值计算所述至少两个蓝牙基站至一移动终端的距离值。Step S120: Calculate a distance value from the at least two Bluetooth base stations to a mobile terminal according to the signal strength value.
在获得(过滤后)的信号强度值之后,计算所述蓝牙基站至一移动终端的距离值。该距离值的计算可以根据以下公式:After obtaining the (filtered) signal strength values, the distance value from the Bluetooth base station to a mobile terminal is calculated. The distance value can be calculated according to the following formula:
其中,dm是已知蓝牙基站与用户之间的距离;Among them, d m is the distance between the known Bluetooth base station and the user;
RSSI1m是蓝牙基站与用户之间距离1米时测试到的RSSI值;RSSI 1m is the RSSI value measured when the distance between the Bluetooth base station and the user is 1 meter;
RSSIcur是移动终端当前获得的蓝牙基站的RSSI值;RSSI cur is the RSSI value of the Bluetooth base station currently obtained by the mobile terminal;
n是信号衰减系数。n is the signal attenuation coefficient.
由于每一个蓝牙基站的情况不同,不能采用通用方式来实现满足所有蓝牙基站至用户的距离值计算,否则容易会产生误差。因此,本发明通过在数据包中包含有多个距离值计算的参数,如RSSI1m和n,以减少误差。于是,在获取信号强度值的同时,接收到距离值计算的参数的相应信息,进而获得不同蓝牙基站至用户的相应距离值。Since the situation of each Bluetooth base station is different, a general method cannot be used to realize the calculation of distance values satisfying all Bluetooth base stations to users, otherwise errors may easily occur. Therefore, the present invention reduces errors by including multiple parameters for distance value calculation, such as RSSI 1m and n, in the data packet. Therefore, while obtaining the signal strength value, the corresponding information of the parameters calculated by the distance value is received, and then the corresponding distance values from different Bluetooth base stations to the user are obtained.
步骤S130:根据计算出的距离值获得持有所述移动终端的一用户相对于蓝牙基站的定位点坐标。Step S130: Obtain the coordinates of the positioning point of a user holding the mobile terminal relative to the Bluetooth base station according to the calculated distance value.
在一时间阈值内,获得至少三个以上蓝牙基站的数据包之后,根据几何原理(或称平面法)以及在步骤S120中所计算出的距离值,并结合蓝牙基站的坐标,可以获得持有所述移动终端的一用户相对于蓝牙基站的定位点坐标。在此步骤中,优选采用最小二乘逼近法来实现计算用户相对于蓝牙基站的定位点坐标,其中最小二乘逼近法是使用户相对于蓝牙基站的定位点至已知蓝牙基站之间距离的差值为最小。若接收到有效数据包越多,则获得的定位信息越稳定可靠。Within a time threshold, after obtaining data packets of at least three or more Bluetooth base stations, according to the geometric principle (or planar method) and the distance value calculated in step S120, combined with the coordinates of the Bluetooth base station, you can obtain the The location point coordinates of a user of the mobile terminal relative to the Bluetooth base station. In this step, it is preferable to adopt the least squares approximation method to realize the calculation of the user's positioning point coordinates relative to the Bluetooth base station, wherein the least squares approximation method is to make the distance between the user's positioning point relative to the Bluetooth base station and the known Bluetooth base station The difference is minimal. If more valid data packets are received, the obtained positioning information is more stable and reliable.
步骤S140:根据一加速度传感器获得用户的移动距离,并且根据一地磁传感器获得用户的移动方向,以获得用户的相对位移所对应的惯导定位点坐标。Step S140: Obtain the moving distance of the user according to an acceleration sensor, and obtain the moving direction of the user according to a geomagnetic sensor, so as to obtain the coordinates of the inertial positioning point corresponding to the relative displacement of the user.
其中,采用一加速度传感器(例如三轴加速度传感器)以获得用户的移动距离。同时,采用一地磁传感器(例如三轴地磁传感器)以获得用户的移动方向。在此步骤中,可以进一步采用一三轴陀螺仪,用以惯性导航(简称惯导,下文相同)。Wherein, an acceleration sensor (such as a three-axis acceleration sensor) is used to obtain the moving distance of the user. At the same time, a geomagnetic sensor (for example, a three-axis geomagnetic sensor) is used to obtain the moving direction of the user. In this step, a three-axis gyroscope can be further used for inertial navigation (abbreviated as inertial navigation, the same below).
在本实施方式中,通过三轴加速度传感器以采集加速度数据。详细而言,首先获取用户正常移动时所述三轴加速度传感器的加速度芯片所输出的具有一定规律的波动信息,该波动信息的频率可以拟合成为用户移动时的步伐频率。接着,通过一信号处理模块对所述步伐频率进行处理,以获得用户的步伐数。再通过所述步伐数乘以普通步长距离,可以获得用户的移动距离。进一步,通过所述三轴地磁传感器以获得用户的移动方向,从而可以计算得到用户的相对位移量,并且结合用户起始点的坐标,以进一步获得相应的惯导定位点坐标。In this embodiment, acceleration data is collected by a three-axis acceleration sensor. In detail, firstly, the regular fluctuation information output by the acceleration chip of the three-axis acceleration sensor when the user moves normally is obtained, and the frequency of the fluctuation information can be fitted to become the step frequency of the user when moving. Then, the step frequency is processed by a signal processing module to obtain the user's step number. Then, the moving distance of the user can be obtained by multiplying the number of steps by the normal step distance. Further, the user's moving direction is obtained through the three-axis geomagnetic sensor, so that the user's relative displacement can be calculated, and combined with the coordinates of the user's starting point, to further obtain the corresponding inertial navigation positioning point coordinates.
由于惯导易受到非走路动作、步长不一致等因素的影响,因此获得的定位具有一定的误差,随着时间的增加,该误差在理论上会不断地增加。考虑到蓝牙基站定位易受到信号稳定处理的延时影响,实际的位置需要一时间阈值(例如3秒钟左右)的延时才能得到,于是,在本发明实施方式中,需要通过蓝牙基站定位和惯导定位相结合方式,以对用户进行准确定位。在蓝牙基站定位和惯导定位相结合而对用户进行定位过程中,需要通过一定的补偿方式对获得的坐标点信息进行修正。Since inertial navigation is easily affected by factors such as non-walking movements and inconsistent step lengths, the obtained positioning has a certain error. As time increases, the error will continue to increase in theory. Considering that Bluetooth base station positioning is easily affected by the delay of signal stabilization processing, the actual position needs a delay of a time threshold (for example, about 3 seconds) to obtain, so, in the embodiment of the present invention, it is necessary to locate and Inertial navigation positioning is combined to accurately locate users. In the process of locating users through the combination of Bluetooth base station positioning and inertial navigation positioning, it is necessary to correct the obtained coordinate point information through a certain compensation method.
步骤S150、判断用户当前是否处于移动,若是,则执行步骤S160,否则执行步骤S170。步骤S160、通过所述用户相对于蓝牙基站的定位点坐标对所述惯导定位点坐标进行多次动态补偿。步骤S170、通过所述用户相对于蓝牙基站的定位点坐标替换所述惯导定位点坐标,以对所述惯导定位点坐标进行一次性补偿。Step S150 , judging whether the user is currently moving, if yes, execute step S160 , otherwise execute step S170 . Step S160, perform multiple dynamic compensations on the coordinates of the inertial navigation positioning point through the coordinates of the positioning point of the user relative to the Bluetooth base station. Step S170, replacing the coordinates of the inertial positioning point with the coordinates of the positioning point of the user relative to the Bluetooth base station, so as to perform a one-time compensation for the coordinates of the positioning point of the inertial navigation.
其中,在步骤S150中,进一步通过加速度传感器获得用户的当前移动距离的变化量,以确定用户当前是否处于移动。例如,判断所述加速度传感器所输出的三轴数据的均方根是否小于0.2g(1g为重力加速度),若小于,则认为用户当前处于静止。Wherein, in step S150, the change amount of the user's current moving distance is further obtained through the acceleration sensor, so as to determine whether the user is currently moving. For example, it is determined whether the root mean square of the three-axis data output by the acceleration sensor is less than 0.2g (1g is the acceleration of gravity), and if less, it is considered that the user is currently at rest.
当判断出用户处于移动状态,则执行步骤S160,当判断出用户处于静止状态,则执行步骤S170。When it is determined that the user is in a moving state, step S160 is performed; when it is determined that the user is in a stationary state, step S170 is performed.
当用户处于移动状态时,通过执行下述步骤以使得所述用户相对于蓝牙基站的定位点坐标对所述惯导定位点坐标进行多次动态补偿。其中步骤包括:(a)计算所述惯导定位点坐标与所述用户相对于蓝牙基站的定位点坐标之间的定位差值;(b)根据一设定系数,以获得所述定位差值对应的补偿值,其中设定系数为1/2~1/20,优选1/5;(c)根据所述补偿值对所述惯导定位点坐标进行补偿修正。于是,不仅解决蓝牙基站定位具有一定延时性问题,而且不影响到用户导航的连贯性。优选的,在一第一时间阈值内(例如每一秒钟),重复依次执行步骤(a)至步骤(c)。When the user is in a moving state, the following steps are performed to enable the user to dynamically compensate the coordinates of the inertial positioning point for multiple times relative to the coordinates of the positioning point of the Bluetooth base station. The steps include: (a) calculating the positioning difference between the coordinates of the inertial navigation positioning point and the positioning point coordinates of the user relative to the Bluetooth base station; (b) obtaining the positioning difference according to a set coefficient The corresponding compensation value, wherein the set coefficient is 1/2 to 1/20, preferably 1/5; (c) Compensating and correcting the coordinates of the inertial navigation positioning point according to the compensation value. Therefore, it not only solves the problem of a certain delay in the positioning of the Bluetooth base station, but also does not affect the continuity of user navigation. Preferably, within a first time threshold (for example, every second), step (a) to step (c) are repeatedly executed sequentially.
以下通过一例子进一步说明如何执行步骤(a)至(c)。How to implement steps (a) to (c) is further illustrated below through an example.
例如,第一次用户相对于蓝牙基站的定位点坐标为(13.00,25.00),惯导定位点坐标为(18.00,15.00)。计算所述惯导定位点坐标与所述用户相对于蓝牙基站的定位点坐标之间的定位差值,即可以获得在X轴上差值为5,在Y轴上差值为10。根据一设定系数,如1/5,于是获得补偿值为(1.00,-2.00)。For example, the coordinates of the positioning point of the user relative to the Bluetooth base station for the first time are (13.00, 25.00), and the coordinates of the positioning point of the inertial navigation are (18.00, 15.00). Calculate the positioning difference between the coordinates of the inertial navigation positioning point and the coordinates of the positioning point of the user relative to the Bluetooth base station to obtain a difference of 5 on the X axis and a difference of 10 on the Y axis. According to a set coefficient, such as 1/5, then the compensation value is (1.00, -2.00).
在经过一秒钟后,修正后的惯导定位点坐标为(17.00,17.00)。再经过一秒钟后,第二次用户相对于蓝牙基站的定位点坐标为(7.00,7.00),修正后的惯导定位点坐标为(17.00,17.00)。重新计算所述惯导定位点坐标与所述用户相对于蓝牙基站的定位点坐标之间的定位差值,即可以获得在X轴上差值为10,在Y轴上差值为10。根据设定系数,如1/5,于是获得补偿值为(2.00,2.00)。又经过一秒钟后,第二次修正后的惯导定位点坐标为(15.00,15.00)。以此类推,每经过一秒钟,重复上述步骤(a)至步骤(c)。After one second, the corrected inertial navigation positioning point coordinates are (17.00, 17.00). After another second, the coordinates of the positioning point of the user relative to the Bluetooth base station for the second time are (7.00, 7.00), and the coordinates of the corrected inertial positioning point are (17.00, 17.00). Recalculating the positioning difference between the coordinates of the inertial navigation positioning point and the coordinates of the positioning point of the user relative to the Bluetooth base station can obtain a difference of 10 on the X axis and a difference of 10 on the Y axis. According to the set coefficient, such as 1/5, then the compensation value is (2.00, 2.00). After another second, the coordinates of the inertial navigation positioning point after the second correction are (15.00, 15.00). By analogy, the above step (a) to step (c) is repeated every second.
当用户处于静止状态时,通过执行下述步骤以使所述用户相对于蓝牙基站的定位点坐标替换所述惯导定位点坐标,进而对所述惯导定位点坐标进行一次性补偿,从而快速达到用户的实际位置。When the user is in a static state, by performing the following steps to replace the coordinates of the positioning point of the user with respect to the Bluetooth base station, and then perform a one-time compensation for the coordinates of the positioning point of the inertial navigation, thereby quickly to the actual location of the user.
以下再通过一例子进行说明。当判断出用户处于静止状态,且确认蓝牙基站定位延时(例如3秒钟)已过的情况下,通过用户相对于蓝牙基站的定位点坐标(例如(13.00,25.00))替换惯导定位点坐标为(18.00,15.00),以进行一次性补偿修正。即修正后的惯导定位点坐标为(13.00,25.00)。An example will be used below to illustrate. When it is judged that the user is in a static state and it is confirmed that the Bluetooth base station positioning delay (for example, 3 seconds) has passed, replace the inertial navigation positioning point with the user's positioning point coordinates relative to the Bluetooth base station (for example (13.00, 25.00)) The coordinates are (18.00, 15.00) for a one-time compensation correction. That is, the coordinates of the corrected inertial navigation positioning point are (13.00, 25.00).
参见图2所示,本发明还提供一种基于室内定位的定位装置200,其包括:一数据包接收模块210、一距离值计算模块230、一蓝牙基站定位点获取模块240、一惯导定位点获取模块250、一用户移动判断模块260、一多次动态补偿模块270和一一次性补偿模块280。2, the present invention also provides a positioning device 200 based on indoor positioning, which includes: a data packet receiving module 210, a distance value calculation module 230, a Bluetooth base station positioning point acquisition module 240, an inertial navigation positioning A point acquisition module 250 , a user movement judgment module 260 , a multi-time dynamic compensation module 270 and a one-time compensation module 280 .
其中,所述数据包接收模块210,用以接收至少两个蓝牙基站所发送的数据包,以获取所述数据包所包含的信号强度值。若用户的移动路径为固定路线,在一定条件下可以只需接收两个蓝牙基站(例如Beacon基站)所发送的数据包即可。若进行平面定位,需要接收至少三个蓝牙基站所发送的数据包。当然,接收更多蓝牙基站所发送的数据包,更有利于对用户的精确定位,但是需大量的数据处理及计算,以至使得相关设备/终端需承载较大的负荷。因此,优选的,接收三个至五个蓝牙基站所发送的数据包即可,也就是说,在室内部署三个至五个蓝牙基站为较佳方案。Wherein, the data packet receiving module 210 is configured to receive data packets sent by at least two Bluetooth base stations, so as to obtain signal strength values contained in the data packets. If the mobile path of the user is a fixed route, under certain conditions, it may only need to receive the data packets sent by two Bluetooth base stations (such as Beacon base stations). For plane positioning, it is necessary to receive data packets sent by at least three Bluetooth base stations. Of course, receiving more data packets sent by the Bluetooth base station is more conducive to accurate positioning of the user, but requires a large amount of data processing and calculation, so that the relevant equipment/terminal needs to bear a relatively large load. Therefore, preferably, it is enough to receive the data packets sent by three to five Bluetooth base stations, that is to say, it is a better solution to deploy three to five Bluetooth base stations indoors.
所述距离值计算模块230,可以与所述数据包接收模块210相连,用以根据信号强度值计算所述至少两个蓝牙基站至一移动终端的距离值。在获得信号强度值之后,计算所述蓝牙基站至一移动终端的距离值。该距离值的计算可以根据以下公式:其中,dm是已知蓝牙基站与用户之间的距离;RSSI1m是蓝牙基站与用户之间距离1米时测试到的RSSI值;RSSIcur是移动终端当前获得的蓝牙基站的RSSI值;n是信号衰减系数。由于每一个蓝牙基站的情况不同,不能采用通用方式来实现满足所有蓝牙基站至用户的距离值计算,否则容易会产生误差。因此,本发明通过在数据包中包含有多个距离值计算的参数,如RSSI1m和n,以减少误差。于是,在获取信号强度值的同时,接收到距离值计算的参数的相应信息,进而获得不同蓝牙基站至用户的相应距离值。The distance value calculation module 230 may be connected to the data packet receiving module 210 to calculate the distance value from the at least two Bluetooth base stations to a mobile terminal according to the signal strength value. After the signal strength value is obtained, the distance value from the Bluetooth base station to a mobile terminal is calculated. The distance value can be calculated according to the following formula: Among them, d m is the distance between the known Bluetooth base station and the user; RSSI 1m is the RSSI value tested when the distance between the Bluetooth base station and the user is 1 meter; RSSI cur is the RSSI value of the Bluetooth base station currently obtained by the mobile terminal; n is the signal attenuation coefficient. Since the situation of each Bluetooth base station is different, a general method cannot be used to realize the calculation of distance values satisfying all Bluetooth base stations to users, otherwise errors may easily occur. Therefore, the present invention reduces errors by including multiple parameters for distance value calculation, such as RSSI 1m and n, in the data packet. Therefore, while obtaining the signal strength value, the corresponding information of the parameters calculated by the distance value is received, and then the corresponding distance values from different Bluetooth base stations to the user are obtained.
所述蓝牙基站定位点获取模块240,与所述距离值计算模块230相连,用以根据计算出的距离值获得持有所述移动终端的一用户相对于蓝牙基站的定位点坐标。在一时间阈值内,获得至少三个以上蓝牙基站的数据包。进一步根据几何原理(或称平面法),以及计算出的距离值,并结合蓝牙基站的坐标,可以获得用户相对于蓝牙基站的定位点坐标。优选采用最小二乘逼近法来实现计算用户相对于蓝牙基站的定位点坐标,其中最小二乘逼近法是使用户相对于蓝牙基站的定位点至已知蓝牙基站之间距离的差值为最小。若接收到有效数据包越多,则获得的定位信息越稳定可靠。The bluetooth base station positioning point acquisition module 240 is connected to the distance value calculation module 230 to obtain the positioning point coordinates of a user holding the mobile terminal relative to the bluetooth base station according to the calculated distance value. Within a time threshold, data packets of at least three or more Bluetooth base stations are obtained. Further, according to the geometric principle (or plane method), and the calculated distance value, combined with the coordinates of the Bluetooth base station, the coordinates of the positioning point of the user relative to the Bluetooth base station can be obtained. Preferably, the least squares approximation method is used to calculate the coordinates of the user's positioning point relative to the Bluetooth base station, wherein the least squares approximation method is to minimize the difference between the user's positioning point relative to the Bluetooth base station and the known Bluetooth base station. If more valid data packets are received, the obtained positioning information is more stable and reliable.
所述惯导定位点获取模块250,用以根据一加速度传感器获得用户的移动距离,并且根据一地磁传感器获得用户的移动方向,以获得用户的相对位移所对应的惯导定位点坐标。在本实施方式中,所述惯导定位点获取模块250通过所述加速度传感器(例如三轴加速度传感器)以采集加速度数据。详细而言,首先获取用户正常移动时所述三轴加速度传感器的加速度芯片所输出的具有一定规律的波动信息,该波动信息的频率可以拟合成为用户移动时的步伐频率,接着,通过一信号处理模块(图中未示)对所述步伐频率进行处理,以获得用户的步伐数,再通过所述步伐数乘以普通步长距离,可以获得用户的移动距。进一步,所述惯导定位点获取模块250通过所述三轴地磁传感器以获得用户的移动方向,从而可以计算得到用户的相对位移量,并且结合用户起始点的坐标,以进一步获得相应的惯导定位点坐标。The inertial positioning point acquisition module 250 is used to obtain the user's moving distance according to an acceleration sensor, and obtain the user's moving direction according to a geomagnetic sensor, so as to obtain the inertial positioning point coordinates corresponding to the user's relative displacement. In this embodiment, the inertial navigation positioning point acquisition module 250 collects acceleration data through the acceleration sensor (for example, a three-axis acceleration sensor). In detail, first obtain the regular fluctuation information output by the acceleration chip of the three-axis acceleration sensor when the user moves normally, the frequency of the fluctuation information can be fitted to become the step frequency of the user when moving, and then, through a signal The processing module (not shown in the figure) processes the step frequency to obtain the number of steps of the user, and then multiplies the number of steps by the normal step distance to obtain the moving distance of the user. Further, the inertial navigation positioning point acquisition module 250 obtains the user's moving direction through the three-axis geomagnetic sensor, so that the user's relative displacement can be calculated, and combined with the coordinates of the user's starting point, to further obtain the corresponding inertial navigation Anchor point coordinates.
所述用户移动判断模块260,分别与所述蓝牙基站定位点获取模块240和惯导定位点获取模块250相连,用以判断用户当前是否处于移动,若是,则调用所述多次动态补偿模块270,否则,调用所述一次性补偿模块280。需注意的是,由于惯导易受到非走路动作、步长不一致等因素的影响,因此通过上述蓝牙基站定位点获取模块240和惯导定位点获取模块250所获得的定位点坐标具有一定的误差,随着时间的增加,该误差在理论上会不断地增加。考虑到蓝牙基站定位易受到信号稳定处理的延时影响,实际的位置需要一时间阈值(例如3秒钟左右)的延时才能得到,于是,在本发明实施方式中,需要通过蓝牙基站定位和惯导定位相结合方式,以对用户进行准确定位。在蓝牙基站定位和惯导定位相结合而对用户进行定位过程中,需要通过一定的补偿方式对获得的坐标点信息进行修正。在优选的实施方式中,所述用户移动判断模块260进一步包括一用户移动确定单元261,用以通过加速度传感器获得用户的当前移动距离的变化量,以确定用户当前是否处于移动。当判断出用户处于移动状态,则调用所述多次动态补偿模块270,当判断出用户处于静止状态,则调用所述一次性补偿模块280。The user movement judgment module 260 is connected with the Bluetooth base station positioning point acquisition module 240 and the inertial navigation positioning point acquisition module 250 respectively to determine whether the user is currently moving, and if so, call the multiple dynamic compensation module 270 , otherwise, call the one-time compensation module 280 . It should be noted that since the inertial navigation is easily affected by factors such as non-walking actions and inconsistent step lengths, the coordinates of the positioning points obtained by the above-mentioned Bluetooth base station positioning point acquisition module 240 and inertial navigation positioning point acquisition module 250 have certain errors , with the increase of time, the error will theoretically increase continuously. Considering that Bluetooth base station positioning is easily affected by the delay of signal stabilization processing, the actual position needs a delay of a time threshold (for example, about 3 seconds) to obtain, so, in the embodiment of the present invention, it is necessary to locate and Inertial navigation positioning is combined to accurately locate users. In the process of locating users through the combination of Bluetooth base station positioning and inertial navigation positioning, it is necessary to correct the obtained coordinate point information through a certain compensation method. In a preferred embodiment, the user movement judging module 260 further includes a user movement determination unit 261, which is used to obtain the variation of the user's current movement distance through an acceleration sensor, so as to determine whether the user is currently moving. When it is determined that the user is in a moving state, the multiple dynamic compensation module 270 is invoked, and when it is determined that the user is in a stationary state, the one-time compensation module 280 is invoked.
所述多次动态补偿模块270,与所述用户移动判断模块260相连,用以通过所述用户相对于蓝牙基站的定位点坐标对所述惯导定位点坐标进行多次动态补偿。在优选实施方式中,所述多次动态补偿模块270进一步包括:一定位差值计算单元271,用以计算所述惯导定位点坐标与所述用户相对于蓝牙基站的定位点坐标之间的定位差值;一补偿值获取单元272,与所述定位差值计算单元271相连,用以根据一设定系数,以获得所述定位差值对应的补偿值;一惯导定位点修正单元273,与所述补偿值获取单元272相连,用以根据所述补偿值对所述惯导定位点坐标进行补偿修正。于是,不仅解决蓝牙基站定位具有一定延时性问题,而且不影响到用户导航的连贯性。优选的,所述多次动态补偿模块270进一步包括:一重复调用单元275,用以在一第一时间阈值内,重复依次调用所述定位差值计算单元271、所述补偿值获取单元272和所述惯导定位点修正单元273。The multiple dynamic compensation module 270 is connected with the user movement judgment module 260, and is used to perform multiple dynamic compensations on the coordinates of the inertial navigation positioning point through the coordinates of the positioning point of the user relative to the Bluetooth base station. In a preferred embodiment, the multiple dynamic compensation module 270 further includes: a positioning difference calculation unit 271, which is used to calculate the difference between the coordinates of the inertial navigation positioning point and the coordinates of the positioning point of the user relative to the Bluetooth base station Positioning difference; a compensation value acquisition unit 272, connected to the positioning difference calculation unit 271, for obtaining a compensation value corresponding to the positioning difference according to a set coefficient; an inertial navigation positioning point correction unit 273 , which is connected to the compensation value acquisition unit 272, and is used for performing compensation correction on the coordinates of the inertial navigation positioning point according to the compensation value. Therefore, it not only solves the problem of a certain delay in the positioning of the Bluetooth base station, but also does not affect the continuity of user navigation. Preferably, the multiple dynamic compensation module 270 further includes: a repeated calling unit 275, used to repeatedly and sequentially call the positioning difference calculation unit 271, the compensation value obtaining unit 272 and the The inertial navigation positioning point correction unit 273 .
所述一次性补偿模块280,与所述用户移动判断模块260相连,用以通过所述用户相对于蓝牙基站的定位点坐标替换所述惯导定位点坐标,以对所述惯导定位点坐标进行一次性补偿,从而快速达到用户的实际位置。The one-time compensation module 280 is connected with the user movement judging module 260, and is used to replace the coordinates of the inertial positioning point with the coordinates of the positioning point of the user relative to the Bluetooth base station, so that the coordinates of the positioning point of the inertial navigation Make a one-time compensation to quickly reach the user's actual location.
在本发明的优选实施方式中,所述定位装置200可以进一步包括一过滤模块220,所述过滤模块220分别与所述数据包接收模块210和所述距离值计算模块230相连,用以过滤所述数据包的信号强度值。所述过滤模块220进一步包括:一存储管道建立单元221,用以建立一存储管道,以使所述数据包暂存于其中;一数据包获取单元222,与所述存储管道建立单元221相连,用以当经过一第二时间阈值后,从所述存储管道中获取相应的第一数据包,并且获取所述第二时间阈值至一第三时间阈值期间内所对应的第二数据包,其中所述第二时间阈值发生在所述第三时间阈值之后;一数据包过滤单元223,与所述数据包获取单元222相连,用以通过平均法对第一数据包和第二数据包所形成的第三数据包进行过滤,以获取过滤后的信号强度值。In a preferred embodiment of the present invention, the positioning device 200 may further include a filtering module 220, the filtering module 220 is connected to the data packet receiving module 210 and the distance value calculating module 230 respectively, to filter all The signal strength value of the above packet. The filtering module 220 further includes: a storage pipeline establishment unit 221, configured to establish a storage pipeline so that the data packets are temporarily stored therein; a data packet acquisition unit 222, connected to the storage pipeline establishment unit 221, After a second time threshold, obtain the corresponding first data packet from the storage pipeline, and obtain the corresponding second data packet within the period from the second time threshold to a third time threshold, wherein The second time threshold occurs after the third time threshold; a data packet filtering unit 223, connected to the data packet acquisition unit 222, is used to form the first data packet and the second data packet by averaging Filter the third packet to obtain the filtered signal strength value.
参见图3所示,本发明还提供一种移动终端300,其包含上述任一所述基于室内定位的定位装置200。在优选的实施方式中,所述移动终端300还包含一三轴加速度传感器301和一三轴地磁传感器302。所述三轴加速度传感器301用以获取用户的移动距离,所述三轴地磁传感器302用以获取用户的移动方向。可选的,所述移动终端300进一步包含三轴陀螺仪303,所述三轴陀螺仪303用以惯导定位。另外,所述移动终端300通过蓝牙4.0协议接收蓝牙基站所发送的数据包。所述蓝牙协议的版本并非用以限定本发明。优选地采用蓝牙4.0协议,能够使移动终端对用户定位和导航具有良好的表现。Referring to FIG. 3 , the present invention also provides a mobile terminal 300 , which includes any one of the positioning devices 200 based on indoor positioning described above. In a preferred embodiment, the mobile terminal 300 further includes a three-axis acceleration sensor 301 and a three-axis geomagnetic sensor 302 . The three-axis acceleration sensor 301 is used to obtain the moving distance of the user, and the three-axis geomagnetic sensor 302 is used to obtain the moving direction of the user. Optionally, the mobile terminal 300 further includes a three-axis gyroscope 303, and the three-axis gyroscope 303 is used for inertial navigation and positioning. In addition, the mobile terminal 300 receives the data packet sent by the Bluetooth base station through the Bluetooth 4.0 protocol. The version of the Bluetooth protocol is not intended to limit the present invention. The bluetooth 4.0 protocol is preferably adopted, which can enable the mobile terminal to have good performance for user positioning and navigation.
在本发明的实施方式中,所述基于室内定位的定位装置的安装位置并未用以限定本发明。所述基于室内定位的定位装置除了可设置于上述移动终端中,还可以设置于一服务器或其他设备中,用以完成对用户的精确定位和连贯的导航。In the embodiments of the present invention, the installation position of the positioning device based on indoor positioning is not used to limit the present invention. The positioning device based on indoor positioning can be set in a server or other equipment in addition to the above-mentioned mobile terminal, so as to complete precise positioning and coherent navigation for users.
本发明所述基于蓝牙基站和移动终端的惯性导航的方法适用于GPS定位技术所无法覆盖的室内环境,尤其对于地形复杂的大型室内综合体(例如,大型商场、大型室内停车场等)具有其重要的应用意义。本发明在保证定位精度和蓝牙基站低功耗的情况下,能够进一步提高定位的实时性,使得室内定位可以满足用户的连贯导航和精确定位的高需求。另外,本发明室内定位方法通过采用移动终端的惯性导航和蓝牙基站的定位相结合方式,并且进一步利用蓝牙基站获得的绝对位置,以对惯性导航获得的相对位置进行动态补偿,从而不仅实现准确的室内定位,而且实现连贯的导航应用。The method of inertial navigation based on Bluetooth base station and mobile terminal described in the present invention is suitable for indoor environments that cannot be covered by GPS positioning technology, especially for large indoor complexes with complex terrain (such as large shopping malls, large indoor parking lots, etc.) important application significance. The present invention can further improve the real-time performance of positioning while ensuring positioning accuracy and low power consumption of the bluetooth base station, so that indoor positioning can meet the high demands of users for coherent navigation and precise positioning. In addition, the indoor positioning method of the present invention combines the inertial navigation of the mobile terminal with the positioning of the Bluetooth base station, and further uses the absolute position obtained by the Bluetooth base station to dynamically compensate the relative position obtained by the inertial navigation, thereby not only realizing accurate positioning Indoor positioning, but also to achieve coherent navigation applications.
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications should also be considered Be the protection scope of the present invention.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410766028.6A CN104703130B (en) | 2014-12-11 | 2014-12-11 | Localization method based on indoor positioning and its device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410766028.6A CN104703130B (en) | 2014-12-11 | 2014-12-11 | Localization method based on indoor positioning and its device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN104703130A CN104703130A (en) | 2015-06-10 |
| CN104703130B true CN104703130B (en) | 2018-08-24 |
Family
ID=53349819
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410766028.6A Expired - Fee Related CN104703130B (en) | 2014-12-11 | 2014-12-11 | Localization method based on indoor positioning and its device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104703130B (en) |
Families Citing this family (42)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104944029B (en) * | 2015-06-15 | 2017-06-16 | 珠海市一微半导体有限公司 | Dustbin robot system and its control method |
| CN104897158B (en) * | 2015-06-26 | 2017-07-14 | 中国科学院上海高等研究院 | Double orientation method and system in a kind of pedestrian room |
| CN105163383B (en) * | 2015-06-30 | 2019-01-11 | 江苏鸿信系统集成有限公司 | One kind being based on the indoor information-pushing method of bluetooth |
| CN105206091A (en) * | 2015-10-12 | 2015-12-30 | 美新半导体(无锡)有限公司 | Vehicle searching system and method based on mobile equipment |
| CN105424027A (en) * | 2015-11-10 | 2016-03-23 | 苏州海而仕信息科技有限公司 | System for searching warehouse for idle store spaces |
| FR3046261B1 (en) * | 2015-12-24 | 2018-08-31 | Starbreeze Paris | HYBRID MOBILE ELEMENT, METHOD AND DEVICE FOR INTERFACING A PLURALITY OF HYBRID MOBILE ELEMENTS WITH A COMPUTER SYSTEM, AND ASSEMBLY FOR A VIRTUAL OR INCREASED REALITY SYSTEM |
| CN105547292A (en) * | 2015-12-30 | 2016-05-04 | 天津盛购科技发展有限公司 | System for improving indoor positioning precision on basis of gyroscope and compass |
| CN105588566B (en) * | 2016-01-08 | 2019-09-13 | 重庆邮电大学 | An indoor positioning system and method based on fusion of bluetooth and MEMS |
| CN105578417A (en) * | 2016-01-29 | 2016-05-11 | 东北大学 | Indoor positioning method for moving person |
| CN105704669A (en) * | 2016-03-25 | 2016-06-22 | 上海智向信息科技有限公司 | Wearable-equipment-based user positioning method and system |
| CN105898711B (en) * | 2016-03-25 | 2019-05-31 | 北京智慧图科技有限责任公司 | A kind of localization method and device based on earth magnetism reference line |
| CN106017465A (en) * | 2016-06-30 | 2016-10-12 | 北京海顿中科技术有限公司 | Micro inertial navigation-based positioning system and positioning method of routing inspection mobile terminal |
| CN106211323A (en) * | 2016-08-23 | 2016-12-07 | 中国联合网络通信集团有限公司 | The method and device of location |
| CN106303930A (en) * | 2016-09-20 | 2017-01-04 | 南京软腾信息科技有限公司 | A kind of intelligent patrol detection based on BLE management system and method |
| CN106248107B (en) * | 2016-09-22 | 2019-03-12 | 中国电子科技集团公司第二十二研究所 | A track inference calibration method and device based on indoor geomagnetic track matching |
| CN108024198A (en) * | 2016-10-31 | 2018-05-11 | 华为技术有限公司 | A kind of localization method, positioner and access point AP |
| CN108020813B (en) * | 2016-11-04 | 2021-10-22 | 富士通株式会社 | Positioning method, positioning device and electronic device |
| CN106412836A (en) * | 2016-11-22 | 2017-02-15 | 北斗羲和科技发展(北京)有限公司 | Indoor positioning method and device |
| CN106781604A (en) * | 2016-12-14 | 2017-05-31 | 湖北双可智能工程有限公司 | Parking lot management system and method based on wireless positioning base station |
| CN107339986B (en) * | 2017-07-04 | 2021-01-29 | 郑州大学 | Positioning method, device and system |
| CN107655480A (en) * | 2017-09-19 | 2018-02-02 | 深圳市深层互联科技有限公司 | A kind of robot localization air navigation aid, system, storage medium and robot |
| CN107820230A (en) * | 2017-11-02 | 2018-03-20 | 成都吱吖科技有限公司 | A kind of step function aids in bluetooth location technology |
| CN108917751B (en) * | 2018-03-30 | 2021-11-02 | 北京凌宇智控科技有限公司 | Calibration-free positioning method and system |
| CN109084775A (en) * | 2018-08-21 | 2018-12-25 | 清华四川能源互联网研究院 | A kind of indoor orientation method and positioning system |
| CN109323696B (en) * | 2018-11-07 | 2022-07-08 | 航天信息股份有限公司 | Indoor positioning navigation system and method for unmanned forklift |
| CN111277944A (en) * | 2018-11-19 | 2020-06-12 | 深圳市唯传科技有限公司 | Positioning method and positioning equipment |
| CN111323745B (en) * | 2018-12-17 | 2022-03-29 | 中安智讯(北京)信息科技有限公司 | Underground personnel positioning system and method based on multi-source fusion |
| CN109579834B (en) * | 2018-12-24 | 2020-12-04 | 北京全电智领科技有限公司 | Positioning method and device based on space optical communication technology |
| CN109814142A (en) * | 2019-03-07 | 2019-05-28 | 辽宁北斗卫星位置信息服务有限公司 | A kind of inspection localization method, device, medium and the equipment of patrolling railway |
| CN110794435A (en) * | 2019-10-25 | 2020-02-14 | 广州极飞科技有限公司 | Method and device for determining base station movement, base station, RTK system and storage medium |
| CN111356228A (en) * | 2020-03-03 | 2020-06-30 | 上海万位数字技术有限公司 | Bluetooth positioning system and Bluetooth positioning method of travel equipment |
| CN111464991A (en) * | 2020-04-01 | 2020-07-28 | 煤炭科学技术研究院有限公司 | Law enforcement terminals and systems |
| CN112444247B (en) * | 2020-11-19 | 2023-09-05 | 贵州北斗空间信息技术有限公司 | Indoor positioning method and system based on matrix transformation |
| CN113938853B (en) * | 2021-09-26 | 2023-05-12 | 众虎物联网(广州)有限公司 | Positioning method, device and system for indoor navigation |
| CN114268901B (en) * | 2021-12-24 | 2024-01-26 | 国网福建省电力有限公司 | A method and terminal for improving indoor positioning accuracy |
| CN114827894B (en) * | 2022-04-27 | 2024-12-24 | 多利购科技(广州)有限公司 | Indoor positioning method, system, computer equipment, and storage medium |
| CN115655266A (en) * | 2022-10-20 | 2023-01-31 | 湖南科众兄弟科技有限公司 | Inertial navigation/GPS combined navigation method and device |
| CN116456458B (en) * | 2023-01-12 | 2024-05-03 | 广东世炬网络科技股份有限公司 | Auxiliary positioning method and device based on equipment sensor |
| CN116153135B (en) * | 2023-04-04 | 2023-10-20 | 湖南朗赫科技有限公司 | Map navigation method and system applied to underground parking garage |
| CN116819591B (en) * | 2023-06-30 | 2024-01-19 | 常州市场景信息科技有限公司 | Positioning method and system based on RTK and Bluetooth |
| CN117576797A (en) * | 2023-10-20 | 2024-02-20 | 广东星舆科技有限公司 | A Bluetooth-based indoor punch-in method, system and Bluetooth work card |
| CN120075736B (en) * | 2025-03-10 | 2025-10-28 | 湖南工商大学 | An indoor positioning method based on the fusion of Bluetooth and inertial sensors |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101051079A (en) * | 2007-04-29 | 2007-10-10 | 金纯� | Blue tooth underground radio positioning system |
| CN103808319A (en) * | 2014-02-26 | 2014-05-21 | 上海交通大学 | Indoor Hybrid Positioning System and Method Based on Inertial Positioning and VLC Technology |
-
2014
- 2014-12-11 CN CN201410766028.6A patent/CN104703130B/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101051079A (en) * | 2007-04-29 | 2007-10-10 | 金纯� | Blue tooth underground radio positioning system |
| CN103808319A (en) * | 2014-02-26 | 2014-05-21 | 上海交通大学 | Indoor Hybrid Positioning System and Method Based on Inertial Positioning and VLC Technology |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104703130A (en) | 2015-06-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104703130B (en) | Localization method based on indoor positioning and its device | |
| Blum et al. | Smartphone sensor reliability for augmented reality applications | |
| US9642110B2 (en) | GPS and WLAN hybrid position determination | |
| CN104121905B (en) | Course angle obtaining method based on inertial sensor | |
| CN103189757B (en) | Position estimating device, position estimating method, program and integrated circuit | |
| CN105704669A (en) | Wearable-equipment-based user positioning method and system | |
| JP2016502647A (en) | Mobile terminal and mobile terminal location information acquisition method | |
| US9736295B2 (en) | Mobile electronic device, control method, and storage medium | |
| US20110270519A1 (en) | Apparatus and Method for Estimating Relative Location | |
| US9554253B2 (en) | Locating method, drive test terminal and hand-held terminal | |
| CN108225324A (en) | A kind of indoor orientation method merged based on the geomagnetic matching of intelligent terminal with PDR | |
| CN106455046B (en) | satellite-WiFi flight time combined positioning system and method thereof | |
| JP5052244B2 (en) | Wireless communication system | |
| CN104749582B (en) | The sending method of differential data, the determination method and device of GPS location data | |
| EP3440448B1 (en) | Automatic pressure sensor output calibration for reliable altitude determination | |
| EP2836035B1 (en) | Terminal positioning method, device and system | |
| KR20140100641A (en) | Global navigation satellite system and method for supporting virtual reference station using smart device | |
| JP6293009B2 (en) | Mobile terminal, program and method for estimating ground clearance | |
| CN116963272A (en) | A Bluetooth AOA positioning method based on recursive average filtering method and limiting filtering method | |
| US9146105B2 (en) | System and method for accuracy certification of geographical locations on a land tract | |
| JP2014190827A (en) | Positioning device, positioning method, and positioning program | |
| CN103618816B (en) | A kind of electronic guide needle system and implementation method thereof with zero offset capability | |
| WO2004001337A1 (en) | Method and apparatus for improving mobile communication terminal location determination using inertial positioning | |
| JP2008215924A (en) | Positioning device, positioning method and program | |
| CN105611494A (en) | A mobile phone-based crowd remote sensing monitoring system and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180824 |