CN116045899A - Curve recognition method based on inland ship longitude and latitude data - Google Patents
Curve recognition method based on inland ship longitude and latitude data Download PDFInfo
- Publication number
- CN116045899A CN116045899A CN202211527137.3A CN202211527137A CN116045899A CN 116045899 A CN116045899 A CN 116045899A CN 202211527137 A CN202211527137 A CN 202211527137A CN 116045899 A CN116045899 A CN 116045899A
- Authority
- CN
- China
- Prior art keywords
- index
- longitude
- latitude
- serial number
- coordinates
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C1/00—Measuring angles
- G01C1/02—Theodolites
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/20—Instruments for performing navigational calculations
- G01C21/203—Instruments for performing navigational calculations specially adapted for water-borne vessels
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Navigation (AREA)
- Complex Calculations (AREA)
Abstract
基于内河船舶经纬度数据的弯道识别方法,属于船舶能源领域,用于解决内河船舶航线弯道的全自动识别的问题,将经纬度数据进行分段,索引所对应的经纬度数据投影成平面坐标;对所述平面坐标进行多项式拟合;根据所述平面坐标的多项式拟合结果,计算索引所对应的经纬度数据的平面坐标的曲率半径;根据索引所对应的经纬度数据的平面坐标的曲率半径,计算曲率半径对应的内河船舶过弯速度降值;根据内河船舶过弯速度降值对索引所对应的经纬度数据的弯道进行标记,效果是自动和准确的通过内河船舶经纬度数据对航行弯道识别。
The curve identification method based on the longitude and latitude data of inland water ships belongs to the field of ship energy, and is used to solve the problem of fully automatic identification of inland water ship route curves. The longitude and latitude data are segmented, and the longitude and latitude data corresponding to the index are projected into plane coordinates; Perform polynomial fitting on the plane coordinates; calculate the radius of curvature of the plane coordinates of the latitude and longitude data corresponding to the index according to the polynomial fitting result of the plane coordinates; calculate the curvature according to the radius of curvature of the plane coordinates of the latitude and longitude data corresponding to the index The inland river ship cornering speed drop value corresponding to the radius; according to the inland river ship cornering speed drop value, mark the curve corresponding to the longitude and latitude data of the index, and the effect is to automatically and accurately identify the navigation curve through the longitude and latitude data of the inland river ship.
Description
技术领域technical field
本发明属于船舶能源管理领域,具体涉及一种能源管理方法中内河船舶航速优化前期,用于航线分段的一种弯道识别方法。The invention belongs to the field of ship energy management, and in particular relates to a curve identification method used for route segmentation in the early stage of speed optimization of an inland river ship in an energy management method.
背景技术Background technique
节能减排是当今时代的重要主题。船舶作为大宗商品的运载工具,世界贸易总额的80%以上是由其进行,在国际贸易以及区域经济发展中具有重要的支撑作用,但因此船舶也被认为是交通运输业燃料消耗的最大贡献者。根据相关的研究,将船舶航行速度在设计速度的基础上降低2~3节,会很大程度上减少船舶燃油消耗,降低运营成本,因此航速优化是更简洁高效的船舶能效提高方法。Energy saving and emission reduction is an important theme in today's era. As a carrier of bulk commodities, ships account for more than 80% of the world's total trade and play an important supporting role in international trade and regional economic development. However, ships are also considered to be the largest contributor to fuel consumption in the transportation industry . According to relevant research, reducing the ship's navigation speed by 2 to 3 knots on the basis of the design speed will greatly reduce the ship's fuel consumption and reduce operating costs. Therefore, speed optimization is a simpler and more efficient way to improve ship energy efficiency.
对于内河船舶而言,航线基本固定、重复性高,内河水文周期性变化明显,尤其是集装箱船和大宗货物运输,需求量稳定,发送时间稳定,因此对内河船舶固定航线下进行降低航速的优化管理是有重要意义的。在固定航线下,在满足航期要求下,通过对航速的优化管理,可以达到航次总油耗量最低、二氧化碳排放最少的目的,进而实现内河船舶节能减排、降低燃油成本的目的。For inland ships, the route is basically fixed and highly repeatable, and the hydrology of the inland river changes significantly. Especially for container ships and bulk cargo transportation, the demand is stable and the delivery time is stable. Therefore, the optimization of reducing the speed of inland ships under fixed routes Management is important. Under the fixed route, while meeting the requirements of the voyage period, through the optimized management of the voyage speed, the goal of the lowest total fuel consumption and the least carbon dioxide emission can be achieved, and the goal of energy saving, emission reduction and fuel cost reduction for inland waterway ships can be realized.
基于此,内河船舶固定航线下进行降低航速的优化管理,需要内河船舶航速优化前期的航线分段进行支撑,其中,内河弯道识别是支撑的重要技术路线,对更准确识别的弯道处,要求船舶减速过弯,不仅提高船舶过弯安全性,也可以根据弯道情况进行降低航速的优化管理。以往学者在内河船舶航线优化的航线分段中,通常采用手动根据途径城市分段:如航线武汉至上海,分为武汉至九江段、九江至南京段和南京至上海段。或采用手动根据航线图中弯道分段。这种方式下,内河弯道识别通常需要进行人工标记,标记效率不高,且准确性受主观影响大。Based on this, the optimal management of reducing the speed of inland ships under the fixed route requires the support of the route segment in the early stage of the speed optimization of inland ships. Among them, the identification of inland river bends is an important technical route for support. For more accurately identified bends, Requiring the ship to slow down and turn, not only improves the safety of the ship, but also optimizes the management of reducing the speed according to the situation of the bend. In the past, in the route segmentation of inland ship route optimization, scholars usually used manual segmentation according to the route cities: for example, the route from Wuhan to Shanghai was divided into Wuhan-Jiujiang section, Jiujiang-Nanjing section, and Nanjing-Shanghai section. Or use manual segmentation according to the curve in the route map. In this way, the identification of inland river bends usually requires manual marking, which is not efficient and the accuracy is greatly affected by subjectivity.
发明内容Contents of the invention
为了解决内河船舶航线弯道的全自动识别的问题,根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,包括In order to solve the problem of fully automatic identification of inland ship route curves, according to some embodiments of the present application, the method for identifying curves based on inland ship latitude and longitude data includes:
步骤1:将通过航行获取N个顺序的经纬度数据的索引设置为从0到N-1;Step 1: Set the index of obtaining N sequential latitude and longitude data through navigation from 0 to N-1;
步骤2:根据起始索引i的经纬度数据,将经纬度数据进行分段,分段结果包括索引i和索引j以及索引i和索引j之间的全部索引所对应的经纬度数据;Step 2: Segment the latitude and longitude data according to the latitude and longitude data of the starting index i, and the segmentation result includes the latitude and longitude data corresponding to index i and index j and all indexes between index i and index j;
步骤3:将包括索引i和索引j以及索引i和索引j之间的全部索引所对应的经纬度数据投影成平面坐标,平面坐标的索引与经纬度数据的索引相同;Step 3: Project the latitude and longitude data corresponding to index i and index j and all indexes between index i and index j into plane coordinates, and the index of plane coordinates is the same as the index of latitude and longitude data;
步骤4:对所述平面坐标进行多项式拟合;Step 4: Carry out polynomial fitting to described plane coordinate;
步骤5:根据索引i和索引j的序号i和j,确定索引序号k和l;通过所述平面坐标的多项式拟合结果,计算包括索引k和索引l以及索引k和索引l之间的全部索引所对应的经纬度数据的平面坐标的曲率半径;Step 5: According to the serial numbers i and j of the index i and the index j, determine the index serial numbers k and l; through the polynomial fitting result of the plane coordinates, calculate the index k and the index l and all between the index k and the index l The radius of curvature of the plane coordinates of the latitude and longitude data corresponding to the index;
根据索引k和索引l以及索引k和索引l之间的全部索引所对应的经纬度数据的平面坐标的曲率半径,计算曲率半径对应的内河船舶过弯速度降值;According to the radius of curvature of the plane coordinates of the longitude and latitude data corresponding to the index k and the index l and all indexes between the index k and the index l, calculate the inland river ship cornering speed drop value corresponding to the curvature radius;
根据内河船舶过弯速度降值对索引k和索引l以及索引k和索引l之间的全部索引所对应的经纬度数据的弯道进行标记;Mark the curves of the longitude and latitude data corresponding to index k and index l and all indexes between index k and index l according to the drop value of the inland waterway ship's cornering speed;
步骤6:根据索引i和索引j的序号i和j,重新确定起始索引i,所述重新确定的起始索引的标记序号大于起始索引的标记序号;Step 6: re-determine the starting index i according to the serial numbers i and j of the index i and the index j, and the marking serial number of the re-determined starting index is greater than the marking serial number of the starting index;
步骤7:重复步骤2-步骤6,直至完成全部经纬度数据的弯道标记。Step 7: Repeat Step 2-Step 6 until the curve marking of all the latitude and longitude data is completed.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,所述步骤2的分段的方法,包括According to some embodiments of the present application, the method for identifying curves based on latitude and longitude data of inland watercraft, the segmented method of
从起始索引i的经纬度数据开始,索引j的序号从i+1开始增加,每增加一个,检查索引i到索引j的全部索引所对应的经纬度数据的最小经度与最大经度之差,其中,最小经度与最大经度之差的值设定为x,固定个数最小值为y,固定个数最大值为z;Starting from the latitude and longitude data of the starting index i, the serial number of the index j increases from i+1, and every time one is added, check the difference between the minimum longitude and the maximum longitude of the latitude and longitude data corresponding to all the indexes from index i to index j, where, The value of the difference between the minimum longitude and the maximum longitude is set to x, the minimum value of the fixed number is y, and the maximum value of the fixed number is z;
S2.1.如果所述最小经度与最大经度之差大于x度,则索引j的序号停止增加,此时若j-i小于y,则序号j=i+y,若j-i大于y则不做操作,得到索引j的序号;S2.1. If the difference between the minimum longitude and the maximum longitude is greater than x degrees, the serial number of index j stops increasing. At this time, if j-i is less than y, then the serial number j=i+y, if j-i is greater than y then No operation, get the serial number of index j;
如果所述最小经度与最大经度之差不大于x度,则索引j的序号继续增加,直到满足所述最小经度与最大经度之差大于x度,则索引j的序号停止增加,此时若j-i小于y,则序号j=i+y,若j-i大于y则不做操作,得到索引j的序号;If the difference between the minimum longitude and the maximum longitude is not greater than x degrees, then the sequence number of index j continues to increase until the difference between the minimum longitude and maximum longitude is greater than x degrees, then the sequence number of index j stops increasing. If j -i is less than y, then the sequence number j=i+y, if j-i is greater than y, no operation is performed, and the sequence number of index j is obtained;
如果索引j的序号增加到超过i+z仍未满足满足所述最小经度与最大经度之差大于x度,则索引j的序号停止增加并且序号j=i+z,得到索引j的序号;If the serial number of the index j increases to exceed i+z and still does not meet the requirement that the difference between the minimum longitude and the maximum longitude is greater than x degrees, the serial number of the index j stops increasing and the serial number j=i+z, and the serial number of the index j is obtained;
S2.2.对所得到的索引j的序号和所述起始索引i的序号计算,通过(j-i)÷3的余数,使序号j加一或减一或不变,使(j-i)能被3整除,得到最终索引j的序号,从而得到包括索引i和索引j以及索引i和索引j之间的全部索引所对应的经纬度数据。S2.2. For the calculation of the sequence number of the obtained index j and the sequence number of the starting index i, through the remainder of (j-i)÷3, the sequence number j is increased or decreased by one or unchanged, so that (j-i) It can be divisible by 3 to obtain the serial number of the final index j, so as to obtain the longitude and latitude data corresponding to all indexes including index i and index j and between index i and index j.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,所述步骤3中将索引i和索引j以及索引i和索引j之间的全部索引所对应的经纬度数据投影成平面坐标的方法,包括According to the curve identification method based on the latitude and longitude data of inland watercraft in some embodiments of the present application, in the
S3.1.提取分段后索引i和索引j以及索引i和索引j之间所有经纬度数据中的最小经度和最大经度;S3.1. After extracting the segmented index i and index j and the minimum longitude and maximum longitude among all the longitude and latitude data between index i and index j;
S3.2.将高斯克吕格投影中的投影带的中央经线等于二分之一乘最小最大经度之和;S3.2. The central meridian of the projection zone in the Gauss Kruger projection is equal to one-half multiplied by the sum of the minimum and maximum longitudes;
S3.3.通过所述中央经线将索引i和索引j以及索引i和索引j之间的经纬度数据投影为平面坐标(x,y)。S3.3. Project the index i and index j and the latitude and longitude data between index i and index j into plane coordinates (x, y) through the central meridian.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,所述步骤4中对所述平面坐标进行多项式拟合的方法,包括According to some embodiments of the present application, the curve recognition method based on the latitude and longitude data of inland watercraft, the method for polynomial fitting of the plane coordinates in the
S4.1.对所述中央经线将索引i和索引j以及索引i和索引j之间的经纬度数据投影的平面坐标(x,y)进行平移操作;S4.1. Perform a translation operation on the plane coordinates (x, y) of the central meridian projecting the index i and index j and the latitude and longitude data between index i and index j;
S4.2.对所述平移操作后的平面坐标(x,y)通过abcd四种方式分别进行多项式拟合:S4.2. Perform polynomial fitting on the plane coordinates (x, y) after the translation operation in four ways: abcd:
a将所述平移操作后的平面坐标(x,y)直接进行多项式拟合;a directly performing polynomial fitting on the plane coordinates (x, y) after the translation operation;
b将所述平移操作后的平面坐标(x,y)的x和y的值互换之后进行多项式拟合;b performing polynomial fitting after exchanging the x and y values of the plane coordinates (x, y) after the translation operation;
c将述平移操作后的平面坐标(x,y)沿坐标原点向右旋转45度之后进行多项式拟合;c. After the plane coordinates (x, y) after the translation operation are rotated 45 degrees to the right along the origin of the coordinates, polynomial fitting is performed;
d将述平移操作后的平面坐标(x,y)的沿坐标原点向左旋转45度之后进行多项式拟合;d Perform polynomial fitting after the plane coordinates (x, y) after the translation operation are rotated 45 degrees to the left along the origin of the coordinates;
S4.3.计算abcd四种方式拟合结果R平方,选取R平方最大的拟合结果为最终拟合结果,若R平方中最大拟合结果合格则进行步骤5;若R平方中最大拟合结果均不合格,则进行第五种方式进行多项式拟合:S4.3. Calculate the R square of the fitting results of the four methods of abcd, and select the fitting result with the largest R square as the final fitting result. If the largest fitting result in the R square is qualified, proceed to step 5; if the largest fitting result in the R square If the results are all unqualified, perform polynomial fitting in the fifth way:
e从所述平移操作后的平面坐标(x,y)开始,以坐标原点为中心以30度为单位顺时针旋转坐标点,共生成12组平面坐标,并对每组平面坐标进行多项式拟合,得到12组你和结果;eStarting from the plane coordinates (x, y) after the translation operation, rotate the coordinate points clockwise with the coordinate origin as the center and in units of 30 degrees to generate 12 sets of plane coordinates in total, and perform polynomial fitting on each set of plane coordinates , get 12 groups of you and the result;
S4.4.计算e方式中的12组拟合结果R平方,选取R平方最大的拟合结果为最终拟合结果,若R平方中最大拟合结果合格则进行步骤5;若R平方中最大拟合结果不合格,则拟合失败,选择拟合结果中R平方中最大拟合结果进行步骤5。S4.4. Calculate the R square of the 12 sets of fitting results in the e method, and select the fitting result with the largest R square as the final fitting result. If the largest fitting result in the R square is qualified, proceed to step 5; if the largest in the R square If the fitting result is unqualified, the fitting fails, and the largest fitting result among the R squares among the fitting results is selected to proceed to step 5.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,所述步骤S4.1具体包括将索引i和索引j以及索引i和索引j之间经纬度数据投影的平面坐标(x,y)的x和y值都减去这一分段内的x最小值和y最小值,再各自加上10,使这一分段的平面坐标向坐标原点平移靠拢;According to the curve recognition method based on the latitude and longitude data of inland watercraft in some embodiments of the present application, the step S4.1 specifically includes projecting the index i and index j and the plane coordinates (x, y) of the latitude and longitude data between index i and index j )’s x and y values are all subtracted from the x minimum value and y minimum value in this segment, and then add 10 respectively to make the plane coordinates of this segment move closer to the coordinate origin;
所述步骤S4.2中将述平移操作后的平面坐标(x,y)沿坐标原点向右旋转45度操作的方法包括In the step S4.2, the method of rotating the plane coordinates (x, y) after the translation operation by 45 degrees to the right along the origin of the coordinates includes
先将笛卡尔坐标(x,y)值转换为极坐标(ρ,θ);First convert the Cartesian coordinates (x, y) to polar coordinates (ρ, θ);
接着将极坐标中θ加上π/4;Then add π/4 to θ in polar coordinates;
然后极坐标转换为笛卡尔坐标(x,y)值;Then the polar coordinates are converted to Cartesian coordinates (x, y) values;
最后每个坐标的x和y值都减去所有坐标的x最小值和y最小值,保证所有值为正;Finally, the x and y values of each coordinate are subtracted from the x minimum value and y minimum value of all coordinates to ensure that all values are positive;
所述步骤S4.2中将述平移操作后的平面坐标(x,y)沿坐标原点向左旋转45度操作的方法包括In the step S4.2, the method of rotating the plane coordinates (x, y) after the translation operation by 45 degrees to the left along the origin of the coordinates includes
先将笛卡尔坐标(x,y)值转换为极坐标(ρ,θ);First convert the Cartesian coordinates (x, y) to polar coordinates (ρ, θ);
接着将极坐标中θ减去π/4;Then subtract π/4 from θ in polar coordinates;
然后极坐标转换为笛卡尔坐标(x,y)值;Then the polar coordinates are converted to Cartesian coordinates (x, y) values;
最后每个坐标的x和y值都减去所有坐标的x最小值和y最小值,保证所有值为正。Finally, the x and y values of each coordinate are subtracted from the minimum x and y values of all coordinates to ensure that all values are positive.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,拟合结果评价指标使用R平方决定系数,R平方大于0.999代表拟合合格;According to some embodiments of the present application, the curve recognition method based on the latitude and longitude data of inland ships, the fitting result evaluation index uses the R square coefficient of determination, and the R square greater than 0.999 means that the fitting is qualified;
所述多项式拟合具体为:从5次多项式拟合开始,若拟合结果R平方合格则结束多项式拟;若拟合结果R平方不合格则多项式次数加一,再次拟合,拟合结果R平方合格则结束;若多项式次数增加至20,拟合结果R平方仍未合格,则强制结束多项式拟合。The polynomial fitting is specifically as follows: starting from the fifth-degree polynomial fitting, if the fitting result R square is qualified, then the polynomial fitting is ended; if the fitting result R square is unqualified, then the number of polynomials is increased by one, and the fitting is performed again, and the fitting result R If the square is qualified, it will end; if the polynomial degree increases to 20 and the fitting result R square is still unqualified, the polynomial fitting will be forcibly terminated.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,所述步骤步骤5中根据索引序号i和j,确定索引序号k和l的方法包括According to some embodiments of the present application, the curve identification method based on the latitude and longitude data of inland ships, in the step 5, according to the index numbers i and j, the method for determining the index numbers k and l includes
当起始索引i的序号等于0时,表示这一分段是起始段,此时索引k的序号等于索引i的序号等于0,索引l的序号等于i+(j-i)÷3×2;When the serial number of the starting index i is equal to 0, it means that this segment is the starting segment, at this time, the serial number of the index k is equal to the serial number of the index i is equal to 0, and the serial number of the index l is equal to i+(j-i)÷3×2;
当索引j的序号大于等于N-1时,表示这一分段是结尾段,此时索引k的序号等于上一次迭代中的索引l的序号,本次迭代索引l的序号等于N-1;When the serial number of index j is greater than or equal to N-1, it means that this segment is the end segment. At this time, the serial number of index k is equal to the serial number of index l in the previous iteration, and the serial number of index l in this iteration is equal to N-1;
当索引i的序号和索引j的序号不满足上述两种条件时,表示这一分段是中间段,此时索引k的序号等于上一次迭代中索引l的序号,本次迭代索引l的序号等于i+(j-i)÷3×2。When the serial number of index i and the serial number of index j do not meet the above two conditions, it means that this segment is an intermediate segment. At this time, the serial number of index k is equal to the serial number of index l in the previous iteration, and the serial number of index l in this iteration It is equal to i+(j-i)÷3×2.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,所述步骤步骤5中根据索引k和索引l以及索引k和索引l之间的全部索引所对应的经纬度数据的平面坐标的曲率半径,计算曲率半径对应的内河船舶过弯速度降值的方法,包括According to some embodiments of the present application, the curve recognition method based on the latitude and longitude data of inland ships, in step 5, according to the plane coordinates of the latitude and longitude data corresponding to the index k and index l and all indexes between index k and index l Radius of curvature, the method for calculating the drop value of inland river ship cornering speed corresponding to the radius of curvature, including
根据步骤步骤中的合格的R平方中最大拟合结果,计算索引k到索引l的所对应的经纬度数据的各个平面坐标的曲率半径;According to the maximum fitting result in the qualified R square in the step step, calculate the radius of curvature of each plane coordinate of the corresponding longitude and latitude data of the index k to the index l;
通过费尔索夫速度降公式,计算曲率半径对应的速度降具体数值,使用该数值作为平面坐标点所对应经纬度数据的弯道标记,其中,费尔索夫速度降公式:Calculate the specific value of the speed drop corresponding to the curvature radius through the Felsov speed drop formula, and use this value as the curve mark of the latitude and longitude data corresponding to the plane coordinate point. Among them, the Felsov speed drop formula:
式中:Vc为船舶在回转过程中速度;V0为船舶回转初速,R为回转曲率半径,L为船长。In the formula: V c is the speed of the ship during the turning process; V 0 is the initial speed of the ship turning, R is the radius of curvature of turning, and L is the length of the ship.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,速度降具体数值越接近1表示弯道曲率半径越大,越接近直线,过弯阻力越小;速度降具体数值越小代表弯道曲率半径越小,过弯阻力越大,要减速过弯。According to the curve recognition method based on the latitude and longitude data of inland watercraft in some embodiments of the present application, the closer the specific value of the speed drop is to 1, the larger the curvature radius of the curve is, and the closer to a straight line, the smaller the cornering resistance; the smaller the specific value of the speed drop, the smaller the curve. The smaller the radius of curvature of the curve, the greater the cornering resistance, so you need to slow down when cornering.
根据本申请一些实施例的基于内河船舶经纬度数据的弯道识别方法,步骤6中根据索引i和索引j的序号i和j,重新确定起始索引i的方法,包括通过对当前迭代中索引i和索引j的序号计算,重新确定的起始索引i的序号增加(j-i)÷3。According to some embodiments of the present application, the curve recognition method based on the longitude and latitude data of inland ships, in step 6, according to the sequence numbers i and j of the index i and index j, the method of re-determining the starting index i includes the method of re-determining the index i in the current iteration and the sequence number of index j, the sequence number of the re-determined starting index i is increased by (j-i)÷3.
有益效果:Beneficial effect:
本发明通过经度差进行分段可以保证将后续投影的形变可控在非常小的范围。In the present invention, segmenting through the longitude difference can ensure that the deformation of the subsequent projection can be controlled in a very small range.
本发明以固定经度差方式为主、固定个数方式为辅的分段策略保证了少数南北方向(经度变化小的方向)的内河航线也能分段成功。通过调节分段的经度差和最大最小个数,可以适应不同采集频率的航航行数据和弯道过于密集的航线。The subdivision strategy of the present invention, which is based on the fixed longitude difference mode and supplemented by the fixed number mode, ensures that a small number of inland river routes in the north-south direction (the direction with small longitude changes) can also be successfully segmented. By adjusting the longitude difference and the maximum and minimum number of segments, it can adapt to navigation data of different collection frequencies and routes with too dense curves.
本发明使用每段经度最大最小值之和的二分之一为中央经线,形成局部高斯克吕格投影带,而不是使用标准投影带,进一步减少了高斯克吕格投影的形变。The present invention uses one-half of the sum of the maximum and minimum values of each segment of longitude as the central meridian to form a local Gauss Kruger projection zone instead of using a standard projection zone, thereby further reducing the deformation of the Gauss Kruger projection.
本发明通过abcde五种方式进行多项式拟合,在保证航线没有形变的前提下,大大提升了多项式拟合的成功率。The present invention carries out polynomial fitting through five methods of abcde, and greatly improves the success rate of polynomial fitting under the premise of ensuring that the route is not deformed.
本发明通过特定的多项式拟合方式,在保证成功率的前提下,大大提升了运算速度。The present invention greatly improves the operation speed under the premise of ensuring the success rate through a specific polynomial fitting method.
本发明通过每段只计算中间份曲率半径而不考虑两端,消除了弯道出现在某一段两端而造成拟合及曲率半径计算不准确的特殊情况。The present invention only calculates the radius of curvature in the middle of each section without considering the two ends, eliminating the special situation that the curve appears at both ends of a certain section, which causes inaccurate fitting and calculation of the radius of curvature.
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
附图说明Description of drawings
图1为基本流程图。Figure 1 is the basic flow chart.
图2为某次航行经纬度数据图。Figure 2 is the latitude and longitude data map of a certain voyage.
图3为第一次分段航线图。Figure 3 is the route map for the first segment.
图4为第一段经纬度坐标投影结果图。Fig. 4 is the projection result map of the latitude and longitude coordinates of the first segment.
图5为第一次分段abcd四种方式的拟合结果图。Fig. 5 is a graph of the fitting results of the first segment abcd four ways.
图6为使用速度降值标记结果图。Figure 6 is a graph showing the results of marking using the velocity drop value.
图7为弯道识别结果航线图。Fig. 7 is a route diagram of the curve recognition result.
图8为索引k、索引l具体序号值的确定及索引i的迭代图。FIG. 8 is an iterative diagram for determining the specific serial number values of index k and index l and index i.
具体实施方式Detailed ways
下面通过参考附图详细描述本申请的实施例,所述实施例的示例在附图中示出,本发明提出一种基于内河船舶航行数据的航道弯道识别方法,在方法中,某次航行获取经纬度数据,为方便说明,用N表示经纬度数据的个数,按顺序各个经纬度数据的索引为从0到N-1,在本发明中,对于索引i,可以理解为序号为i的索引,i表示索引i的序号。根据所述经纬度数据,弯道识别方法包括如下步骤:The embodiments of the present application are described in detail below with reference to the accompanying drawings. Examples of the embodiments are shown in the accompanying drawings. The present invention proposes a method for identifying waterway bends based on inland waterway ship navigation data. In the method, a certain navigation To obtain the latitude and longitude data, for convenience of explanation, use N to represent the number of latitude and longitude data, and the index of each latitude and longitude data in order is from 0 to N-1. In the present invention, for the index i, it can be understood as the index that the serial number is i, i represents the serial number of index i. According to the latitude and longitude data, the curve recognition method includes the following steps:
步骤1:将所有经纬度数据通过特定方式进行分段,分段结果为索引i到索引j之间的经纬度数据。在优选方案中,步骤1中通过以固定经度差方式为主、固定个数方式为辅进行分段。具体为当固定经度差方式截取的分段数据的个数过大或过小时,自动转换为固定个数方式分段。其中,航线弯道特性表现为航线中弯的大小和弯的密度,弯越小越密集则应适当减小经度差的值,适当同时减小最大最小个数的值,来保证截取的一段中弯不会太多而造成无法多项式拟合;经纬度数据的采集频率越高,代表同样个数下截取的一段航线的实际长度会越短,此时应该适当同时增加最大最小个数的值,来保证截取的一段航线的实际长度变化不大;要求高斯克吕格投影形变越小,则减小经度差的值,反之亦然。在优选方案中,设定每段经度差为0.1度,设定固定个数最小33,最大99,可以理解的是,设定参数均可根据不同采集频率的经纬度数据和高斯克吕格投影形变要求适当调整。Step 1: Segment all the latitude and longitude data in a specific way, and the segmentation result is the latitude and longitude data between index i and index j. In the preferred solution, in
首先通过固定的经度差来截取每一段经纬度数据。分段从第i个索引的经纬度数据开始,索引j的序号从第i+1增加,每增加一个检查索引i到索引j之间所有数据的最小经度与最大经度之差。如果经度差大于0.1度,则索引j的序号j停止增加,此时若j-i小于33则强制j=i+33,若j-i大于33则不做操作。如果经度差不大于0.1度,则索引j的序号j继续增加直到满足经度差要求。如果索引j的序号j增加到超过i+99仍未满足经度差要求,则索引j的序号j停止增加并且强制j=i+99。最后通过(j-i)÷3的余数,使索引j的序号j加一或减一或不变,保证(j-i)能被3整除,分段结束开始步骤2。Firstly, each piece of longitude and latitude data is intercepted by a fixed longitude difference. Segmentation starts from the latitude and longitude data of the i-th index, and the serial number of the index j increases from the i+1th, and every time one is added, the difference between the minimum longitude and the maximum longitude of all data between index i and index j is checked. If the longitude difference is greater than 0.1 degrees, the serial number j of the index j stops increasing. At this time, if j-i is less than 33, force j=i+33, and if j-i is greater than 33, no operation is performed. If the difference in longitude is not greater than 0.1 degrees, the serial number j of index j continues to increase until the longitude difference requirement is met. If the sequence number j of the index j increases beyond i+99 and still fails to meet the longitude difference requirement, the sequence number j of the index j stops increasing and j=i+99 is forced. Finally, through the remainder of (j-i)÷3, the serial number j of index j is increased or decreased by one or remains unchanged, ensuring that (j-i) is divisible by 3, and the segment ends and
步骤2:将索引i到j之间的这段经纬度数据通过高斯克吕格投影方法投影成平面坐标,平面坐标与对应经纬度数据的索引是相同的。在优选方案中,所述步骤2的具体内容包括提取步骤1分段后索引i到索引j之间所有经纬度数据中的最小经度和最大经度,将高斯克吕格投影中,投影带的中央经线等于二分之一乘最小最大经度之和。然后通过此中央经线将索引i到索引j之间这段经纬度数据投影为平面坐标(x,y)。Step 2: Project the longitude and latitude data between index i to j into plane coordinates by Gauss Kruger projection method, and the plane coordinates are the same as the index of the corresponding longitude and latitude data. In the preferred solution, the specific content of
步骤3:通过特定方式对平面坐标进行多项式拟合。在优选方案中,所述步骤3的具体内容包括:Step 3: Carry out polynomial fitting to the plane coordinates in a specific way. In the preferred version, the specific content of said
首先将步骤2输出的一段平面坐标(x,y)进行平移操作:将所有坐标的x和y值都减去该段内的x最小值和y最小值,再各自加上10,使整段平面坐标向坐标原点平移靠拢,有利于多项式拟合效果。拟合结果评价指标使用R平方决定系数,R平方大于0.999代表拟合合格。Firstly, translate a segment of plane coordinates (x, y) output in step 2: subtract the minimum value of x and minimum value of y in the segment from the x and y values of all coordinates, and then add 10 to make the entire segment The plane coordinates move closer to the origin of the coordinates, which is beneficial to the polynomial fitting effect. The fitting result evaluation index uses the R square coefficient of determination, and the R square greater than 0.999 indicates that the fitting is qualified.
接着通过abcd四种方式进行多项式拟合:Then polynomial fitting is performed in four ways of abcd:
a.按照原始平面坐标(x,y)直接进行多项式拟合;a. Directly perform polynomial fitting according to the original plane coordinates (x, y);
b.将整段x和y的值互换(也就是沿直线y=x镜像)之后进行多项式拟合;B. carry out polynomial fitting after the value interchange (that is mirror image along straight line y=x) of whole section x and y;
c.将整段原始平面坐标(x,y)沿坐标原点向右旋转45度之后进行多项式拟合;c. After rotating the entire original plane coordinates (x, y) 45 degrees to the right along the origin of the coordinates, polynomial fitting is performed;
d.将整段原始平面坐标(x,y)沿坐标原点向左旋转45度之后进行多项式拟合。d. After rotating the entire segment of the original plane coordinates (x, y) 45 degrees to the left along the origin of the coordinates, perform polynomial fitting.
平面坐标旋转具体操作为:先将笛卡尔坐标(x,y)值转换为极坐标(ρ,θ),接着将极坐标中θ加上或减去π/4,然后极坐标转换为笛卡尔坐标(x,y)值,最后每个坐标的x和y值都减去所有坐标的x最小值和y最小值再各自加上10,保证所有值为正。The specific operation of plane coordinate rotation is: first convert the Cartesian coordinate (x, y) value to polar coordinate (ρ, θ), then add or subtract π/4 to θ in the polar coordinate, and then convert the polar coordinate to Cartesian Coordinates (x, y) value, the x and y values of each coordinate are subtracted from the x minimum value and y minimum value of all coordinates, and 10 is added to each of them to ensure that all values are positive.
多项式拟合具体方法为:从5次多项式拟合开始,若拟合结果R平方合格则结束多项式拟;若拟合结果R平方不合格则多项式次数加一,再次拟合,拟合结果R平方合格则结束;若多项式次数增加至20,拟合结果R平方仍未合格,则强制结束多项式拟合。可以理解的是,对于a~e的任一多项式拟合,均可以使用所述多项式拟合具体方法。The specific method of polynomial fitting is as follows: start from 5th degree polynomial fitting, if the fitting result R square is qualified, then end the polynomial fitting; if the fitting result R square is unqualified, add one to the polynomial degree, fit again, and the fitting result R square If it is qualified, it will end; if the degree of polynomial increases to 20 and the fitting result R square is still unqualified, the polynomial fitting will be forcibly terminated. It can be understood that, for any polynomial fitting of a to e, the specific polynomial fitting method can be used.
然后计算abcd四种方式拟合结果的R平方,选取R平方最大的拟合结果为最终拟合结果,若最大R平方合格则开始步骤4。若四种方式拟合结果的R平方均不合格,则进行额外的第五种e方式多项式拟合:Then calculate the R square of the fitting results of the four methods of abcd, select the fitting result with the largest R square as the final fitting result, and start
e.从原始平面坐标(x,y)开始,以30度为单位顺时针旋转坐标点,共生成12组平面坐标,并对每组平面坐标进行多项式拟合。e. Starting from the original plane coordinates (x, y), rotate the coordinate points clockwise by 30 degrees to generate 12 sets of plane coordinates, and perform polynomial fitting on each set of plane coordinates.
最后计算e方式中12组拟合结果的R平方,选取R平方最大的拟合结果为最终拟合结果,若最大R平方合格则开始步骤4。若最大R平方仍不合格,则将最好的拟合结果图打印出来并提示“拟合失败”,因此,在这种方案中,可以选择拟合结果中R平方中最大拟合结果进行步骤5。Finally, calculate the R square of the 12 sets of fitting results in the e method, select the fitting result with the largest R square as the final fitting result, and start
步骤4:通过拟合结果曲线计算特定部分(索引k到索引l)平面坐标的曲率半径,并将曲率半径对应的内河船舶过弯速度降值作为标记。作为优选方案,所述步骤4为了防止弯道出现在某一段(索引i至j)两端而造成拟合及曲率半径计算不准确的特殊情况,把每一段(索引i至j)平均分成三份,只计算中间份(索引k至l)的曲率半径。但由于每次分段是采用经度差分段方式为主、个数分段方式为辅的策略进行分段,造成每次分段长度可能不等,可能跳过某些经纬度的曲率半径的计算,所以所述步骤4具体确定索引k和l的具体序号值通过以下方法确定:Step 4: Calculate the curvature radius of the plane coordinates of a specific part (index k to index l) through the fitting result curve, and use the inland river ship cornering speed drop corresponding to the curvature radius as a mark. As a preferred solution, the
当索引i的序号i等于0时,表示此段是起始段,此时索引k的序号等于i等于0,索引l的序号等于i+(j-i)÷3×2。When the serial number i of the index i is equal to 0, it means that this segment is the initial segment. At this time, the serial number of the index k is equal to i equal to 0, and the serial number of the index l is equal to i+(j-i)÷3×2.
当索引j的序号大于等于N-1时,表示此段是结尾段,此时索引k的序号等于上一次的索引l的序号,这次的索引l的序号等于N-1。When the serial number of index j is greater than or equal to N-1, it means that this segment is the end segment. At this time, the serial number of index k is equal to the serial number of index l last time, and the serial number of index l this time is equal to N-1.
当索引i和索引j的序号都不满足上述两种条件时,表示此段是中间段,此时索引k的序号等于上一次的索引l的序号,这次的索引l的序号等于i+(j-i)÷3×2。When the serial numbers of index i and index j do not meet the above two conditions, it means that this segment is an intermediate segment. At this time, the serial number of index k is equal to the serial number of index l last time, and the serial number of index l this time is equal to i+(j-i )÷3×2.
由于每次只对一段的中间份进行曲率半径计算,所以每次分段前索引i的序号i通过下列公式进行迭代计算:Since the radius of curvature is only calculated for the middle part of a segment each time, the serial number i of the index i before each segment is iteratively calculated by the following formula:
索引k、索引l具体序号值的确定及索引i的迭代如图8所示,根据图8所示,本发明确定索引k、索引l具体序号值的思路是:The determination of the specific serial number values of index k and index l and the iteration of index i are shown in Figure 8. According to Figure 8, the present invention determines the specific serial number values of index k and index l as follows:
1.只计算中间份,消除弯道出现在某一段两端而造成拟合及曲率半径计算不准确的问题。1. Only the middle part is calculated to eliminate the problem of inaccurate fitting and curvature radius calculation caused by the appearance of curves at both ends of a certain section.
2.(假设每段个数相等)由于只计算了中间份,所以只能前进1/3段,才能保证这一次的中间份和上一次的中间份在序号上是连着的。2. (Assuming that the number of each segment is equal) Since only the middle part is calculated, only 1/3 of the steps can be advanced to ensure that the middle part of this time and the middle part of the previous time are connected in serial number.
3.由于每次分段个数不等,中间段又连不上了,所以采取这一次的k等于上一次的l这样的方式强制连上。3. Since the number of segments is different each time, the middle segment cannot be connected again, so the method that this time k is equal to the previous l is forced to connect.
根据所述设计思路,本发明通过对在不同分段条件下给与不同的索引序号赋值的策略,协同索引序号的迭代赋值,并使用索引l的序号等于i+(j-i)÷3×2的赋值方式,目的是协同配合使得在本发明采用分段策略下,每个分段被分为三部分,每一次迭代分段时,前进方式是让索引i的序号增加(j-i)÷3,在这种方式下,本次迭代分段和上次迭代分段能够具有重合的部分(如前一分段的约后2/3部分和后一分段的约前2/3部分是重合的),从而在每次迭代后,对于当前分段只计算分段的中间部分(索引k至l)的曲率半径。According to the design idea, the present invention uses the strategy of assigning different index serial numbers under different segmentation conditions, cooperates with the iterative assignment of index serial numbers, and uses the assignment that the serial number of index l is equal to i+(j-i)÷3×2 way, the purpose is to cooperate so that under the segmentation strategy adopted by the present invention, each segment is divided into three parts, and when each iteration is segmented, the way forward is to increase the sequence number of index i by (j-i)÷3, where In this way, the segment of this iteration and the segment of the last iteration can have overlapping parts (for example, about the last 2/3 of the previous segment and the first 2/3 of the next segment are overlapped), Thus after each iteration only the radius of curvature of the middle part of the segment (indices k to l) is calculated for the current segment.
在这样的技术方案下,能够尽可能解决弯道出现在某一段两端而造成拟合及曲率半径计算不准确的问题。每次迭代后索引k的序号等于上一次的索引l的序号,在这样的技术方案下,能够尽可能解决本发明采用经度差分段方式为主、个数分段方式为辅的策略进行分段,造成每次分段长度可能不等,可能跳过某些经纬度的曲率半径的计算的问题。Under such a technical solution, the problem of inaccurate fitting and calculation of the radius of curvature caused by the bend appearing at both ends of a certain section can be solved as much as possible. After each iteration, the serial number of the index k is equal to the serial number of the previous index l. Under such a technical solution, it can be solved as much as possible in the present invention. , resulting in the problem that the length of each segment may be different, and the calculation of the radius of curvature of some latitude and longitude may be skipped.
通过步骤3拟合的曲线结果,计算通过步骤4所确定的索引k和索引l之间各个平面坐标的曲率半径。然后通过如下费尔索夫速度降公式,计算曲率半径对应的速度降具体数值。并使用该具体数值作为该平面坐标点所对应经纬度数据的弯道标记,值越大越接近1代表弯道曲率半径越大越接近直线,过弯阻力越小;值越小代表弯道曲率半径越小,过弯阻力越大,需减速过弯。Calculate the radius of curvature of each plane coordinate between index k and index l determined in
费尔索夫速度降公式:Felsoff speed drop formula:
式中:Vc为船舶在回转过程中速度;V0为船舶回转初速;R为回转曲率半径,L为船长。In the formula: V c is the speed of the ship during the turning process; V 0 is the initial speed of the ship turning; R is the radius of curvature of turning, and L is the length of the ship.
标记结束后,通过步骤4中索引i的迭代方式确定下一次分段前的索引i的具体序号值,然后重复步骤1-步骤5,直至完成全部经纬度数据的弯道标记。After marking, determine the specific serial number value of index i before the next segment through the iterative method of index i in
步骤5:前进特定数量的经纬度数据后开始第二次分段,重复步骤1-4,依此类推,循环直到完成整条航行数据弯道识别。作为优选方案,所述步骤5的具体内容为:特定数量等于(j-i)÷3,前进方式是让索引i的序号增加(j-i)÷3后,开始重复步骤1进行再次分段。然后依次重复后续步骤,一直循环直到完成所有经纬度数据的弯道识别。Step 5: Start the second segment after advancing a specific amount of latitude and longitude data, repeat steps 1-4, and so on, until the entire navigation data curve identification is completed. As a preferred solution, the specific content of step 5 is: the specific number is equal to (j-i)÷3, and the way forward is to increase the serial number of index i by (j-i)÷3, and then repeat
其中,所述特定数量等于(j-i)÷3,如上述,索引i的序号i通过下列公式进行迭代计算:Wherein, the specific number is equal to (j-i)÷3, as mentioned above, the serial number i of the index i is iteratively calculated by the following formula:
在一种具体实例中,如图1所示,在上述弯道识别方法的基础上,本发明的弯道识别方法根据某次航行所获取的一共2936个经纬度数据,根据图2所示,按顺序索引从0到2935为例,对本发明的弯道识别方法进一步说明,所述识别方法具体包括:In a specific example, as shown in Figure 1, on the basis of the above-mentioned curve recognition method, the curve recognition method of the present invention is based on a total of 2936 longitude and latitude data obtained by a certain voyage, as shown in Figure 2, according to The sequence index from 0 to 2935 is taken as an example to further illustrate the curve recognition method of the present invention. The recognition method specifically includes:
步骤1:通过以固定经度差方式为主、固定个数方式为辅进行分段。具体为当固定经度差方式截取的分段数据的个数过大或过小时,自动转换为固定个数方式分段。设定每段经度差为0.1度,设定固定个数最小33最大99,设定参数均可根据不同采集频率的经纬度数据和高斯克吕格投影形变要求适当调整。Step 1: Carry out segmentation by using the fixed longitude difference method as the main method and the fixed number method as the auxiliary method. Specifically, when the number of segmented data intercepted by the fixed longitude difference method is too large or too small, it is automatically converted to a fixed number of segmented data. The longitude difference of each section is set to 0.1 degrees, and the fixed number is set to a minimum of 33 and a maximum of 99. The setting parameters can be adjusted appropriately according to the latitude and longitude data of different collection frequencies and the Gauss Krüger projection deformation requirements.
首先通过固定的经度差来截取每一段经纬度数据。第一次分段从索引i对应的经纬度数据开始,其中索引i的序号i=0,索引j的序号j从i+1增加,每增加一个,检查索引i到索引j之间所有数据的最小经度与最大经度之差。索引j的序号j增加到78时经度差大于0.1度,序号j停止增加,此时j-i=77,大于33。如果索引j的序号j增加到超过i+99时经度差仍小于0.1,则序号j停止增加并且强制序号j=i+99。最后通过(j-i)÷3的余数,使序号j加一或减一或不变,保证(j-i)能被3整除,(j-i)÷3=1,j=77+1=78,分段结束。第一次分段结果为i=0、j=78,第一次分段航线如图3所示。Firstly, each piece of longitude and latitude data is intercepted by a fixed longitude difference. The first segment starts from the latitude and longitude data corresponding to the index i, where the serial number i of the index i=0, and the serial number j of the index j increases from i+1, each time one is added, check the minimum value of all data between the index i and the index j The difference between the longitude and the maximum longitude. When the serial number j of the index j increases to 78, the longitude difference is greater than 0.1 degrees, and the serial number j stops increasing. At this time, j-i=77, which is greater than 33. If the longitude difference is still less than 0.1 when the sequence number j of the index j is increased beyond i+99, the sequence number j stops increasing and the sequence number j=i+99 is forced. Finally, through the remainder of (j-i)÷3, the serial number j is increased or decreased by one or remains the same, ensuring that (j-i) can be divisible by 3, (j-i)÷3=1, j=77+1=78, divided end of segment. The result of the first segment is i=0, j=78, and the route of the first segment is shown in FIG. 3 .
步骤2:提取步骤1分段后索引i=0到索引j=78之间所有经纬度数据中的最小经度和最大经度,接着将最小最大经度之和的二分之一作为高斯克吕格投影带的中央经线,然后将索引i=0到索引j=78这段经纬度数据投影为平面坐标(x,y)。第一段经纬度坐标投影结果如图4所示。Step 2: Extract the minimum longitude and maximum longitude of all latitude and longitude data between index i=0 and index j=78 after segmenting in
步骤3:通过特定方式对平面坐标进行多项式拟合。首先将步骤2投影出的一段平面坐标(x,y)进行平移操作:将所有坐标的x和y值都减去该段内的x最小值和y最小值,再各自加上10,使整段平面坐标向坐标原点平移靠拢。拟合结果评价指标使用R平方决定系数,R平方大于0.999代表拟合合格。Step 3: Carry out polynomial fitting to the plane coordinates in a specific way. Firstly, translate a segment of plane coordinates (x, y) projected in step 2: subtract the minimum value of x and minimum value of y in the segment from the x and y values of all coordinates, and then add 10 to each, so that the whole The segment plane coordinates move closer to the coordinate origin. The fitting result evaluation index uses the R square coefficient of determination, and the R square greater than 0.999 indicates that the fitting is qualified.
接着通过abcd四种方式进行多项式拟合:Then polynomial fitting is performed in four ways of abcd:
a.按照原始平面坐标(x,y)直接进行多项式拟合;a. Directly perform polynomial fitting according to the original plane coordinates (x, y);
b.将整段x和y的值互换(也就是沿直线y=x镜像)之后进行多项式拟合;B. carry out polynomial fitting after the value interchange (that is mirror image along straight line y=x) of whole section x and y;
c.将整段原始平面坐标(x,y)沿坐标原点向右旋转45度之后进行多项式拟合;c. After rotating the entire original plane coordinates (x, y) 45 degrees to the right along the origin of the coordinates, polynomial fitting is performed;
d.将整段原始平面坐标(x,y)沿坐标原点向左旋转45度之后进行多项式拟合。d. After rotating the entire segment of the original plane coordinates (x, y) 45 degrees to the left along the origin of the coordinates, perform polynomial fitting.
第一次分段的abcd四种方式拟合结果如图5所示。The fitting results of the four ways of abcd in the first segment are shown in Figure 5.
然后计算abcd四种方式拟合结果的R平方,分别是R平方_a=0.9861,R平方_b=0.9564,R平方_c=0.9957,R平方_d=0.9999。其中R平方_d最大,所以选取d的拟合结果为最终拟合结果,显然此时R平方_d>0.999拟合合格,可以开始步骤4。若最大的R平方<0.999仍不合格,则进行额外的第五种e方式多项式拟合:Then calculate the R square of the fitting results of the four ways of abcd, which are R square_a=0.9861, R square_b=0.9564, R square_c=0.9957, R square_d=0.9999. Among them, R squared_d is the largest, so the fitting result of d is selected as the final fitting result. Obviously, at this time, R squared_d>0.999 is qualified, and
e.从原始平面坐标(x,y)开始,以30度为单位顺时针旋转坐标点,共生成12组平面坐标,并对每组平面坐标进行多项式拟合。e. Starting from the original plane coordinates (x, y), rotate the coordinate points clockwise by 30 degrees to generate 12 sets of plane coordinates, and perform polynomial fitting on each set of plane coordinates.
最后计算e方式中12组拟合结果的R平方,选取R平方最大的拟合结果作为最终拟合结果,若最大R平方合格则开始步骤4。若最大R平方仍不合格,则将最好的拟合结果图打印出来并提示“拟合失败”。Finally, calculate the R square of the 12 sets of fitting results in the e method, select the fitting result with the largest R square as the final fitting result, and start
步骤4:通过拟合结果曲线计算特定部分(索引k到索引l)平面坐标的曲率半径,并将曲率半径对应的内河船舶过弯速度降值作为标记。首先根据三种情况确定特定部分索引k和索引l的具体序号值:当索引i的序号等于0时,表示此段是起始段,此时索引k的序号等于序号i等于0,索引l的序号等于i+(j-i)÷3×2。当索引j的序号大于等于N-1时,表示此段是结尾段,此时索引k的序号等于上一次的索引l的序号,这次的索引l的序号等于N。当索引的序号i和序号j都不满足上述两种条件时,表示此段是中间段,此时索引k的序号等于上一次的索引l的序号,这次的索引l的序号等于i+(j-i)÷3×2。此时索引i的序号i=0、索引j的序号j=78满足第一种情况,所以索引k的序号k=0、索引l的序号l=i+(j-i)/3*2=52。Step 4: Calculate the curvature radius of the plane coordinates of a specific part (index k to index l) through the fitting result curve, and use the inland river ship cornering speed drop corresponding to the curvature radius as a mark. First, determine the specific serial number values of the specific part index k and index l according to three situations: when the serial number of the index i is equal to 0, it means that this segment is the starting segment, at this time the serial number of the index k is equal to the serial number i is equal to 0, and the serial number of the index l The serial number is equal to i+(j-i)÷3×2. When the sequence number of index j is greater than or equal to N-1, it means that this segment is the end segment. At this time, 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 the serial number i and the serial number j of the index do not meet the above two conditions, it means that this segment is an intermediate segment. At this time, the serial number of the index k is equal to the serial number of the last index l, and the serial number of the index l this time is equal to i+(j-i )÷3×2. At this time, the serial number i=0 of index i and the serial number j=78 of index j satisfy the first condition, so the serial number k of index k=0 and the serial number of index l=i+(j-i)/3*2=52.
然后通过步骤3拟合好的曲线结果,计算索引k到索引l对应的经纬度数据这一部分所对应的各个平面坐标的曲率半径。最后通过如下费尔索夫速度降公式:Then, the curvature radius of each plane coordinate corresponding to the part of the longitude and latitude data corresponding to index k to index l is calculated based on the fitted curve result in
结合船长L=189.9m和每个坐标对应的曲率半径,计算对应的速度降具体数值。同时使用该数值作为该平面坐标点所对应经纬度数据的弯道标记,标记结果如图6所示。值越大越接近1代表弯道曲率半径越大越接近直线,过弯阻力越小;值越小代表弯道曲率半径越小,过弯阻力越大,需减速过弯。Combined with the length of the ship L=189.9m and the radius of curvature corresponding to each coordinate, calculate the specific value of the corresponding speed drop. At the same time, use this value as the curve mark of the latitude and longitude data corresponding to the plane coordinate point, and the marking result is shown in Figure 6. The larger the value, the closer to 1, the larger the curvature radius of the curve, the closer to the straight line, and the smaller the cornering resistance; the smaller the value, the smaller the curvature radius of the curve, the greater the cornering resistance, and you need to slow down to corner.
步骤5:前进索引i的序号i,前进(j-i)÷3=26个经纬度数据后,从i=26开始第二次分段,重复步骤1-4,依此类推,循环直到完成整条航行数据弯道识别。若将所标记速度降值小于0.99的经纬度坐标认定为弯道,则弯道识别结果航线图如图7所示。Step 5: advance the serial number i of the index i, after advancing (j-i)÷3=26 latitude and longitude data, start the second segment from i=26, repeat steps 1-4, and so on, until the entire voyage is completed Data curve recognition. If the latitude and longitude coordinates marked with a speed drop value less than 0.99 are identified as curves, the route map of the curve recognition results is shown in Figure 7.
根据所述方案,本发明通过经度差进行分段可以保证将后续高斯克吕格投影的形变可控在非常小的范围。因为高斯克吕格投影的形变程度只与该点到中央经线之间的经度差有关,所以设定了每段的经度差就控制了每段高斯克吕格投影的最大形变。本发明以固定经度差方式为主、固定个数方式为辅的分段策略保证了少数南北方向(经度变化小的方向)的内河航线也能分段成功。通过调节分段的经度差和最大最小个数,可以适应不同采集频率的航航行数据和弯道过于密集的航线。According to the solution, the present invention can ensure that the deformation of the subsequent Gauss-Krüger projection can be controlled in a very small range by segmenting through the longitude difference. Because the degree of deformation of the Gauss Kruger projection is only related to the longitude difference between the point and the central meridian, setting the longitude difference of each segment controls the maximum deformation of each segment of the Gauss Kruger projection. The subdivision strategy of the present invention, which is based on the fixed longitude difference mode and supplemented by the fixed number mode, ensures that a small number of inland river routes in the north-south direction (the direction with small longitude changes) can also be successfully segmented. By adjusting the longitude difference and the maximum and minimum number of segments, it can adapt to navigation data of different collection frequencies and routes with too dense curves.
根据所述方案,本发明使用每段经度最大最小值之和的二分之一为中央经线,形成局部高斯克吕格投影带,而不是使用标准投影带,进一步减少了高斯克吕格投影的形变。According to the scheme, the present invention uses half of the sum of the maximum and minimum values of each segment of longitude as the central meridian to form a local Gauss Kruger projection zone instead of using a standard projection zone, which further reduces the Gauss Kruger projection. deformation.
根据所述方案,本发明通过abcde五种方式进行多项式拟合,在保证航线没有形变的前提下,大大提升了多项式拟合的成功率。According to the scheme, the present invention performs polynomial fitting in five ways of abcde, and greatly improves the success rate of polynomial fitting on the premise of ensuring that the route is not deformed.
根据所述方案,本发明通过特定的多项式拟合方式,在保证成功率的前提下,大大提升了运算速度。According to the solution, the present invention greatly improves the calculation speed under the premise of ensuring the success rate through a specific polynomial fitting method.
根据所述方案,本发明通过每段只计算中间份曲率半径而不考虑两端,消除了弯道出现在某一段两端而造成拟合及曲率半径计算不准确的特殊情况。According to the solution, the present invention only calculates the radius of curvature of the middle portion of each section without considering the two ends, eliminating the special situation that the curve appears at both ends of a certain section, which causes inaccurate fitting and calculation of the radius of curvature.
在本发明中,术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。As used herein, the terms "one embodiment," "some embodiments," "example," "specific examples," or "some examples" mean specific features, structures, materials, or features described in connection with the embodiment or example. A feature is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.
以上所述,仅为本发明创造较佳的具体实施方式,但本发明创造的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明创造披露的技术范围内,根据本发明创造的技术方案及其发明构思加以等同替换或改变,都应涵盖在本发明创造的保护范围之内。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, any person familiar with the technical field within the technical scope of the disclosure of the present invention, according to the present invention Any equivalent replacement or change of the created technical solution and its inventive concept shall be covered within the scope of protection of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211527137.3A CN116045899B (en) | 2022-12-01 | 2022-12-01 | A method for identifying curves based on longitude and latitude data of inland ships |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211527137.3A CN116045899B (en) | 2022-12-01 | 2022-12-01 | A method for identifying curves based on longitude and latitude data of inland ships |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116045899A true CN116045899A (en) | 2023-05-02 |
| CN116045899B CN116045899B (en) | 2025-04-29 |
Family
ID=86117120
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211527137.3A Active CN116045899B (en) | 2022-12-01 | 2022-12-01 | A method for identifying curves based on longitude and latitude data of inland ships |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116045899B (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8155391B1 (en) * | 2006-05-02 | 2012-04-10 | Geoeye Solutions, Inc. | Semi-automatic extraction of linear features from image data |
| CN109583271A (en) * | 2017-09-29 | 2019-04-05 | 杭州海康威视数字技术股份有限公司 | The method, apparatus and terminal that a kind of pair of lane line is fitted |
| CN113705090A (en) * | 2021-08-20 | 2021-11-26 | 中国船舶科学研究中心 | Real-time optimization method for navigation speed of ships in Yangtze river channel |
-
2022
- 2022-12-01 CN CN202211527137.3A patent/CN116045899B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8155391B1 (en) * | 2006-05-02 | 2012-04-10 | Geoeye Solutions, Inc. | Semi-automatic extraction of linear features from image data |
| CN109583271A (en) * | 2017-09-29 | 2019-04-05 | 杭州海康威视数字技术股份有限公司 | The method, apparatus and terminal that a kind of pair of lane line is fitted |
| CN113705090A (en) * | 2021-08-20 | 2021-11-26 | 中国船舶科学研究中心 | Real-time optimization method for navigation speed of ships in Yangtze river channel |
Non-Patent Citations (1)
| Title |
|---|
| 周晓光;苗洪利;王云海;范陈清;崔廷伟;张杰;: "卫星地面轨迹分段拟合确定交叉点的方法研究", 测绘学报, no. 06, 15 December 2012 (2012-12-15) * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116045899B (en) | 2025-04-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110083983B (en) | A ship segmented speed optimization method and intelligent management system | |
| CN112052817B (en) | Improved YOLOv3 model side scan sonar sunken ship target automatic recognition method based on transfer learning | |
| CN102567492A (en) | Method for sea-land vector map data integration and fusion | |
| CN115170528B (en) | A road surface defect detection method, system, device and storage medium | |
| CN108052707B (en) | Ship navigation condition division method based on cluster analysis | |
| CN115146412B (en) | A ship type performance prediction and optimization method and system | |
| CN115294452A (en) | Rotating SAR Ship Target Detection Method Based on Bidirectional Feature Pyramid Network | |
| CN109240288A (en) | Unmanned boat collision prevention paths planning method in the case of a kind of barrier based on trajectory unit | |
| CN112036490A (en) | A Recognition and Reconstruction Method of Railway Longitudinal Section Alignment | |
| CN111368016A (en) | Spatial information extraction and analysis method of rail transit control protection area with multi-threshold constraints | |
| CN112348867A (en) | Method and system for constructing city high-precision three-dimensional terrain based on LiDAR point cloud data | |
| CN113138554B (en) | A Distributed Cooperative Control Method for Multi-ships in Mixed Traffic Scenarios | |
| CN116935226A (en) | An improved remote sensing image road extraction method, system, equipment and medium based on HRNet | |
| CN113988213A (en) | Ship in-dock repair identification method and system | |
| CN116045899A (en) | Curve recognition method based on inland ship longitude and latitude data | |
| CN115268474B (en) | A method of underwater vehicle formation based on improved Dubins curve | |
| CN117574530A (en) | Ship body linear optimization design method based on CAESES semi-parametric deformation | |
| Pérez et al. | Parametric generation, modeling, and fairing of simple hull lines with the use of nonuniform rational B-spline surfaces | |
| CN112418106B (en) | Ship detection method based on dense key point guidance | |
| CN110986943B (en) | Intelligent optimization method and device for ship navigation path | |
| CN117760438A (en) | A ship typhoon avoidance route planning method, terminal equipment and storage medium | |
| CN112017480B (en) | A dynamic memory planning method for aircraft green cruise trajectory | |
| CN1356668A (en) | Rolling ball method for automatically generating digital road map | |
| Guo et al. | Research on Muli-objective Ship Speed Optimization Considering Ship Emission Control Areas | |
| CN115471762A (en) | Light fast RCNN remote sensing image airplane detection method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |