A runway intercept analysis method based on C# native functions
By constructing polygonal shapes of runway dents or bulges using native C# functions and combining them, and combining this with a three-layer loop to determine runway truncation, the problem of low computational efficiency and information loss in existing methods is solved, achieving efficient and accurate runway truncation analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GENERAL ENG RES INST CHINA ACAD OF ENG PHYSICS
- Filing Date
- 2025-01-10
- Publication Date
- 2026-04-21
AI Technical Summary
In existing runway truncation analysis methods, the discretization of the edges of pits or ridges leads to low computational efficiency or information loss.
The code uses the native C# function GraphicsPath to construct polygonal shapes with depressions or bulges, and then uses the Union function to combine them. It combines three layers of calculation loops to determine whether the minimum take-off and landing rectangle is inside the runway and intersects with the depression or bulge union, and to determine whether the runway is truncated.
It effectively solves the problems of computation time and information loss, improves computation efficiency, and ensures the accuracy of results.
Smart Images

Figure CN119904509B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of damage assessment technology, specifically relating to a runway truncation analysis method based on native C# functions. Background Technology
[0002] When a runway is damaged, there will be potholes or bumps of varying sizes on the surface for aircraft to take off and land. It is necessary to analyze whether the damaged runway has been cut off in order to determine whether the aircraft still has the ability to take off and land on that runway.
[0003] Existing runway truncation analysis methods have the following drawbacks:
[0004] Existing methods generally require discretization of the edges of pits or protrusions. The sparsity of the discretization of these edges can affect the computational results. If the edge discretization is too dense, it will reduce computational efficiency and consume more computation time; if the edge discretization is too sparse, the true information of the pits or protrusions will be lost, affecting the accuracy of the final computational results. Summary of the Invention
[0005] To address the problems mentioned in the background section, this invention provides a runway truncation analysis method based on native C# functions, which solves the computation time or information loss problems caused by discretization of pits or bulges in existing runway truncation analysis methods.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A runway truncation analysis method based on native C# functions includes the following steps:
[0008] S1: Assume that each pit or protrusion in the runway is a circular area. Discretize the edge of the circular area according to the center point coordinates and radius of the pit or protrusion. Select a preset number of discrete points on the edge of the circular area in equal proportion.
[0009] S2: Based on discrete points on the edges of pits or protrusions, construct the equilateral polygon region_i corresponding to each pit or protrusion using the native C# function GraphicsPath;
[0010] S3: Use the native C# function Union to combine the equilateral polygon shapes region_i corresponding to all the pits or bumps in the runway to obtain the combined region_all corresponding to all the pits or bumps in the runway.
[0011] S4: Establish a three-layer calculation loop and a minimum takeoff and landing rectangle. The first layer of calculation loop uses the runway width as the loop variable, the second layer of calculation loop uses the runway length as the loop variable, and the third layer of calculation loop uses the skew angle of the minimum takeoff and landing rectangle as the loop variable. Set the loop range and loop spacing for all loop variables.
[0012] S5: Perform loop calculations, specifically:
[0013] S5.1: The loop variables of the first, second, and third calculation loops are respectively used as the x-coordinate, y-coordinate, and skew angle of the center point of the minimum take-off and landing rectangle;
[0014] S5.2: Based on the coordinates of the center point, skew angle, length, and width of the minimum take-off and landing rectangle, calculate the coordinates of the four vertices of the minimum take-off and landing rectangle;
[0015] S5.3: Determine whether the minimum takeoff and landing rectangle is completely inside the runway. If it is inside the runway, proceed to S5.4. If it is not inside the runway, reassign the loop variable according to the preset interval and return to S5.1.
[0016] S5.4: Construct the quadrilateral graph region_min corresponding to the minimum take-off and landing rectangle using the native C# function GraphicsPath;
[0017] S5.5: Use the native C# function Intersect to determine whether the quadrilateral region_min corresponding to the minimum takeoff and landing rectangle intersects with the combined region region_all. If they intersect, determine whether the loop has ended. If the loop has not ended, reassign the loop variable according to the preset interval and return to S5.1. If the loop has ended, output the judgment result that the runway has been truncated. If the quadrilateral region_min and the combined region region_all do not intersect, exit the current loop calculation and output the judgment result that the runway has not been truncated.
[0018] Preferably, in S1, 16 discrete points are selected proportionally on the edge of the circular region.
[0019] Preferably, S4 specifically involves: Let the width and length of the runway be W and H respectively, and the width and length of the minimum takeoff and landing rectangle be w and h respectively. The first-level calculation loop uses the runway width as the loop variable, the loop range is [1, W], and the loop interval is... The second-level calculation loop uses the track length as the loop variable, with a loop range of [1, H] and a loop interval of [1, H]. The third-level calculation loop uses the skew angle φ of the minimum takeoff and landing rectangle as the loop variable, and the loop range is [φ]. min ,φ maxThe cycle interval is 1°, where the minimum value of the skew angle φ is φ. min and maximum value φ max The calculation formula is:
[0020] .
[0021] Preferably, the x-coordinate of the center point of the minimum take-off and landing rectangle is represented as x. oj The vertical axis is represented by y. oj The deflection angle is represented by φ. j In S5.2, the four vertices (x, y, z) of the minimum take-off and landing rectangle j1 y j1 ), (x j2 y j2 ), (x j3 y j3 ), (x j4 y j4 The specific method for calculating the coordinates of () is as follows:
[0022] .
[0023] Preferably, in S5.3, the specific method for determining whether the minimum takeoff and landing rectangle is completely inside the runway is as follows:
[0024] To determine if the minimum takeoff and landing rectangle is inside the runway, it is considered to be inside the runway if all four vertices are inside the runway, and not inside the runway if not. The method for determining whether each vertex of the minimum takeoff and landing rectangle is inside the runway is as follows:
[0025] Connect the vertex to be judged to the four vertices of the track with straight lines. The four sides of the track and the four connecting lines form four triangles. Calculate the area of the four triangles using the coordinates of the three vertices of each triangle. If the sum of the areas of the four triangles is greater than the area of the track, then the vertex is outside the track; otherwise, the vertex is inside the track.
[0026] Compared with the prior art, the beneficial effects of the present invention are:
[0027] This application proposes a runway truncation analysis method based on native C# functions. The method discretizes the edges of pits or bulges, constructs polygonal graphics corresponding to the pits or bulges using the native C# function `GraphicsPath`, and combines all polygonal graphics corresponding to the pits or bulges using the function `Union`. A three-layer calculation loop is established based on the runway's length, width, and minimum takeoff and landing rectangle's skew angle. The minimum takeoff and landing rectangle is constructed based on the loop parameters, and the method determines whether the minimum takeoff and landing rectangle is inside the runway and intersects with the combined pit or bulge. If a non-intersecting minimum takeoff and landing rectangle exists, the runway is considered not truncated; if the loop ends and no non-intersecting minimum takeoff and landing rectangle is found, the runway is considered truncated.
[0028] Compared to existing runway truncation analysis methods, this application uses C#'s built-in region construction and joint functions to determine whether two regions overlap by region intersection. Discrete points on the edges of pits or bulges do not need to directly participate in the intersection judgment. The sparsity of the discrete points on the edges of pits or bulges does not have a significant impact on computational efficiency. Therefore, it is sufficient to select appropriate discrete points to participate in the calculation. This solves the problems of computation time or information loss caused by the discretization of pits or bulges in existing runway truncation analysis methods. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating the process of this application;
[0030] Figure 2 This is a discrete schematic diagram of the edge of a pit or a protrusion. Detailed Implementation
[0031] To facilitate understanding of the technical content of this invention by those skilled in the art, the invention will be further described in detail below with reference to the accompanying drawings and specific examples. It should be understood that the specific examples described herein are merely illustrative and not intended to limit the scope of the invention.
[0032] Example 1:
[0033] A method for runway truncation analysis based on native C# functions, such as... Figure 1 As shown, it includes the following steps:
[0034] S1: Assume that each depression or protrusion in the track is as follows: Figure 2 The circular region shown in (a) is as follows: Figure 2 As shown in (b), the coordinates of the center point of the circular region (x... i y i ) and radius r iGiven that the edges of a pit or protrusion are discretized based on the center point coordinates and radius, 16 discrete points are selected proportionally on the edge of the pit or protrusion. An equilateral polygon region is used to approximate the area of the pit or protrusion. The selected discrete points divide the edge of the pit or protrusion into 16 equal parts. The coordinates of the discrete points on the edge (x...) ij y ij The calculation formula for ) is shown below:
[0035] ;
[0036] In the formula, n is the total number of pits or bumps.
[0037] S2: Based on discrete points on the edges of pits or bulges, construct the equilateral polygon region_i corresponding to each pit or bulge using the native C# function GraphicsPath. The specific construction code for the equilateral polygon region_i is shown below:
[0038] GraphicsPath region_i = new GraphicsPath(new Point[] {
[0039] (x) i1 y i1 ),
[0040] (x) i16 y i16 ), ...
[0042] (x) i1 y i1 ),
[0043] }, new byte[] {
[0044] (byte)PathPointType.Start,
[0045] (byte)PathPointType.Line,
[0046] (byte)PathPointType.Line,
[0047] (byte)PathPointType.Line,
[0048] (byte)PathPointType.Line,
[0049] });
[0050] S3: Use the native C# function Union to union all the equilateral polygon figures region_i corresponding to the pits or protrusions within the runway to obtain the union region region_all corresponding to all the pits or protrusions on the runway;
[0051] The specific construction code is as follows:
[0052] Region region_all = new Region();
[0053] for (int i = 0; i < n; i++)
[0054] {
[0055] Region region_temp = new Region(region_i);
[0056] region_all.Union(region_temp);
[0057] };
[0058] S4: Establish a three-layer calculation loop. Let the width and length of the runway be W and H respectively, and the width and length of the minimum takeoff and landing rectangle be w and h respectively. The first-layer calculation loop uses the width value of the runway as the loop variable, with the loop range being [1, W] and the loop spacing being , the second-layer calculation loop uses the length value of the runway as the loop variable, with the loop range being [1, H] and the loop spacing being , the third-layer calculation loop uses the skew angle φ of the minimum takeoff and landing rectangle as the loop variable, with the loop range being [φ min , φ max , and the loop spacing is 1°. Among them, the minimum value φ min and the maximum value φ max of the skew angle φ are calculated as follows:
[0059] ;
[0060] The specific construction code is as follows:
[0061] for (float i = 1; i < W; i = i + 1 / 3 * w) / / First-layer loop <oo00192>{
[0063] for (float j = 1; j < H; j = j + 1 / 3 * h) / / Second-layer loop
[0064] {
[0065] for (float k = fai_min; k < fai_max; k = k + 1) / / Third - layer loop
[0066] {
[0067] / / / Calculation part
[0068] }
[0069] }
[0070] }
[0071] S5: Perform loop calculation, specifically:
[0072] S5.1: Respectively take the loop variables of the first - layer calculation loop, the second - layer calculation loop, and the third - layer calculation loop as the abscissa x of the center point of the minimum take - off and landing rectangle oj , ordinate y oj and skew angle φ j ;
[0073] S5.2: Based on the center point coordinates (x oj , y oj ), skew angle φ j , length h and width w of the minimum take - off and landing rectangle, calculate the coordinates of the four vertices (x j1 , y j1 ), (x j2 , y j2 ), (x j3 , y j3 ), (x j4 , y j4 ) of the minimum take - off and landing rectangle. The calculation formula is as follows:
[0074] ;
[0075] S5.3: Judge whether the minimum take - off and landing rectangle is completely inside the runway. If it is inside the runway, enter S5.4; if it is not inside the runway, re - assign the loop variables according to the loop spacing in a preset manner and return to S5.1;
[0076] The specific judgment method is: Judge whether all four vertices of the minimum take - off and landing rectangle are inside the runway. If so, it is considered that the minimum take - off and landing rectangle is inside the runway; if not, it is considered that the minimum take - off and landing rectangle is not inside the runway. Among them, the judgment method for whether each vertex of the minimum take - off and landing rectangle is inside the runway is:
[0077] Connect the vertex to be judged with the four vertices of the runway by straight lines. The four sides of the runway and the four connections form four triangles. Calculate the areas of the four triangles through the coordinates of the three vertices of the triangles. If the sum of the areas of the four triangles is greater than the area of the runway, the vertex is outside the runway; otherwise, the vertex is inside the runway.
[0078] S5.4: Construct the quadrilateral region_min corresponding to the minimum take-off and landing rectangle using the native C# function GraphicsPath. The specific construction code for the quadrilateral region_min is shown below:
[0079] GraphicsPath region_min = new GraphicsPath(new Point[] {
[0080] (x) j1 y j1 ),
[0081] (x) j2 y j2 )
[0082] (x) j3 y j3 )
[0083] (x) j4 y j4 ),
[0084] }, new byte[] {
[0085] (byte)PathPointType.Start,
[0086] (byte)PathPointType.Line,
[0087] (byte)PathPointType.Line,
[0088] (byte)PathPointType.Line,
[0089] (byte)PathPointType.Line,
[0090] });
[0091] S5.5: Use the native C# function Intersect to determine whether the quadrilateral region_min corresponding to the minimum takeoff and landing rectangle intersects with the combined region region_all. If they intersect, determine whether the loop has ended. If the loop has not ended, reassign the loop variable according to the preset interval and return to S5.1. If the loop has ended, output the judgment result that the runway has been truncated. If the quadrilateral region_min and the combined region region_all do not intersect, exit the current loop calculation and output the judgment result that the runway has not been truncated.
[0092] In this embodiment, compared with the existing runway truncation analysis method, this application adopts the region construction and joint function built into C#. It determines whether two regions overlap by region intersection. The discrete points of the pit or convex edge do not need to directly participate in the intersection judgment. The sparsity of the pit or convex edge discreteness will not have a significant impact on the computational efficiency. Therefore, it is sufficient to select appropriate discrete points to participate in the calculation. This solves the problem of computation time or information loss caused by the discretization of pits or convex edges in the existing runway truncation analysis method.
Claims
1. A runway truncation analysis method based on native C# functions, characterized in that, Includes the following steps: S1: Assume that each pit or protrusion in the runway is a circular area. Discretize the edge of the circular area according to the center point coordinates and radius of the pit or protrusion. Select a preset number of discrete points on the edge of the circular area in equal proportion. S2: Based on discrete points on the edges of pits or protrusions, construct the equilateral polygon region_i corresponding to each pit or protrusion using the native C# function GraphicsPath; S3: Use the native C# function Union to combine the equilateral polygon shapes region_i corresponding to all the pits or bumps in the runway to obtain the combined region_all corresponding to all the pits or bumps in the runway. S4: Establish a three-layer calculation loop and a minimum takeoff and landing rectangle. The first layer of the calculation loop uses the runway width as the loop variable, the second layer uses the runway length as the loop variable, and the third layer uses the skew angle of the minimum takeoff and landing rectangle as the loop variable. Set the loop range and loop interval for all loop variables. Specifically, S4 is as follows: Let the width and length of the runway be W and H, respectively, and the width and length of the minimum takeoff and landing rectangle be w and h, respectively. The first-level calculation loop uses the runway width as the loop variable, the loop range is [1, W], and the loop interval is... The second-level calculation loop uses the track length as the loop variable, with a loop range of [1, H] and a loop interval of [1, H]. The third-level calculation loop uses the skew angle φ of the minimum takeoff and landing rectangle as the loop variable, and the loop range is [φ]. min ,φ max The cycle interval is 1°, where the minimum value of the skew angle φ is φ. min and maximum value φ max The calculation formula is: ; S5: Perform loop calculations, specifically: S5.1: The loop variables of the first, second, and third calculation loops are respectively used as the x-coordinate, y-coordinate, and skew angle of the center point of the minimum take-off and landing rectangle; S5.2: Based on the coordinates of the center point, skew angle, length, and width of the minimum take-off and landing rectangle, calculate the coordinates of the four vertices of the minimum take-off and landing rectangle; S5.3: Determine whether the minimum takeoff and landing rectangle is completely inside the runway. If it is inside the runway, proceed to S5.
4. If it is not inside the runway, reassign the loop variable according to the preset interval and return to S5.
1. S5.4: Construct the quadrilateral graph region_min corresponding to the minimum take-off and landing rectangle using the native C# function GraphicsPath; S5.5: Use the native C# function Intersect to determine whether the quadrilateral region_min corresponding to the minimum takeoff and landing rectangle intersects with the combined region region_all. If they intersect, determine whether the loop has ended. If the loop has not ended, reassign the loop variable according to the preset interval and return to S5.
1. If the loop has ended, output the judgment result that the runway has been truncated. If the quadrilateral region_min and the combined region region_all do not intersect, exit the current loop calculation and output the judgment result that the runway has not been truncated.
2. The method for runway truncation analysis based on native C# functions according to claim 1, characterized in that, In S1, 16 discrete points are selected proportionally on the edge of the circular region.
3. The method for runway truncation analysis based on native C# functions according to claim 1, characterized in that, The x-coordinate of the center point of the minimum takeoff and landing rectangle is represented by x. oj The vertical axis is represented by y. oj The deflection angle is represented by φ. j In S5.2, the four vertices (x, y, z) of the minimum take-off and landing rectangle j1 y j1 ), (x j2 y j2 ), (x j3 y j3 ), (x j4 y j4 The specific method for calculating the coordinates of () is as follows: 。 4. The method for runway truncation analysis based on native C# functions according to claim 1, characterized in that, In S5.3, the specific method for determining whether the minimum takeoff and landing rectangle is completely inside the runway is as follows: To determine if the minimum takeoff and landing rectangle is inside the runway, it is considered to be inside the runway if all four vertices are inside the runway, and not inside the runway if not. The method for determining whether each vertex of the minimum takeoff and landing rectangle is inside the runway is as follows: Connect the vertex to be judged to the four vertices of the track with straight lines. The four sides of the track and the four connecting lines form four triangles. Calculate the area of the four triangles using the coordinates of the three vertices of each triangle. If the sum of the areas of the four triangles is greater than the area of the track, then the vertex is outside the track; otherwise, the vertex is inside the track.
Citation Information
Patent Citations
Rapid runway truncation analysis method
CN111652071A