Method for calculating the distance of a naval vessel to a destination

By using local adjacent zone conversion and angle bisector and perpendicular line methods, the problem of reduced accuracy in calculating the distance from the warship to the destination caused by Gaussian projection length deformation was solved, and high-precision distance calculation and yaw alarm were achieved.

CN115808174BActive Publication Date: 2026-04-10JIANGXI LIANCHUANG COMM CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, there is a problem that the accuracy of calculating the distance from the warship to the destination decreases due to the deformation of the Gaussian projection length.

Method used

By acquiring multiple route points, connecting adjacent route points to form line segments, performing local adjacent zone conversion to unify the Gaussian rectangular coordinate system, calculating distances in the Gaussian rectangular coordinate system using angle bisectors and perpendicular lines, and setting thresholds for yaw judgment, high-precision calculations are achieved.

Benefits of technology

It achieves high-precision distance calculation between Gaussian projection zones and also has a yaw alarm function, solving the problem of decreased distance calculation accuracy caused by Gaussian projection length deformation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115808174B_ABST
    Figure CN115808174B_ABST
Patent Text Reader

Abstract

The application provides a warship-to-endpoint distance calculation method, comprising the following steps: acquiring a plurality of route points, connecting two adjacent route points to form a line segment, and acquiring the distance of each line segment; acquiring a trajectory point of the warship, dividing the trajectory point according to a preset point number to obtain a plurality of groups of trajectory points, and solving to obtain an angle bisector of each group of trajectory points and a perpendicular line passing through the start point or the end point of the line segment; acquiring a current point and calculating the distance between the current point and each line segment in the line segment set; judging whether the distance is less than a threshold value; if yes, the line segment with a distance less than the threshold value from the current point is the line segment where the current point is located; acquiring the distance from the current point to the end point of the located line segment, and accumulating the distances of the line segments to obtain the distance of the warship from the endpoint. The application determines the final route position of the warship by the head-to-tail perpendicular line or the angle bisector of the line segment, and the determination threshold in the Gaussian rectangular coordinate system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a method for calculating the distance from a warship to a destination. BACKGROUND

[0002] Under the dual effects of economic globalization and the "Marine Century", the strategic position of the sea in the interests of national survival and development is rising, and its role in promoting national comprehensive strength is becoming more and more obvious, and the maritime rights and interests disputes between countries are more prominent. In order to strengthen the protection of its own maritime rights and interests, warship patrol is inevitable.

[0003] The warship usually patrols according to the preset route, and it is necessary to estimate the distance from the warship to the destination and the time required to reach the destination, which can provide time basis for continuing to perform the navigation task or pre-war preparation. Since it is relatively complex to use the latitude and longitude coordinates of the warship to calculate the distance, the latitude and longitude coordinates are usually converted into the values of the Gauss plane rectangular coordinate system, and then the distance related calculation is carried out by using the plane geometry knowledge. However, the route is not short, and sometimes it crosses multiple Gauss projection zones (Gauss projection zone, referred to as zone), and the length deformation of Gauss projection is inevitable, and the distance calculation accuracy decreases in a certain proportion with the increase of the length of Gauss projection. In order to reduce the problem of decrease of distance calculation accuracy caused by length deformation of Gauss projection, a high-precision distance calculation scheme from the warship to the destination is designed. SUMMARY

[0004] Based on this, the purpose of the present application is to provide a method for calculating the distance from a warship to a destination, which is used to solve the problem of decrease of distance calculation accuracy caused by length deformation of Gauss projection in the prior art.

[0005] In one aspect, the present application provides a method for calculating the distance from a warship to a destination, comprising:

[0006] Obtaining a plurality of route points, connecting adjacent two route points to form a line segment, and obtaining the distance of each line segment;

[0007] Obtaining a trajectory point of the warship, dividing the trajectory point according to a preset point number to obtain a plurality of groups of trajectory points, solving to obtain an angle bisector of each group of trajectory points and a perpendicular line passing through the starting point or the ending point of the line segment, and recording the zone number where each angle bisector is located and the zone number where each perpendicular line is located, determining the line segment where the current point is located according to the angle bisector, the perpendicular line and the zone number to obtain a line segment set meeting the conditions;

[0008] Obtaining the current point and calculating the distance between each line segment in the line segment set respectively;

[0009] Judging whether the distance is less than a threshold value to determine the line segment where the current point is located and whether the yawing occurs;

[0010] If the distance is less than the threshold value, the line segment with a distance less than the threshold value to the current point is the line segment where the current point is located;

[0011] The distance of the warship to the end point is obtained by adding the distances of the line segments after the end point of the line segment where the current point is located.

[0012] The distance calculation method of the warship to the end point converts each trajectory point into the same Gauss projection zone through local adjacent zone conversion, determines the final route position of the warship in the Gauss rectangular coordinate system through the perpendicular or angle bisector of the head and tail of the line segment and the determination threshold, and finally calculates the distance of the warship to the end point. The scheme does not need to develop a chart grid, realizes high-precision calculation through local adjacent zone conversion, has a yaw alarm function, has a positive significance, and solves the problem of distance calculation precision reduction caused by the length deformation of the Gauss projection in the prior art.

[0013] In addition, the distance calculation method of the warship to the end point according to the scheme can have the following additional technical features:

[0014] Further, the plurality of route points are obtained, and the two adjacent route points are connected to form a line segment. The distance of each line segment is obtained by the following steps:

[0015] It is determined whether the two points of the line segment are in the same zone.

[0016] If the two points are in the same zone, the Gauss projection coordinate conversion is performed.

[0017] If the two points are in different zones, the points in the different zones are converted into the adjacent zones based on the zone where the starting point of the line segment is located, so that each group of points is the Gauss rectangular coordinate point in the same zone.

[0018] The distance of each line segment is obtained by the converted same-zone coordinate points.

[0019] Further, the steps before the angle bisector of each group of trajectory points and the perpendicular through the starting point or the end point of the line segment are obtained and recorded include:

[0020] The trajectory points of the warship are obtained, and the trajectory points are divided into a plurality of groups according to three consecutive points to obtain a plurality of groups of trajectory points.

[0021] It is determined whether each group of trajectory points is in the same zone.

[0022] If the two points are in the same zone, the Gauss projection coordinate conversion is performed.

[0023] If the two points are in different zones, the points in the different zones are converted into the adjacent zones based on the zone where the starting point of the line segment is located, so that each group of points is the Gauss rectangular coordinate point in the same zone.

[0024] Further, the step of solving the angle bisector of each group of trajectory points and the perpendicular line through the start point or end point of the line segment, and recording the band number where each angle bisector is located and the band number where each perpendicular line is located, further comprises:

[0025] Solving the angle bisector of each group of trajectory points and recording the band number where the angle bisector is located;

[0026] Determining whether the two end points of the start point line segment or the end point line segment in the trajectory line segment are in the same band;

[0027] If they are in the same band, then performing Gauss projection coordinate conversion;

[0028] If they are in different bands, then taking the band where the start point or end point of the line segment is located as a reference, converting the points in the different bands to adjacent bands, so that each group of points are in the same band of Gauss rectangular coordinate points.

[0029] Further, the step of solving the angle bisector of each group of trajectory points and the perpendicular line through the start point or end point of the line segment, and recording the band number where each angle bisector is located and the band number where each perpendicular line is located, comprises:

[0030] Solving the perpendicular line through the start point or end point of the line segment according to the slope-intercept form of a straight line.

[0031] Further, the step of obtaining the current point and calculating the distance to each line segment in the line segment set, respectively, comprises:

[0032] Taking the line passing through the two end points of the line segment as a group;

[0033] Determining whether the current point is in the same band as the perpendicular line or the angle bisector of each group;

[0034] If they are in the same band, then taking the current point into the general formula of the two adjacent angle bisectors or perpendicular lines Ax + By + C > 0, to obtain lineFlag 1 and lineFlag 2, and preliminarily determining the specific line segment where the current point is located through the formula flag = lineFlag 1 x lineFlag 2;

[0035] If they are in different bands, then converting the current point to the same band as the perpendicular line or the angle bisector, and preliminarily determining the position of the current point through the formula flag = lineFlag 1 x lineFlag 2;

