Terrain trowelling method, system and equipment based on contour line infiltration and medium
The contour infiltration method is used to automatically perform terrain smoothing in flight simulation, which solves the problems of low terrain smoothing accuracy and efficiency in the existing technology, achieves efficient and accurate terrain processing, and reduces the gap between the simulator and actual flight conditions. deviation.
Patent Information
- Application Number
- CN202410780060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-06
AI Technical Summary
It is difficult to retain geographical features when smoothing terrain in flight simulation using existing technology, resulting in deviations between the simulator and actual flight conditions, low smoothing accuracy and efficiency, and prone to data errors and heavy workloads.
The terrain smoothing method based on contour infiltration is adopted. By selecting the area to be smoothed, specifying marker retention, setting the smoothing proportion value and performing infiltration processing, data smoothing is automatically calculated and processed simultaneously in a large range or multiple areas.
It reduces time and labor costs, maintains the accuracy of digital elevation data, avoids deviations between the simulator and actual flight conditions, improves processing efficiency and accuracy, and reduces distortion and interference phenomena.
Smart Images

Figure CN118607245A
Abstract
Description
Technical Field
[0001] The invention belongs to the field of visual simulation, and in particular relates to a terrain leveling method, system, equipment and medium based on contour line infiltration. Background Art
[0002] The visual simulation system is one of the important subsystems of flight simulation. The three-dimensional landscape is generated by rasterizing digital elevation data (DEM) and overlaying satellite images (DOM) to achieve three-dimensional geographical morphology and terrain undulation features, such as hills, plains, roads, villages, towns, etc. DEM data can be obtained through a variety of methods, including lidar, remote sensing technology, DLG (digital line graph) and GPS measurement. DEM data is usually presented in the form of a grid, and each grid cell contains a height value. Due to the limitation of the computational capacity of computer hardware, the accuracy of DEM data in visual simulation is limited. When sampling, the originally flat terrain will become uneven. During the flight simulation process, if the terrain is uneven, the satellite images superimposed on the terrain will also be uneven; more seriously, the airport plane and model placed on the terrain will interfere with the terrain, resulting in the so-called "penetration" and "suspended" phenomena, which seriously affect flight training.
[0003] The traditional solution is to flatten the local terrain and simply flatten the entire terrain to the same height. This has the disadvantage of causing the loss of a large number of original geographical features, especially for some mountain airports with complex terrain, which will cause a lot of important obstacle information to be erased, resulting in deviations between the airport conditions in the simulator and the actual flight airport conditions, which is also not allowed by the flight simulator; the biggest problem with the existing method is that in order to retain the original terrain features, it is necessary to rely on manual flattening and manually avoid these geographical features, resulting in insufficient flattening accuracy, prone to data errors, and a large workload. There is another method of flattening everything and then superimposing these features, but the workload is greater. Although the collective superimposed features can guarantee relative accuracy, it is difficult to guarantee absolute accuracy, and the superimposed markers are obviously misplaced. Summary of the invention
[0004] In order to overcome the problems existing in the prior art, the present invention provides a terrain leveling method, system, equipment and medium based on contour infiltration, which are used to overcome the current defects.
[0005] A terrain smoothing method based on contour line infiltration is used for the visual picture of a flight simulator, and the method comprises the steps of:
[0006] S1. Select the area to be leveled, specify the landmarks therein and keep them;
[0007] S2. Selecting a smoothing benchmark for the area to be smoothed and setting a smoothing ratio value;
[0008] S3. Smoothing the area to be smoothed according to the smoothing ratio value.
[0009] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein S1 includes:
[0010] S11. Select the polygonal vertices of the area to be smoothed in the WGS-84 coordinate system, and automatically generate multiple areas to be smoothed;
[0011] S12. Mark each marker in the area to be leveled by box selection;
[0012] S13. Calculate the height of the marked landmark.
[0013] According to the above aspects and any possible implementation, there is further provided an implementation, wherein the smoothing ratio value is the ratio of the smoothed area to the area to be smoothed.
[0014] According to the aspects and any possible implementations described above, there is further provided an implementation, in which the smoothing ratio value in a plain area is greater than the smoothing ratio value in a hilly area.
[0015] According to the aspects and any possible implementations described above, there is further provided an implementation in which the leveling ratio value in the plain area is 95%.
[0016] According to the above aspects and any possible implementation, there is further provided an implementation, in which the leveling ratio value in the hilly area is 85%.
[0017] According to the aspects described above and any possible implementation method, an implementation method is further provided, S3 specifically includes smoothing the horizontal plane and the area below where the smoothed area is located according to the smoothing ratio value, and smoothing the edge line where the horizontal plane intersects with the area to be smoothed and the surface area of the horizontal plane.
[0018] The present invention also provides a terrain leveling system based on contour line infiltration, wherein the system implements the method described above and comprises the following modules:
[0019] A selection module is used to select the area to be leveled, and to specify and retain the landmarks therein;
[0020] A setting module, used for selecting a smoothing benchmark for the area to be smoothed and setting a smoothing ratio value;
[0021] A processing module is used to smooth the area to be smoothed according to the smoothing ratio value.
[0022] The present invention further provides an electronic device, comprising:
[0023] A memory storing executable instructions;
[0024] A processor is used to execute the executable instructions in the memory to implement the method.
[0025] The present invention also provides a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described.
[0026] Beneficial effects of the present invention
[0027] The terrain smoothing method based on contour line infiltration of the present invention is used for the visual screen of a flight simulator, and the method includes the steps of: selecting an area to be smoothed, specifying and retaining the markers therein; selecting a smoothing benchmark for the area to be smoothed, and setting a smoothing ratio value; smoothing the area to be smoothed according to the smoothing ratio value. The present invention has the following technical effects: 1) low time cost and labor cost, no need for a large number of artists to invest a lot of time in manual smoothing, and data smoothing is performed through automatic calculation by a computer;
[0028] 2) Important geographical features are autonomously controllable, and important obstacle information is randomly selected to avoid deviations between the airport conditions in the simulator and the actual flight airport conditions;
[0029] 3) The accuracy error is small. The infiltration method can keep the horizontal accuracy of the digital elevation data (DEM) unchanged, and the vertical accuracy can be flexibly controlled through the infiltration surface;
[0030] 4) The treatment efficiency is high and the range is wide. The traditional method can only perform leveling treatment on a small area of the airport one by one, while the contour infiltration method can perform leveling treatment on a large area or multiple areas at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of the leveling area selection of the present invention;
[0032] Figure 2 It is a schematic diagram of the infiltration and leveling principle of the present invention;
[0033] Figure 3 It is a schematic diagram of the infiltration and leveling effect of the present invention. DETAILED DESCRIPTION
[0034] In order to better understand the technical solution of the present invention, the content of the present invention includes but is not limited to the specific implementation methods described below, and similar technologies and methods should be considered to be within the scope of protection of the present invention. In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.
[0035] It should be clear that the embodiments described in the present invention are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] A terrain leveling method based on contour line infiltration of the present invention is used for the visual picture of a flight simulator, and the method comprises the steps of:
[0037] S1. Select the area to be leveled, specify the landmarks therein and keep them;
[0038] S2. Selecting a smoothing benchmark for the area to be smoothed and setting a smoothing ratio value;
[0039] S3. Smoothing the area to be smoothed according to the smoothing ratio value.
[0040] Preferably, the S1 includes:
[0041] S11. Select the polygonal vertices of the area to be smoothed in the WGS-84 coordinate system, and automatically generate multiple areas to be smoothed;
[0042] S12. Mark each marker in the area to be leveled by box selection;
[0043] S13. Calculate the height of the marked landmark.
[0044] Preferably, the smoothing ratio is the ratio of the smoothed area to the area to be smoothed, and the smoothing ratio in the plain area is greater than that in the hilly area; the smoothing ratio in the plain area is 95%, and the smoothing ratio in the hilly area is 85%.
[0045] Preferably, S3 specifically includes: smoothing the horizontal plane where the smoothed area is located and the area below it according to the smoothing ratio value, and smoothing the edge line where the horizontal plane intersects with the area to be smoothed and the surface area of the horizontal plane.
[0046] Specifically, the implementation process of the present invention is as follows:
[0047] Step 1: Select the leveling area and specify the markers to be retained
[0048] The present invention selects the polygonal vertices of the area to be smoothed based on the WGS-84 coordinate system to automatically generate the polygonal area. The selection method is as follows: Figure 1 As shown, you can select multiple areas to be smoothed at the same time by drawing a polygon on the spherical surface, selecting the polygon vertices, and calculating and drawing a line between two points. The area enclosed by the line is used as the area to be smoothed. Figure 1 The figure shows the situation where multiple polygonal areas are formed by connecting lines. The calculations involved in this process include: converting the longitude and latitude of the selected point into the spatial coordinate system and calculating the shortest path when the longitude and latitude of two known points are known. The transformation of longitude and latitude into the spatial rectangular coordinate system is as follows:
[0049]
[0050] The sphere adopts the WGS-84 coordinate system and uses terrain data to draw a virtual earth. The area to be smoothed is the area to be smoothed on the sphere. After smoothing, satellite image texture is pasted to make the virtual earth more realistic. The purpose of smoothing is to improve the texture distortion of the surface after the satellite image texture is pasted on the area to be smoothed. The shortest distance formula between two points is as follows:
[0051]
[0052] In the first two equations, R is the radius of the earth, lat A Indicates the latitude value of point A, lon A Indicates the longitude value of point A; lat B Indicates the latitude value of point B, lat B Indicates the longitude value of point B; It represents the distance between two points A and B on the sphere. In formula 1, lat represents the latitude of a point, and lon represents the longitude of a point. In this formula, lat can be lat A or lat B lon can be lon A or lon B , x, y, z represent the spatial coordinates of the selected point, and A, B and C are used as the selected markers.
[0053] The smoothed area is selected by point selection, accurately to a vertex with known coordinates; markers such as A, B and C are framed by frame selection, as the markers that need to be retained on the satellite image, and the divide-and-conquer algorithm is used to infer the highest point of the DEM in the framed area, that is, the point representing the height of the marker. The marker refers to a landmark object or reference object that the pilot needs to refer to in the air, such as an airport tower, a mountaintop base station, a city landmark building, etc.; the selection method is to frame the area near the marker. The present invention selects multiple markers representing regional characteristics in turn, and according to the height value of each point in its digital elevation data (DEM) (the data is marked in advance), the following formula three is used to calculate the maximum height value of multiple framed areas. Formula three uses the recursive equation in the divide-and-conquer algorithm, as shown in the following formula:
[0054]
[0055] This formula uses a recursive equation to calculate the highest point value of the landmark in the selected area, that is, the point value with the largest height value among the n points in the selected range, n represents the total number of vertices in the selected area; k represents the number of decompositions, that is, when comparing the height values of n points in the selected area, in order to improve the calculation efficiency, the n points are divided into k parts using a divide-and-conquer algorithm, and the maximum value of each part is calculated respectively, and then the k maximum values are compared to obtain the maximum value of the n points, that is, the highest point, k>1; m represents the number of vertices in each part after the n points in the selected area are divided into k parts, and n / m represents the proportion of the number of vertices in one of the k parts to the total number of vertices; t (n) represents the time of decomposition and merging, f (n) Indicates the time corresponding to the height values of all points in the selected area; f (n / m ) represents the time corresponding to the height values of all points in each area after decomposition.
[0056] Step 2: Select the leveling benchmark and set the leveling ratio value
[0057] In the flight simulation vision, the areas that need to be processed are airports, cities or large planes (such as roads) where markers need to be placed. For example, for airports, the runway surface elevation adjustment value P' point is selected as the leveling reference, that is, the contour line of point P' is used as the leveling reference; the leveling ratio value refers to: the leveling area selected in step 1 moves with the contour line, and the leveled area accounts for the proportion of the entire selected area to be leveled. The purpose of setting this value is to retain the geographical features near the airport as much as possible. If the entire selected area is leveled directly with point P' as the reference, if the ratio of the leveled area to the selected area to be leveled is greater than the leveling ratio value, the DEM data will lose more geographical features around the airport, and the virtual airport environment will not meet the pilot training conditions. Therefore, the setting of this leveling ratio value is related to the feature richness of the selected leveling area. The leveling ratio value in the plain area is greater than that in the hilly area. For example, the leveling ratio value in the plain area is 95%, and the leveling ratio value in the hilly area is 85%. Therefore, this step is used to select the leveling reference, set the leveling ratio value and determine the leveling reference surface of different leveling areas.
[0058] Step 3: Smooth the elevation data below the datum plane in the selected area and the data above the datum plane.
[0059] The above step 1 obtains the selected smoothing area and the position and elevation of the reserved markers in the selected area, and step 2 obtains the smoothing reference surface and smoothing ratio value of different smoothing areas. In this step, the infiltration method is used for smoothing. The principle of the infiltration method is to draw a ray from the center point O to the reference point P. P represents a point in space. Take point E between OP and draw a sphere with the center point O through point E. The sphere where point E is located is the infiltration surface, also called the E surface. The curve on the E surface is the infiltration line, such as Figure 2The plane where the infiltration line is shown is the E surface, A, B and C are the retained markers, the value range of point E is the movement value from point O to point P, and the elevation DEM data of each grid vertex of the spherical surface where the E surface and the smoothed area are located are intersected to form an intersection surface. The DEM grid vertex intersecting with the E surface moves along the E surface toward the direction of the normal vector of the grid vertex relative to the sphere center O. Similar to the rising sea level, the original spherical surface submerged by the E surface automatically moves up with the E surface. The E surface is a virtual spherical surface, and the original spherical surface is the spherical surface of the flat area selected in step 1. It stops when the infiltration area reaches the smoothing ratio value or the lowest submerged retained marker, such as Figure 2 The lowest retention marker point A is shown, and the calculation process is expressed by the following equation:
[0060]
[0061] Where f′ (n) represents the area to be leveled; f′ (i) represents the area of the leveled area; i represents a leveled area in the area to be leveled; d represents the leveling ratio; m′ represents the height values of multiple retained markers. The height values of different markers are different, and F′ is used. (m) Represents the set of all the retained landmark elevation values; E represents the current leveled elevation point, that is, the point between the previous OP', with coordinates (x E ,y E , z E );0 represents the center of the sphere, and its coordinates are (x0, y0, z0). These two coordinates are the coordinates in the spatial coordinate system. Each coordinate can be converted into the WGS-84 coordinate system through formula 1.
[0062] When the E surface is immersed to the retention mark point A, f′ (i) / f′ (n) <d, at this time, a certain range around the retained marker point A is automatically kicked out of the area to be leveled, that is, no leveling is performed, but a certain range around the marker point A is retained, and the E surface continues to be infiltrated until f′ (i) / f′ (n) =d, the infiltration is terminated, a certain range around the kicked out marker is not affected by the infiltration surface, and the smoothed surface obtained by infiltration is the difference between the smoothed area and the kicked out marker and a certain range around it that do not require smoothing.
[0063] Finally, the edge lines and infiltration surfaces that intersect the infiltration surface are smoothed, and the grid points under the infiltration surface are raised to the height of the infiltration surface. After the increase, a cutting line appears between the infiltration surface and the uninfiltration area. At this time, the transition is relatively abrupt. Therefore, smoothing is required to allow a natural transition between the infiltration surface and the original spherical surface or data (that is, the infiltration surface is raised to the height of the infiltration surface, and the raised surface and the edge of the uninfiltration area).
[0064] like Figure 3 As shown in the figure on the left, the terrain is rugged before infiltration (smoothing), and the satellite image texture attached on this basis will have a stretching distortion effect, which will cause the satellite image superimposed on the terrain to be uneven; more seriously, the airport plane or model placed on the terrain interferes with the terrain, resulting in the so-called "through-the-mold" and "overhanging" phenomena, which seriously affects flight training. After being processed by the method of the present invention, as shown in the figure on the right, the terrain will be well processed, and plants or buildings will be generated on this basis after infiltration, avoiding problems such as distortion, through-the-mold and overhanging.
[0065] The principle of the flattening method based on contour line infiltration terrain proposed by the present invention is to mark out the terrain area to be flattened, regard it as an electronic sand table, and then pour water into it. The height of the obstacles that must be left is marked in advance, and when the imported horizontal plane gradually increases and meets the elevation area that needs to be flattened or reaches the first obstacle height that must be left, the flattening is stopped; then the plane below this height is flattened, and the plane above this height is left for smoothing.
[0066] As an embodiment disclosed by the present invention, the present invention further discloses a terrain leveling system based on contour line infiltration, wherein the system implements the method described, and comprises the following modules:
[0067] A selection module is used to select the area to be leveled, and to specify and retain the landmarks therein;
[0068] A setting module, used for selecting a smoothing benchmark for the area to be smoothed and setting a smoothing ratio value;
[0069] A processing module is used to smooth the area to be smoothed according to the smoothing ratio value.
[0070] As an embodiment disclosed in the present invention, the present invention further discloses an electronic device, the electronic device comprising:
[0071] A memory storing executable instructions;
[0072] A processor is used to execute the executable instructions in the memory to implement the method described in the present invention.
[0073] As an embodiment disclosed in the present invention, the present invention further discloses a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described in the present invention.
[0074] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0075] The above description shows and describes several preferred embodiments of the present invention, but as mentioned above, it should be understood that the present invention is not limited to the form disclosed in the present invention, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the application concept of the present invention through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A terrain smoothing method based on contour infiltration, used for the visual picture of a flight simulator, characterized in that: The method comprises the steps of: S1. Select the area to be leveled, specify the landmarks therein and keep them; S2. Selecting a smoothing benchmark for the area to be smoothed and setting a smoothing ratio value; S3. Smoothing the area to be smoothed according to the smoothing ratio value.
2. The terrain leveling method based on contour infiltration according to claim 1, characterized in that: The S1 includes: S11. Select the polygonal vertices of the area to be smoothed in the WGS-84 coordinate system, and automatically generate multiple areas to be smoothed; S12. Mark each marker in the area to be leveled by box selection; S13. Calculate the height of the marked landmark.
3. The terrain leveling method based on contour infiltration according to claim 2, characterized in that: The smoothing ratio value is the ratio of the smoothed area to the area to be smoothed.
4. The terrain leveling method based on contour infiltration according to claim 3 is characterized in that: The leveling ratio value in the plain area is greater than the leveling ratio value in the hilly area.
5. The terrain leveling method based on contour infiltration according to claim 4, characterized in that: The leveling ratio value for the plain area is 95%.
6. The terrain leveling method based on contour infiltration according to claim 4, characterized in that: The leveling ratio value for hilly areas is 85%.
7. The terrain leveling method based on contour infiltration according to claim 1, characterized in that: S3 specifically includes: smoothing the horizontal plane where the smoothed area is located and the area below it according to the smoothing ratio value, and smoothing the edge line where the horizontal plane intersects with the area to be smoothed and the surface area of the horizontal plane.
8. A terrain leveling system based on contour infiltration, characterized in that: The system implements the method described in any one of claims 1 to 7, and includes the following modules: A selection module is used to select the area to be leveled, and to specify and retain the landmarks therein; A setting module, used for selecting a smoothing benchmark for the area to be smoothed and setting a smoothing ratio value; A processing module is used to smooth the area to be smoothed according to the smoothing ratio value.
9. An electronic device, characterized in that: The electronic device comprises: A memory storing executable instructions; A processor, wherein the processor runs the executable instructions in the memory to implement the method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.
