The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art fall within the protection scope of the present invention.
 Such as Figure 1-5 As shown, a spatial positioning method based on digital coding according to an embodiment of the present invention includes:
 Step 1: Using a Cartesian rectangular coordinate system, select a predetermined position as the origin of the coordinate, establish a coordinate system, obtain the abscissa and ordinate of the target point, and generate an initial digital code according to a predetermined coding rule, the digital code including the area code And address code;
 Step 2: By comparing the longitude and latitude addresses of the coordinate point and the origin, the error correction coefficient of the coordinate point from the origin along the abscissa direction (ie the tangential direction of the latitude line) and the error correction factor from the origin along the ordinate direction (ie the tangent direction of the warp line) are obtained;
 Step 3: According to the predetermined conversion method, convert the codes of the abscissa and the ordinate to the actual distance, by multiplying the actual distance in the abscissa direction by the error correction coefficient in the abscissa direction, and the actual distance in the ordinate direction and The error correction coefficient in the ordinate direction is multiplied to obtain the final coordinate value of the target point.
 The digital code also includes administrative area code and height code. The specific manifestation of the digital code is: (administrative area code)·area code·address code·(height code), area code and address code are necessary sections, administrative The area code and height code are optional sections and can be omitted according to user needs.
 Administrative area code: It includes information about the administrative area to which a certain geographic location (target point) belongs, including the country code and city code of the administrative area to which the target point belongs. The country code adopts "ISO3166 National Three-letter Code" or related expressions, city code Adopt "GB-T2260 People's Republic of China Administrative Division Code" or related expressions. For example, Beijing can be expressed as CHNPEK. For ease of use, without causing confusion, such as using codes for positioning within the same city, the corresponding administrative area codes can be omitted.
 Area code: indicates that within the scope defined by the administrative area code, the information of a certain geographic location (target point) relative to the origin of the specified area coordinates. The method for determining the area code is: select a predetermined location in the area where the target point is located as the origin of the coordinates, take the true east direction of the origin as the +X axis direction, and use the true north direction of the origin as the +Y axis direction to establish a relative coordinate system. The coordinate value of the target point is expressed in hexadecimal complement code. The predetermined location can be the geographic center or landmark building of the administrative area where the target point is located. The hexadecimal area code includes three lengths of 8bit, 16bit and 32bit, which cover respectively In the areas of 15Km2, 255Km2, and 4095Km2, the first bit of the hexadecimal area code is the sign bit, and the unit code spacing of the hexadecimal area code is converted into an actual distance of 1Km.
 Address code: indicates the specific position of the target point in the area where it is located. The method for determining the address code is: select a predetermined position in the area where the target point is located as the origin of the coordinates, and take the true east direction of the origin as the +X axis direction, Taking the true north direction of the origin as the +Y axis direction, a relative coordinate system is established, and the coordinate value of the target point is expressed in a decimal code, and the unit code interval of the decimal code is converted into an actual distance of 10 m.
 The height code has two expression forms: absolute height code and relative height code.
 Absolute altitude code: indicates the altitude information of the current location (target point), this form can be widely used in aviation, aerospace, outdoor travel, field rescue and other project fields;
 Relative height code: indicates the distance of the current location (target point) relative to the vertical line of the land plane where it is located. The distance can be positive or negative. A positive value indicates the height relative to the land plane, and a negative value The value represents the depth relative to the land plane. This form can be applied to project areas such as urban management, floor display, underground exploration, urban search and rescue, and disaster relief.
 The height code can be expressed in actual height, measured in the metric system, and the unit is "meter".
 Continue to refer Figure 5 , Calculate the correction coefficient: Since the earth's surface is a spherical surface, there is an unavoidable error in calculating the distance between two points on the earth's surface using the above method, and the greater the actual distance between the two points, the greater the error. This patent proposes the concept of error coefficient, which respectively multiplies the abscissa and ordinate values of the measuring point obtained by the above method by their respective error coefficients to obtain the actual and accurate coordinate values. The method of solving the error coefficient is given below:
 Error correction coefficient from the origin along the meridian direction (ordinate):
 Use the method introduced in step two to establish a coordinate system. Where O is the origin, A is the measurement point, NA is the projection of point A on the N axis, and NA' is the intersection of the longitude plane where the point O is and the dimensional plane where the point A is.
 Suppose the arc length of ONA’ is L, then:
 Among them, Δα is the dimensional difference between NA' and O point, and R is the radius of the earth.
 Suppose the ONA length is S, then:
 Let P be the ordinate error correction coefficient, then:
 Error correction coefficient from the origin along the latitude line (abscissa):
 Use the method introduced in step two to establish a coordinate system. Where O is the origin, A is the measurement point, EA is the projection of point A on the E axis, and EA' is the intersection of the dimensional plane where the point O is and the longitude plane where the point A is.
 Suppose the arc length of OEA’ is M, then:
 Among them, Δβ is the longitude difference between EA' and point O, R is the radius of the earth, and αO is the latitude value of point O.
 Suppose the length of OEA is S, then:
 Let Q be the abscissa error correction coefficient, then:
 According to the initial digital code generated in step 1, we can know the abscissa and ordinate of the target point relative to the origin in city coordinates, convert them into distances and multiply them with the error correction coefficients calculated in step 2, namely Obtain the accurate coordinate value of the target point, and then correct the code generated in step two.
 Take the north gate of Xiangshan Park as an example. First, set the center of Tiananmen Square as the origin to establish a coordinate system with a unit interval of 1km. The abscissa of the north gate of Xiangshan Park exceeds 15km, so the length is 16bit. According to the area where the north gate of Xiangshan Park is located, the area code is FFFE000A; the coordinate system is established with the southwest corner of the 1km area where the north gate of Xiangshan Park is located as the origin, the address code of the north gate of Xiangshan Park is 3216; the north gate of Xiangshan Park is at an altitude of 108 Meters, so its height code is not 108; therefore, the initial digital code of the north gate of Xiangshan Park relative to the center of Tiananmen is: CHNPEK·FFFE000A·3216·108.
 Second, calculate the correction factor. The longitude and latitude of the center of Tiananmen are: N39°54’26” north latitude and E116°23’28” east longitude; the latitude and longitude of the north gate of Xiangshan Park are: N39°59’39” north latitude and E116°11’19” east longitude. Therefore, Δα=0.087° and Δβ=0.203°.
 According to formula (1):
 Error correction coefficient from the origin along the meridian direction (ordinate)
 According to formula (2):
 Error correction coefficient from the origin along the latitude direction (abscissa)
 Finally the error is corrected. Because the north gate of Xiangshan Park is close to the center of Tiananmen Square, the error is very small, so it can be ignored.
 Therefore, the digital code of the north gate of Xiangshan Park relative to the center of Tiananmen Square is: CHNPEK··FFFE000A·3216·108.
 In summary, with the help of the above technical solution of the present invention,
 1. Continuous and stable acquisition of accurate positioning information;
 Currently commonly used positioning technologies are mainly based on satellite positioning systems, and positioning accuracy relies on real-time satellite signals. Signal acquisition is easily affected by the environment, and accurate accuracy cannot be guaranteed at any time during specific use. Using the digital coding introduced by the present invention to perform positioning expression, and correcting the generated error through the error correction coefficient, can continuously and stably obtain accurate positioning of any location.
 2. Coding granularity can be set freely;
 The unit code granularity expression interval of the address code given in the present invention is 10 meters, which is determined by comprehensively considering the code length and the daily use requirements of users. If there is a need for higher precision, or if the particle size is not high, you only need to change the definition of the unit code spacing.
 The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the present invention. Within the scope of protection.