[0036] wherein, in flag = lineFlag 1 x lineFlag 2, if lineFlag 1 = 0 and lineFlag2≠0, it indicates that the current point is on the perpendicular or the angle bisector of the group;

[0037] If lineFlag 1≠0 and lineFlag 2≠0 and lineFlag 1× lineFlag 2=-1, it indicates that the current point is on the line segment between the adjacent angle bisectors or the line segment between the adjacent angle bisectors and the perpendicular.

[0038] Further, the step of judging whether the distance is less than the threshold to determine the line segment where the current point is and whether the deviation occurs further comprises:

[0039] If not, it indicates that the warship has deviated. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 It is a schematic diagram of Gauss projection;

[0041] Figure 2 It is a Cartesian coordinate system of Gauss plane;

[0042] Figure 3 It is a schematic diagram of line segment;

[0043] Figure 4 It is a schematic diagram of judging whether the current point is on one side of the line segment in the second embodiment of the present application;

[0044] Figure 5 It is a schematic diagram of the point being in the line segment between the perpendicular or the angle bisector in the second embodiment of the present application;

[0045] Figure 6 It is a schematic diagram of the point being in two lines in the second embodiment of the present application;

[0046] Figure 7 It is a schematic diagram of the non-parallel line route judgment in the second embodiment of the present application;

[0047] Figure 8 It is a schematic diagram of calculating the distance of the warship from the terminal point in the second embodiment of the present application;

[0048] Figure 9 It is a flow chart of the distance calculation method of the warship from the terminal point in the first embodiment of the present application;

[0049] Figure 10 It is a flow chart of the distance calculation method of the warship from the terminal point in the second embodiment of the present application.

[0050] The following specific embodiments will further illustrate the present application in combination with the above drawings. DETAILED DESCRIPTION

[0051] For the purposes of the present invention, a more complete description of which will follow, reference will be made to the accompanying drawings. The drawings are presented to illustrate several embodiments of the present invention. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and fully convey the scope of the present invention to those skilled in the art.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0053] In order to better understand the present invention, the related art in the prior art will be described, as follows:

[0054] 1) About Gauss projection and calculation:

[0055] The distance calculation of the warship to the end point can be regarded as the distance calculation of the point to the end point. Since it is complex and tedious to directly calculate the distance related elements on the earth ellipsoid, it is necessary to project the elements on the earth ellipsoid onto a plane and perform plane coordinate calculation in the plane rectangular coordinate system. The Gauss-Lueck projection (referred to as Gauss projection) is a common method of mapping geodetic latitude and longitude to the Gauss plane rectangular coordinate system.

[0056] The core idea of Gauss projection: imagine a cylindrical sleeve outside the earth sphere, and tangent to a certain meridian of the earth ellipsoid, the central axis of the elliptical cylinder passes through the center of the ellipsoid and coincides with the major axis of the ellipsoid, and a certain range of regions on both sides of the central meridian within a certain range of longitude difference is projected onto the elliptical cylindrical surface by a certain projection method, as shown in Figure 1 .

[0057] On the Gauss projection plane, the intersection point of the central meridian and the equator O is taken as the coordinate origin, the projection of the central meridian is taken as the longitudinal coordinate axis, i.e. x axis; the projection of the equator is taken as the transverse coordinate axis, i.e. y axis, thus forming the Gauss plane rectangular coordinate system, as shown in Figure 2 .

[0058] The Gauss projection coordinate positive calculation formula, i.e. converting geodetic longitude L and latitude B into Gauss plane rectangular coordinates x and y , is shown in equation (1):

[0059] x = X + Nt {[ 1 / 2+(1 / 24 (5- t 2 + 9η 2 + 4η 4 ) + 1 / 720 (61-58 t 2 + t 4 ) m 2 ) m 2 ] m 2}

[0060] y = N {[1+(1 / 6 (1- t 2 + η 2 )+1 / 120 (5-18 t 2 + t 4 + 14 η 2 -58 η 2 t 2 ) m 2 ) m 2 ] m}(1);

