CN113747349A - Positioning method, positioning device, electronic equipment and storage medium - Google Patents
Positioning method, positioning device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113747349A CN113747349A CN202110923882.9A CN202110923882A CN113747349A CN 113747349 A CN113747349 A CN 113747349A CN 202110923882 A CN202110923882 A CN 202110923882A CN 113747349 A CN113747349 A CN 113747349A
- Authority
- CN
- China
- Prior art keywords
- nodes
- coordinate system
- local coordinate
- common
- local
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 239000011159 matrix material Substances 0.000 claims description 95
- 238000013519 translation Methods 0.000 claims description 31
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 238000010606 normalization Methods 0.000 description 6
- 238000010276 construction Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000002146 bilateral effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/023—Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S11/00—Systems for determining distance or velocity not using reflection or reradiation
- G01S11/02—Systems for determining distance or velocity not using reflection or reradiation using radio waves
- G01S11/06—Systems for determining distance or velocity not using reflection or reradiation using radio waves using intensity measurements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W64/00—Locating users or terminals or network equipment for network management purposes, e.g. mobility management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
The application discloses a positioning method, a device, electronic equipment and a storage medium, which relate to the technical field of positioning, the method comprises the steps of taking the distance between every two nodes in a plurality of nodes, constructing a plurality of local coordinate systems, determining the local coordinate system corresponding to each node in the plurality of nodes, determining the coordinates of each node under the corresponding local coordinate system according to the distance between every two nodes, determining a common coordinate system from the plurality of local coordinate systems, resolving the rest local coordinate systems under the common coordinate system, determining the coordinates of the plurality of nodes under the common coordinate system, completing the positioning of the plurality of nodes according to the coordinates of the plurality of nodes under the common coordinate system, constructing a plurality of local coordinate systems, rapidly calculating the coordinates of the nodes under each local coordinate system, resolving the plurality of local coordinate systems under the same common coordinate system, and enabling all the nodes to be under the common coordinate system, the coordinates of many nodes are quickly established, and the quick positioning of a plurality of nodes is realized.
Description
Technical Field
The present application relates to the field of positioning technologies, and in particular, to a positioning method, an apparatus, an electronic device, and a storage medium.
Background
The wireless transmission technology is widely applied to the field of sensing control, a wireless transmission network is established based on the wireless transmission technology, and a plurality of nodes are distributed in the wireless transmission network, wherein each node can monitor, sense and collect information of various environments or monitored objects in a network distribution area in real time. Since the number of nodes in the wireless transmission network is large, how to locate the position of each node becomes difficult.
Disclosure of Invention
In view of the above problems, the present application provides a positioning method, an apparatus, an electronic device, and a storage medium, which can solve the above problems.
In a first aspect, an embodiment of the present application provides a positioning method, which is applied to a gateway device, where the gateway device is connected to multiple nodes, and the method includes: acquiring the distance between every two nodes in the plurality of nodes; constructing a plurality of local coordinate systems; determining a local coordinate system corresponding to each node in the plurality of nodes, and determining the coordinate of each node under the corresponding local coordinate system according to the distance between every two nodes; determining a common coordinate system from the plurality of local coordinate systems, and resolving the rest local coordinate systems except the common coordinate system in the plurality of local coordinate systems into the common coordinate system so as to enable the plurality of nodes to be located under the common coordinate system; and determining the coordinates of the nodes in the common coordinate system, and finishing the positioning of the nodes according to the coordinates of the nodes in the common coordinate system.
Optionally, the resolving the rest of the local coordinate systems except the common coordinate system into the common coordinate system so that the nodes are all located under the common coordinate system includes: acquiring rotation matrixes corresponding to the rest of local coordinate systems and translation matrixes corresponding to the rest of local coordinate systems; rotating the rest local coordinate systems through the rotation matrix to obtain the rotated rest local coordinate systems; and translating the other rotated local coordinate systems through the translation matrix to obtain a translated local coordinate system, wherein the origin of the translated local coordinate system is the same as the origin of the common coordinate system, and the plurality of nodes are all located under the common coordinate system, so that all the nodes are normalized to the common coordinate system, and the position of each node is conveniently and accurately positioned under the condition that all the nodes are in the same common coordinate system.
Optionally, the plurality of local coordinate systems includes a first local coordinate system and a second local coordinate system, the first local coordinate system and the second local coordinate system include a common node with the first local coordinate system as a common coordinate system, and the remaining local coordinate systems include the second local coordinate system; the obtaining of the rotation matrix corresponding to the rest of the local coordinate systems and the translation matrix corresponding to the rest of the local coordinate systems includes: acquiring a first coordinate corresponding to the common node in the first local coordinate system and acquiring a second coordinate corresponding to the common node in the second local coordinate system; and acquiring the rotation matrix corresponding to the second local coordinate system and acquiring the translation matrix corresponding to the second local coordinate system according to the first coordinate and the second coordinate. And determining a rotation matrix and a translation matrix according to the common node of the two coordinate systems, and obtaining a good normalization result when the rotation matrix and the translation matrix are used for carrying out coordinate normalization.
Optionally, the obtaining the rotation matrix corresponding to the second local coordinate system according to the first coordinate and the second coordinate includes: according to the first coordinate and the second coordinate, a first coordinate axis rotation matrix corresponding to the second local coordinate system, a second coordinate axis rotation matrix corresponding to the second local coordinate system and a third coordinate axis rotation matrix corresponding to the second local coordinate system are obtained; and acquiring the rotation matrix according to the first coordinate axis rotation matrix, the second coordinate axis rotation matrix and the third coordinate axis rotation matrix. Each coordinate axis in the space coordinate system corresponds to a rotation matrix and a translation matrix, and a good normalization result can be obtained when coordinate normalization is performed.
Optionally, the local coordinate system comprises a first local coordinate system, and the constructing a plurality of local coordinate systems comprises: determining three target nodes from the plurality of nodes, the three target nodes being a first target node, a second target node and a third target node; and constructing the first local coordinate system by taking the first target node as an origin of the first local coordinate system, taking a connecting line between the first target node and the second target node as a first coordinate axis, taking a line segment which is on a plane formed by the three target nodes and is vertical to the first coordinate axis as a second coordinate axis, and taking a straight line which is vertical to the plane formed by the three target nodes as a third coordinate axis. The plurality of nodes are located in the first local coordinate system, and when the coordinate normalization is carried out, the nodes in the first local coordinate system can be simultaneously normalized to the common coordinate system, so that the speed of the coordinate normalization is increased.
Optionally, the constructing a plurality of local coordinate systems includes: and constructing the plurality of local coordinate systems according to the number of the nodes.
Optionally, after determining the coordinates of the plurality of nodes in the common coordinate system and completing the positioning of the plurality of nodes according to the coordinates of the plurality of nodes in the common coordinate system, the method further includes: numbering the nodes to obtain numbers corresponding to the nodes, wherein the numbers of the nodes are different; and establishing and storing a corresponding relation between the numbers corresponding to the plurality of nodes and the coordinates of the plurality of nodes in the common coordinate system. The position numbering of all the nodes is completed, and the management of a plurality of nodes is facilitated.
In a second aspect, an embodiment of the present application provides a positioning apparatus, which is applied to a gateway device, where the gateway device is connected to multiple nodes, and the apparatus includes: an obtaining module, configured to obtain a distance between every two nodes in the plurality of nodes; the building module is used for building a plurality of local coordinate systems; the determining module is used for determining a local coordinate system corresponding to each node in the plurality of nodes and determining the coordinates of each node in the corresponding local coordinate system according to the distance between every two nodes; the calculation module is used for determining a common coordinate system from the local coordinate systems and calculating the other local coordinate systems except the common coordinate system in the local coordinate systems to be under the common coordinate system so as to enable the nodes to be positioned under the common coordinate system; and the positioning module is used for determining the coordinates of the nodes in the common coordinate system and finishing positioning the nodes according to the coordinates of the nodes in the common coordinate system.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the above-described method.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.
The application provides a positioning method, a device, an electronic device and a storage medium, which are applied to a gateway device, wherein the gateway device is connected with a plurality of nodes, the gateway device acquires the distance between every two nodes in the plurality of nodes, constructs a plurality of local coordinate systems, then determines the local coordinate system corresponding to each node in the plurality of nodes, determines the coordinates of each node in the corresponding local coordinate system according to the distance between every two nodes, determines a common coordinate system from the plurality of local coordinate systems, and solves the rest local coordinate systems except the common coordinate system in the plurality of local coordinate systems to the common coordinate system so as to ensure that the plurality of nodes are all positioned in the common coordinate system, determines the coordinates of the plurality of nodes in the common coordinate system, completes the positioning of the plurality of nodes according to the coordinates of the plurality of nodes in the common coordinate system, constructs the plurality of local coordinate systems, divides the plurality of nodes into the plurality of local coordinate systems, the number of the nodes in each local coordinate system is small, the coordinates of the nodes in each local coordinate system can be calculated quickly, then the local coordinate systems are solved to the same common coordinate system, all the nodes are located in the common coordinate system, the coordinates of the nodes are established quickly, and quick positioning of the nodes is achieved.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a node distribution provided by an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating a positioning method according to an embodiment of the present application;
fig. 3 is a schematic flow chart illustrating a positioning method according to another embodiment of the present application;
fig. 4 is a schematic flow chart illustrating a positioning method according to another embodiment of the present application;
fig. 5 shows a flow chart of step S340 of the positioning method shown in fig. 4 of the present application;
FIG. 6 illustrates a block diagram of a positioning device provided by an embodiment of the present application;
fig. 7 is a block diagram of an electronic device for performing a positioning method according to an embodiment of the present application;
fig. 8 illustrates a storage unit for storing or carrying program codes for implementing a positioning method according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The wireless transmission technology is widely applied to the field of sensing control, a wireless transmission network is established based on the wireless transmission technology, and numerous nodes are distributed in the wireless transmission network, wherein each node can monitor, sense and acquire information of various environments or monitored objects in a network distribution area in real time, for example, the monitored objects are standard nodes (such as mechanical arms, tower cranes and cranes of robots), planes to be monitored and the like. Since the number of nodes in a wireless transmission network is large, and the number of nodes can reach dozens of hundreds, it is difficult to locate the position of each node.
In the prior art, the mode of positioning a plurality of nodes is that the number of each node is determined manually, a worker installs the nodes (sensors) according to the number of each node and the number strictly, and then the installation positions and the nodes of the nodes are recorded. A large amount of manpower and material resources are consumed through the manual recording mode, omission exists in the manual numbering mode, and when the number recording is wrong or the installation position of the node is deviated from the recording position, the real position of the alarming node is difficult to determine when the later node gives an alarm.
In view of the above technical problems, the inventors have found and proposed a positioning method, an apparatus, an electronic device and a storage medium, in which a gateway device is connected to a plurality of nodes, where the nodes may be wireless communication devices, the wireless communication devices may be sensors having a wireless communication function, for example, the sensors may be bolt loosening sensors, the gateway device obtains a distance between each two of the plurality of nodes, then constructs a plurality of local coordinate systems, determines a local coordinate system corresponding to each node of the plurality of nodes, determines coordinates of each node in the corresponding local coordinate system according to the distance between each two nodes, determines a common coordinate system from the plurality of local coordinate systems, and solves other coordinate systems except the common coordinate system in the plurality of local coordinate systems into the common coordinate system, so that the plurality of nodes are all located in the common coordinate system, and determining the coordinates of the nodes in the common coordinate system, and positioning the nodes according to the coordinates of the nodes in the common coordinate system, so that the nodes can be quickly positioned. The specific positioning method is specifically described in the following embodiments.
The standard knot 1 shown in fig. 1 plays an important role in mechanical equipment such as cranes, tower cars, elevators and the like, and the standard knot not only can improve the flexibility of the mechanical arm, but also can improve the working efficiency. In the columnar standard knot as shown in fig. 1, four corners of every two adjacent standard knots are fixed by bolts, in order to ensure the reliability of each bolt, a node 10 is installed at each bolt for detecting the state of the corresponding bolt, and the node is in a layer-first type in space. The node 10 may be a bolt loosening sensor or a temperature sensor.
The gateway device 2 in fig. 1 allocates a network to all the nodes 10, where the network may configure a key, an address, an information distribution, a communication protocol, and the like of each node 10, and after the gateway device 2 allocates a network to each node 10, each node is networked, so that each node 10 in the standard section is connected to the gateway device 2, for example, may be connected in a Wireless Fidelity (WIFI) communication module, a Bluetooth communication (BLE) module, a Zigbee communication module, and the like. After networking is successful, the node 10 reports the acquired bolt state to the gateway device 2.
Fig. 2 shows a flow diagram of a positioning method according to an embodiment of the present application, where a plurality of local coordinate systems are constructed, a plurality of nodes are divided into the plurality of local coordinate systems, so that the number of nodes in each local coordinate system is small, coordinates of nodes in each local coordinate system can be quickly calculated, and then the plurality of local coordinate systems are solved to a common coordinate system, so that all nodes are in the common coordinate system, and coordinates of a plurality of nodes are quickly established, thereby realizing quick positioning of the plurality of nodes. In a specific embodiment, the positioning method is applied to the gateway device 2 shown in fig. 1, the positioning apparatus 100 shown in fig. 6, and the electronic device 200 configured with the positioning apparatus 100 shown in fig. 7. The present embodiment will describe a specific flow of the present embodiment by taking an example of applying the positioning method to the gateway device 2. As will be explained in detail with respect to the flow shown in fig. 2, the positioning method may specifically include the following steps:
and step S110, acquiring the distance between every two nodes in the plurality of nodes.
The gateway device is in communication connection with the plurality of nodes, acquires the distance between every two nodes in the plurality of nodes, and specifically, each node in the plurality of nodes acquires the distance between the node and other nodes and reports the distance to the gateway device.
In one embodiment, the distance between each two nodes may be measured according to the Strength of the communication Signal between the two nodes, for example, RSSI ranging (Received Signal Strength Indication). The plurality of nodes include a first node and a second node, and the first node transmits a broadcast message having a first signal strength to the remaining nodes and sets the broadcast message to a retransmission-disabled mode, i.e., the remaining nodes cannot retransmit the broadcast message, when measuring a distance between the first node and the second node. Because the broadcast message has energy attenuation in the transmission process, after receiving the broadcast message with the second signal strength, the second nodes in the other nodes respond to the broadcast message, load the second signal strength into the feedback message, and then send the feedback message to the first node. The first node analyzes the second signal strength from the feedback message, and calculates the average value of the second signal strength and the first signal strength as the average signal strength r; according to the first signal strength PTAverage signal strength r, channel attenuation function G, signal propagation speed C and signal modulation frequency fcAcquiring the distance between the first device and the second deviceWherein the first signal strength PTThe unit of the average signal strength r and the channel attenuation function G is decibel or decibel. Optionally, the signal modulation frequency f is different for different communication modes between nodescDifferent, e.g. for BLE, signal modulation frequency fcMay be 2.4GHz (frequency units, gigahertz).
In another embodiment, the distance between each two nodes may also be measured according to the time difference between data transmission and reception between the two nodes, for example, a bilateral two-way ranging method. The plurality of nodes comprise a first node and a second node, and when the distance between the first node and the second node is measured, the first node sends ranging information to the other nodes except the first node in the plurality of nodes, wherein the other nodes comprise the second node; the second node responds to the ranging information to send feedback information to the first node when receiving the ranging information sent by the first node; and the first node calculates the distance between the first node and the second node according to the time difference between the sending of the ranging information and the receiving of the feedback information and the signal transmission rate.
It should be noted that, before the distance between two nodes is measured by using the time difference, the clocks of each of the nodes need to be synchronized to ensure the real time difference of the received and transmitted messages and ensure the accuracy of the measured distance.
It should be further noted that the measurement of the distance between the other nodes is similar to that of the first node and the second node, and is not described herein again. And when the distances between all the nodes are measured, completing the distance measurement of every two nodes.
When the gateway device participates in positioning, the distance between the gateway device and each node in the plurality of nodes also needs to be collected.
And step S120, constructing a plurality of local coordinate systems.
Because the number of the nodes is large, if only one coordinate system is established, because the distance between every two coordinates is collected, when the coordinate of each node is calculated, an equation needs to be established and calculation is carried out once according to the distance between every two nodes, and the calculation amount is increased, therefore, a plurality of local coordinate systems are established, a plurality of nodes are respectively arranged in different local coordinate systems, the number of the nodes under each local coordinate system is reduced, the calculation amount under each local coordinate system is reduced, and the final calculation amount is reduced.
In one embodiment, the plurality of local coordinate systems is constructed according to the number of nodes. Specifically, the number of the nodes is n, the number of the nodes in the local coordinate system is k, and each two local coordinate systems have m same nodes, so that the number of the local coordinate systems established in sequence is nAnd (4) respectively. Where ceil denotes rounding up, n is greater than k, k is greater than m, and k is greater than or equal to the number of nodes in the standard section of each layer, taking fig. 1 as an example, k is greater than or equal to 4. It should be noted that, in the following description,the number of the nodes under the local coordinate system is k, and the number of the nodes under the 1 local coordinate system is And (4) respectively.
For example, the number of nodes is 50, the number of nodes in each local coordinate system is 7, each two adjacent local coordinate systems have 3 same nodes, and the number of established local coordinate systems is 12, where 11 local coordinate systems each have 7 nodes, and 1 local coordinate system has 2 nodes.
In another embodiment, a plurality of nodes are arbitrarily selected from the plurality of nodes to construct a plurality of local coordinate systems.
Step S130, determining a local coordinate system corresponding to each node in the plurality of nodes, and determining the coordinates of each node in the corresponding local coordinate system according to the distance between every two nodes.
In one embodiment, when a node is on a coordinate axis of the local coordinate system, the coordinates of the node are determined according to the distance between the node and the node at the origin of the coordinates.
In another mode, the coordinates of each node are calculated according to the distance between every two nodes in a local coordinate system, for example, there are a first node and a second node in a local coordinate system, and the coordinates of the first node is (x)1,y1,z1) The coordinate of the second node is (x)2,y2,z2) Then the following distance calculation formula exists:wherein d is1-2Is the distance between the first node and the second node.
For example, there are i nodes in the same local coordinate system, the coordinate of the first node is (0,0,0), that is, the first node is at the origin of coordinates, the connecting line between the first node and the second node is the x-axis, and the coordinate of the second node is (x)20,0), the plane where the first node, the second node and the third node are located is taken as the xy-axis plane, and then the coordinate of the third device is (x)3,y30), the z-axis is taken as the direction perpendicular to the xy-axis plane, and the coordinate of the i-th node is (x)i,yi,zi) And calculating the coordinates of the distance between every two nodes by using the distance calculation formula in the step to obtain the following equation set:
x2=d1-2
alternatively, the coordinates of all nodes in the local coordinate system can be obtained by solving the equation set through a newton iteration method or a least square method.
It should be noted that the solution manner of each node in the remaining local coordinate systems is similar to that described above, and is not described herein again. And sequentially resolving the nodes in all the local coordinate systems to obtain the coordinates of all the nodes in the respective corresponding local coordinate systems, wherein the resolved coordinates of the same node in different coordinate systems are different. For example, the coordinate of a node in one local coordinate system is (1,0,0), and the corresponding coordinate of the node in another local coordinate system is (7,3, 1).
Step S140, determining a common coordinate system from the plurality of local coordinate systems, and resolving the remaining local coordinate systems except the common coordinate system in the plurality of local coordinate systems to the common coordinate system, so that the plurality of nodes are all located under the common coordinate system.
And determining any one of the local coordinate systems as a common coordinate system, and resolving the rest coordinate systems to the common coordinate system, so that all nodes are positioned under the common coordinate system, and each node corresponds to one coordinate under the common coordinate system.
Optionally, the local coordinate system comprises a first local coordinate system, with the first local coordinate system as the common coordinate system.
And S150, determining the coordinates of the nodes in the common coordinate system, and positioning the nodes according to the coordinates of the nodes in the common coordinate system.
And determining the coordinates of the nodes in the common coordinate system, and positioning the nodes according to the coordinates of the nodes in the common coordinate system. Wherein each coordinate characterizes a physical location of each node.
In one embodiment, when the gateway device distributes a network to a plurality of nodes, the plurality of nodes are configured with respective corresponding addresses. The gateway device obtains respective corresponding addresses (e.g., ID addresses, MAC addresses, etc.) of the plurality of nodes, and establishes and stores a correspondence between the addresses of the nodes and coordinates of the nodes. When the gateway equipment receives the alarm information corresponding to a certain address, the coordinate corresponding to the certain address is obtained according to the corresponding relation between the address and the coordinate, and the bolt corresponding to the coordinate is overhauled.
In another embodiment, in order to facilitate management of a plurality of nodes, the plurality of nodes are numbered, and numbers corresponding to the plurality of nodes are obtained, wherein the numbers of each of the plurality of nodes are different; and establishing and storing a corresponding relation between the numbers corresponding to the plurality of nodes and the coordinates of the plurality of nodes in the common coordinate system. And when the gateway equipment receives the alarm information corresponding to a certain number, acquiring a coordinate corresponding to the certain number according to the corresponding relation between the number and the coordinate, and overhauling the bolt corresponding to the coordinate.
As one mode, the gateway device automatically numbers according to the position of the node, and numbers according to the number of layers of the standard node where the node is located and the number of nodes, for example, numbers in the form of ID-a-b. Specifically, the gateway device firstly obtains coordinates of a plurality of nodes, classifies the node coordinates with the same z-axis size as nodes in a standard section of the same layer, in a multi-layer standard section, the node with the smallest z-axis size is positioned in the standard section of the lowest layer, a is 1, 4 nodes of each layer are numbered according to the clockwise sequence, namely, the coordinates of the x-axis are compared, the y-axis is compared between two nodes with the smallest x-axis, the node with the small y-axis size is the node 1 and is marked as ID-1-1, the node with the large y-axis size is the node 2 and is marked as ID-1-2, then the coordinates of the x-axis of the remaining 2 nodes of the first layer are compared, and the node with the large x-axis size is the node 3 and is marked as ID-1-3; the remaining node is node number 4, denoted as ID-1-4. And after numbering each layer of nodes is finished, numbering the nodes of the standard nodes of other layers until all the nodes are numbered.
When numbering is performed on each layer, the numbering is not limited to the clockwise numbering described above, and may be performed counterclockwise or arbitrarily, as long as the numbering of each node is different.
The positioning method provided by this embodiment is applied to a gateway device, the gateway device is connected to a plurality of nodes, the gateway device obtains a distance between every two nodes in the plurality of nodes, constructs a plurality of local coordinate systems, determines a local coordinate system corresponding to each node in the plurality of nodes, determines coordinates of each node in the corresponding local coordinate system according to the distance between every two nodes, determines a common coordinate system from the plurality of local coordinate systems, and resolves the other local coordinate systems except the common coordinate system in the plurality of local coordinate systems into the common coordinate system, so that the plurality of nodes are all located under the common coordinate system, determines coordinates of the plurality of nodes in the common coordinate system, completes positioning of the plurality of nodes according to the coordinates of the plurality of nodes in the common coordinate system, constructs the plurality of local coordinate systems, and divides the plurality of nodes into the plurality of local coordinate systems, the number of the nodes in each local coordinate system is small, the coordinates of the nodes in each local coordinate system can be calculated quickly, then the local coordinate systems are solved to the same common coordinate system, all the nodes are located in the common coordinate system, the coordinates of the nodes are established quickly, and quick positioning of the nodes is achieved.
In this embodiment, on the basis of the foregoing embodiment, a positioning method is provided, configured to construct a plurality of local coordinate systems according to nodes, where the local coordinate systems include a first local coordinate system, and fig. 3 shows a flowchart of the positioning method according to another embodiment of the present application, and please refer to fig. 3, where the positioning method specifically includes the following steps:
and step S210, acquiring the distance between every two nodes in the plurality of nodes.
For detailed description of step S210, please refer to step S110, which is not described herein again.
Step S220, determining three target nodes from the plurality of nodes, where the three target nodes are a first target node, a second target node, and a third target node.
And determining three target nodes from the plurality of nodes, wherein the three target nodes can be three nodes in the same layer standard section or any three nodes.
Step S230, constructing the first local coordinate system by using the first target node as an origin of the first local coordinate system, using a connection line between the first target node and the second target node as a first coordinate axis, using a line segment perpendicular to the first coordinate axis and on a plane formed by the three target nodes as a second coordinate axis, and using a straight line perpendicular to the plane formed by the three target nodes as a third coordinate axis.
In one embodiment, the three target nodes are at three corners of the same layer of standard knots, and the target node at the diagonal is not taken as the origin. In this embodiment, taking the second target node and the third target node in diagonal lines as an example, taking the first target node as the origin of the first local coordinate system, and the coordinates of the first target node in the first local coordinate system are (0,0, 0); if the connecting line between the first target node and the second target node is taken as the first coordinate axis, for example, the first coordinate axis is the x-axis, then the coordinate of the second target node is (x)10, 0); a line segment perpendicular to the first coordinate axis and on a plane formed by the three target nodes is taken as a second coordinate axis, and since the three target nodes are on the same plane, that is, a connecting line between the first target node and the third target node is taken as the second coordinate axis, for example, the coordinate of the third target node is (0, y)20); a straight line perpendicular to a plane formed by the three target nodes is taken as a third coordinate axis, for example, the third coordinate axis perpendicular to the xy plane is taken as a z axis, and the first local coordinate system is constructed. There are k nodes in the first local coordinate system.
Local coordinate systemThe method comprises the steps that a second local coordinate system is included, m nodes are arbitrarily selected from k nodes of a first local coordinate system, wherein k is larger than m, and m can be 1, 2, 3 and the like; taking k-m nodes from other nodes which are not in the first local coordinate system, wherein the k-m nodes are not corresponding to any local coordinate system, the m nodes and the k-m nodes are used as nodes corresponding to a second local coordinate system, three nodes are arbitrarily selected from the m nodes and the k-m nodes as target nodes, and the second local coordinate system is established through the three target nodes, wherein the three target nodes comprise a first target node, a second target node and a third target node, specifically, the first target node is used as an origin of the first local coordinate system, and coordinates of the first target node in the first local coordinate system are (0,0, 0); if the connecting line between the first target node and the second target node is taken as the first coordinate axis, for example, the first coordinate axis is the x-axis, then the coordinate of the second target node is (x)10, 0); if a line segment perpendicular to the first coordinate axis on the plane formed by the three target nodes is taken as a second coordinate axis, for example, the second coordinate axis is the y-axis, the coordinate of the third target node is (x)2,y20); and a straight line perpendicular to a plane formed by the three target nodes is used as a third coordinate axis to construct a second local coordinate system.
In the manner of this step, willAnd completing the construction of the local coordinate systems, wherein all the nodes are at least under one local coordinate system after the construction is completed.
Step S240, determining a local coordinate system corresponding to each node in the plurality of nodes, and determining coordinates of each node in the corresponding local coordinate system according to a distance between every two nodes.
Step S250, determining a common coordinate system from the plurality of local coordinate systems, and resolving the remaining local coordinate systems except the common coordinate system in the plurality of local coordinate systems to the common coordinate system, so that the plurality of nodes are all located under the common coordinate system.
And step S260, determining the coordinates of the nodes in the common coordinate system, and positioning the nodes according to the coordinates of the nodes in the common coordinate system.
For the detailed description of steps S240 to S250, please refer to steps S130 to S150, which are not described herein again.
In this embodiment, three target nodes are determined from a plurality of nodes, the three target nodes are a first target node, a second target node and a third target node, the first target node is used as an origin of a first local coordinate system, a connecting line between the first target node and the second target node is used as a first coordinate axis, a line segment which is on a plane formed by the three target nodes and is perpendicular to the first coordinate axis is used as a second coordinate axis, and a straight line which is perpendicular to the plane formed by the three target nodes is used as a third coordinate axis, the first local coordinate system is constructed, all the local coordinate systems are constructed, each node is located under at least one local coordinate system, the local coordinate system corresponding to each node is determined, coordinates of each node under the corresponding local coordinate system are determined, the rest local coordinate systems are solved under a common coordinate system, and the plurality of nodes are all located under the common coordinate system, and determining the coordinates of the nodes in the common coordinate system, and quickly finishing positioning according to the coordinates.
Optionally, on the basis of the foregoing embodiment, the present embodiment provides a positioning method for resolving the remaining local coordinate systems into a common coordinate system, and fig. 4 shows a flowchart of the positioning method according to another embodiment of the present application, please refer to fig. 4, where the positioning method specifically includes the following steps:
and step S310, acquiring the distance between every two nodes in the plurality of nodes.
And step S320, constructing a plurality of local coordinate systems.
Step S330, determining a local coordinate system corresponding to each node in the plurality of nodes, and determining the coordinates of each node in the corresponding local coordinate system according to the distance between every two nodes.
For the detailed description of steps S310 to S330, refer to steps S110 to S130, which are not described herein again.
Step S340, determining a common coordinate system from the plurality of local coordinate systems, and obtaining a rotation matrix corresponding to the remaining local coordinate systems and a translation matrix corresponding to the remaining local coordinate systems.
In one embodiment, the first local coordinate system is determined as a common coordinate system, the common coordinate system is determined from the plurality of local coordinate systems, and the rotation matrix and the translation matrix corresponding to the remaining local coordinate systems are obtained.
Specifically, the plurality of local coordinate systems include a first local coordinate system and a second local coordinate system, the first local coordinate system and the second local coordinate system include a common node, it is understood that the common node is located under both the first local coordinate system and the second local coordinate system, the first local coordinate system is used as a common coordinate system, and the remaining local coordinate systems include the second local coordinate system, please refer to fig. 5, and step S340 includes the following sub-steps:
and a substep S341, obtaining a first coordinate corresponding to the common node in the first local coordinate system, and obtaining a second coordinate corresponding to the common node in the second local coordinate system.
The actual physical position of the common node is fixed, but when the common node is located in different local coordinate systems, the corresponding coordinate positions are different, the first coordinate corresponding to the common node in the first local coordinate system is obtained, and the second coordinate corresponding to the common node in the second local coordinate system is obtained.
And a substep S342, obtaining the rotation matrix corresponding to the second local coordinate system and obtaining the translation matrix corresponding to the rest local coordinate systems according to the first coordinate and the second coordinate.
Wherein the rotation matrix is configured to rotate the second local coordinate system such that an x-axis of the second local coordinate system is parallel to an x-axis of the first local coordinate system, a y-axis of the second local coordinate system is parallel to a y-axis of the first local coordinate system, and a z-axis of the second local coordinate system is parallel to a z-axis of the first local coordinate system. The translation matrix is used for translating the rotated second local coordinate system until the origin of the second local coordinate system coincides with the origin of the first local coordinate system.
Specifically, according to the first coordinate and the second coordinate, a first coordinate axis rotation matrix corresponding to the second local coordinate system, a second coordinate axis rotation matrix corresponding to the second local coordinate system, and a third coordinate axis rotation matrix corresponding to the second local coordinate system are obtained; and acquiring the rotation matrix corresponding to a second local coordinate system according to the first coordinate axis rotation matrix, the second coordinate axis rotation matrix and the third coordinate axis rotation matrix.
For example, the first coordinate axis is an x-axis, the second coordinate axis is a y-axis, the third coordinate axis is a z-axis, the second local coordinate system is rotated around the x-axis by a roll degree according to the first coordinate and the second coordinate, so that the x-axis of the second local coordinate system is parallel to the x-axis of the first local coordinate system, and the obtained first coordinate axis rotation matrix R is obtainedxComprises the following steps:
rotating the second local coordinate system by a pitch degree around the y axis so that the y axis of the second local coordinate system is parallel to the y axis of the first local coordinate system, and obtaining a second coordinate axis rotation matrix RyComprises the following steps:
rotating the second local coordinate system by an angle yaw degrees around the z-axis, so that the z-axis of the second local coordinate system is parallel to the z-axis of the first local coordinate system, and obtaining a third coordinate axis rotation matrix RzComprises the following steps:
rotating the matrix R according to the first coordinate axisxSecond coordinate axis rotation matrix RyAnd a third coordinate axis rotation matrix RzObtaining a rotation matrix R as:
it should be noted that each local coordinate system corresponds to one rotation matrix and one translation matrix. And each local coordinate system and the common node of the common coordinate system can be used for calculating a rotation matrix and a translation matrix corresponding to the local coordinate system. For example, three local coordinate systems are sequentially established, including a first local coordinate system, a second local coordinate system and a third local coordinate system, where each two local coordinate systems includes m common nodes, that is, the first local coordinate system and the second local coordinate system include m common nodes, the second local coordinate system and the third local coordinate system include another m common nodes, a rotation matrix and a translation matrix corresponding to the second local coordinate system are obtained through the m common nodes included in the first local coordinate system and the second local coordinate system, the second local coordinate system is processed according to the rotation matrix and the translation matrix, so that nodes in the second local coordinate system are all located in the common coordinate system, and since nodes in the second local coordinate system are all located in the common coordinate system, the second local coordinate system and the third local coordinate system include another m common nodes and are located in the first coordinate system, and acquiring a rotation matrix and a translation matrix corresponding to the third local coordinate system according to the other m public nodes, and processing the third local coordinate system according to the rotation matrix and the translation matrix, so that the nodes in the third local coordinate system are all positioned under the public coordinate system.
And S350, rotating the rest local coordinate systems through the rotation matrix to obtain the rotated rest local coordinate systems.
And rotating the rest local coordinate systems through the rotation matrix, wherein the x axis of the rotated local coordinate system is parallel to the x axis of the public coordinate system, the y axis of the rotated local coordinate system is parallel to the y axis of the public coordinate system, and the z axis of the rotated local coordinate system is parallel to the z axis of the public coordinate system.
And S360, translating the other rotated local coordinate systems through the translation matrix to obtain a translated local coordinate system, wherein the origin of the translated local coordinate system is the same as that of the public coordinate system, and the plurality of nodes are all located under the public coordinate system.
And translating the other rotated local coordinate systems through the translation matrix, and moving the coordinate origin points of the other local coordinate systems to the coordinate origin point of the public coordinate system, so that the nodes under the other coordinate systems are all placed under the public coordinate system.
It should be noted that the sequence of step S350 and step S360 is not limited, and may be exchanged, that is, the remaining local coordinate system may be translated through the translation matrix, and then the translated local coordinate system may be rotated through the rotation matrix, so that all the nodes are located in the common coordinate system.
It should be noted that, when the other local coordinate systems are calculated, the calculation may be performed by using euler angles, quaternions, and the like, in addition to the two matrices.
Step S370, determining coordinates of the plurality of nodes in the common coordinate system, and completing positioning of the plurality of nodes according to the coordinates of the plurality of nodes in the common coordinate system.
For a detailed description of step S370, please refer to step S150, which is not described herein again.
In the positioning method provided in this embodiment, a plurality of local coordinate systems are constructed, a common coordinate system is determined in the plurality of local coordinate systems, rotation matrixes and translation matrixes corresponding to the other local coordinate systems are obtained, and after the other local coordinate systems are sequentially processed through the rotation matrixes and the translation matrixes, the other local coordinate systems are normalized to the common coordinate system, so that all nodes are located under the common coordinate system, and rapid positioning of the plurality of nodes is completed.
To implement the foregoing method embodiments, this embodiment provides a positioning apparatus, which is applied to a gateway device, where the gateway device is connected to multiple nodes, fig. 6 shows a block diagram of the positioning apparatus provided in this embodiment of the present application, and please refer to fig. 6, where the positioning apparatus 100 includes: an acquisition module 110, a build module 120, a determination module 130, a solution module 140, and a location module 150.
An obtaining module 110, configured to obtain a distance between each two nodes in the plurality of nodes;
a construction module 120 for constructing a plurality of local coordinate systems;
a determining module 130, configured to determine a local coordinate system corresponding to each node in the plurality of nodes, and determine, according to a distance between every two nodes, a coordinate of each node in the corresponding local coordinate system;
the calculating module 140 is configured to determine a common coordinate system from the multiple local coordinate systems, and calculate the remaining local coordinate systems except the common coordinate system in the multiple local coordinate systems to be under the common coordinate system, so that the multiple nodes are all located under the common coordinate system;
and a positioning module 150, configured to determine coordinates of the multiple nodes in the common coordinate system, and complete positioning of the multiple nodes according to the coordinates of the multiple nodes in the common coordinate system.
Optionally, the resolving module 140 includes: a matrix acquisition submodule, a rotation submodule, and a translation submodule.
The matrix acquisition submodule is used for acquiring rotation matrixes corresponding to the rest of local coordinate systems and translation matrixes corresponding to the rest of local coordinate systems;
the rotation sub-module is used for rotating the other local coordinate systems through the rotation matrix to obtain the other rotated local coordinate systems;
and the translation submodule is used for translating the other rotated local coordinate systems through the translation matrix to obtain a translated local coordinate system, wherein the origin of the translated local coordinate system is the same as the origin of the public coordinate system, and the plurality of nodes are all located under the public coordinate system.
Optionally, the plurality of local coordinate systems include a first local coordinate system and a second local coordinate system, the first local coordinate system and the second local coordinate system include a common node, the first local coordinate system is used as a common coordinate system, the remaining local coordinate systems include the second local coordinate system, and the matrix acquisition submodule includes: a coordinate acquisition sub-module and a processing matrix sub-module.
The coordinate acquisition submodule is used for acquiring a first coordinate corresponding to the public node in the first local coordinate system and acquiring a second coordinate corresponding to the public node in the second local coordinate system;
and the processing matrix submodule is used for acquiring the rotation matrix corresponding to the second local coordinate system and acquiring the translation matrix corresponding to the second local coordinate system according to the first coordinate and the second coordinate.
Optionally, the processing matrix sub-module includes: a triaxial matrix acquisition submodule and a rotation matrix acquisition submodule.
The three-axis matrix obtaining sub-module is used for obtaining a first coordinate axis rotation matrix corresponding to the second local coordinate system, a second coordinate axis rotation matrix corresponding to the second local coordinate system and a third coordinate axis rotation matrix corresponding to the second local coordinate system according to the first coordinate and the second coordinate;
and the rotation matrix obtaining submodule is used for obtaining the rotation matrix according to the first coordinate axis rotation matrix, the second coordinate axis rotation matrix and the third coordinate axis rotation matrix.
Optionally, the local coordinate system comprises a first local coordinate system, and the building module 120 comprises: the target node acquisition submodule and the local coordinate system construction submodule.
The target node acquisition submodule is used for determining three target nodes from the plurality of nodes, wherein the three target nodes are a first target node, a second target node and a third target node;
and the local coordinate system construction submodule is used for constructing the first local coordinate system by taking the first target node as an origin of the first local coordinate system, taking a connecting line between the first target node and the second target node as a first coordinate axis, taking a line segment which is on a plane formed by the three target nodes and is vertical to the first coordinate axis as a second coordinate axis, and taking a straight line which is vertical to the plane formed by the three target nodes as a third coordinate axis.
Optionally, the building module 120 comprises: and constructing a submodule.
And the constructing submodule is used for constructing the plurality of local coordinate systems according to the number of the nodes.
Optionally, the positioning device 100 further comprises: a numbering module and a corresponding relation establishing module.
A numbering module, configured to number the multiple nodes to obtain numbers corresponding to the multiple nodes, where the numbers of each of the multiple nodes are different;
and the corresponding relation establishing module is used for establishing and storing the corresponding relation between the numbers corresponding to the nodes and the coordinates of the nodes in the common coordinate system.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Fig. 7 is a block diagram of an electronic device for performing a positioning method according to an embodiment of the present application, and please refer to fig. 7, which shows a block diagram of an electronic device 200 according to an embodiment of the present application. The electronic device 200 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application program. The electronic device 200 in the present application may include one or more of the following components: a processor 210, a memory 220, and one or more applications, wherein the one or more applications may be stored in the memory 220 and configured to be executed by the one or more processors 210, the one or more applications configured to perform a method as described in the aforementioned method embodiments.
The Memory 220 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 220 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 220 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the electronic device 200 in use (such as historical profiles) and the like.
Fig. 8 shows a storage unit for storing or carrying program codes for implementing a positioning method according to an embodiment of the present application, please refer to fig. 8, which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 300 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 300 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 300 includes a non-volatile computer-readable storage medium. The computer readable storage medium 300 has storage space for program code 310 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 310 may be compressed, for example, in a suitable form.
In summary, the positioning method, the apparatus, the electronic device and the storage medium provided by the present application are applied to a gateway device, the gateway device is connected to a plurality of nodes, the gateway device obtains a distance between every two nodes in the plurality of nodes to construct a plurality of local coordinate systems, then determines a local coordinate system corresponding to each node in the plurality of nodes, determines coordinates of each node in the corresponding local coordinate system according to the distance between every two nodes, determines a common coordinate system from the plurality of local coordinate systems, and resolves the remaining local coordinate systems except the common coordinate system in the plurality of local coordinate systems into the common coordinate system, so that the plurality of nodes are all located under the common coordinate system, determines coordinates of the plurality of nodes in the common coordinate system, completes positioning of the plurality of nodes according to the coordinates of the plurality of nodes in the common coordinate system, and constructs the plurality of local coordinate systems, the multiple nodes are divided into the multiple local coordinate systems, so that the number of the nodes in each local coordinate system is small, the coordinates of the nodes in each local coordinate system can be calculated quickly, the multiple local coordinate systems are solved to the same public coordinate system, all the nodes are located under the public coordinate system, the coordinates of the multiple nodes are established quickly, and the quick positioning of the multiple nodes is realized.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.
Claims (10)
1. A positioning method is applied to a gateway device, wherein the gateway device is connected with a plurality of nodes, and the method comprises the following steps:
acquiring the distance between every two nodes in the plurality of nodes;
constructing a plurality of local coordinate systems;
determining a local coordinate system corresponding to each node in the plurality of nodes, and determining the coordinate of each node under the corresponding local coordinate system according to the distance between every two nodes;
determining a common coordinate system from the plurality of local coordinate systems, and resolving the rest local coordinate systems except the common coordinate system in the plurality of local coordinate systems into the common coordinate system so as to enable the plurality of nodes to be located under the common coordinate system;
and determining the coordinates of the nodes in the common coordinate system, and finishing the positioning of the nodes according to the coordinates of the nodes in the common coordinate system.
2. The method of claim 1, wherein resolving the remaining ones of the plurality of local coordinate systems other than the common coordinate system to the common coordinate system such that the plurality of nodes are all located under the common coordinate system comprises:
acquiring rotation matrixes corresponding to the rest of local coordinate systems and translation matrixes corresponding to the rest of local coordinate systems;
rotating the rest local coordinate systems through the rotation matrix to obtain the rotated rest local coordinate systems;
and translating the other rotated local coordinate systems through the translation matrix to obtain a translated local coordinate system, wherein the origin of the translated local coordinate system is the same as the origin of the common coordinate system, and the plurality of nodes are all located under the common coordinate system.
3. The method of claim 2, wherein the plurality of local coordinate systems comprises a first local coordinate system and a second local coordinate system, the first local coordinate system and the second local coordinate system comprising a common node with the first local coordinate system as a common coordinate system, the remaining local coordinate systems comprising the second local coordinate system; the obtaining of the rotation matrix corresponding to the rest of the local coordinate systems and the translation matrix corresponding to the rest of the local coordinate systems includes:
acquiring a first coordinate corresponding to the common node in the first local coordinate system and acquiring a second coordinate corresponding to the common node in the second local coordinate system;
and acquiring the rotation matrix corresponding to the second local coordinate system and acquiring the translation matrix corresponding to the second local coordinate system according to the first coordinate and the second coordinate.
4. The method according to claim 3, wherein the obtaining the rotation matrix corresponding to the second local coordinate system according to the first coordinate and the second coordinate comprises:
according to the first coordinate and the second coordinate, a first coordinate axis rotation matrix corresponding to the second local coordinate system, a second coordinate axis rotation matrix corresponding to the second local coordinate system and a third coordinate axis rotation matrix corresponding to the second local coordinate system are obtained;
and acquiring the rotation matrix according to the first coordinate axis rotation matrix, the second coordinate axis rotation matrix and the third coordinate axis rotation matrix.
5. The method of claim 1, wherein the local coordinate system comprises a first local coordinate system, and wherein constructing the plurality of local coordinate systems comprises:
determining three target nodes from the plurality of nodes, the three target nodes being a first target node, a second target node and a third target node;
and constructing the first local coordinate system by taking the first target node as an origin of the first local coordinate system, taking a connecting line between the first target node and the second target node as a first coordinate axis, taking a line segment which is on a plane formed by the three target nodes and is vertical to the first coordinate axis as a second coordinate axis, and taking a straight line which is vertical to the plane formed by the three target nodes as a third coordinate axis.
6. The method of any one of claim 1, wherein constructing the plurality of local coordinate systems comprises:
and constructing the plurality of local coordinate systems according to the number of the nodes.
7. The method according to any one of claims 1-6, wherein the determining coordinates of the plurality of nodes in the common coordinate system, the method further comprising, after the locating the plurality of nodes is completed according to the coordinates of the plurality of nodes in the common coordinate system:
numbering the nodes to obtain numbers corresponding to the nodes, wherein the numbers of the nodes are different;
and establishing and storing a corresponding relation between the numbers corresponding to the plurality of nodes and the coordinates of the plurality of nodes in the common coordinate system.
8. A positioning apparatus, applied to a gateway device, the gateway device being connected to a plurality of nodes, the apparatus comprising:
an obtaining module, configured to obtain a distance between every two nodes in the plurality of nodes;
the building module is used for building a plurality of local coordinate systems;
the determining module is used for determining a local coordinate system corresponding to each node in the plurality of nodes and determining the coordinates of each node in the corresponding local coordinate system according to the distance between every two nodes;
the calculation module is used for determining a common coordinate system from the local coordinate systems and calculating the other local coordinate systems except the common coordinate system in the local coordinate systems to be under the common coordinate system so as to enable the nodes to be positioned under the common coordinate system;
and the positioning module is used for determining the coordinates of the nodes in the common coordinate system and finishing positioning the nodes according to the coordinates of the nodes in the common coordinate system.
9. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the method of any of claims 1-7.
10. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110923882.9A CN113747349A (en) | 2021-08-12 | 2021-08-12 | Positioning method, positioning device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110923882.9A CN113747349A (en) | 2021-08-12 | 2021-08-12 | Positioning method, positioning device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113747349A true CN113747349A (en) | 2021-12-03 |
Family
ID=78730831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110923882.9A Withdrawn CN113747349A (en) | 2021-08-12 | 2021-08-12 | Positioning method, positioning device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113747349A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109115191A (en) * | 2018-08-03 | 2019-01-01 | 华南农业大学 | The multi-faceted coordinate measuring method of total station |
CN110579738A (en) * | 2018-06-11 | 2019-12-17 | 深圳市优必选科技有限公司 | Method for acquiring direction angle of moving target and terminal equipment |
CN110738143A (en) * | 2019-09-27 | 2020-01-31 | Oppo广东移动通信有限公司 | Positioning method and device, equipment and storage medium |
CN110780325A (en) * | 2019-08-23 | 2020-02-11 | 腾讯科技(深圳)有限公司 | Method and device for positioning moving object and electronic equipment |
CN110930482A (en) * | 2019-11-14 | 2020-03-27 | 北京达佳互联信息技术有限公司 | Human hand bone parameter determination method and device, electronic equipment and storage medium |
CN111323751A (en) * | 2020-03-25 | 2020-06-23 | 苏州科达科技股份有限公司 | Sound source positioning method, device and storage medium |
CN111856447A (en) * | 2020-07-28 | 2020-10-30 | 三一机器人科技有限公司 | Radar positioning method and device and storage medium |
-
2021
- 2021-08-12 CN CN202110923882.9A patent/CN113747349A/en not_active Withdrawn
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110579738A (en) * | 2018-06-11 | 2019-12-17 | 深圳市优必选科技有限公司 | Method for acquiring direction angle of moving target and terminal equipment |
CN109115191A (en) * | 2018-08-03 | 2019-01-01 | 华南农业大学 | The multi-faceted coordinate measuring method of total station |
CN110780325A (en) * | 2019-08-23 | 2020-02-11 | 腾讯科技(深圳)有限公司 | Method and device for positioning moving object and electronic equipment |
CN110738143A (en) * | 2019-09-27 | 2020-01-31 | Oppo广东移动通信有限公司 | Positioning method and device, equipment and storage medium |
CN110930482A (en) * | 2019-11-14 | 2020-03-27 | 北京达佳互联信息技术有限公司 | Human hand bone parameter determination method and device, electronic equipment and storage medium |
CN111323751A (en) * | 2020-03-25 | 2020-06-23 | 苏州科达科技股份有限公司 | Sound source positioning method, device and storage medium |
CN111856447A (en) * | 2020-07-28 | 2020-10-30 | 三一机器人科技有限公司 | Radar positioning method and device and storage medium |
Non-Patent Citations (1)
Title |
---|
马英: ""自组织网络的无线定位算法研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 1, pages 43 - 64 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104837142B (en) | Calibration method and system for positioning reference point in wireless positioning system | |
US9883407B2 (en) | Radio wave propagation environment measuring apparatus, radio network construction system, and method for measuring radio wave propagation environment | |
CN109874146B (en) | Method and device for predicting path loss | |
CN102395200B (en) | Node positioning method in wireless sensor network and apparatus thereof | |
Chang et al. | Real-time structural health monitoring system using internet of things and cloud computing | |
CN113923772B (en) | Base station calibration method and device, computer equipment and storage medium | |
KR20170096062A (en) | Sending node and buffer status reporting method | |
Kirichek et al. | Development of a node-positioning algorithm for wireless sensor networks in 3D space | |
CN111562029A (en) | A three-dimensional temperature field construction device, method and equipment | |
US10110461B2 (en) | Server group and group manager with support for location-based operations | |
CN113747349A (en) | Positioning method, positioning device, electronic equipment and storage medium | |
CN106941685B (en) | A method and system for determining reverse connection of antenna | |
Lam et al. | Bluetooth mesh networking: An enabler of smart factory connectivity and management | |
CN105025443B (en) | A kind of based on WLAN localization method, relevant device and system | |
CN112200861B (en) | Method and device for determining column type, storage medium and electronic equipment | |
CN114116207A (en) | Flow control method, device, equipment and system | |
CN116817924A (en) | Indoor positioning method and device based on intelligent gateway and electronic equipment | |
Krupanek et al. | Investigations of transmission delays in ZigBee networks | |
US12047834B2 (en) | Locating devices within a premises | |
CN116347242A (en) | Camera positioning method, equipment and storage medium | |
CN115540748A (en) | Positioning method and device applied to space three-dimensional positioning system | |
CN118555535A (en) | Node fault detection method, system and related equipment | |
JP7011994B2 (en) | Information processing equipment, programs and information processing methods | |
JP5470237B2 (en) | Wireless network maintenance terminal and maintenance system | |
CN119026997A (en) | A process quality control method and process quality control system for a super high-rise building |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20211203 |
|
WW01 | Invention patent application withdrawn after publication |