Disclosure of Invention
In order to solve the problem of full-automatic identification of curves of a inland ship route, the curve identification method based on inland ship longitude and latitude data according to some embodiments of the application comprises the following steps of
Step 1, setting indexes of N sequential longitude and latitude data acquired through navigation from 0 to N-1;
Step 2, segmenting longitude and latitude data according to longitude and latitude data of a starting index i, wherein a segmentation result comprises longitude and latitude data corresponding to all indexes between the index i and the index j and between the index i and the index j;
Step 3, projecting longitude and latitude data corresponding to all indexes including the index i and the index j and between the index i and the index j into plane coordinates, wherein the indexes of the plane coordinates are the same as the indexes of the longitude and latitude data;
Step 4, performing polynomial fitting on the plane coordinates;
Step 5, determining index numbers k and l according to the numbers i and j of the index i and the index j, and calculating the curvature radius of the plane coordinates comprising the index k and the index l and longitude and latitude data corresponding to all indexes between the index k and the index l according to the polynomial fitting result of the plane coordinates;
Calculating the over-bending speed reduction value of the inland ship corresponding to the curvature radius according to the curvature radius of the plane coordinates of the longitude and latitude data corresponding to the indexes k and l and all indexes between the indexes k and l;
marking curves of longitude and latitude data corresponding to indexes k and l and all indexes between the indexes k and l according to the bending speed reduction value of the inland ship;
step 6, redefining a starting index i according to the indexes i and j of the index i and the index j, wherein the marking sequence number of the redetermined starting index is larger than that of the starting index;
And 7, repeating the steps 2-6 until the curve marking of all longitude and latitude data is completed.
According to some embodiments of the present application, the method for identifying curves based on latitude and longitude data of inland vessels includes
Starting from longitude and latitude data of a starting index i, increasing the serial number of an index j from i+1, checking the difference between the minimum longitude and the maximum longitude of longitude and latitude data corresponding to all indexes of the indexes i to j, wherein the value of the difference between the minimum longitude and the maximum longitude is set as x, the minimum value of the fixed number is y, and the maximum value of the fixed number is z;
S2.1, if the difference between the minimum longitude and the maximum longitude is greater than x degrees, the sequence number of the index j stops increasing, if j-i is smaller than y, the sequence number j=i+y, and if j-i is greater than y, no operation is performed, and the sequence number of the index j is obtained;
If the difference between the minimum longitude and the maximum longitude is not greater than x degrees, the serial number of the index j continues to be increased until the difference between the minimum longitude and the maximum longitude is greater than x degrees, the serial number of the index j stops increasing, if j-i is smaller than y, the serial number j=i+y, and if j-i is greater than y, no operation is performed, and the serial number of the index j is obtained;
If the number of the index j increases to exceed i+z and the difference between the minimum longitude and the maximum longitude is not satisfied and is larger than x degrees, stopping increasing the number of the index j and obtaining the number of the index j, wherein the number of the index j is equal to i+z;
S2.2, calculating the serial number of the obtained index j and the serial number of the initial index i, and adding one or subtracting one or not changing the serial number j through the remainder of (j-i) and 3, so that (j-i) can be divided by 3 to obtain the serial number of the final index j, thereby obtaining longitude and latitude data corresponding to all indexes including the index i and the index j and all indexes between the index i and the index j.
According to some embodiments of the present application, a method for identifying curves based on latitude and longitude data of inland vessels in step 3 includes
S3.1, extracting the minimum longitude and the maximum longitude in all longitude and latitude data between the segmented index i and the segmented index j and between the segmented index i and the segmented index j;
S3.2, enabling the central meridian of a projection belt in Gaussian Kelvin projection to be equal to the sum of one half times the minimum longitude;
S3.3. projecting latitude and longitude data between index i and index j and index i and index j as plane coordinates (x, y) through the central meridian.
According to some embodiments of the present application, the curve recognition method based on inland ship longitude and latitude data in step 4 includes
S4.1, carrying out translation operation on plane coordinates (x, y) of the central meridian projected by longitude and latitude data between an index i and an index j and between the index i and the index j;
S4.2, respectively performing polynomial fitting on the plane coordinates (x, y) after the translation operation in four modes of abcd:
a, directly performing polynomial fitting on the plane coordinates (x, y) after the translation operation;
b, exchanging x and y values of the plane coordinates (x, y) after the translation operation, and then performing polynomial fitting;
c, performing polynomial fitting after rotating the plane coordinates (x, y) after the translation operation to the right by 45 degrees along the origin of coordinates;
d, performing polynomial fitting after rotating the plane coordinates (x, y) subjected to the translation operation to the left by 45 degrees along the origin of coordinates;
s4.3, calculating R square of the fitting results of four modes of abcd, selecting the fitting result with the largest R square as the final fitting result, carrying out step 5 if the largest fitting result in the R square is qualified, and carrying out polynomial fitting in a fifth mode if the largest fitting result in the R square is unqualified:
e, starting from the plane coordinates (x, y) after the translation operation, rotating coordinate points clockwise by taking a coordinate origin as a center and taking 30 degrees as a unit to generate 12 groups of plane coordinates, and performing polynomial fitting on each group of plane coordinates to obtain 12 groups of fitting results;
S4.4, calculating 12 groups of fitting results R squares in the e mode, selecting the fitting result with the largest R square as a final fitting result, if the largest fitting result in the R squares is qualified, performing step 5, and if the largest fitting result in the R squares is not qualified, performing fitting failure, and selecting the largest fitting result in the R squares in the fitting results to perform step 5.
According to some embodiments of the present application, the step S4.1 specifically includes subtracting x minimum value and y minimum value in the segment from x and y values of the plane coordinates (x, y) of the projections of the latitude and longitude data between the index i and the index j, and adding 10 to each of the x and y minimum values to translate the plane coordinates of the segment toward the origin of coordinates;
the method for rotating the plane coordinates (x, y) after the translation operation to the right along the origin of coordinates by 45 degrees in the step S4.2 comprises
Firstly, converting Cartesian coordinate (x, y) values into polar coordinates (rho, theta);
Then adding pi/4 to the theta in the polar coordinates;
the polar coordinates are then converted into Cartesian (x, y) values;
finally subtracting the x minimum value and the y minimum value of all coordinates from the x value and the y value of each coordinate to ensure that all the values are positive;
The method for rotating the plane coordinates (x, y) after the translation operation to the left by 45 degrees along the origin of coordinates in the step S4.2 comprises
Firstly, converting Cartesian coordinate (x, y) values into polar coordinates (rho, theta);
Subtracting pi/4 from θ in polar coordinates;
the polar coordinates are then converted into Cartesian (x, y) values;
and finally subtracting the x minimum value and the y minimum value of all the coordinates from the x and the y values of each coordinate to ensure that all the values are positive.
According to the curve recognition method based on the latitude and longitude data of the inland ship, according to some embodiments of the application, the fitting result evaluation index uses an R square determination coefficient, and the R square is more than 0.999 to represent that fitting is qualified;
the polynomial fitting specifically comprises the steps of starting from 5 times of polynomial fitting, finishing polynomial fitting if the square of a fitting result R is qualified, adding one to polynomial degree if the square of the fitting result R is unqualified, fitting again, finishing if the square of the fitting result R is qualified, and finishing polynomial fitting forcedly if the square of the fitting result R is still unqualified if the number of the polynomial degree is increased to 20.
According to some embodiments of the present application, a curve recognition method based on latitude and longitude data of a inland ship includes
When the sequence number of the start index i is equal to 0, it indicates that the segment is the start segment, and when the sequence number of the index k is equal to 0, the sequence number of the index i is equal to i+ (j-i)/(3×2);
When the sequence number of the index j is greater than or equal to N-1, the segment is an ending segment, and the sequence number of the index k is equal to the sequence number of the index l in the last iteration, and the sequence number of the index l in the current iteration is equal to N-1;
when the index i and the index j do not satisfy the above two conditions, this segment is indicated as an intermediate segment, and the index k is equal to the index l in the previous iteration, and the index l in the present iteration is equal to i+ (j-i)/(3×2).
According to some embodiments of the present application, a curve recognition method based on latitude and longitude data of a inland ship includes a step 5 of calculating a curve passing speed reduction value of the inland ship corresponding to a radius of curvature according to the radius of curvature of plane coordinates of latitude and longitude data corresponding to the index k and the index l and all indexes between the index k and the index l, wherein the curve passing speed reduction value comprises
Calculating the curvature radius of each plane coordinate of longitude and latitude data corresponding to the index k to the index l according to the maximum fitting result in the qualified R square in the step;
calculating a speed drop specific value corresponding to the curvature radius through a Fisher speed drop formula, and using the value as a curve mark of longitude and latitude data corresponding to a plane coordinate point, wherein the Fisher speed drop formula is as follows:
Wherein V c is the speed of the ship in the rotation process, V 0 is the initial rotation speed of the ship, R is the rotation curvature radius, and L is the ship length.
According to the curve identification method based on the longitude and latitude data of the inland ship, the closer the speed drop concrete value is to 1, the larger the curve curvature radius is, the closer the curve is to a straight line, the smaller the bending resistance is, the smaller the speed drop concrete value is, the smaller the curve curvature radius is, the larger the bending resistance is, and the deceleration bending is needed.
According to some embodiments of the present application, the method for identifying curves based on latitude and longitude data of inland vessels in step 6, the method for redefining the start index i according to the indexes i and j in step 6, includes increasing the redetermined start index i by (j-i)/(3) by calculating the indexes i and j in the current iteration.
The beneficial effects are that:
the invention can ensure that the deformation of the subsequent projection can be controlled in a very small range by segmenting through the longitude difference.
The segmentation strategy taking the fixed longitude difference mode as the main mode and the fixed number mode as the auxiliary mode ensures that inland navigation lines in a few north-south directions (the direction with small longitude change) can be segmented successfully. By adjusting the longitude differences and the maximum and minimum numbers of the segments, the navigation data with different acquisition frequencies and the navigation line with too dense curves can be adapted.
The invention uses half of the sum of the maximum and minimum longitude values of each section as the central meridian to form the local Gaussian projection belt instead of using the standard projection belt, thereby further reducing the deformation of the Gaussian projection.
According to the invention, polynomial fitting is carried out in five modes of abcde, and the success rate of polynomial fitting is greatly improved on the premise of ensuring that the route is not deformed.
According to the invention, the operation speed is greatly improved by a specific polynomial fitting mode on the premise of ensuring the success rate.
According to the invention, only the middle curvature radius is calculated in each section without considering two ends, so that the special condition that fitting and curvature radius calculation are inaccurate due to the fact that a bending channel appears at two ends of a certain section is eliminated.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
The embodiment of the present application is described in detail below by referring to the accompanying drawings, an example of which is shown in the accompanying drawings, and the present application proposes a channel curve recognition method based on inland ship navigation data, in which longitude and latitude data are acquired for a certain navigation, for convenience of explanation, N is used to represent the number of longitude and latitude data, and indexes of each longitude and latitude data in sequence are from 0 to N-1, in the present application, for index i, it can be understood that index with index i, i represents the index i. According to the longitude and latitude data, the curve recognition method comprises the following steps:
Step 1, segmenting all longitude and latitude data in a specific mode, wherein the segmentation result is longitude and latitude data between indexes i and j. In a preferred embodiment, in step 1, segmentation is performed mainly by a fixed longitude difference method and secondarily by a fixed number method. Specifically, when the number of the segmented data intercepted in the fixed longitude difference mode is too large or too small, the segmented data is automatically converted into the segmented data in the fixed number mode. Wherein the curve characteristic of the course is represented by the size of the curve in the course and the density of the curve, the smaller and denser the curve is, the value of the longitude difference should be reduced appropriately, properly reducing the maximum and minimum values at the same time to ensure that the middle bend of a section is not too much to cause the inability of polynomial fitting; the higher the acquisition frequency of the longitude and latitude data is, the shorter the actual length of a section of the route intercepted under the same number is, at the moment, the maximum and minimum number values should be properly increased at the same time to ensure that the actual length of the section of the route intercepted is not changed greatly, and the smaller the Gaussian-Hooke projection deformation is required, the value of the longitude difference is reduced, and vice versa. In the preferred scheme, the longitude difference of each section is set to be 0.1 degree, the minimum fixed number is set to be 33, and the maximum fixed number is set to be 99, and it can be understood that the set parameters can be properly adjusted according to longitude and latitude data of different acquisition frequencies and Gaussian-Gauss-Lung projection deformation requirements.
Each piece of longitude and latitude data is first intercepted by a fixed longitude difference. The segmentation starts with the longitude and latitude data of the ith index, the sequence number of the index j increases from the (i+1) th index, and each time the index i is increased, the difference between the minimum longitude and the maximum longitude of all data between the index j and the index i is checked. If the difference in longitude is greater than 0.1 degrees, the index j's sequence number j stops increasing, forcing j=i+33 if j-i is less than 33, and not operating if j-i is greater than 33. If the difference in longitude is not greater than 0.1 degrees, the index j's sequence number j continues to increase until the difference in longitude requirement is met. If the number j of index j increases beyond i+99 and the longitude difference requirement is not yet met, the number j of index j stops increasing and forces j=i+99. And finally, adding one or subtracting one or not to change the serial number j of the index j through the remainder of (j-i) and 3, ensuring that (j-i) can be divided by 3, and ending the segmentation to start the step 2.
And 2, projecting the section of longitude and latitude data between indexes i and j into plane coordinates by a Gaussian-gram projection method, wherein the plane coordinates are identical to indexes of corresponding longitude and latitude data. In a preferred embodiment, the specific content of step 2 includes extracting the minimum longitude and the maximum longitude of all longitude and latitude data between the index i and the index j after the segmentation in step 1, and in the gaussian-luer projection, the central meridian of the projection belt is equal to the sum of one half times the minimum maximum longitude. The length of latitude and longitude data between index i and index j is then projected as plane coordinates (x, y) through this central meridian.
And 3, performing polynomial fitting on the plane coordinates in a specific mode. In a preferred embodiment, the specific content of step 3 includes:
Firstly, carrying out translation operation on a section of plane coordinates (x, y) output in the step 2, namely subtracting an x minimum value and a y minimum value in the section from x and y values of all coordinates, and respectively adding 10 to enable the whole section of plane coordinates to translate towards a coordinate origin so as to be beneficial to polynomial fitting effect. The fitting result evaluation index uses an R square determination coefficient, and the R square is larger than 0.999 to represent that the fitting is qualified.
Polynomial fitting is then performed by four ways abcd:
directly performing polynomial fitting according to the original plane coordinates (x, y);
the values of the whole segments x and y are interchanged (i.e. mirrored along the line y=x) and then polynomial fitting is performed;
The whole original plane coordinates (x, y) are rotated to the right by 45 degrees along the origin of coordinates, and then polynomial fitting is carried out;
the polynomial fitting is performed after rotating the entire original plane coordinates (x, y) 45 degrees to the left along the origin of coordinates.
The planar coordinate rotation specific operation is that Cartesian coordinate (x, y) values are converted into polar coordinates (ρ, θ), θ in the polar coordinates is added or subtracted by pi/4, then the polar coordinates are converted into Cartesian coordinate (x, y) values, and finally x and y values of each coordinate are subtracted by x minimum values and y minimum values of all coordinates and added by 10 respectively, so that all values are ensured to be positive.
The polynomial fitting method specifically comprises the steps of starting from polynomial fitting of 5 times, finishing polynomial fitting if the square of a fitting result R is qualified, adding one to polynomial degree if the square of the fitting result R is unqualified, fitting again, finishing if the square of the fitting result R is qualified, and forcedly finishing polynomial fitting if the square of the fitting result R is still unqualified if the number of the polynomial degree is increased to 20. It will be appreciated that for any polynomial fit of a-e, a specific method of polynomial fit may be used.
And then calculating R square of four fitting results of abcd, selecting the fitting result with the largest R square as the final fitting result, and starting the step 4 if the largest R square is qualified. If all R squares of the four fitting results are not qualified, performing additional fifth e-mode polynomial fitting:
Starting from the original plane coordinates (x, y), the coordinate points are rotated clockwise in units of 30 degrees, 12 sets of plane coordinates are co-generated, and polynomial fitting is performed on each set of plane coordinates.
And finally, calculating R square of 12 groups of fitting results in the e mode, selecting the fitting result with the largest R square as the final fitting result, and starting the step 4 if the largest R square is qualified. If the maximum R square is still not acceptable, the best fit result is printed and a "fit failure" is indicated, so in this scheme, the maximum fit result of the R squares in the fit results may be selected for step 5.
And 4, calculating the curvature radius of the plane coordinates of the specific part (index k to index l) by fitting the result curve, and taking the inland ship over-bending speed reduction value corresponding to the curvature radius as a mark. Preferably, in the step 4, in order to prevent the special situation that the curvature is not accurate in fitting and calculating the curvature radius due to the fact that the curvature is present at two ends of a certain segment (index i to j), each segment (index i to j) is divided into three parts, and only the curvature radius of the middle part (index k to l) is calculated. However, since each segmentation is performed by adopting a strategy of mainly using a longitude difference segmentation mode and secondarily using a number segmentation mode, the length of each segmentation may be unequal, and calculation of curvature radius of certain longitudes and latitudes may be skipped, the specific sequence number value of the specific determination indexes k and l in the step 4 is determined by the following method:
When the index i has a sequence number i equal to 0, this indicates that the segment is the start segment, when the index k has a sequence number i equal to 0 and the index i has a sequence number i+ (j-i)/(3×2).
When the index j has a sequence number greater than or equal to N-1, it indicates that the segment is an ending segment, and the sequence number of index k is equal to the sequence number of index l last time, which is equal to N-1.
When the index i and the index j have no sequence numbers satisfying the above two conditions, this section is indicated as an intermediate section, and the sequence number of the index k is equal to the sequence number of the index l of the last time, and the sequence number of the index l of this time is equal to i+ (j-i)/(3×2).
Since the radius of curvature is calculated for only the middle part of one segment at a time, the sequence number i of the index i before each segment is iteratively calculated by the following formula:
The determination of the specific sequence number values of the index k and the index l and the iteration of the index i are shown in fig. 8, and the thought of determining the specific sequence number values of the index k and the index l according to the invention is as follows:
1. only the middle part is calculated, and the problem of inaccurate fitting and curvature radius calculation caused by the fact that a curve appears at two ends of a certain section is solved.
2. Since only the middle part is calculated (assuming that the number of each segment is equal), it is only possible to advance by 1/3 segment to ensure that the middle part of this time and the middle part of the last time are consecutive in sequence number.
3. Since the number of segments is not equal each time, the intermediate segments are not connected, so that the k is equal to the k of the last time, and the segments are forcedly connected.
According to the design thought, the invention cooperates with the iterative assignment of index numbers by giving different index number assignment strategies under different segmentation conditions and uses the assignment mode that the index number of index l is equal to i+ (j-i)/(3×2) so as to cooperatively cooperate, so that each segment is divided into three parts under the segmentation strategy adopted by the invention, each iterative segment is advanced in such a way that the index number of index i is increased by (j-i)/(3), in such a way that the current iterative segment and the last iterative segment can have coincident parts (such as about the back 2/3 part of the previous segment and about the front 2/3 part of the next segment are coincident), and thus after each iteration, the curvature radius of the middle part (index k to l) of the current segment is calculated only for the current segment.
Under the technical scheme, the problem of inaccurate fitting and curvature radius calculation caused by the fact that a curve appears at two ends of a certain section can be solved as far as possible. Under the technical scheme, the invention can solve the problems that the length of each segment is possibly unequal and the calculation of the curvature radius of certain longitudes and latitudes is possibly skipped because the segmentation is performed by adopting a strategy with a longitude difference segmentation mode as a main mode and a number segmentation mode as an auxiliary mode.
And (3) calculating the curvature radius of each plane coordinate between the index k and the index l determined in the step (4) through the fitted curve result in the step (3). And then calculating a speed drop concrete value corresponding to the curvature radius through the following Fisher speed drop formula. And the specific numerical value is used as a curve mark of longitude and latitude data corresponding to the plane coordinate point, wherein the larger the value is, the closer the value is to 1, the larger the radius of curvature of the curve is, the closer the value is to a straight line, the smaller the bending resistance is, the smaller the value is, the smaller the radius of curvature of the curve is, the larger the bending resistance is, and the deceleration bending is needed.
The fersoff speed drop formula:
Wherein V c is the speed of the ship in the rotation process, V 0 is the initial rotation speed of the ship, R is the rotation curvature radius, and L is the ship length.
After the marking is finished, determining the specific serial number value of the index i before the next segmentation in the iterative mode of the index i in the step 4, and then repeating the steps 1-5 until the curve marking of all longitude and latitude data is finished.
And 5, starting the second segmentation after advancing the longitude and latitude data of a specific quantity, repeating the steps 1-4, and repeating the steps until the whole navigation data curve is identified. Preferably, the specific content of the step 5 is that the specific number is equal to (j-i)/(3), and the forward way is that after the sequence number of the index i is increased by (j-i)/(3), the step 1 is repeated to perform the segmentation again. And then sequentially repeating the following steps, and continuously cycling until the curve identification of all longitude and latitude data is completed.
Wherein the specific number is equal to (j-i)/(3), and as described above, the index i is iteratively calculated by the following formula:
in a specific example, as shown in fig. 1, on the basis of the curve identification method, the curve identification method of the present invention is further described based on 2936 pieces of longitude and latitude data obtained by a certain navigation, and according to fig. 2, the curve identification method of the present invention is further described by taking sequential indexes from 0 to 2935 as an example, and the identification method specifically includes:
And step 1, segmentation is carried out by taking a fixed longitude difference mode as a main mode and a fixed number mode as an auxiliary mode. Specifically, when the number of the segmented data intercepted in the fixed longitude difference mode is too large or too small, the segmented data is automatically converted into the segmented data in the fixed number mode. And setting the longitude difference of each section to be 0.1 degree, setting the minimum 33 maximum 99 of the fixed number, and properly adjusting the setting parameters according to longitude and latitude data of different acquisition frequencies and Gaussian-Lung-lattice projection deformation requirements.
Each piece of longitude and latitude data is first intercepted by a fixed longitude difference. The first segmentation starts from latitude and longitude data corresponding to an index i, wherein the index i has a sequence number i=0, the index j has a sequence number j increased from i+1, and the difference between the minimum longitude and the maximum longitude of all data between the index i and the index j is checked every time the index j is increased. When the number j of the index j increases to 78, the longitude difference is larger than 0.1 degree, the number j stops increasing, and j-i=77 is larger than 33. If the difference in longitude is still less than 0.1 when the number j of index j increases beyond i+99, then the number j stops increasing and forces the number j=i+99. And finally, adding one or subtracting one or not to the serial number j through the remainder of (j-i) and 3, so that (j-i) can be divided by 3, and (j-i) and 3 are=1, and j=77+1=78, and the segmentation is finished. The first segmentation results in i=0, j=78, and the first segmentation route is shown in fig. 3.
Step 2, extracting the minimum longitude and the maximum longitude in all longitude and latitude data between the index i=0 and the index j=78 after the segmentation in the step 1, taking one half of the sum of the minimum and maximum longitudes as the central meridian of the Gaussian grid projection band, and then projecting the longitude and latitude data between the index i=0 and the index j=78 into plane coordinates (x, y). The result of the first section longitude and latitude coordinate projection is shown in fig. 4.
And 3, performing polynomial fitting on the plane coordinates in a specific mode. Firstly, carrying out translation operation on a section of plane coordinates (x, y) projected in the step 2, namely subtracting an x minimum value and a y minimum value in the section from x and y values of all coordinates, and respectively adding 10 to enable the whole section of plane coordinates to translate towards a coordinate origin. The fitting result evaluation index uses an R square determination coefficient, and the R square is larger than 0.999 to represent that the fitting is qualified.
Polynomial fitting is then performed by four ways abcd:
directly performing polynomial fitting according to the original plane coordinates (x, y);
the values of the whole segments x and y are interchanged (i.e. mirrored along the line y=x) and then polynomial fitting is performed;
The whole original plane coordinates (x, y) are rotated to the right by 45 degrees along the origin of coordinates, and then polynomial fitting is carried out;
the polynomial fitting is performed after rotating the entire original plane coordinates (x, y) 45 degrees to the left along the origin of coordinates.
The four ways of fitting abcd for the first segment are shown in figure 5.
Then, R squares of the abcd four-way fitting result are calculated, and R square_a=0.9861, R square_b=0.9564, R square_c=0.9957, and R square_d=0.9999, respectively. Wherein R square_d is the largest, so the fitting result of d is selected as the final fitting result, obviously R square_d >0.999 is fit qualified at this time, and step 4 can be started. If the largest R square <0.999 is still not acceptable, an additional fifth e-mode polynomial fit is performed:
Starting from the original plane coordinates (x, y), the coordinate points are rotated clockwise in units of 30 degrees, 12 sets of plane coordinates are co-generated, and polynomial fitting is performed on each set of plane coordinates.
And finally, calculating R square of 12 groups of fitting results in the e mode, selecting the fitting result with the largest R square as the final fitting result, and starting the step 4 if the largest R square is qualified. If the maximum R square is still not qualified, the best fitting result graph is printed and a 'fitting failure' is indicated.
And 4, calculating the curvature radius of the plane coordinates of the specific part (index k to index l) by fitting the result curve, and taking the inland ship over-bending speed reduction value corresponding to the curvature radius as a mark. The specific sequence number values of the index k and the index l of the specific part are determined according to three cases, namely, when the sequence number of the index i is equal to 0, the segment is indicated to be a starting segment, when the sequence number of the index k is equal to 0, and the sequence number of the index i is equal to i+ (j-i)/(3×2). When the index j has a sequence number greater than or equal to N-1, it indicates that the segment is an ending segment, and the sequence number of index k is equal to the sequence number of index l last time, and the sequence number of index l this time is equal to N. When both the index number i and the index number j do not satisfy the above two conditions, this section is indicated as an intermediate section, and the index number k is equal to the index number of the last index l, which is equal to i+ (j-i)/(3×2). At this time, the index i has a sequence number i=0 and the index j has a sequence number j=78 satisfying the first case, so that the index k has a sequence number k=0 and the index l has a sequence number l=i+ (j-i)/3*2 =52.
And then calculating the curvature radius of each plane coordinate corresponding to the part from the index k to the longitude and latitude data corresponding to the index l through the curve result fitted in the step 3. Finally, the following Fisher speed drop formula is adopted:
And calculating a corresponding speed drop concrete value by combining the ship length L= 189.9m and the corresponding curvature radius of each coordinate. Meanwhile, the numerical value is used as a curve mark of longitude and latitude data corresponding to the plane coordinate point, and the marking result is shown in fig. 6. The larger the value is closer to 1, the larger the curvature radius of the curve is, the closer to a straight line is, the smaller the bending resistance is, the smaller the curvature radius of the curve is, the larger the bending resistance is, and the bending is required to be decelerated.
And 5, advancing the serial number i of the index i, advancing (j-i) 3=26 longitude and latitude data, starting second segmentation from i=26, repeating the steps 1-4, and the like, and cycling until the whole navigation data curve identification is completed. If the longitude and latitude coordinates with the marked speed drop value smaller than 0.99 are considered as the curve, the curve recognition result route diagram is shown in fig. 7.
According to the scheme, the deformation of the subsequent Gaussian-Gaussian projection can be controlled to be in a very small range by segmenting through the longitude difference. Since the degree of deformation of the gaussian projection is only related to the difference in longitude between the point and the central meridian, setting the difference in longitude for each segment controls the maximum deformation of each segment of the gaussian projection. The segmentation strategy taking the fixed longitude difference mode as the main mode and the fixed number mode as the auxiliary mode ensures that inland navigation lines in a few north-south directions (the direction with small longitude change) can be segmented successfully. By adjusting the longitude differences and the maximum and minimum numbers of the segments, the navigation data with different acquisition frequencies and the navigation line with too dense curves can be adapted.
According to the scheme, the invention uses one half of the sum of the maximum value and the minimum value of each longitude as the central meridian to form a local Gaussian projection belt instead of using a standard projection belt, so that the deformation of the Gaussian projection is further reduced.
According to the scheme, polynomial fitting is carried out in five modes of abcde, and the success rate of polynomial fitting is greatly improved on the premise of ensuring that the route is not deformed.
According to the scheme, the operation speed is greatly improved by a specific polynomial fitting mode on the premise of ensuring the success rate.
According to the scheme, the invention eliminates the special condition that the fitting and the curvature radius calculation are inaccurate due to the fact that a curve appears at two ends of a certain section by only calculating the middle curvature radius of each section without considering the two ends.
For purposes of this disclosure, the terms "one embodiment," "some embodiments," "example," "a particular example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
While the invention has been described with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.