[0061] wherein, , π is the ratio of the circumference to the diameter; , L 0 central meridian length; ρ" =180x60x60÷ π ; t =tan B ; η = e' cos B ; , a is the major axis of the earth, b is the minor axis of the earth; ; ; ; M = a (1-e 2 ) x (1-e 2 sinB) -3 / 2 .

[0062] Gauss projection has no length distortion on the central meridian, but the farther from the central meridian, the greater the length distortion. In order to control the length distortion of the projection area not to be too large, according to a certain meridian difference, the earth ellipsoid is divided into several narrow projection areas by the meridian, and the central meridian of each projection area is projected respectively to form projection zones of equal size and independent of each other, each zone has its own coordinate origin and coordinate axis, forming an independent coordinate system. In order to solve the connection between different projection zones, it is necessary to convert the plane rectangular coordinates of one projection zone into the plane rectangular coordinates of another projection zone, which is called adjacent zone conversion.

[0063] 2) About plane geometry:

[0064] (1) Straight line expression

[0065] The straight line expression used in this paper has a general form and an oblique intercept form, and the general form is shown in formula (2).

[0066] Ax + By + C =0 (2)

[0067] The oblique intercept form is shown in formula (3).

[0068] y = kx + b (3)

[0069] (2) Distance between two points

[0070] Let the coordinates of two points p 1 and p 2 be p 1( x 1, y 1) and p 2( x 2, y 2) respectively, then the distance between p 1 and p 2 is shown in formula (4):

[0071] (4)

[0072] (3) Distance between point and straight line

[0073] Let the coordinates of point p be p ( x 0, y 0), and the general form of the straight line be Ax + By + C =0, then the distance between point p and the straight line is shown in formula (5). d

[0074] ​(5)

[0075] (4) solving the angle bisector

[0076] Suppose that the longitude and latitude coordinates of the three consecutive route points are converted into the same plane rectangular coordinates, and are denoted as p 1( x 1, y 1), p 2( x 2, y 2), p 3( x 3, y 3), wherein point p 2 is the intersection of line segments p 1 p 2, p 2 p 3, as shown in the figure. Figure 3 The slope of the angle bisector is solved by vector calculation

[0077] , as shown in equation (6). k

[0078] (6)

[0079] If △ x ≠0, then the slope k= △ y / △ x and point p 2 are brought into equation (6) to obtain the equation of the angle bisector; when △ x= 0, the general formula of the angle bisector is: x - x 2 =0 .

[0080] (5) solving the perpendicular line passing through the end points of the line segment

[0081] The end points of the line segment are known, and according to the fact that the product of the slopes of the two straight lines is -1 and the perpendicular line passes through the end points of the line segment, the perpendicular line passing through the end points of the line segment can be solved by the straight line slope intercept equation (3).

[0082] In order to better illustrate the present application, the present application is described below with specific examples.

[0083] Example 1

[0084] Please refer to Figure 9 , which shows the distance calculation method of the warship to the end point in the first embodiment of the present application, comprising S101-S106:

[0085] S101, obtaining a plurality of route points, connecting adjacent two route points to form a line segment, and obtaining the distance of each line segment.

[0086] ​S102, acquire the track points of the warship, divide the track points according to a preset point number to obtain a plurality of groups of track points, solve to obtain an angle bisector of each group of track points and a perpendicular line passing through the start point or the end point of the line segment, and record the band number where each angle bisector is located and the band number where each perpendicular line is located, determine the line segment where the current point is located according to the angle bisector, the perpendicular line and the band number to obtain a line segment set meeting the condition.

[0087] S103, acquire the current point and calculate the distance between each line segment in the line segment set respectively.

[0088] S104, judge whether the distance is less than a threshold value to determine the line segment where the current point is located and whether the yaw occurs.

[0089] S105, if less than the threshold value, the line segment to the current point whose distance is less than the threshold value is the line segment where the current point is located.

[0090] S106, acquire the distance from the current point to the end point of the line segment where the current point is located, and accumulate the distance of each line segment located after the end point of the line segment where the current point is located to obtain the distance of the warship from the end point.

