HK1229431B - Position acquistion method and apparatus - Google Patents
Position acquistion method and apparatus Download PDFInfo
- Publication number
- HK1229431B HK1229431B HK17102850.6A HK17102850A HK1229431B HK 1229431 B HK1229431 B HK 1229431B HK 17102850 A HK17102850 A HK 17102850A HK 1229431 B HK1229431 B HK 1229431B
- Authority
- HK
- Hong Kong
- Prior art keywords
- distance
- devices
- target device
- valid
- intersection
- Prior art date
Links
Description
技术领域Technical Field
本申请属于定位技术领域,具体地说,涉及一种位置获取方法及装置。The present application belongs to the field of positioning technology, and specifically relates to a method and device for obtaining a position.
背景技术Background Art
在室内环境中,卫星信号到达地面时较弱且不能穿透建筑物,因此无法使用卫星定位进行位置定位,而在实际应用中,又经常需要在室内环境中进行位置定位,也即室内定位,以方便进行室内位置的管理、监控或追踪等,例如在超市以及商场等中,定位货架等的位置;在电子地图中,定位或追踪室内设备位置;位于室内的电子设备通过定位彼此位置进行互动等。In indoor environments, satellite signals are weak when they reach the ground and cannot penetrate buildings, so satellite positioning cannot be used for location positioning. However, in actual applications, location positioning is often required in indoor environments, that is, indoor positioning, to facilitate indoor location management, monitoring or tracking. For example, in supermarkets and shopping malls, the location of shelves, etc.; in electronic maps, the location of indoor devices can be located or tracked; electronic devices located indoors interact by locating each other's positions, etc.
在目前的室内定位技术中,通常是采用Wi-Fi、蓝牙、红外线、超宽带、RFID、ZigBee或超声波等技术,利用设备之间发射的信号强度实现室内定位。具体的,将位置待确定的目标设备与若干个位置已知的已知设备之间发射的信号强度,转换为目标设备与已知设备之间的设备距离,从而即可以计算获得目标设备的位置。Current indoor positioning technologies typically utilize Wi-Fi, Bluetooth, infrared, ultra-wideband, RFID, ZigBee, or ultrasonic technologies, leveraging the signal strength between devices. Specifically, the signal strength between a target device (whose location is to be determined) and several known devices (whose locations are known) is converted into the distance between them, allowing the target device's location to be calculated.
但是,由于信号干扰以及不同品牌设备的天线、电路和外壳设计不同可能造成信号强度存在误差,从而就会导致获取的目标设备的位置并不准确。However, due to signal interference and differences in antenna, circuit and casing design between devices of different brands, there may be errors in signal strength, which may result in inaccurate location of the target device.
发明内容Summary of the Invention
有鉴于此,本申请所要解决的技术问题是提供了一种位置获取方法及装置,用于解决现有技术中位置获取不准确的问题。In view of this, the technical problem to be solved by the present application is to provide a location acquisition method and device for solving the problem of inaccurate location acquisition in the prior art.
为了解决上述技术问题,本申请提供了一种位置获取方法,包括:In order to solve the above technical problems, the present application provides a location acquisition method, including:
从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,选择至少一组N个有效设备;Selecting at least one group of N valid devices from among known devices that transmit signals to the target device or among known devices that receive signals transmitted by the target device;
针对每一组的N个有效设备,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值,所述校正值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点;其中,所述换算比例因子用于将所述有效设备向目标设备发射的信号或者接收的所述目标设备发射的信号的信号强度转换为距离;For each group of N valid devices, adjust the value of the conversion scale factor to find a correction value for the conversion scale factor, the correction value being such that N circles or spheres formed with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection; wherein the conversion scale factor is used to convert the signal strength of a signal transmitted by the valid device to the target device, or a signal received by the target device, into a distance;
利用获得的所述换算因子的至少一个校正值,计算获得所述目标设备的位置。The position of the target device is calculated using the obtained at least one correction value of the conversion factor.
一种位置获取装置,包括:A position acquisition device, comprising:
设备选择模块,用于从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,选择至少一组N个有效设备;a device selection module, configured to select at least one group of N valid devices from among known devices that transmit signals to a target device or among known devices that receive signals transmitted by the target device;
校正模块,用于针对每一组的N个有效设备,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值,所述校正值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点;其中,所述换算比例因子用于将所述有效设备向目标设备发射的信号或者接收的所述目标设备发射的信号的信号强度转换为距离;a correction module, configured to adjust, for each group of N valid devices, a value of a conversion scale factor, and find a correction value of the conversion scale factor such that N circles or spheres formed with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection; wherein the conversion scale factor is used to convert the signal strength of a signal transmitted by the valid device to the target device, or a signal received by the target device, into a distance;
位置获取模块,用于利用获得的所述换算因子的至少一个校正值,计算获得所述目标设备的位置。The position acquisition module is used to calculate the position of the target device using the obtained at least one correction value of the conversion factor.
与现有技术相比,本申请可以获得包括以下技术效果:Compared with the existing technology, this application can achieve the following technical effects:
从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,选择至少一组N个有效设备;针对每一组的N个有效设备,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值,所述校正值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点;其中,所述换算比例因子用于将所述有效设备向目标设备发射的信号或者接收的所述目标设备发射的信号的信号强度转换为距离;利用获得的所述换算因子的至少一个校正值,计算获得所述目标设备的位置。本申请实施例通过寻找换算比例因子的校正值,提高了目标设备位置获取的准确性,减少了信号强度误差导致的位置获取不准确的问题。At least one group of N valid devices is selected from known devices that transmit signals to a target device or known devices that receive signals transmitted by the target device; for each group of N valid devices, the value of a conversion scale factor is adjusted to find a correction value of the conversion scale factor, wherein the correction value makes N circles or spheres formed with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection; wherein the conversion scale factor is used to convert the signal strength of the signal transmitted by the valid device to the target device or the signal received by the target device into a distance; and the position of the target device is calculated using at least one correction value of the conversion factor obtained. By finding the correction value of the conversion scale factor, the embodiment of the present application improves the accuracy of obtaining the position of the target device and reduces the problem of inaccurate position acquisition caused by signal strength error.
当然,实施本申请的任一产品必不一定需要同时达到以上所述的所有技术效果。Of course, any product implementing this application does not necessarily need to achieve all of the technical effects described above at the same time.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
图1是本申请实施例的一种位置获取方法一个实施例的流程图;FIG1 is a flow chart of an embodiment of a location acquisition method according to an embodiment of the present application;
图2a~图2k是本申请实施例的一维坐标空间中位置获取示意图;Figures 2a to 2k are schematic diagrams of position acquisition in a one-dimensional coordinate space according to an embodiment of the present application;
图3a~图3m是本申请实施例二维坐标空间中位置获取示意图;Figures 3a to 3m are schematic diagrams of position acquisition in a two-dimensional coordinate space according to an embodiment of the present application;
图4a~图4c是本申请实施例三维坐标空间中位置获取示意图;4a to 4c are schematic diagrams of position acquisition in a three-dimensional coordinate space according to an embodiment of the present application;
图5是本申请实施例中已知设备在室内环境中的一种布置示意图;FIG5 is a schematic diagram of an arrangement of known devices in an indoor environment according to an embodiment of the present application;
图6是本申请实施例中有效设备的一种选择示意图;FIG6 is a schematic diagram of a selection of effective devices in an embodiment of the present application;
图7是本申请实施例中有效设备的另一种选择示意图;FIG7 is a schematic diagram of another selection of effective devices in an embodiment of the present application;
图8是本申请实施例中一种位置获取装置一个实施例的结构示意图。FIG8 is a schematic structural diagram of an embodiment of a position acquisition device in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
以下将配合附图及实施例来详细说明本申请的实施方式,藉此对本申请如何应用技术手段来解决技术问题并达成技术功效的实现过程能充分理解并据以实施。The following will describe the implementation methods of the present application in detail with reference to the accompanying drawings and examples, so that the implementation process of how the present application applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
本申请技术方案主要适用于室内定位场景中,利用位置已知的已知设备的位置以及距离目标设备的距离,获得目标设备的位置。因此,需要首先确定已知设备与目标设备的之间的设备距离。The technical solution of this application is mainly applicable to indoor positioning scenarios, using the location of a known device and its distance from the target device to obtain the location of the target device. Therefore, it is necessary to first determine the device distance between the known device and the target device.
在目前室内定位技术中,主要是利用已知设备与目标设备之间发射或接收的信号的信号强度,通过换算比例因子,将信号强度转换为距离获得。因此已知设备与目标设备之间可以进行信号通信,主要可以采用Wifi、蓝牙、红外线、超宽带、RFID、ZigBee或超声波等技术实现。Current indoor positioning technology primarily uses the signal strength of signals transmitted or received between a known device and a target device, converting this strength into distance by applying a scaling factor. This allows signal communication between the known and target devices, primarily through Wi-Fi, Bluetooth, infrared, ultra-wideband, RFID, ZigBee, or ultrasonic technologies.
在不同的应用场景中,可以通过部署已知设备,以实现目标设备的定位,例如超市、商场等应用场景。In different application scenarios, known devices can be deployed to achieve the positioning of target devices, such as in supermarkets, shopping malls and other application scenarios.
正如背景技术中所述,由于存在信号干扰以及不同品牌设备的天线、电路和外壳设计不同等客原因,造成信号强度存在误差,导致计算获得的目标设备可能会存在多个解或者无解,使得无法准确获取目标设备的位置。As described in the background technology, due to signal interference and different antenna, circuit and casing designs of devices of different brands, there are errors in signal strength, resulting in multiple solutions or no solution for the calculated target device, making it impossible to accurately obtain the location of the target device.
为了解决现有技术无法准确获取目标设备位置的技术问题,发明人经过一系列的研究,提出本申请的技术方案,在本申请实施例中,从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,选择至少一组N个有效设备;针对每一组的N个有效设备,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值,所述校正值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点;其中,所述换算比例因子用于将所述有效设备向目标设备发射的信号或者接收的所述目标设备发射的信号的信号强度转换为距离;利用获得的所述换算因子的至少一个校正值,计算获得所述目标设备的位置。本申请实施例通过对换算比例因子进行调整,寻找校正值,可以确定出目标设备所在的唯一位置,从而提高了目标设备位置获取的准确性。In order to solve the technical problem that the existing technology cannot accurately obtain the location of the target device, the inventors have proposed the technical solution of the present application after a series of studies. In an embodiment of the present application, at least one group of N valid devices is selected from known devices that transmit signals to the target device or known devices that receive signals transmitted by the target device; for each group of N valid devices, the value of the conversion scale factor is adjusted to find a correction value of the conversion scale factor, wherein the correction value makes N circles or spheres formed with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection; wherein the conversion scale factor is used to convert the signal strength of the signal transmitted by the valid device to the target device or the signal received by the target device into distance; and the location of the target device is calculated using at least one correction value of the conversion factor obtained. By adjusting the conversion scale factor and finding the correction value, the embodiment of the present application can determine the unique location of the target device, thereby improving the accuracy of obtaining the location of the target device.
下面将结合附图对本申请技术方案进行详细描述。The technical solution of this application will be described in detail below with reference to the accompanying drawings.
图1为本申请实施例提供的一种位置获取方法一个实施例的流程图,该方法可以包括以下几个步骤:FIG1 is a flow chart of an embodiment of a location acquisition method provided in an embodiment of the present application. The method may include the following steps:
101:从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,选择至少一组N个有效设备。101: Select at least one group of N valid devices from among known devices that transmit signals to a target device or among known devices that receive signals transmitted by the target device.
本申请实施例中,所述已知设备是指在坐标空间中,位置已知的设备。目标设备为位置待确定的设备。In the embodiment of the present application, the known device refers to a device whose position is known in the coordinate space. The target device is a device whose position is to be determined.
已知设备以及目标设备是指可以利用用蓝牙、Wifi,以及RFID等无线传输技术进行数据传输的装置。The known device and the target device refer to devices that can transmit data using wireless transmission technologies such as Bluetooth, Wi-Fi, and RFID.
已知设备可以接收信号或发射信号,目标设备也可以接收信号或发射信号。接收信号的设备可以将信号上传至计算系统,由计算系统可以从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,选择N个有效设备,并利用信号强度,进行位置定位。Known devices can receive or transmit signals, and so can target devices. The receiving device can upload the signal to a computing system, which then selects N valid devices from among the known devices that transmitted signals to the target device or received signals from the target device. The system then uses the signal strength to determine the target device's location.
102:将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值。102: Adjust the value of the conversion scale factor to find a correction value of the conversion scale factor.
所述校正值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点。The correction value is such that N circles or spheres formed with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection point.
其中,所述换算比例因子用于将所述有效设备向目标设备发射的信号或者接收的所述目标设备发射的信号的信号强度转换为距离。The conversion scale factor is used to convert the signal strength of the signal transmitted by the effective device to the target device or the signal received by the target device into a distance.
其中,在一维或二维坐标空间中,形成的为圆,在三维或三维以上坐标空间中,形成的即为球。Among them, in one-dimensional or two-dimensional coordinate space, what is formed is a circle, and in three-dimensional or higher-dimensional coordinate space, what is formed is a sphere.
校正距离即是利用换算比例因子的校正值转换获得的,换算比例因子的校正值可以是初始值或者调整之后的任一个值。The correction distance is obtained by converting the correction value of the conversion scale factor. The correction value of the conversion scale factor can be an initial value or any value after adjustment.
其中,换算比例因子是指将信号强度转换为距离的参数,转换公式如下所述:The conversion factor refers to the parameter that converts signal strength to distance. The conversion formula is as follows:
d2=C2(R0-R);d 2 =C 2 (R 0 -R);
其中,R为接收或发射的信号的信号强度,d表示距离,C为换算比例因子,R0可以采用国际标准值,也可以是将已知设备无限靠近不同型号的用于接收信号并上传计算系统的主设备时的,信号强度均值。Where R is the signal strength of the received or transmitted signal, d represents the distance, and C is the conversion factor. R0 can use the international standard value or the average signal strength when a known device is infinitely close to different models of main devices used to receive signals and upload to the computing system.
在本实现场景中,换算比例因子具体可以将有效设备向目标设备发射的信号或者接收所述目标设备发射的信号的信号强度转换为距离。转换公式可以参见上述。In this implementation scenario, the conversion scaling factor can specifically convert the signal strength of the signal transmitted by the effective device to the target device or the signal received by the target device into the distance. The conversion formula can be found above.
在现有技术中,换算比例因子通常采用国际标准值。而本实施例中,为了解决信号强度误差导致距离计算不准确,进而影响目标设备位置准确定位的位置,可以对换算比例因子的数值进行调整。In the prior art, the conversion scale factor generally adopts an international standard value. In this embodiment, in order to solve the problem of inaccurate distance calculation caused by signal strength error, which in turn affects the accurate positioning of the target device, the value of the conversion scale factor can be adjusted.
其中,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值可以是通过将换算比例因子的数值进行放大或缩小,以获得校正值;当然,还可以通过计算方式,获得所述换算比例因子的校正值。在下面实施例中会进行详细介绍。The value of the conversion scale factor is adjusted, and the correction value of the conversion scale factor can be found by amplifying or reducing the value of the conversion scale factor to obtain the correction value. Of course, the correction value of the conversion scale factor can also be obtained by calculation. This will be described in detail in the following embodiments.
103:利用获得的所述换算因子的至少一个校正值,计算获得所述目标设备的位置。103: Calculate and obtain the position of the target device using the obtained at least one correction value of the conversion factor.
其中,利用换算比例因子计算获得目标设备的位置的方式可以与现有技术相同,例如可以采用三角质心算法等,在此不再赘述。The method of calculating the position of the target device using the conversion scale factor can be the same as that in the prior art, for example, a triangle centroid algorithm can be used, which will not be described in detail here.
在本实施例中,通过调整所述换算比例因子的数值,获得校正值,该校正值使得以N个有效设备与目标设备的校正距离为半径获得的N个圆或球具有唯一交点,该唯一交点即为目标设备所在位置,从而即可以获得目标设备的位置,本申请实施例通过对换算比例因子进行调整,寻找校正值,从而提高了目标设备位置获取的准确性。In this embodiment, a correction value is obtained by adjusting the value of the conversion scale factor. The correction value makes the N circles or spheres obtained with the correction distance between N valid devices and the target device as the radius have a unique intersection point. The unique intersection point is the location of the target device, so that the location of the target device can be obtained. The embodiment of the present application improves the accuracy of obtaining the target device location by adjusting the conversion scale factor and finding the correction value.
其中,可以选择多组N个有效设备,从而可以获得换算比例因子的多个校正值,可以是利用多个校正值的平均值,计算获得目标设备的位置,使得位置获取更加准确。Among them, multiple groups of N valid devices can be selected to obtain multiple correction values of the conversion scale factor. The average value of the multiple correction values can be used to calculate the position of the target device, making the position acquisition more accurate.
当然,还可以利用每一个换算比例因子的校正值,首先计算获得目标设备的初始位置;再将初始位置进行平均,获得目标设备的最终位置从而也可以提高位置获取的准确度。Of course, the correction value of each conversion scale factor can also be used to first calculate the initial position of the target device; then the initial positions are averaged to obtain the final position of the target device, thereby also improving the accuracy of position acquisition.
其中,作为又一个实施例,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值可以是:In yet another embodiment, the value of the conversion scale factor is adjusted, and the correction value of the conversion scale factor can be found as follows:
从换算比例因子的初始值开始,放大或缩小所述换算比例因子的数值,并在所述换算比例因子的当前调整值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点时,将所述当前调整值作为所述换算比例因子的校正值。Starting from the initial value of the conversion scale factor, the value of the conversion scale factor is enlarged or reduced, and when the current adjustment value of the conversion scale factor makes N circles or spheres formed with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection, the current adjustment value is used as the correction value of the conversion scale factor.
此时,N为大于坐标空间维数的整数。In this case, N is an integer greater than the dimension of the coordinate space.
也即N可以等于坐标控空间维数加1。That is, N can be equal to the dimension of the coordinate control space plus 1.
因此在一维坐标空间中,N可以等于2,在二维坐标空间中,N可以等于3,在三维坐标空间中,N可以等于4的整数。Therefore, in a one-dimensional coordinate space, N may be equal to 2, in a two-dimensional coordinate space, N may be equal to 3, and in a three-dimensional coordinate space, N may be equal to an integer of 4.
其中,N个有效设备即可以是指在一维空间中,不在同一位置,在二维空间中,不在同一直线、在三维空间中,不在同一面上的N个已知设备。The N valid devices may refer to N known devices that are not in the same position in one-dimensional space, are not on the same line in two-dimensional space, or are not on the same plane in three-dimensional space.
当前距离即是根据换算比例因子的当前调整值转换获得的,换算比例因子的当前值可以是初始值或者调整之后的任一个值。The current distance is obtained by conversion according to the current adjusted value of the conversion scale factor. The current value of the conversion scale factor may be an initial value or any value after adjustment.
换算比例因子的初始值可以采用国际标准值,也可以是将任意两个已知设备距离一米时测试获得的信号强度,按照上述转换公式计算得到的换算比例因子的均值。The initial value of the conversion scale factor may adopt an international standard value, or may be the average value of the conversion scale factor calculated according to the above conversion formula by measuring the signal strength obtained when any two known devices are one meter apart.
由于在不存在信号强度误差的情况下,以每一个有效设备的位置为中心,以每一个有效设备与目标设备的距离为半径,获得的N个圆或N个球具有唯一的一个交点。In the absence of signal strength errors, with the position of each valid device as the center and the distance between each valid device and the target device as the radius, the obtained N circles or N spheres have a unique intersection point.
因此本实施例中,为了保证N个有效设备对应的N个圆或N个球具有唯一的一个交点,可以通过调整换算比例因子的数值实现,以在一定程度上降低信号强度误差带来的位置获取不准确的问题。Therefore, in this embodiment, in order to ensure that the N circles or N spheres corresponding to N valid devices have a unique intersection, this can be achieved by adjusting the value of the conversion scale factor, thereby reducing the problem of inaccurate position acquisition caused by signal strength error to a certain extent.
通过调整换算比例因子的数值,即可以获得换算比例因子的校正值,通过该校正计算获得的校正距离,可以使得N个有效设备对应的N个圆或N个球具有唯一的一个交点。By adjusting the value of the conversion scale factor, a correction value of the conversion scale factor can be obtained. The correction distance obtained by the correction calculation can make the N circles or N spheres corresponding to the N valid devices have a unique intersection point.
其中,所述从换算比例因子的初始值开始,放大或缩小所述换算比例因子的数值,并在所述换算比例因子的当前调整值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点时,将所述当前调整值作为所述换算比例因子的校正值,可以有多种可能的实现方式。Among them, starting from the initial value of the conversion scale factor, the value of the conversion scale factor is enlarged or reduced, and when the current adjustment value of the conversion scale factor makes N circles or spheres with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection, the current adjustment value is used as the correction value of the conversion scale factor. There are many possible implementation methods.
作为又一个实施例,所述从换算比例因子的初始值开始,放大或缩小所述换算比例因子的数值,并在所述换算比例因子的当前调整值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点时,将所述当前调整值作为所述换算比例因子的校正值可以包括以下几个步骤:As yet another embodiment, starting from the initial value of the conversion scale factor, enlarging or reducing the value of the conversion scale factor, and using the current adjusted value as the correction value of the conversion scale factor when the current adjusted value of the conversion scale factor is such that N circles or spheres centered at the position of each valid device and having a correction distance between each valid device and the target device as a radius have a unique intersection point may include the following steps:
(X1)从所述N个有效设备中选择任一个有效设备作为判断设备,其它N-1个有效设备作为定位设备。(X1) Select any one valid device from the N valid devices as a judgment device, and the other N-1 valid devices as positioning devices.
(X2)从将所述换算比例因子的初始值作为当前调整值开始,判断是否以所述N-1个有效设备与所述目标设备的当前距离为半径,形成的N-1个圆或球具有交点,且所述判断设备与所述目标设备的当前距离等于所述判断设备与任一个交点位置的相交距离。(X2) Starting from the initial value of the conversion scale factor as the current adjustment value, determine whether the N-1 circles or spheres formed with the current distance between the N-1 valid devices and the target device as the radius have an intersection, and the current distance between the judgment device and the target device is equal to the intersection distance between the judgment device and any intersection position.
其中,所述当前距离即利用所述换算比例因子的当前调整值计算获得。The current distance is obtained by calculating the current adjustment value of the conversion scale factor.
(X3)如果(X2)判断结果为是,将所述换算比例因子的当前值作为所述换算比例因子的校正值。(X3) If the judgment result of (X2) is yes, the current value of the conversion scale factor is used as the correction value of the conversion scale factor.
也即,如果N-1个圆或球是否具有交点,且所述判断设备与所述目标设备的当前距离等于所述判断设备与任一个交点位置的相交距离时,表明以定位设备和判断设备分别与目标设备的当前距离为半径,形成的N个圆具有唯一交点,此时当前值即作为校正值。That is, if N-1 circles or spheres have an intersection, and the current distance between the judgment device and the target device is equal to the intersection distance between the judgment device and any intersection position, it indicates that the N circles formed with the current distances between the positioning device and the judgment device and the target device respectively as the radius have a unique intersection, and the current value is used as the correction value.
(X4)如果(X2)判断结果为否,也即N-1个圆或球没有交点,或者所述判断设备与所述目标设备的当前距离不能等于所述判断设备与任一个交点位置的相交距离时,执行如下操作:(X4) If the result of the judgment in (X2) is negative, that is, the N-1 circles or spheres do not intersect, or the current distance between the judgment device and the target device cannot be equal to the intersection distance between the judgment device and any intersection position, perform the following operations:
(X41)在所述N-1个圆或球具有两个交点位置时,将所述判断设备与所述目标设备的当前距离,分别和所述判断设备与接近所述判断设备的交点位置之间的第一相交距离、所述判断设备与远离所述判断设备的交点位置之间的第二相交距离以及所述判断设备与所述两个交点位置连线中心点之间的中心距离进行比较;(X41) when the N-1 circles or spheres have two intersection positions, compare the current distance between the judgment device and the target device with a first intersection distance between the judgment device and the intersection position close to the judgment device, a second intersection distance between the judgment device and the intersection position far from the judgment device, and a center distance between the judgment device and the center point of the line connecting the two intersection positions;
(X411)若所述当前距离小于所述第一相交距离且小于所述中心距离,或者所述当前距离小于所述第二相交距离且大于所述中心距离时,放大换算比例因子。(X411) If the current distance is smaller than the first intersection distance and smaller than the center distance, or if the current distance is smaller than the second intersection distance and larger than the center distance, amplify the conversion scale factor.
(X412)若所述当前距离大于所述第一相交距离且小于所述中心距离;或者所述当前距离大于所述第二相交距离且大于所述中心距离;或者所述当前距离大于所述第一相交距离且等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离相等时,缩小换算比例因子;(X412) If the current distance is greater than the first intersection distance and less than the center distance; or the current distance is greater than the second intersection distance and greater than the center distance; or the current distance is greater than the first intersection distance and equal to the center distance, and the current distances of the determination device and the positioning device to the target device are respectively equal, reduce the conversion scale factor;
(X413)若所述当前距离等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离不相等时,重新选择一个有效设备作为判断设备,其它N-1个有效设备作为定位设备之后继续执行;(X413) If the current distance is equal to the center distance, and the current distances between the judgment device and the positioning device and the target device are not equal, reselect a valid device as the judgment device, and continue the process after selecting the other N-1 valid devices as the positioning devices;
(X42)在所述N-1个圆或球没有交点且互相外离、且所述N-1个圆或球分别与以所述判断设备与目标设备的当前距离为半径形成的圆或球外离、且所述N个有效设备与所述目标设备的当前距离相同时,放大换算比例因子。(X42) When the N-1 circles or spheres have no intersection and are separated from each other, and the N-1 circles or spheres are respectively separated from the circle or sphere formed with the current distance between the judgment device and the target device as the radius, and the current distance between the N valid devices and the target device is the same, the conversion scale factor is amplified.
也即以定位设备和判断设备分别与目标设备的当前距离为半径,形成的N个圆外离,且定位设备和判断设备分别与目标设备的当前距离相同时,即放大换算比例因子。That is, the N circles formed with the current distances between the positioning device and the judgment device and the target device as radii, and when the current distances between the positioning device and the judgment device and the target device are the same, the conversion scale factor is amplified.
在每一次放大换算比例因子或者缩小换算比例因子之后,放大或缩小之后的调整值即作为当前值返回步骤(X2)继续执行,直至以所述N-1个有效设备与所述目标设备的当前距离为半径,形成的N-1个圆或球具有交点,且所述判断设备与所述目标设备的当前距离等于所述判断设备与任一个交点位置的相交距离时,此时的当前值即为校正值。After each enlargement or reduction of the conversion scale factor, the adjusted value after enlargement or reduction is returned to step (X2) as the current value to continue execution until the N-1 circles or spheres formed with the current distance between the N-1 valid devices and the target device as the radius have an intersection, and the current distance between the judgment device and the target device is equal to the intersection distance between the judgment device and any intersection position. At this time, the current value is the correction value.
下面将分别以一维坐标空间、二维坐标空间以及三维坐标空间,对换算比例因子的调整进行详细介绍。The following will introduce in detail the adjustment of the conversion scale factor using one-dimensional coordinate space, two-dimensional coordinate space, and three-dimensional coordinate space respectively.
在一维坐标空间中:In one-dimensional coordinate space:
所述N个有效设备的位置坐标为一维坐标,N等于2,所述N个有效设备包括两个。The position coordinates of the N valid devices are one-dimensional coordinates, N is equal to 2, and the N valid devices include two.
所述从换算比例因子的初始值开始,调整所述换算比例因子,使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备的当前距离为半径,形成的N个圆或球具有唯一交点时,获得所述换算比例因子的校正值可以包括:Starting from the initial value of the conversion scale factor, adjusting the conversion scale factor so that N circles or spheres formed with the position of each valid device as the center and the current distance between each valid device and the target device as the radius have a unique intersection, obtaining the correction value of the conversion scale factor may include:
(A1)从所述N个有效设备中选择一个作为定位设备,另一个作为判断设备。(A1) Select one of the N valid devices as a positioning device and another as a judgment device.
(A2)在一维坐标空间中,定位设备只包括一个,以定位设备与目标设备的当前距离为半径,只形成一个圆,为了方便描述,命名为定位圆。(A2) In a one-dimensional coordinate space, there is only one positioning device, and a circle is formed with the current distance between the positioning device and the target device as the radius. For the convenience of description, it is named the positioning circle.
此时判断设备与定位设备的连线,与定位圆形成的两个交点位置,即作为N-1个圆的交点位置。At this time, the two intersection positions formed by the line connecting the judgment device and the positioning device and the positioning circle are used as the intersection positions of the N-1 circles.
则步骤(A2)具体是判断所述判断设备与所述目标设备的当前距离是否等于所述判断设备与任一个交点位置的相交距离。Then step (A2) specifically determines whether the current distance between the determination device and the target device is equal to the intersection distance between the determination device and any intersection position.
(A3)如果步骤(A2)结果为是,则将当前值作为校正值。(A3) If the result of step (A2) is yes, the current value is used as the correction value.
(A4)如果步骤(A3)结果为否,则将所述判断设备与所述目标设备的当前距离,分别和所述判断设备与接近所述判断设备的交点位置之间的第一相交距离、所述判断设备与远离所述判断设备的交点位置之间的第二相交距离以及所述判断设备与所述两个交点位置连线中心点之间的中心距离进行比较。(A4) If the result of step (A3) is no, the current distance between the judgment device and the target device is compared with the first intersection distance between the judgment device and the intersection position close to the judgment device, the second intersection distance between the judgment device and the intersection position far from the judgment device, and the center distance between the judgment device and the center point of the line connecting the two intersection positions.
如图2a~图2e中所示,定位设备A和判断设备B形成两个圆,定位圆的两个交点位置分别为a和b,交点位置a为接近所述判断设备的交点位置,交点位置b为远离所述判断设备的交点位置。As shown in Figures 2a to 2e, the positioning device A and the judgment device B form two circles, and the two intersection positions of the positioning circles are a and b respectively. The intersection position a is the intersection position close to the judgment device, and the intersection position b is the intersection position far away from the judgment device.
(A41)若所述当前距离小于所述第一相交距离且小于所述中心距离,放大换算比例因子。(A41) If the current distance is less than the first intersection distance and less than the center distance, enlarge the conversion scale factor.
如图2a所示,通过放大换算比例因子,可以使得所述当前距离等于所述第一相交距离,相交于交点位置a,如图2b所示。As shown in FIG2a , by enlarging the conversion scale factor, the current distance can be made equal to the first intersection distance, and intersect at the intersection position a, as shown in FIG2b .
(A42)若所述当前距离小于所述第二相交距离且大于所述中心距离时,放大换算比例因子;(A42) if the current distance is less than the second intersection distance and greater than the center distance, amplifying the conversion scale factor;
如图2c所示。通过放大换算比例因子,可以使得所述当前距离等于所述第一相交距离,相交于交点位置b,如图2d所示。As shown in Figure 2c, by enlarging the conversion scale factor, the current distance can be made equal to the first intersection distance, and intersect at the intersection position b, as shown in Figure 2d.
(A43)若所述当前距离大于所述第一相交距离且小于所述中心距离,缩小换算比例因子;(A43) if the current distance is greater than the first intersection distance and less than the center distance, reducing the conversion scale factor;
如图2e所示。通过缩小换算比例因子,可以使得所述当前距离等于所述第一相交距离,相交于交点位置a,如图2f所示。As shown in Figure 2e, by reducing the conversion scale factor, the current distance can be made equal to the first intersection distance, and the intersection is at the intersection position a, as shown in Figure 2f.
(A44)若所述当前距离大于所述第二相交距离且大于所述中心距离,缩小换算比例因子;(A44) if the current distance is greater than the second intersection distance and greater than the center distance, reducing the conversion scale factor;
如图2g所示。通过缩小换算比例因子,可以使得所述当前距离等于所述第二相交距离,相交于交点位置b,如图2h所示。As shown in Figure 2g, by reducing the conversion scale factor, the current distance can be made equal to the second intersection distance, and intersect at the intersection position b, as shown in Figure 2h.
(A45)若所述当前距离大于所述第一相交距离且等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离相等时,缩小换算比例因子;(A45) if the current distance is greater than the first intersection distance and equal to the center distance, and the current distances between the determination device and the positioning device and the target device are equal, reducing the conversion scale factor;
如图2i所示,通过缩小换算比例因子,可以使得当前距离等于第一相交距离,相交于交点位置a,如图2j所示。As shown in FIG2i , by reducing the conversion scale factor, the current distance can be made equal to the first intersection distance, and the intersection is at the intersection position a, as shown in FIG2j .
(A46)若所述当前距离等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离不相等时,返回步骤(A1)重新选择一个有效设备作为判断设备,另一个有效设备作为定位设备之后继续执行;也即将定位设备和判断设备身份互换。如图2k所示。(A46) If the current distance is equal to the center distance, and the current distances between the judgment device and the positioning device are not equal to each other, the process returns to step (A1) and reselects a valid device as the judgment device and another valid device as the positioning device, and then continues the process; that is, the positioning device and the judgment device are swapped. This is shown in FIG2k.
在二维坐标空间中:In two-dimensional coordinate space:
所述N个有效设备的位置坐标为二维坐标,所述N个有效设备包括3个。The position coordinates of the N valid devices are two-dimensional coordinates, and the N valid devices include 3.
所述从换算比例因子的初始值开始,调整换算比例因子,使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备的当前距离为半径,形成的N个圆或球具有唯一交点时,获得换算比例因子的校正值可以包括:Starting from the initial value of the conversion scale factor, adjusting the conversion scale factor so that N circles or spheres formed with the position of each valid device as the center and the current distance between each valid device and the target device as the radius have a unique intersection, obtaining the correction value of the conversion scale factor may include:
(B1)从所述N个有效设备中选择任意两个作为定位设备,另一个作为判断设备。(B1) Select any two of the N valid devices as positioning devices and the other one as a judgment device.
(B2)从将所述换算比例因子的初始值作为当前调整值开始,判断以所述定位设备与所述目标设备的当前距离为半径,形成的2个圆是否具有交点,且所述判断设备与所述目标设备的当前距离是否等于所述判断设备与任一个交点位置的相交距离。(B2) Starting with the initial value of the conversion scale factor as the current adjustment value, determine whether two circles formed with the current distance between the positioning device and the target device as the radius have an intersection, and whether the current distance between the determination device and the target device is equal to the intersection distance between the determination device and any intersection position.
其中,所述当前距离利用所述换算比例因子的当前值计算获得;The current distance is calculated using the current value of the conversion scale factor;
(B3)如果(B2)判断结果均为是,也即定位设备形成的2个圆具有交点,且所述判断设备与所述目标设备的当前距离等于所述判断设备与任一个交点位置的相交距离,此时将所述换算比例因子的当前值作为所述换算比例因子的校正值;(B3) If the judgment results of (B2) are all yes, that is, the two circles formed by the positioning device have an intersection, and the current distance between the judgment device and the target device is equal to the intersection distance between the judgment device and any intersection position, then the current value of the conversion scale factor is used as the correction value of the conversion scale factor;
(B4)如果(B2)判断结果为否时,执行如下操作:(B4) If the result of (B2) is negative, perform the following operations:
(B41)在所述2个圆具有两个交点位置时,将所述判断设备与所述目标设备的当前距离,分别和所述判断设备与接近所述判断设备的交点位置之间的第一相交距离、所述判断设备与远离所述判断设备的交点位置之间的第二相交距离以及所述判断设备与所述两个交点位置连线中心点之间的中心距离进行比较。(B41) When the two circles have two intersection positions, the current distance between the judgment device and the target device is compared with the first intersection distance between the judgment device and the intersection position close to the judgment device, the second intersection distance between the judgment device and the intersection position far from the judgment device, and the center distance between the judgment device and the center point of the line connecting the two intersection positions.
如图3a~3j中所述,两个定位设备形成的两个圆有两个交点位置,分别为c和d,交点位置c为接近判断设备C的交点位置,判断设备C距离交点位置c的距离为第一相交距离,因此,距离交点位置d的距离即为第二相交距离,距离c和d连线的中心点m的距离为中心距离。As shown in Figures 3a to 3j, the two circles formed by the two positioning devices have two intersection positions, namely c and d. The intersection position c is the intersection position close to the judgment device C. The distance between the judgment device C and the intersection position c is the first intersection distance. Therefore, the distance from the intersection position d is the second intersection distance, and the distance from the center point m of the line connecting c and d is the center distance.
(B411)若所述当前距离小于所述第一相交距离且小于所述中心距离,放大换算比例因子。(B411) If the current distance is smaller than the first intersection distance and smaller than the center distance, enlarge the conversion scale factor.
如图3a所示。通过放大换算比例因子,可以使得当前距离等于第一相交距离,3个圆相交于交点位置c,如图3b所示。As shown in Figure 3a, by enlarging the conversion scale factor, the current distance can be made equal to the first intersection distance, and the three circles intersect at the intersection position c, as shown in Figure 3b.
(B412)若所述当前距离小于所述第二相交距离且大于所述中心距离时,放大换算比例因子。(B412) If the current distance is less than the second intersection distance and greater than the center distance, enlarge the conversion scale factor.
如图3c所示,通过放大换算比例因子,可以使得当前距离等于第二相交距离,3个圆相交于交点位置b,如图3d所示。As shown in FIG3c, by enlarging the conversion scale factor, the current distance can be made equal to the second intersection distance, and the three circles intersect at the intersection position b, as shown in FIG3d.
(B413)若所述当前距离大于所述第一相交距离且小于所述中心距离,缩小换算比例因子。(B413) If the current distance is greater than the first intersection distance and less than the center distance, reduce the conversion scale factor.
如图3e所示,通过缩小换算比例因子,可以使得当前距离等于第一相交距离,3个圆相交于交点位置c,如图3f所示。As shown in FIG3e , by reducing the conversion scale factor, the current distance can be made equal to the first intersection distance, and the three circles intersect at the intersection position c, as shown in FIG3f .
(B414)若所述当前距离大于所述第二相交距离且大于所述中心距离;缩小换算比例因子;(B414) If the current distance is greater than the second intersection distance and greater than the center distance; reduce the conversion scale factor;
如图3g所示,通过缩小换算比例因子,可以使得当前距离等于第二相交距离,3个圆相交于交点位置d,如图3h所示。As shown in FIG3g , by reducing the conversion scale factor, the current distance can be made equal to the second intersection distance, and the three circles intersect at the intersection position d, as shown in FIG3h .
(B415)若所述当前距离大于所述第一相交距离且等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离相等时,缩小换算比例因子;(B415) if the current distance is greater than the first intersection distance and equal to the center distance, and the current distances between the determination device and the positioning device and the target device are respectively equal, reducing the conversion scale factor;
如图3i所示,通过缩小换算比例因子,可以使得当前距离等于第一相交距离,3个圆相交于交点位置c。As shown in FIG3i , by reducing the conversion scale factor, the current distance can be made equal to the first intersection distance, and the three circles intersect at the intersection position c.
(B416)若所述当前距离等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离不相等时,重新选择一个有效设备作为判断设备,其它2个有效设备作为定位设备之后继续执行;(B416) If the current distance is equal to the center distance, and the current distances between the judgment device and the positioning device and the target device are not equal, reselect a valid device as the judgment device, and continue the process with the other two valid devices as the positioning devices;
如图3j所示。As shown in Figure 3j.
(B42)在所述2个圆没有交点且互相外离、且所述2个圆分别与以所述判断设备与目标设备的当前距离为半径形成的圆或球外离、且所述3个有效设备与所述目标设备的当前距离相同时,放大换算比例因子。(B42) When the two circles have no intersection and are separated from each other, and the two circles are respectively separated from a circle or a sphere formed with the current distance between the judgment device and the target device as a radius, and the current distances between the three valid devices and the target device are the same, the conversion scale factor is amplified.
如图3k所示,3个有效设备A、B和C形成的圆互相外离,且3个有效设备与所述目标设备的当前距离相同,此时即放大换算比例因子。As shown in FIG3k , the circles formed by the three valid devices A, B, and C are separated from each other, and the current distances between the three valid devices and the target device are the same. At this time, the conversion scale factor is amplified.
此外,在二维坐标空间中,在定位设备形成的N-1圆具有一个交点位置且外切时,所述方法还包括:In addition, in the two-dimensional coordinate space, when the N-1 circles formed by the positioning device have one intersection position and are circumscribed, the method further includes:
如果以所述判断设备与目标设备的当前距离为半径形成的圆内含与所述N-1个圆中的任一个圆时,重新选择一组N个有效设备继续执行;如图3l所示;If the circle formed by the current distance between the determination device and the target device as the radius contains any circle among the N-1 circles, a new group of N valid devices is selected to continue the execution; as shown in FIG31;
如果以所述判断设备与目标设备的当前距离为半径形成的圆内切与所述N-1个圆中的任一个圆时,且内切点不是所述交点位置时,重新选择一组N个有效设备继续执行。If a circle formed with the current distance between the judgment device and the target device as a radius is inscribed in any of the N-1 circles, and the inscribed point is not the intersection position, a new group of N valid devices is selected to continue execution.
在定位设备形成的N-1圆具有一个交点位置且内切时,如果以所述判断设备与目标设备的当前距离为半径形成的圆与所述N-1圆均外离时,重新选择一组N个有效设备继续执行;如图3m所示。When the N-1 circle formed by the positioning device has an intersection position and is inscribed, if the circle formed with the current distance between the judgment device and the target device as the radius is outside the N-1 circle, a new group of N valid devices is selected to continue execution; as shown in Figure 3m.
在三维坐标空间中:In three-dimensional coordinate space:
所述N个有效设备的位置坐标为三维坐标,所述N个有效设备包括4个。The position coordinates of the N valid devices are three-dimensional coordinates, and the N valid devices include 4.
所述调整换算比例因子,使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备的调整距离为半径,形成的N个圆或球具有唯一交点时,获得所述换算比例因子的校正值可以包括:Adjusting the conversion scale factor so that N circles or spheres formed with the position of each valid device as the center and the adjusted distance between each valid device and the target device as the radius have a unique intersection point may include: obtaining a correction value of the conversion scale factor.
(C1)从所述N个有效设备中选择任意三个作为定位设备,另一个作为判断设备。(C1) Select any three of the N valid devices as positioning devices and the other one as a judgment device.
(C2)从将所述换算比例因子的初始值作为当前调整值开始,判断以所述定位设备与所述目标设备的当前距离为半径,形成的3个球是否具有交点,且所述判断设备与所述目标设备的当前距离是否等于所述判断设备与任一个交点位置的相交距离。(C2) Starting from the initial value of the conversion scale factor as the current adjustment value, it is determined whether the three spheres formed with the current distance between the positioning device and the target device as the radius have an intersection, and whether the current distance between the judgment device and the target device is equal to the intersection distance between the judgment device and any intersection position.
其中,所述当前距离利用所述换算比例因子的当前值计算获得。The current distance is obtained by calculation using the current value of the conversion scale factor.
其中,三维坐标空间中,3个球具有交点包括3个球外切,如图4a所示;3个球相交,如图4b所示;以及3个球内切,如图4c所示。In the three-dimensional coordinate space, the intersection of the three spheres includes three spheres circumscribed, as shown in FIG4a ; three spheres intersecting, as shown in FIG4b ; and three spheres inscribed, as shown in FIG4c .
在3个球外切或内切时,具有一个交点。When the three balls are inscribed externally or internally, there is an intersection point.
在3个球相交时,具有两个交点。When three spheres intersect, there are two intersection points.
(C3)如果(C2)判断结果均为是,也即定位设备形成的3个球具有交点,且所述判断设备与所述目标设备的当前距离等于所述判断设备与任一个交点位置的相交距离,此时将所述换算比例因子的当前值作为所述换算比例因子的校正值。(C3) If the judgment results of (C2) are all yes, that is, the three spheres formed by the positioning device have an intersection, and the current distance between the judgment device and the target device is equal to the intersection distance between the judgment device and any intersection position, then the current value of the conversion scale factor is used as the correction value of the conversion scale factor.
(C4)如果(C2)判断结果为否时,执行如下操作:(C4) If the result of (C2) is negative, perform the following operations:
(C41)在所述N-1个球具有两个交点位置时,将所述判断设备与所述目标设备的当前距离,分别和所述判断设备与接近所述判断设备的交点位置之间的第一相交距离、所述判断设备与远离所述判断设备的交点位置之间的第二相交距离以及所述判断设备与所述两个交点位置连线中心点之间的中心距离进行比较;(C41) when the N-1 balls have two intersection positions, comparing the current distance between the judgment device and the target device with a first intersection distance between the judgment device and an intersection position close to the judgment device, a second intersection distance between the judgment device and an intersection position far from the judgment device, and a center distance between the judgment device and a center point of a line connecting the two intersection positions;
其中,在三维坐标空间中,所述判断设备与所述两个交点位置连线中心点之间的中心距离具体即是指判断设备到所述两个交点位置连线中心点形成的平面的中心距离。In the three-dimensional coordinate space, the center distance between the judgment device and the center point of the line connecting the two intersection positions specifically refers to the center distance between the judgment device and the plane formed by the center point of the line connecting the two intersection positions.
(C411)若所述当前距离小于所述第一相交距离且小于所述中心距离,放大换算比例因子;(C411) If the current distance is less than the first intersection distance and less than the center distance, enlarge the conversion scale factor;
(C412)若所述当前距离小于所述第二相交距离且大于所述中心距离时,放大换算比例因子;(C412) if the current distance is less than the second intersection distance and greater than the center distance, enlarging the conversion scale factor;
(C413)若所述当前距离大于所述第一相交距离且小于所述中心距离,缩小换算比例因子;(C413) if the current distance is greater than the first intersection distance and less than the center distance, reducing the conversion scale factor;
(C414)若所述当前距离大于所述第二相交距离且大于所述中心距离;缩小换算比例因子;(C414) If the current distance is greater than the second intersection distance and greater than the center distance; reduce the conversion scale factor;
(C415)若所述当前距离大于所述第一相交距离且等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离相等时,缩小换算比例因子;(C415) if the current distance is greater than the first intersection distance and equal to the center distance, and the current distances between the determination device and the positioning device and the target device are equal, reducing the conversion scale factor;
(C416)若所述当前距离等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离不相等时,重新选择一个有效设备作为判断设备,其它3个有效设备作为定位设备之后继续执行;(C416) If the current distance is equal to the center distance, and the current distances between the judgment device and the positioning device and the target device are not equal, reselect a valid device as the judgment device, and continue the process with the other three valid devices as the positioning devices;
(C42)在所述3个球没有交点且互相外离、且所述3个球分别与以所述判断设备与目标设备的当前距离为半径形成的圆或球外离、且所述4个有效设备与所述目标设备的当前距离相同时,放大换算比例因子。(C42) When the three spheres have no intersection and are separated from each other, and the three spheres are respectively separated from a circle or sphere formed with the current distance between the judgment device and the target device as a radius, and the current distances between the four valid devices and the target device are the same, the conversion scale factor is amplified.
此外。在二维坐标空间中,在所述N-1圆具有一个交点位置且外切时,所述方法还包括:In addition, in the two-dimensional coordinate space, when the N-1 circle has one intersection position and is circumscribed, the method further includes:
在所述N个有效设备的位置坐标为三维坐标时,N等于4,在所述N-1个球没有交点,且任意两个球内含时,则即重新选择一组N个有效设备继续执行。When the position coordinates of the N valid devices are three-dimensional coordinates, N is equal to 4. When there is no intersection among the N-1 spheres and any two spheres are contained, a new group of N valid devices is selected to continue execution.
其中,作为又一个实施例,在一维坐标空间中,所述N个有效设备的位置坐标为一维坐标时,N等于2;Wherein, as another embodiment, in a one-dimensional coordinate space, when the position coordinates of the N valid devices are one-dimensional coordinates, N is equal to 2;
所述将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值可以是:The method of adjusting the value of the conversion scale factor and finding the correction value of the conversion scale factor may be:
从所述两个有效设备中选择一个作为定位设备,另一个作为判断设备;Select one of the two valid devices as a positioning device and the other as a judgment device;
在所述定位设备与所述判断设备之间的设备距离小于所述判断设备与所述目标设备的初始距离时,则可以按照如下计算公式,获得换算比例因子的校正值:When the device distance between the positioning device and the judgment device is less than the initial distance between the judgment device and the target device, the correction value of the conversion scale factor can be obtained according to the following calculation formula:
d1-d2=L;d 1 -d 2 =L;
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2);d 2 2 =C cal 2 (R 0 -R 2 );
其中,L为定位设备与判断设备之间的设备距离,R1为判断设备对应的信号强度,R2为定位设备对应的信号强度;Ccal为换算比例因子的校正值,d1为判断设备与目标设备之间的校正距离,d2为定位设备与目标设备之间的校正距离。Where L is the device distance between the positioning device and the judgment device, R1 is the signal strength corresponding to the judgment device, and R2 is the signal strength corresponding to the positioning device; C cal is the correction value of the conversion scale factor, d1 is the corrected distance between the judgment device and the target device, and d2 is the corrected distance between the positioning device and the target device.
从而,计算获得所述换算比例因子的校正值为:Thus, the correction value of the conversion scale factor is calculated as:
需要说明是的,上述公式开平方根需保证为正值。It should be noted that the square root of the above formula must be a positive value.
在所述定位设备与所述判断设备之间的设备距离大于所述判断设备与所述目标设备的初始距离时,按照如下计算公式,获得换算比例因子的校正值:When the device distance between the positioning device and the judgment device is greater than the initial distance between the judgment device and the target device, the correction value of the conversion scale factor is obtained according to the following calculation formula:
d1+d2=L;d 1 +d 2 =L;
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2)。d 2 2 =C cal 2 (R 0 -R 2 ).
从而,计算获得所述换算比例因子的校正值为:Thus, the correction value of the conversion scale factor is calculated as:
需要说明是的,上述公式开平方根需保证为正值。It should be noted that the square root of the above formula must be a positive value.
在实际应用中,例如在超市或仓库等大型场所中,本申请实施例中的已知设备可以是预先布置在室内且位置已知的已知设备。In practical applications, for example, in large places such as supermarkets or warehouses, the known devices in the embodiments of the present application may be known devices that are pre-arranged indoors and have known locations.
已知设备可以按照预设阵列进行布置,在目标设备的每一个移动区域的对立两侧分别布置多个已知设备。移动区域为目标设备在室内的活动范围。室内环境中可以包括多个移动区域,移动区域例如可以是超市或仓库中货架中间的走道,已知设备可以布置在走道两侧的货架上。Known devices can be arranged in a pre-set array, with multiple known devices placed on opposite sides of each target device's movement zone. A movement zone is the indoor range of movement of the target device. Indoor environments can include multiple movement zones. For example, a movement zone could be an aisle between shelves in a supermarket or warehouse, and known devices could be placed on shelves on either side of the aisle.
如图5所示的已知设备布置示意图。分别在移动区域的对立两侧,部署多个已知设备。A schematic diagram of known device arrangement is shown in Figure 5. A plurality of known devices are deployed on opposite sides of the moving area.
在该实际应用中,已知设备接收信号或发射信号的有效区域范围为半圆或半球,所述已知设备的有效区域范围位于移动区域内,也即有效区域范围外接收或发射的信号会自动屏蔽。In this actual application, the effective area range of the known device for receiving or transmitting signals is a semicircle or a hemisphere, and the effective area range of the known device is within the moving area, that is, the signals received or transmitted outside the effective area range will be automatically shielded.
此时,作为又一个实施例:At this time, as another embodiment:
所述从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,选择至少一组N个有效设备可以包括:The selecting at least one group of N valid devices from among known devices that transmit signals to the target device or among known devices that receive signals transmitted by the target device may include:
从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,按照信号强度从强到弱的顺序,选择位于对立两侧、信号强度不相等、每一侧包括两个有效设备的四个有效设备,其中,位于同一侧的两个有效设备的位置坐标中只有一个坐标轴对应的坐标值不相等。From known devices that transmit signals to the target device or known devices that receive signals transmitted by the target device, four valid devices located on opposite sides with unequal signal strengths and two valid devices on each side are selected in order of signal strength from strong to weak, wherein the coordinate values corresponding to only one coordinate axis of the position coordinates of two valid devices located on the same side are unequal.
其中,所述已知设备接收信号或发射信号的有效区域范围为半圆或半球。The effective area for receiving or transmitting signals by the known device is a semicircle or a hemisphere.
信号强度最强的有效设备表示距离目标设备距离最短,由于目标设备处于移动状态,因此如果检测到第二时间的信号相较于第一时间的信号开始减弱,其中第一时间与第二时间为连续时间,则第一时间对应的信号即可以确定为最强信号。从而可以根据各个已知设备在第一时间对应的信号强度,选择有效设备。The valid device with the strongest signal strength is the closest to the target device. Because the target device is mobile, if the signal at the second time is detected to be weaker than the signal at the first time, and the first and second times are consecutive, the signal at the first time is determined to be the strongest signal. This allows valid devices to be selected based on the signal strengths of each known device at the first time.
如图6所示,白色圆圈代表目标设备,黑色圆圈即表示有效设备。按照图5所示布置的已知设备,即可以选择得到如图6所述的四个有效设备。位于同一侧的两个有效设备的位置坐标中只有一个坐标轴对应的坐标值不相等,也即位于同一个直线上。As shown in Figure 6, white circles represent target devices, and black circles represent valid devices. Using the known devices arranged as shown in Figure 5, four valid devices can be selected, as shown in Figure 6. Two valid devices on the same side have different coordinate values for only one axis, meaning they lie on the same straight line.
所述针对每一组的四个个有效设备,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值包括:For each group of four valid devices, adjusting the value of the conversion scale factor to find the correction value of the conversion scale factor includes:
针对每一组的四个有效设备,确定所述目标设备位于所述四个有效设备连接构成的区域范围内;For each group of four valid devices, determining that the target device is located within an area formed by the four valid devices;
按照如下计算公式,计算获得目标设备的校正换算因子:Calculate the correction conversion factor of the target device according to the following formula:
dj 2=Ccal 2(R0-Rj);d j 2 =C cal 2 (R 0 -R j );
其中,第j个有效设备的位置坐标为(Xj1,Xj2,……,XjM),其中M为坐标空间维数,M=1、2、3……。The position coordinates of the j-th valid device are (X j1 , X j2 , ..., X jM ), where M is the dimension of the coordinate space, M=1, 2, 3, ... . . .
目标设备的位置坐标为(Xt1,Xt2,……,XtM)。The location coordinates of the target device are (X t1 , X t2 , . . . , X tM ).
其中,j=1、2、3、4,Xjm为第j个有效设备的第m维坐标,Xtm为目标设备的第m维坐标;dj为第j个有效设备与所述目标设备的校正距离;其中,四个有效设备的只有第m维坐标不相等。Wherein, j=1, 2, 3, 4, Xjm is the m-th dimension coordinate of the j-th valid device, Xtm is the m-th dimension coordinate of the target device; dj is the corrected distance between the j-th valid device and the target device; wherein, only the m-th dimension coordinates of the four valid devices are different.
通过上述计算公式,可以获得包括Ccal的两个求解Xjm的公式,令两个公式相对,即可以计算获得Ccal。Through the above calculation formula, two formulas for solving X jm including C cal can be obtained. By making the two formulas relative to each other, C cal can be calculated.
利用计算获得Ccal,可以代入任一个求解Xjm的公式,即可以获得Xjm。将Xjm代入欧式距离公式,即可以求解获得其他维度的坐标值。Substituting C cal into any formula for solving X jm yields X jm Substituting X jm into the Euclidean distance formula yields coordinate values in other dimensions.
其中,为了提高位置获取准确性,可以选择多组四个有效设备,例如可以选择5组,也即20个有效设备,从而可以计算获得5个换算比例因子的校正值,可以利用5个校正值的平均值,求解获得目标设备的每一维坐标的坐标值,构成目标设备的位置坐标,作为目标设备最终位置。Among them, in order to improve the accuracy of position acquisition, multiple groups of four valid devices can be selected, for example, 5 groups, that is, 20 valid devices can be selected, so that the correction values of 5 conversion scale factors can be calculated. The average value of the 5 correction values can be used to solve the coordinate value of each dimension of the target device to form the position coordinates of the target device as the final position of the target device.
也可以利用每一个校正值,求解目标设备的每一维坐标的坐标值,获得每一维坐标对应的多个坐标值;再求解每一维坐标对应的多个坐标值的平均坐标值,由每一维坐标的平均坐标值构成目标设备的位置坐标,作为目标设备的最终位置。Each correction value can also be used to solve the coordinate value of each dimension of the target device to obtain multiple coordinate values corresponding to each dimension; then the average coordinate value of the multiple coordinate values corresponding to each dimension is solved, and the position coordinates of the target device are formed by the average coordinate value of each dimension as the final position of the target device.
下面以二维坐标空间为例进行说明,在一组有效设备中,有效设备的位置坐标可以表示为(Xj,Yj),目标设备的位置坐标为(Xt,Yt)假设位于同一侧的两个有效设备X坐标相等,如图6所示中,也即X1=X2,X3=X4;The following uses a two-dimensional coordinate space as an example. In a group of valid devices, the position coordinates of the valid devices can be expressed as (X j , Y j ), and the position coordinates of the target device are (X t , Y t ). Assume that the X coordinates of two valid devices on the same side are equal, as shown in Figure 6 , that is, X 1 = X 2 , X 3 = X 4 ;
根据欧式距离公式:According to the Euclidean distance formula:
由于X1=X2,X3=X4,可以将欧式距离公式,简化为:Since X 1 = X 2 , X 3 = X 4 , the Euclidean distance formula can be simplified to:
结合距离转换公式:Combined with the distance conversion formula:
dj 2=Ccal 2(R0-Rj);d j 2 =C cal 2 (R 0 -R j );
从而可以计算获得:Thus we can calculate:
令两式相等,即可以计算获得换算比例因子的校正值为:By making the two equations equal, we can calculate the correction value of the conversion factor:
计算获得换算比例因子的校正值之后,可以按照现有技术的公式计算获得目标设备的位置。After the correction value of the conversion scale factor is calculated, the position of the target device can be calculated according to the formula in the prior art.
当然作为又一个实施例,还可以将校正换算比例因子代入上述求解的任一个Yt的公式中,即可以计算获得Yt,将Yt代入欧式距离公式,进而即可以计算获得Xt。Of course, as another embodiment, the correction conversion factor can be substituted into any of the above-mentioned formulas for solving Y t to obtain Y t , and Y t can be substituted into the Euclidean distance formula to obtain X t .
其中,由于X1=X2,X3=X4,作为又一种可能的实现方式,可以将任一个已知设备的位置坐标作为二维坐标空间原点,假设将第2个已知设备的位置坐标作为二维坐标空间原点,第2个已知设备的位置坐标可以简化(0,0)则第1个已知设备的位置坐标可以简化为(0,Y1-Y2),第3个已知设备的位置坐标可以简化为(X3-X2,Y3-Y2),第4个已知设备的位置坐标可以简化为(X4-X2,Y4-Y2)。目标设备的位置坐标可以简化为(X’t,Y’t)Since X 1 = X 2 and X 3 = X 4 , as another possible implementation, the position coordinates of any known device can be used as the origin of the two-dimensional coordinate space. Assuming that the position coordinates of the second known device are used as the origin of the two-dimensional coordinate space, the position coordinates of the second known device can be simplified to (0, 0). Then the position coordinates of the first known device can be simplified to (0, Y 1 -Y 2 ), the position coordinates of the third known device can be simplified to (X 3 -X 2 , Y 3 -Y 2 ), and the position coordinates of the fourth known device can be simplified to (X 4 -X 2 , Y 4 -Y 2 ). The position coordinates of the target device can be simplified to (X' t , Y' t ).
上述欧式距离公式可以简化为:The above Euclidean distance formula can be simplified as:
从而作为一种可能的实现方式,可以至少利用上述公式(1)(2)(3)计算获得目标设备的位置坐:As a possible implementation method, the location of the target device can be calculated using at least the above formulas (1), (2), and (3):
其中,由(1)和(2)可以计算获得:Among them, from (1) and (2) we can calculate:
由(2)和(3)可以计算获得:From (2) and (3), we can calculate:
则目标设备的每一维坐标的坐标值为:The coordinate value of each dimension of the target device is:
从而可以进一步简化目标设备位置坐标值的计算,按照上述公式可以针对每一组有效设备,获得目标设备的每一维坐标对应的多个坐标值,通过求平均坐标值,由每一维坐标的平均坐标值构成目标设备的位置坐标,即获得目标设备的位置。This can further simplify the calculation of the target device position coordinate value. According to the above formula, for each group of valid devices, multiple coordinate values corresponding to each dimension of the target device can be obtained. By calculating the average coordinate value, the position coordinate of the target device is formed by the average coordinate value of each dimension of the coordinate, that is, the position of the target device is obtained.
当然,在选择多组有效设备时,可以计算获得的多个换算比例因子校正值,可以针对任一组有效设备,将利用多个换算比例因子校正值的平均值,求解获得的目标设备的每一维坐标的坐标值,构成目标设备的位置坐标,即获得目标设备的位置。Of course, when selecting multiple groups of valid devices, multiple conversion scale factor correction values can be calculated. For any group of valid devices, the average value of multiple conversion scale factor correction values can be used to solve the coordinate value of each dimension of the target device to form the position coordinates of the target device, that is, to obtain the position of the target device.
此外,作为又一种可能的实现方式,可以根据上述公式(1)(3)(4)计算获得目标设备的位置坐标:In addition, as another possible implementation method, the location coordinates of the target device can be calculated according to the above formulas (1)(3)(4):
其中,由上述公式(3)和(4)可以计算获得:Among them, the above formulas (3) and (4) can be used to calculate:
由公式(1)和(4)可以计算获得:From formulas (1) and (4), we can calculate:
因此,目标设备的每一维坐标的坐标值还可以为:Therefore, the coordinate value of each dimension of the target device can also be:
下面以三维坐标空间为例进行说明,在一组有效设备中,有效设备的位置坐标可以表示为(Xj,Yj,Zj),目标设备的位置坐标为(Xt,Yt,Zt)假设位于同一侧的两个有效设备X坐标以及Z坐标相等,也即X1=X2,X3=X4;Z1=Z2,Z3=Z4;The following uses a three-dimensional coordinate space as an example. In a group of valid devices, the position coordinates of the valid devices can be expressed as (X j , Y j , Z j ), and the position coordinates of the target device are (X t , Y t , Z t ). Assume that the X and Z coordinates of two valid devices on the same side are equal, that is, X 1 = X 2 , X 3 = X 4 ; Z 1 = Z 2 , Z 3 = Z 4 ;
根据欧式距离公式:According to the Euclidean distance formula:
由于X1=X2,X3=X4;Z1=Z2,Z3=Z4;可以将欧式距离公式,简化为:Since X 1 = X 2 , X 3 = X 4 ; Z 1 = Z 2 , Z 3 = Z 4 ; the Euclidean distance formula can be simplified to:
结合距离转换公式:Combined with the distance conversion formula:
dj 2=Ccal 2(R0-Rj)d j 2 =C cal 2 (R 0 -R j )
从而可以计算获得:Thus we can calculate:
令两式相等,即可以计算获得换算比例因子的校正值为:By making the two equations equal, we can calculate the correction value of the conversion factor:
计算获得换算比例因子的校正值之后,可以按照现有技术的公式计算获得目标设备的位置坐标。After the correction value of the conversion scale factor is calculated, the position coordinates of the target device can be calculated according to the formula in the prior art.
当然,为了进一步简化目标设备位置坐标的计算,由于于X1=X2,X3=X4;Z1=Z2,Z3=Z4;因此可以将任一个已知设备的位置坐标作为三维坐标空间原点,假设将第1个已知设备的位置坐标作为二维坐标空间原点,此时第1个已知设备的位置坐标可以简化(0,0,0),则第2个已知设备的位置坐标可以简化为(0,Y2-Y1,0),第3个已知设备的位置坐标可以简化为(0,0,Z3-Z1),第4个已知设备的位置坐标可以简化为(X4-X1,0,0)。目标设备的位置坐标可以简化为(X’t,Y’t)。Of course, to further simplify the calculation of the target device's position coordinates, since X 1 = X 2 , X 3 = X 4 ; Z 1 = Z 2 , Z 3 = Z 4 ; the position coordinates of any known device can be used as the origin of the three-dimensional coordinate space. Assuming that the position coordinates of the first known device are used as the origin of the two-dimensional coordinate space, the position coordinates of the first known device can be simplified to (0, 0, 0). The position coordinates of the second known device can be simplified to (0, Y 2 - Y 1 , 0), the position coordinates of the third known device can be simplified to (0, 0, Z 3 - Z 1 ), and the position coordinates of the fourth known device can be simplified to (X 4 - X 1 , 0, 0). The position coordinates of the target device can be simplified to (X' t , Y' t ).
上述欧式距离公式可以简化为:The above Euclidean distance formula can be simplified as:
从而可以根据公式(5)和公式(8)计算获得:Therefore, it can be calculated according to formula (5) and formula (8):
根据公式(5)和公式(6)计算获得:According to formula (5) and formula (6), we can obtain:
根据公式(5)和公式(7)计算获得:According to formula (5) and formula (7), we can obtain:
从而可以计算获得目标设备每一维坐标的坐标值为:The coordinate values of each dimension of the target device can be calculated as follows:
针对每一组有效设备,按照上述公式可以获得目标设备的每一维坐标对应的多个坐标值,然后求解每一维坐标的平均坐标值,即可以由每一维坐标的平均坐标值构成目标设备的位置坐标。For each group of valid devices, the above formula can be used to obtain multiple coordinate values corresponding to each dimension of the target device, and then the average coordinate value of each dimension is solved, that is, the position coordinates of the target device can be formed by the average coordinate value of each dimension.
此外,基于图5所示的已知设备在室内环境中的布置,作为又一个实施例,所述针对每一组的四个有效设备,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值可以包括:In addition, based on the arrangement of known devices in an indoor environment shown in FIG5 , as yet another embodiment, adjusting the value of the conversion scale factor for each group of four valid devices and finding the correction value of the conversion scale factor may include:
针对每一组的四个有效设备,确定所述目标设备位于所述两个有效设备所在直线上,且所述目标设备分别距离两个有效设备的距离之和等于两个有效设备之间的距离;For each group of four valid devices, determine that the target device is located on a straight line where the two valid devices are located, and the sum of the distances between the target device and the two valid devices is equal to the distance between the two valid devices;
按照如下计算公式,计算获得目标设备的校正换算因子:Calculate the correction conversion factor of the target device according to the following formula:
d1+d2=L;d 1 +d 2 =L;
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2)。d 2 2 =C cal 2 (R 0 -R 2 ).
其中,L为两个有效设备之间的设备距离,d1和d2分别为两个有效设备与目标设备的之间的校正距离,R1和R2分别为两个有效设备对应的信号强度。Where L is the device distance between two valid devices, d1 and d2 are the corrected distances between the two valid devices and the target device, and R1 and R2 are the signal strengths corresponding to the two valid devices.
计算获得的换算比例因子的校正值为:The calculated correction value of the conversion scale factor is:
也即在该实际应用中,无论采用几维空间,都可以通过选择合适的有效设备,转换为在一维空间中,计算获得换算比例因子的校正值,简化了计算算法,可以提高位置定位效率。That is, in this practical application, no matter how many dimensions of space are used, by selecting appropriate effective equipment, it can be converted into one-dimensional space to calculate the correction value of the conversion scale factor, which simplifies the calculation algorithm and improves the positioning efficiency.
在该实施例中,获得校正换算比例因子之后,可以按照现有技术计算获取目标设备的位置。In this embodiment, after obtaining the correction conversion scale factor, the position of the target device can be calculated and obtained according to the existing technology.
其中,为了提高位置获取准确性,可以选择多组四个有效设备,例如可以选择5组,也即20个有效设备,从而可以计算获得5个换算比例因子的校正值,可以将利用5个校正值的平均值,求解获得的目标设备的每一维坐标的坐标值,构成目标设备的位置坐标。Among them, in order to improve the accuracy of position acquisition, multiple groups of four valid devices can be selected, for example, 5 groups, that is, 20 valid devices can be selected, so that the correction values of 5 conversion scale factors can be calculated and obtained. The average value of the 5 correction values can be used to solve the coordinate value of each dimension of the target device to form the position coordinates of the target device.
也可以利用每一个校正值,求解目标设备的每一维坐标的坐标值,获得每一维坐标对应的多个坐标值;再求解每一维坐标对应的多个坐标值的平均坐标值,由每一维坐标的平均坐标值构成目标设备的位置坐标。Each correction value can also be used to solve the coordinate value of each dimension of the target device to obtain multiple coordinate values corresponding to each dimension; then the average coordinate value of the multiple coordinate values corresponding to each dimension is solved, and the average coordinate value of each dimension constitutes the position coordinate of the target device.
因此,作为又一个实施例,利用获得的所述换算因子的每一个校正值,可以按照如下计算公式计算获得所述目标设备的位置:Therefore, as another embodiment, using each correction value of the conversion factor obtained, the position of the target device can be calculated according to the following calculation formula:
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2);d 2 2 =C cal 2 (R 0 -R 2 );
其中,Xtn为目标设备的第n维坐标,X1n为第1个有效设备的第n维坐标,X2n为第2个有效设备的第n维坐标,d1为第1个有效设备与目标设备的校正距离,d2为第2个有效设备与目标设备的校正距离,n=1、2……M,M为坐标空间维数,M=1、2……。Wherein, Xtn is the n-th coordinate of the target device, X1n is the n-th coordinate of the first valid device, X2n is the n-th coordinate of the second valid device, d1 is the corrected distance between the first valid device and the target device, d2 is the corrected distance between the second valid device and the target device, n=1, 2, ..., M, M is the dimension of the coordinate space, M=1, 2, ...
其中,第1个有效设备的位置坐标为(X11,X12,……,X1M),第2个有效设备的位置坐标为(X21,X22,……,X2M)。The position coordinates of the first valid device are (X 11 , X 12 , ..., X 1M ), and the position coordinates of the second valid device are (X 21 , X 22 , ..., X 2M ).
目标设备的位置坐标为(Xt1,Xt2,……,XtM)。The location coordinates of the target device are (X t1 , X t2 , . . . , X tM ).
从而即可以计算获得:Thus we can calculate:
之后,可以由每一个校正值计算获得的所述目标设备的每一维坐标的坐标值的平均坐标值,构成所述目标设备位置的位置坐标。Afterwards, the average coordinate value of the coordinate values of each dimension of the target device obtained by calculating each correction value may be used to form the position coordinates of the target device.
下面分别以二维坐标空间和三维坐标空间为例对目标设备位置坐标的计算进行说明。The calculation of the target device position coordinates is explained below using two-dimensional coordinate space and three-dimensional coordinate space as examples.
在二维坐标空间中,第1个有效设备的位置坐标即可以表示(X1,Y1),第2个有效设备的位置坐标可以表示(X2,Y2),目标设备的位置坐标可以表示为(Xt,Yt)In a two-dimensional coordinate space, the position coordinates of the first valid device can be expressed as (X 1 , Y 1 ), the position coordinates of the second valid device can be expressed as (X 2 , Y 2 ), and the position coordinates of the target device can be expressed as (X t , Y t ).
因此可以按照如下计算公式:Therefore, the calculation formula can be as follows:
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2);d 2 2 =C cal 2 (R 0 -R 2 );
即可以计算获得目标设备的每一维坐标的坐标值为:That is, the coordinate value of each dimension of the target device can be calculated as follows:
在三维坐标空间中,第1个有效设备的位置坐标即可以表示(X1,Y1,Z1),第2个有效设备的位置坐标可以表示(X2,Y2,Z2),目标设备的位置坐标可以表示为(Xt,Yt,Zt)In the three-dimensional coordinate space, the position coordinates of the first valid device can be expressed as ( X1 , Y1 , Z1 ), the position coordinates of the second valid device can be expressed as ( X2 , Y2 , Z2 ), and the position coordinates of the target device can be expressed as ( Xt , Yt , Zt ).
因此可以按照如下计算公式:Therefore, the calculation formula can be as follows:
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2);d 2 2 =C cal 2 (R 0 -R 2 );
即可以计算获得目标设备的每一维坐标的坐标值为:That is, the coordinate value of each dimension of the target device can be calculated as follows:
其中,如图7所示的一种特殊情况,在二维坐标空间中,假设有效设备与目标设备的Y坐标相等。In a special case shown in FIG7 , it is assumed that the Y coordinates of the effective device and the target device are equal in the two-dimensional coordinate space.
此时,d1+d2=L;L=X2-X1;At this time, d 1 +d 2 =L; L = X 2 -X 1 ;
Xt=X1+d1=X2-d2;X t =X 1 +d 1 =X 2 -d 2 ;
从而即可以计算获得目标设备的每一维坐标的坐标值为:Thus, the coordinate value of each dimension of the target device can be calculated as follows:
Yt=Y2=Y1。Y t =Y 2 =Y 1 .
通过本申请实施例对换算比例因子进行调整,以获得换算比例因子的校正值,从而提高了目标设备位置获取的准确性。By adjusting the conversion scale factor according to the embodiment of the present application to obtain a correction value of the conversion scale factor, the accuracy of obtaining the position of the target device is improved.
图8是本申请实施例提供的一种位置获取装置一个实施例的结构示意图,该装置可以具体配置在计算机系统中,从而通过计算机系统实现位置获取。FIG8 is a schematic structural diagram of an embodiment of a position acquisition device provided in an embodiment of the present application. The device can be specifically configured in a computer system to achieve position acquisition through the computer system.
该装置可以包括:The device may include:
设备选择模块801,用于从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,选择至少一组N个有效设备。The device selection module 801 is configured to select at least one group of N valid devices from among known devices that transmit signals to a target device or among known devices that receive signals transmitted by the target device.
校正模块802,用于针对每一组的N个有效设备,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值,所述校正值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点。The correction module 802 is used to adjust the value of the conversion scale factor for each group of N valid devices and find a correction value of the conversion scale factor, wherein the correction value ensures that the N circles or spheres formed with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection.
其中,所述换算比例因子用于将所述有效设备向目标设备发射的信号或者接收的所述目标设备发射的信号的信号强度转换为距离。The conversion scale factor is used to convert the signal strength of the signal transmitted by the effective device to the target device or the signal received by the target device into a distance.
其中,在一维或二维坐标空间中,形成的为圆,在三维或三维以上坐标空间中,形成的即为球。Among them, in one-dimensional or two-dimensional coordinate space, what is formed is a circle, and in three-dimensional or higher-dimensional coordinate space, what is formed is a sphere.
校正距离即是利用换算比例因子的校正值转换获得的,换算比例因子的校正值可以是初始值或者调整之后的任一个值。The correction distance is obtained by converting the correction value of the conversion scale factor. The correction value of the conversion scale factor can be an initial value or any value after adjustment.
其中,将换算比例因子的数值进行调整,寻找所述换算比例因子的校正值可以是通过将换算比例因子的数值进行放大或缩小,以遍历寻找获得校正值。The value of the conversion scale factor is adjusted, and the correction value of the conversion scale factor is found by amplifying or reducing the value of the conversion scale factor to traverse and find the correction value.
当然,还可以通过计算方式,获得所述换算比例因子的校正值。Of course, the correction value of the conversion scale factor can also be obtained by calculation.
在下面实施例中会进行详细介绍。This will be described in detail in the following examples.
位置获取模块803,用于利用获得的所述换算因子的至少一个校正值,计算获得所述目标设备位置。The position acquisition module 803 is configured to calculate the target device position using the obtained at least one correction value of the conversion factor.
在本实施例中,通过调整所述换算比例因子的数值,获得校正值,该校正值使得以N个有效设备与目标设备的校正距离为半径获得的N个圆或球具有唯一交点,该唯一交点即为目标设备所在位置,从而即可以获得目标设备的位置,本申请实施例通过对换算比例因子进行调整,寻找校正值,从而提高了目标设备位置获取的准确性。In this embodiment, a correction value is obtained by adjusting the value of the conversion scale factor. The correction value makes the N circles or spheres obtained with the correction distance between N valid devices and the target device as the radius have a unique intersection point. The unique intersection point is the location of the target device, so that the location of the target device can be obtained. The embodiment of the present application improves the accuracy of obtaining the target device location by adjusting the conversion scale factor and finding the correction value.
其中,可以选择多组N个有效设备,从而可以获得多个校正换算比例因子的校正值,位置获取模块具体的可以是利用多个换算比例因子的校正值的平均校正值,利用平均校正值计算获得的目标设备位置,使得位置获取更加准确。Among them, multiple groups of N valid devices can be selected to obtain correction values of multiple correction conversion scale factors. The position acquisition module can specifically use the average correction value of the correction values of multiple conversion scale factors, and use the average correction value to calculate the target device position, so that the position acquisition is more accurate.
当然,还可以利用每一个换算比例因子的校正值,首先计算获得目标设备的位置坐标值;再将位置坐标值进行平均,将获得的平均位置坐标值构成目标设备位置的位置坐标,从而也可以提高位置获取的准确度。Of course, the correction value of each conversion scale factor can also be used to first calculate the position coordinate value of the target device; then the position coordinate values are averaged, and the obtained average position coordinate value is used to form the position coordinate of the target device position, thereby also improving the accuracy of position acquisition.
其中,作为又一个实施例,所述校正模块可以具体用于:In yet another embodiment, the correction module may be specifically configured to:
从换算比例因子的初始值开始,放大或缩小所述换算比例因子的数值,并在所述换算比例因子的当前调整值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的当前距离为半径,形成的N个圆或球具有唯一交点时,将所述当前调整值作为所述换算比例因子的校正值。Starting from the initial value of the conversion scale factor, the value of the conversion scale factor is enlarged or reduced, and when the current adjustment value of the conversion scale factor makes N circles or spheres formed with the position of each valid device as the center and the current distance between each valid device and the target device as the radius have a unique intersection, the current adjustment value is used as the correction value of the conversion scale factor.
此时,N为大于坐标空间维数的整数。In this case, N is an integer greater than the dimension of the coordinate space.
也即N可以等于坐标控空间维数加1。That is, N can be equal to the dimension of the coordinate control space plus 1.
因此在一维坐标空间中,N可以等于2,在二维坐标空间中,N可以等于3,在三维坐标空间中,N可以等于4的整数。Therefore, in a one-dimensional coordinate space, N may be equal to 2, in a two-dimensional coordinate space, N may be equal to 3, and in a three-dimensional coordinate space, N may be equal to an integer of 4.
其中,N个有效设备即可以是指在一维空间中,不在同一位置,在二维空间中,不在同一直线、在三维空间中,不在同一面上的N个已知设备。The N valid devices may refer to N known devices that are not in the same position in one-dimensional space, are not on the same line in two-dimensional space, or are not on the same plane in three-dimensional space.
当前距离即是根据换算比例因子的当前调整值转换获得的,换算比例因子的当前值可以是初始值或者调整之后的任一个值。The current distance is obtained by conversion according to the current adjusted value of the conversion scale factor. The current value of the conversion scale factor may be an initial value or any value after adjustment.
换算比例因子的初始值可以采用国际标准值,也可以是将任意两个已知设备距离一米时测试获得的信号强度,按照上述转换公式计算得到的换算比例因子的均值。The initial value of the conversion scale factor may adopt an international standard value, or may be the average value of the conversion scale factor calculated according to the above conversion formula by measuring the signal strength obtained when any two known devices are one meter apart.
由于在不存在信号强度误差的情况下,以每一个有效设备的位置为中心,以每一个有效设备与目标设备的距离为半径,获得的N个圆或N个球具有唯一的一个交点。In the absence of signal strength errors, with the position of each valid device as the center and the distance between each valid device and the target device as the radius, the obtained N circles or N spheres have a unique intersection point.
因此本实施例中,为了保证N个有效设备对应的N个圆或N个球具有唯一的一个交点,可以通过调整换算比例因子的数值实现,以在一定程度上降低信号强度误差带来的位置获取不准确的问题。Therefore, in this embodiment, in order to ensure that the N circles or N spheres corresponding to N valid devices have a unique intersection, this can be achieved by adjusting the value of the conversion scale factor, thereby reducing the problem of inaccurate position acquisition caused by signal strength error to a certain extent.
通过调整换算比例因子的数值,即可以获得换算比例因子的校正值,通过该校正计算获得的校正距离,可以使得N个有效设备对应的N个圆或N个球具有唯一的一个交点。By adjusting the value of the conversion scale factor, a correction value of the conversion scale factor can be obtained. The correction distance obtained by the correction calculation can make the N circles or N spheres corresponding to the N valid devices have a unique intersection point.
其中,校正模块从换算比例因子的初始值开始,放大或缩小所述换算比例因子的数值,并在所述换算比例因子的当前调整值使得以每一个有效设备的位置为中心,以每一个有效设备与所述目标设备之间的校正距离为半径,形成的N个圆或球具有唯一交点时,将所述当前调整值作为所述换算比例因子的校正值,可以有多种可能的实现方式。Among them, the correction module starts from the initial value of the conversion scale factor, amplifies or reduces the value of the conversion scale factor, and when the current adjustment value of the conversion scale factor makes N circles or spheres formed with the position of each valid device as the center and the correction distance between each valid device and the target device as the radius have a unique intersection, the current adjustment value is used as the correction value of the conversion scale factor. There are many possible implementation methods.
作为又一个实施例,所述校正模块可以具体用于:As yet another embodiment, the correction module may be specifically configured to:
从所述N个有效设备中选择任一个有效设备作为判断设备,其它N-1个有效设备作为定位设备;Select any one valid device from the N valid devices as a judgment device, and the other N-1 valid devices as positioning devices;
从将所述换算比例因子的初始值作为当前调整值开始,判断是否以所述N-1个有效设备与所述目标设备的当前距离为半径,形成的N-1个圆或球具有交点,且所述判断设备与所述目标设备的当前距离等于所述判断设备与任一个交点位置的相交距离;其中,所述当前距离利用所述换算比例因子的当前值计算获得;Starting with an initial value of the conversion scale factor as a current adjustment value, determining whether N-1 circles or spheres formed with the current distances between the N-1 valid devices and the target device as radii have an intersection, and whether the current distance between the determination device and the target device is equal to the intersection distance between the determination device and any one of the intersections; wherein the current distance is calculated using the current value of the conversion scale factor;
如果是,将所述换算比例因子的当前值作为所述换算比例因子的校正值;If yes, using the current value of the conversion scale factor as the correction value of the conversion scale factor;
如果否,在所述N-1个圆或球具有两个交点位置时,将所述判断设备与所述目标设备的当前距离,分别和所述判断设备与接近所述判断设备的交点位置之间的第一相交距离、所述判断设备与远离所述判断设备的交点位置之间的第二相交距离以及所述判断设备与所述两个交点位置连线中心点之间的中心距离进行比较;If not, when the N-1 circles or spheres have two intersection positions, compare the current distance between the judgment device and the target device with a first intersection distance between the judgment device and the intersection position close to the judgment device, a second intersection distance between the judgment device and the intersection position far from the judgment device, and a center distance between the judgment device and the center point of the line connecting the two intersection positions;
若所述当前距离小于所述第一相交距离且小于所述中心距离,或者所述当前距离小于所述第二相交距离且大于所述中心距离时,放大换算比例因子;If the current distance is less than the first intersection distance and less than the center distance, or if the current distance is less than the second intersection distance and greater than the center distance, amplify the conversion scale factor;
若所述当前距离大于所述第一相交距离且小于所述中心距离;或者所述当前距离大于所述第二相交距离且大于所述中心距离;或者所述当前距离大于所述第一相交距离且等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离相等时,缩小换算比例因子;If the current distance is greater than the first intersection distance and less than the center distance; or the current distance is greater than the second intersection distance and greater than the center distance; or the current distance is greater than the first intersection distance and equal to the center distance, and the current distances of the determination device and the positioning device to the target device are respectively equal, reducing the conversion scale factor;
若所述当前距离等于所述中心距离,且所述判断设备和所述定位设备分别与所述目标设备的当前距离不相等时,重新选择一个有效设备作为判断设备,其它N-1个有效设备作为定位设备之后继续执行;If the current distance is equal to the center distance, and the current distances between the judgment device and the positioning device and the target device are not equal, a valid device is reselected as the judgment device, and the other N-1 valid devices are used as positioning devices before continuing the process;
在所述N-1个圆或球没有交点且互相外离、且所述N-1个圆或球分别与以所述判断设备与目标设备的当前距离为半径形成的圆或球外离、且所述N个有效设备与所述目标设备的当前距离相同时,放大换算比例因子。When the N-1 circles or spheres have no intersection and are separated from each other, and the N-1 circles or spheres are respectively separated from a circle or sphere formed with the current distance between the judgment device and the target device as a radius, and the current distance between the N valid devices and the target device is the same, the conversion scale factor is amplified.
其中,在所述N个有效设备的位置坐标为二维坐标时,N等于3;Wherein, when the position coordinates of the N valid devices are two-dimensional coordinates, N is equal to 3;
所述校正模块在所述N-1个圆具有一个交点位置且外切时,还用于:When the N-1 circles have one intersection position and are circumscribed, the correction module is further configured to:
如果以所述判断设备与目标设备的当前距离为半径形成的圆内含与所述N-1个圆中的任一个圆时,重新选择一组N个有效设备继续执行;If a circle formed by taking the current distance between the determination device and the target device as a radius contains any of the N-1 circles, a new group of N valid devices is selected to continue the execution;
如果以所述判断设备与目标设备的当前距离为半径形成的圆与所述N-1个圆中的任一个圆相交时,缩小换算比例因子。If a circle formed with the current distance between the determination device and the target device as a radius intersects any one of the N-1 circles, the conversion scale factor is reduced.
在所述N-1圆具有一个交点位置且内切时,所述方法还包括:When the N-1 circle has one intersection position and is inscribed, the method further includes:
如果以所述判断设备与目标设备的当前距离为半径形成的圆与所述N-1圆均外离时,重新选择一组N个有效设备继续执行;If the circle formed by the current distance between the determination device and the target device as the radius is outside the N-1 circle, a new group of N valid devices is selected to continue the execution;
所述N个有效设备的位置坐标为三维坐标时,N等于4;When the position coordinates of the N valid devices are three-dimensional coordinates, N is equal to 4;
所述校正模块在所述N-1个球没有交点,且任意两个球内含时,还用于触发所述设备选择模块重新选择一组N个有效设备。The correction module is further configured to trigger the device selection module to reselect a group of N valid devices when the N-1 spheres have no intersection and any two spheres are contained.
作为又一个实施例,在所述N个有效设备的位置坐标为一维坐标时,N等于2;As yet another embodiment, when the position coordinates of the N valid devices are one-dimensional coordinates, N is equal to 2;
所述校正模块具体用于:The correction module is specifically used for:
从所述两个有效设备中选择一个作为定位设备,另一个作为判断设备;Select one of the two valid devices as a positioning device and the other as a judgment device;
在所述定位设备与所述判断设备之间的设备距离小于所述判断设备与所述目标设备的初始距离时,按照如下计算公式,获得换算比例因子的校正值:When the device distance between the positioning device and the judgment device is less than the initial distance between the judgment device and the target device, the correction value of the conversion scale factor is obtained according to the following calculation formula:
d1-d2=L;d 1 -d 2 =L;
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2);d 2 2 =C cal 2 (R 0 -R 2 );
其中,L为定位设备与判断设备之间的设备距离,R1为判断设备对应的信号强度,R2为定位设备对应的信号强度;Ccal为校正换算比例因子,d1为判断设备与目标设备之间的校正距离,d2为定位设备与目标设备之间的校正距离;Where L is the distance between the positioning device and the judgment device, R1 is the signal strength corresponding to the judgment device, and R2 is the signal strength corresponding to the positioning device; C cal is the correction conversion factor, d1 is the corrected distance between the judgment device and the target device, and d2 is the corrected distance between the positioning device and the target device;
从而,计算获得所述换算比例因子的校正值为:Thus, the correction value of the conversion scale factor is calculated as:
需要说明是的,上述公式开平方根需保证为正值。It should be noted that the square root of the above formula must be a positive value.
在所述定位设备与所述判断设备之间的设备距离大于所述判断设备与所述目标设备的初始距离时,按照如下计算公式,获得换算比例因子的校正值:When the device distance between the positioning device and the judgment device is greater than the initial distance between the judgment device and the target device, the correction value of the conversion scale factor is obtained according to the following calculation formula:
d1+d2=L;d 1 +d 2 =L;
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2)。d 2 2 =C cal 2 (R 0 -R 2 ).
从而,计算获得所述换算比例因子的校正值为:Thus, the correction value of the conversion scale factor is calculated as:
需要说明是的,上述公式开平方根需保证为正值。It should be noted that the square root of the above formula must be a positive value.
在实际应用中,例如在超市或仓库等大型场所中,本申请实施例中的已知设备可以是预先布置在室内且位置已知的设备,如图5所示的布置示意图,所述已知设备接收信号或发射信号的有效区域范围为半圆或半球,且在目标设备的每一个移动区域的对立两侧分别布置多个已知设备;所述已知设备的有效区域范围位于移动区域内。In practical applications, for example in large places such as supermarkets or warehouses, the known devices in the embodiments of the present application may be devices that are pre-arranged indoors and whose positions are known, as shown in the layout diagram of Figure 5 . The effective area for the known device to receive or transmit signals is a semicircle or a hemisphere, and multiple known devices are arranged on opposite sides of each moving area of the target device; the effective area of the known device is within the moving area.
因此,作为又一个实施例,所述设备选择模块可以具体用于:Therefore, as yet another embodiment, the device selection module may be specifically configured to:
从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,按照信号强度从强到弱的顺序,选择位于对立两侧、信号强度不相等、每一侧包括两个有效设备的四个有效设备,其中,位于同一侧的两个有效设备的位置坐标中只有一个坐标轴对应的坐标值不相等;其中,所述已知设备接收信号或发射信号的有效区域范围为半圆或半球;From known devices that transmit signals to a target device or receive signals transmitted by the target device, select four valid devices located on opposite sides, with unequal signal strengths, and two valid devices on each side, in descending order of signal strength, wherein the coordinate values corresponding to only one coordinate axis of the position coordinates of the two valid devices on the same side are unequal; wherein the valid area for receiving or transmitting signals by the known devices is a semicircle or a hemisphere;
所述校正模块可以具体用于:The correction module can be specifically used for:
针对每一组的四个有效设备,确定所述目标设备位于所述四个有效设备连接构成的区域范围内For each group of four valid devices, determine that the target device is within the area formed by the connection of the four valid devices
按照如下计算公式,计算获得目标设备的校正换算因子:Calculate the correction conversion factor of the target device according to the following formula:
dj 2=Ccal 2(R0-Rj);d j 2 =C cal 2 (R 0 -R j );
其中,第j个有效设备的位置坐标为(Xj1,Xj2,……,XjM),其中M为坐标空间维数,M=1、2、3……。The position coordinates of the j-th valid device are (X j1 , X j2 , ..., X jM ), where M is the dimension of the coordinate space, M=1, 2, 3, ... . . .
其中,j=1、2、3、4,Xjm为第j个有效设备的第m坐标,Xtm为目标设备的第m维坐标;dj为第j个有效设备与所述目标设备的校正距离;其中,四个有效设备的第m维坐标不相等。Wherein, j=1, 2, 3, 4, Xjm is the mth coordinate of the jth valid device, Xtm is the mth coordinate of the target device; dj is the corrected distance between the jth valid device and the target device; wherein the mth coordinates of the four valid devices are not equal.
基于图5所示的布置示意图,所述已知设备接收信号或发射信号的区域范围为半圆或半球;,且在目标设备的每一个移动区域的对立两侧分别布置多个已知设备;所述已知设备的有效区域范围位于移动区域内;作为又一个实施例,Based on the arrangement diagram shown in FIG5 , the area in which the known device receives or transmits signals is a semicircle or a hemisphere; and multiple known devices are arranged on opposite sides of each moving area of the target device; the effective area of the known device is within the moving area; as another embodiment,
所述设备选择模块可以具体用于:The device selection module can be specifically used to:
从向目标设备发射信号的已知设备中或者接收所述目标设备发射信号的已知设备中,按照信号强度从强到弱的顺序,选择位于同一直线上的两个有效设备;Select two valid devices located on the same straight line from known devices that transmit signals to the target device or known devices that receive signals transmitted by the target device, in descending order of signal strength;
所述校正模块下具体用于:The correction module is specifically used for:
针对每一组的两个有效设备,确定所述目标设备位于所述两个有效设备所在直线上,且所述目标设备分别距离两个有效设备的距离之和等于两个有效设备之间的距离;For each group of two valid devices, determine that the target device is located on a straight line where the two valid devices are located, and the sum of the distances between the target device and the two valid devices is equal to the distance between the two valid devices;
按照如下计算公式,计算获得目标设备的校正换算因子:Calculate the correction conversion factor of the target device according to the following formula:
d1+d2=L;d 1 +d 2 =L;
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2)。d 2 2 =C cal 2 (R 0 -R 2 ).
其中,L为两个有效设备之间的设备距离,d1和d2分别为两个有效设备与目标设备的之间的校正距离,R1和R2分别为两个有效设备对应的信号强度。Where L is the device distance between two valid devices, d1 and d2 are the corrected distances between the two valid devices and the target device, and R1 and R2 are the signal strengths corresponding to the two valid devices.
获得校正换算比例因子之后,可以按照现有技术计算获取目标设备的位置。After obtaining the correction conversion scale factor, the position of the target device can be calculated according to the existing technology.
当然,作为又一个实施例,所述位置获取模块具体用于:Of course, as another embodiment, the location acquisition module is specifically used to:
利用所述换算因子的每一个校正值,按照如下计算公式计算获得所述目标设备的每一维坐标的坐标值;Using each correction value of the conversion factor, the coordinate value of each dimension of the target device is calculated according to the following calculation formula;
d1 2=Ccal 2(R0-R1);d 1 2 =C cal 2 (R 0 -R 1 );
d2 2=Ccal 2(R0-R2);d 2 2 =C cal 2 (R 0 -R 2 );
其中,Xtn为所述目标设备的第n维坐标,X1n为第1个有效设备的第n维坐标,X2n为第2个有效设备的第n维坐标,d1为第1个有效设备与目标设备的距离,d2为第2个有效设备与目标设备的距离;n=1、2……M,其中M为坐标空间维数,M=1、2、3……。Wherein, Xtn is the n-th coordinate of the target device, X1n is the n-th coordinate of the first valid device, X2n is the n-th coordinate of the second valid device, d1 is the distance between the first valid device and the target device, and d2 is the distance between the second valid device and the target device; n=1, 2, ..., M, where M is the dimension of the coordinate space, M=1, 2, 3, ....
其中,第1个有效设备的位置坐标为(X11,X12,……,X1M),第2个有效设备的位置坐标为(X21,X22,……,X2M)。The position coordinates of the first valid device are (X 11 , X 12 , ..., X 1M ), and the position coordinates of the second valid device are (X 21 , X 22 , ..., X 2M ).
目标设备的位置坐标为(Xt1,Xt2,……,XtM)。The location coordinates of the target device are (X t1 , X t2 , . . . , X tM ).
从而即可以计算获得:Thus we can calculate:
由于可以选择多组两个有效设备,从而可以获得多个校正值,因此可以将利用每一个校正值计算获得所述目标设备的每一维坐标的的平均坐标值,构成所述目标设备位置的位置坐标。Since multiple groups of two valid devices can be selected to obtain multiple correction values, the average coordinate value of each dimension of the target device calculated using each correction value can be used to form the position coordinates of the target device.
本申请实施例通过寻找换算比例因子的校正值,提高了目标设备位置获取的准确性,减少了信号强度误差导致的位置获取不准确的问题。The embodiment of the present application improves the accuracy of acquiring the position of the target device and reduces the problem of inaccurate position acquisition caused by signal strength error by finding a correction value of the conversion scale factor.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
如在说明书及权利要求当中使用了某些词汇来指称特定组件。本领域技术人员应可理解,硬件制造商可能会用不同名词来称呼同一个组件。本说明书及权利要求并不以名称的差异来作为区分组件的方式,而是以组件在功能上的差异来作为区分的准则。如在通篇说明书及权利要求当中所提及的“包含”为一开放式用语,故应解释成“包含但不限定于”。“大致”是指在可接收的误差范围内,本领域技术人员能够在一定误差范围内解决所述技术问题,基本达到所述技术效果。此外,“耦接”一词在此包含任何直接及间接的电性耦接手段。因此,若文中描述一第一装置耦接于一第二装置,则代表所述第一装置可直接电性耦接于所述第二装置,或通过其他装置或耦接手段间接地电性耦接至所述第二装置。说明书后续描述为实施本申请的较佳实施方式,然所述描述乃以说明本申请的一般原则为目的,并非用以限定本申请的范围。本申请的保护范围当视所附权利要求所界定者为准。For example, certain terms are used in the specification and claims to refer to specific components. Those skilled in the art will understand that hardware manufacturers may use different terms to refer to the same component. This specification and claims do not distinguish components based on differences in name, but rather on differences in their functionality. Throughout the specification and claims, the term "including" is an open-ended term and should be interpreted as meaning "including, but not limited to." "Substantially" means that within an acceptable range of error, a person skilled in the art can solve the technical problem and substantially achieve the technical effect. Furthermore, the term "coupled" encompasses any direct and indirect electrical coupling means. Therefore, if a first device is described as being coupled to a second device, this means that the first device can be directly electrically coupled to the second device or indirectly electrically coupled to the second device via other devices or coupling means. The subsequent description of the specification describes preferred embodiments of the present application. However, this description is intended to illustrate the general principles of the present application and is not intended to limit the scope of the present application. The scope of protection of the present application shall be determined by the appended claims.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。It should also be noted that the terms "include," "comprises," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a product or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such product or system. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the product or system comprising the element.
上述说明示出并描述了本申请的若干优选实施例,但如前所述,应当理解本申请并非局限于本文所披露的形式,不应看作是对其他实施例的排除,而可用于各种其他组合、修改和环境,并能够在本文所述申请构想范围内,通过上述教导或相关领域的技术或知识进行改动。而本领域人员所进行的改动和变化不脱离本申请的精神和范围,则都应在本申请所附权利要求的保护范围内。The above description shows and describes several preferred embodiments of the present application. However, as previously mentioned, it should be understood that the present application is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Instead, the present application can be used in various other combinations, modifications, and environments and can be modified within the scope of the application concept described herein through the above teachings or technology or knowledge in the relevant field. Modifications and changes made by those skilled in the art that do not depart from the spirit and scope of the present application should be protected by the claims appended hereto.
Claims (12)
Publications (3)
| Publication Number | Publication Date |
|---|---|
| HK1229431A1 HK1229431A1 (en) | 2017-11-17 |
| HK1229431A HK1229431A (en) | 2017-11-17 |
| HK1229431B true HK1229431B (en) | 2019-11-29 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105954717B (en) | Location acquiring method and device | |
| US20090323586A1 (en) | User interface based on magnetic induction | |
| CN103501538B (en) | Based on the indoor orientation method of multipath energy fingerprint | |
| CN106793076B (en) | A shadow fading assisted localization method for portable devices | |
| CN109618284A (en) | Three-dimensional base station positioning method and device | |
| CN106255059B (en) | It is a kind of based on geometric ways without device target localization method | |
| CN109089209B (en) | Indoor positioning big data analysis system and method based on RFID technology | |
| CN107560618B (en) | Robot indoor orientation method based on RFID | |
| CN106323290A (en) | Map generation system and method | |
| CN101561487B (en) | A Method for Indoor Spatial Positioning | |
| CN117528406A (en) | Bluetooth and geomagnetic integrated position fingerprint indoor positioning method | |
| Hui | RFID-based location tracking system using a peer-to-peer network architecture | |
| HK1229431B (en) | Position acquistion method and apparatus | |
| Wielandt et al. | Evaluation of angle of arrival estimation for localization in multiple indoor environments | |
| KR102226690B1 (en) | LOCATION ESTIMATION METHOD AND APPARATUS FOR IoT DEVICE BASED ON BEACON SIGNAL | |
| HK1229431A (en) | Position acquistion method and apparatus | |
| HK1229431A1 (en) | Position acquistion method and apparatus | |
| CN116264734A (en) | A positioning method, terminal and storage medium | |
| TWI756095B (en) | Indoor positioning system | |
| TW201702629A (en) | Indoor positioning system and method using the same | |
| JP4730894B2 (en) | Wireless system | |
| Vongkulbhisal et al. | R-LABS: An RFID-based indoor localisation system using antenna beam scanning | |
| CN106131796A (en) | Location acquisition method and device | |
| Koyuncu et al. | A study of indoor positioning by using trigonometric and weight centroid localization techniques | |
| Xu et al. | A Light RSSI-Based Three Dimensions Location Estimation Algorithm for Indoor ZigBee Network |