Three-dimensional space positioning rapid searching method
Technical Field
The invention relates to the field of space position quick search, in particular to a three-dimensional space positioning quick search method.
Background
Three-dimensional positioning can be completed through the space reference point coordinates, and measurement accuracy and data splicing are improved. In the measuring space, the control reference points are arranged, the coordinate positions of the control reference points are calibrated (measured in advance), and the measuring machine is used for measuring more than three reference points, so that the self positioning of the measuring machine can be realized. The method can greatly enlarge the measurement range and the measurement efficiency of the measuring machine and can ensure the measurement precision.
The Chinese patent ZL201410468636.9 discloses a large-size precise geometric dimension measuring system based on a measurement reference lattice, which comprises a measurement reference lattice, a space coordinate measuring device and a measuring system computer; the movable space coordinate measuring device determines the relative position of the measuring device in a measuring space by measuring three or more reference points on the periphery of the movable space coordinate measuring device, which are not on the same straight line, so that all measuring data obtained when the space coordinate measuring device measures a measured object can be converted into a uniform measuring space working coordinate system, the measuring range of the movable space coordinate measuring device is greatly expanded, meanwhile, the error accumulation caused by the traditional measuring methods such as leapfrogging is avoided, and the high-efficiency and high-precision large-size measurement is realized.
However, how to quickly find the corresponding measured reference point from the reference lattice directly affects the implementation and experience of the measurement method.
Disclosure of Invention
The invention aims to provide a three-dimensional space positioning quick searching method for solving the technical problem of quick searching.
The invention discloses a three-dimensional space positioning quick searching method, which comprises the following steps:
s1, in a space grid lattice formed by lines and rows in a three-dimensional space, the space position of each grid point is calibrated in advance, the coordinate is known, and the shape of a triangle formed by any three adjacent grid points is ensured to be unique in the grid lattice;
s2, calculating the distance between each grid point and eight adjacent points around the grid point, and storing for later use;
s3, sequentially measuring coordinate values of any three adjacent points in the grid lattice and calculating three side lengths formed by the three points;
s4, searching the distances between the grid points and the adjacent points in sequence, comparing the measured side lengths of the triangle, and after finding the side lengths are consistent, sequentially comparing the next side length and the distances between the adjacent points of the grid points meeting the requirements and the peripheral points thereof until the three sides of the triangle are completely consistent with the triangle formed by the known three grid points, thereby completing the search.
Further, in step S1, in the grid lattice formed by rows and columns in the three-dimensional space, the distance between adjacent rows or adjacent columns is a prime number with different size, the spatial coordinate of each grid point is known, and the shape of a triangle formed by any adjacent three grid points is unique in the grid lattice.
Further, in step S2, the eight neighboring points of each grid point and its periphery refer to the eight orientations of the grid point, such as up, down, left, right, up-right, down-right, up-left, down-left, and so on, and the distances between each grid point and its neighboring eight grid points are saved as the attributes of the grid point for backup.
Further, in step S3, when any three points in the grid lattice are measured, the measurement is performed in a predetermined order (clockwise or counterclockwise).
Further, in step S4, a search is performed in the order of measuring three sides of a triangle formed by measuring three points, and the search is performed in the same order as the measurement.
Further, in step S4, when the side lengths of the triangles are compared, and the difference is smaller than a preset allowable error, the triangles are determined to be consistent, so as to overcome the problem that theoretical consistency cannot be achieved due to measurement errors or grid lattice installation errors in actual application.
The invention has the following beneficial effects: the side length of the triangle formed by the grid dot matrix is pre-calculated when the grid dot matrix is installed and is pre-stored in a computer file, so that repeated calculation is avoided, the position of the triangle in the grid dot matrix can be measured only by comparing the side lengths, and the operation amount is greatly reduced. In addition, the grid row and column intervals adopt prime number units with different sizes, so that a triangle formed by any three adjacent points in the grid is ensured to be unique, the positioning of the three points in a grid lattice space is measured by the uniqueness, and the repeated calculation is reduced (when a completely matched triangle is obtained by searching, a result is obtained, and the searching is quitted). The algorithm can be used in an oversized measurement space based on a reference dot matrix, and self-positioning of a measuring machine is quickly realized by measuring three adjacent reference points, so that precise and quick measurement of the oversized can be realized.
The invention realizes fast search by referring to the distance between each grid point and adjacent points in the grid lattice and the comparison of the side length of a triangle formed by three adjacent points to be detected so as to confirm the serial numbers of the three points to be detected and the positions of the three points in the grid lattice.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic diagram of a triangle formed by three grid points to be measured;
FIG. 2 is a schematic diagram of a grid lattice and the side lengths of adjacent points in different size prime number unit intervals.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
As shown in fig. 1-2, a three-dimensional space positioning fast search method includes the following steps:
s1, in a space grid lattice formed by lines and rows in a three-dimensional space, the space position of each grid point is calibrated in advance, the coordinate is known, and the shape of a triangle formed by any three adjacent grid points is ensured to be unique in the grid lattice; the space coordinate of each grid point of a grid lattice formed by rows and columns in the three-dimensional space is known, and the distance between adjacent rows or adjacent columns is a prime number with different sizes, so that the shape of a triangle formed by any three adjacent grid points is unique in the grid lattice;
s2, calculating the distance between each grid point and eight adjacent points around the grid point, and storing for later use; the distances between each grid point and eight adjacent grid points are used as the attributes of the grid point to be saved for later use, wherein the eight adjacent points of each grid point and the periphery of the grid point refer to the eight orientations (shown in table 1) of the grid point, such as upper, lower, left, right, upper right, lower right, upper left, lower left and the like;
table 1: current grid point and eight neighbor points
Wherein: o (current point), E (east), SE (southeast), S (south), SW (southwest), W (west), NW (northwest), N (north), NE (northeast).
S3, sequentially measuring coordinate values of any three adjacent points in the grid lattice and calculating three side lengths formed by the three points; when measuring any three points in the grid lattice, the measurement is carried out according to the appointed sequence;
s4, searching the distances from the grid points to the adjacent points in sequence, comparing the measured side lengths of the triangle, and after finding that the side lengths are consistent, sequentially comparing the next side length with the distances between the adjacent points of the grid points meeting the requirements and the peripheral points thereof until the three sides of the triangle are completely consistent with the triangle formed by the known three grid points, thereby completing the search; and searching according to three measured sides of a triangle formed by three points, wherein the searching sequence is performed according to the same measuring sequence.