[0091] In summary, the distance calculation method of the warship to the end point in the above embodiment of the present application, each track point is converted by the local adjacent band conversion unified Gauss rectangular coordinate system so as to be on the same Gauss projection band, and finally the distance of the warship from the end point is calculated, so that the present scheme does not need to develop a chart grid, and a higher precision calculation is realized by using the local adjacent band conversion, and the yaw alarm function is also provided, which has a positive significance and solves the problem of distance calculation precision reduction caused by the length deformation of the Gauss projection in the prior art.

[0092] Embodiment 2

[0093] Please refer to Figure 10 , which is a distance calculation method of a warship to an end point in a second embodiment of the present application, comprising S201-S207:

[0094] S201, acquire a plurality of route points, connect two adjacent route points to form a line segment, and acquire the distance of each line segment.

[0095] Specifically, the method for calculating the distance of each segment of the route is as follows:

[0096] Judge whether the two points of the line segment are located in the same band;

[0097] If located in the same band, perform Gauss projection coordinate conversion;

[0098] If located in different bands, take the band where the start point of the line segment is located as a reference, and perform adjacent band conversion on the points in the different bands, so that each group of points are Gauss rectangular coordinate points in the same band.

[0099] By combining equation (4), the distance of each line segment can be obtained by transforming the coordinate points of the same zone.

[0100] S202. Obtain the trajectory points of the warship. Divide the trajectory points into multiple groups according to the preset number of points. Solve to obtain the angle bisectors of each group of trajectory points and the perpendiculars passing through the start or end point of the line segment. Record the zone number of each angle bisector and the zone number of each perpendicular. Determine the line segment of the current point based on the angle bisectors, perpendiculars, and zone numbers to obtain a set of line segments that meet the conditions.

[0101] The core idea of ​​the initial solution for determining the line segment containing the current point is to determine whether the current point lies on one side of the line, that is, to substitute the point into the general formula of the line, which is specifically: the slope of the line. k≥0 When, substitute the current point into the general form of a straight line, if Ax + By + C If > 0, then record lineFlag = Ax + By + C -1, conversely if lineFlag = Ax + By + C If < 0, then record lineFlag = Ax + By + C 1; If the slope of the straight line k<0 When, substitute the current point into the general form of the line. lineFlag = Ax + By + C If > 0, then record lineFlag = Ax + By + C 1. Conversely, if lineFlag = Ax + By + C <0, Figure 4 -1; regardless of the slope of the line k How should the value be taken, if lineFlag =0, then record Ang B is 0. The above situation is as follows: VLine As shown. Among them. lineFlag A marker to indicate where a point is located on a certain side.

[0102] Therefore, in order to preliminarily determine the current location of the warship, the specific method is as follows:

[0103] 1) Trajectory points of the warship p Starting from the starting point, divide the area into groups of three consecutive points, such as... p 0 p 1 p 2. p 1 p 2 p 3. p i-2 p i-1 p i , i≥2;

[0104] 2) Determine if each group of trajectory points is in the same zone. If they are in the same zone, perform Gaussian projection coordinate transformation; if they are in different zones, use the middle sequence points of each group. p i-1The points in the different bands are converted to the adjacent bands, so that each group of points is the same band of Gauss rectangular coordinate points.

[0105] 3) Solve the angle bisector of each group by formula (6) lineFlag and record the band number where the angle bisector is located.

[0106] 4) Determine whether the two endpoints of the starting line segment or the ending line segment in the trajectory line segment are in the same band. If they are in the same band, perform Gauss projection coordinate conversion; if they are in different bands, take the band where the starting point or the ending point of the line segment as the reference, and convert the points in the different bands to the adjacent bands, so that each group of points is the same band of Gauss rectangular coordinate points.

[0107] 5) According to the fact that the product of the perpendicular slopes of two straight lines is -1 and the perpendicular line passes through the starting point or the ending point of the line segment, solve the perpendicular line passing through the starting point or the ending point of the line segment according to the straight line oblique intercept formula (3) flag and record the band number where the perpendicular line is located.

[0108] 6) The starting point and the ending point of the line segment pass through a perpendicular line and an angle bisector respectively, and the two endpoints of the middle line segment pass through the angle bisectors. Take the line passing through the two endpoints of the line segment as a group, determine whether the current point is in the same band as the perpendicular line or the angle bisector of each group, and if it is in the same band, then the current point is sequentially brought into the general formula of the two adjacent angle bisectors or perpendicular lines, which can obtain lineFlag 1 and lineFlag 2, which are preliminarily judged by formula (7) to determine the specific line segment where the current point is located. If they are in different bands, then the current point is converted to the same band as the perpendicular line or the angle bisector, and then formula (7) is used to preliminarily determine the position of the current point. Formula (7) is as follows.

[0109] lineFlag = lineFlag 1× Figure 5 2 (7)

[0110] If lineFlag 1 = 0 and lineFlag 2≠0, it indicates that the current point is on the perpendicular line or the angle bisector of the group. As shown in lineFlag .

[0111] If lineFlag 1≠0 and Figure 6 2≠0 and Figure 7 1× Figure 7 2=-1, it indicates that the current point is in the line segment between the adjacent angle bisectors or in the line segment between the adjacent angle bisectors and the perpendicular line. As shown in ε .

[0112] According to the determination criteria of formula (7), if for the non-parallel line, there may be multiple line segments that meet the determination criteria, as shown in εas shown.

[0113] From Figure 8 the line segment l 1 and l 6 both meet the determination criterion, so multiple line segments meeting the requirements can be obtained through the determination criterion, and therefore all the line segments meeting the conditions are recorded as .

[0114] S203, the current point is obtained and the distances between the current point and each line segment in the line segment set are calculated.

[0115] S204, it is determined whether the distance is less than the threshold value to determine the line segment where the current point is located and whether the ship has deviated.

[0116] If it is less than the threshold value, step S205 is performed;

[0117] If it is not less than the threshold value, step S206 is performed;

[0118] S205, the line segment whose distance to the current point is less than the threshold value is the line segment where the current point is located.

[0119] S206, it is prompted that the ship has deviated.

[0120] The line segment where the current point is located can only be preliminarily determined through the perpendicular line or the angle bisector on the route, and therefore additional limiting conditions are needed to determine the final line segment where the current point is located. In this paper, the 2 times of the positioning accuracy of the ship is taken as the threshold value, denoted as ​ , and specifically, the distances between the current point P and the line segment set T meeting the requirements are calculated through equation (5), and if the distance of the corresponding line segment is less than the threshold value ​ , it indicates that the line segment is the line segment where the current point is located. If there is no line segment meeting the requirements in the line segment set T , it indicates that the ship has deviated, and whether to plan a new route after the deviation is not within the scope of discussion in this paper.

[0121] S207, the distance from the current point to the end point of the line segment where the current point is located is obtained, and the distances of the line segments after the end point of the line segment where the current point is located are accumulated to obtain the distance from the ship to the end point.

[0122] After the line segment where the current point of the ship is located is determined, the distance from the ship to the end point is calculated. First, the distance from the current point P to the end point of the line segment where the current point is located is calculated through equation (4), as shown in ​ .

[0123] Then the lengths of the remaining line segments l s are sequentially accumulated, and finally the distance from the ship to the end point is obtained.

[0124] In summary, the distance calculation method of the warship to the end point in the above-mentioned embodiments of the present application,

[0125] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily mean the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0126] The above-described embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A method of calculating the distance of a warship to a destination, characterized by, Comprise: Obtain a plurality of route points, connect adjacent two route points to form a line segment, and obtain the distance of each line segment; Obtain the trajectory points of the warship, divide the trajectory points according to a preset point number to obtain a plurality of groups of trajectory points, solve to obtain the angle bisector of each group of trajectory points and the perpendicular line passing through the start point or the end point of the line segment, and record the band number where each angle bisector is located and the band number where each perpendicular line is located, determine the line segment where the current point is located according to the angle bisector, the perpendicular line and the band number, and obtain a line segment set meeting the condition; Obtain the current point and calculate the distance between the current point and each line segment in the line segment set respectively; Determine whether the distance is less than a threshold value to determine the line segment where the current point is located and whether the yawing occurs; If less than the threshold value, the line segment whose distance to the current point is less than the threshold value is the line segment where the current point is located; Obtain the distance from the current point to the end point of the line segment where the current point is located, and accumulate the distance of each line segment located after the end point of the line segment where the current point is located to obtain the distance of the warship from the end point; Before the step of solving to obtain the angle bisector of each group of trajectory points and the perpendicular line passing through the start point or the end point of the line segment, and recording the band number where each angle bisector is located and the band number where each perpendicular line is located, the step comprises: Obtain the trajectory points of the warship, divide the trajectory points according to a preset point number to obtain a plurality of groups of trajectory points, solve to obtain the angle bisector of each group of trajectory points and the perpendicular line passing through the start point or the end point of the line segment, and record the band number where each angle bisector is located and the band number where each perpendicular line is located, determine the line segment where the current point is located according to the angle bisector, the perpendicular line and the band number, and obtain a line segment set meeting the condition; Before the step of solving to obtain the angle bisector of each group of trajectory points and the perpendicular line passing through the start point or the end point of the line segment, and recording the band number where each angle bisector is located and the band number where each perpendicular line is located, the step further comprises: Solve the angle bisector of each group of trajectory points and record the band number where the angle bisector is located; Determine whether the start point line segment or the end point line segment of the trajectory line segment is in the same band; If in the same band, perform Gauss projection coordinate conversion; If in different bands, perform adjacent band conversion based on the band where the start point or the end point of the line segment is located, so that each group of points is a Gauss rectangular coordinate point in the same band; Before the step of obtaining the current point and calculating the distance between the current point and each line segment in the line segment set respectively, the step comprises: Take the line passing through the two end points of the line segment as a group; Determine whether the current point and the perpendicular line or the angle bisector of each group are in the same band; Ax+By+C lineFlag lineFlag If the same, then the current point is sequentially into two adjacent angle bisector or perpendicular to the general formula lineFlag > 0, get flag 1 and lineFlag 2, wherein, lineFlag is the mark to determine the point on a side, by formula flag = lineFlag 1 x lineFlag 2 preliminary judgment of the current point is located in the specific line segment; If the current point is in a different band, convert it to the same band as the perpendicular or angle bisector, and then apply the formula flag = lineFlag 1× lineFlag 2Preliminary determination of the location of the current point; wherein, in lineFlag = lineFlag 1× lineFlag 2, if lineFlag 1 = 0 and lineFlag 2≠0, it indicates that the current point is on the perpendicular or the angle bisector of the group; If lineFlag 1≠0 and In the step of determining the line segment where the current point is located according to the angle bisector, the perpendicular line and the band number to obtain a line segment set meeting the condition, the condition is: 2≠0 and lineFlag 1 x lineFlag 2=-1, it indicates that the current point is in the line segment between the adjacent angle bisector or in the line segment between the adjacent angle bisector and the perpendicular line. lineFlag lineFlag 1≠0 and lineFlag 2≠0 and ​ 1 x ​ 2=-1.

2. The method of claim 1, wherein, The step of obtaining the distance of each line segment includes: Judging whether the two points of the line segment are located in the same zone; If the two points are located in the same zone, performing Gauss projection coordinate conversion; If the two points are located in different zones, taking the zone where the starting point of the line segment is located as a reference, performing adjacent zone conversion on the points in the different zones, so that each group of points are Gauss rectangular coordinate points in the same zone; Obtaining the distance of each line segment through the same zone coordinate points obtained through the conversion.

3. The method of claim 1, wherein, The step of obtaining the angle bisector of each group of trajectory points and the perpendicular line passing through the starting point or the ending point of the line segment and recording the zone number where each angle bisector is located and the zone number where each perpendicular line is located includes: Solving the perpendicular line passing through the starting point or the ending point of the line segment according to the straight line oblique intercept form.

4. The method of claim 1, wherein, The step of judging whether the distance is less than a threshold value to determine the line segment where the current point is located and whether the deviation occurs further includes: If the distance is not less than the threshold value, prompting that the warship has deviated.

Citation Information

Patent Citations

  • Method for judging flight route deviation

    CN102506872A

  • Land deep scarification qualified rate obtaining method based on table cell scanning and GPS track interpolation

    CN106989664A