Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

Written in front

Hi! I am very glad to see you coming in to read this article. Please don't mind, the title is a bit long and awkward (completely for seo considerations), but it is also a summary of the content of this article. If you are going to develop the scene shown below, but you have no good ideas, then this article will definitely help you!

Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

Reciprocating sport route

Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

Reciprocating route planning based on irregular convex polygon plots

Oh, yes, the implementation of this article is based on a web platform map, using javascript. If you are also developing on a web platform, and the task time is very urgent, there is no time to read the full text. . . I have packaged the idea of ​​this article into a library, you can smash the link below, out of the box:
github.com/Char-Ten/cp...
Compatible with all major map platform apis (in fact, the impact of different platform api differences is very low) Oh, unbelieving words stamp demo:
Baidu map demo
Gao De map demo
Leaflet map demo
If you feel good, remember to give a star ~ original is not easy, thank you for your support

text!

In fact, it is also a formula

In fact, this kind of problem is actually a mathematical geometry application. Since it is a math problem, the first step in the routine of the examination is definitely a set of formulas. In this scenario, there are not many core formulas, just two:

  • Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

  • One-time function two-point expression
  • Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

  • Scale the transformation matrix of SxSy times after rotating n degrees around the (tx, ty) point

There is nothing to say in the first one. The second grade mathematics begins to teach the knowledge of a function, which is used to calculate the intersection of the route and the boundary of the plot. The second is a very classic compound transformation matrix, which is the displacement matrix fork-multiplied rotation matrix fork-multiplied displacement scaling matrix. We set the cross-multiplication result to A, then we can list the following equations:


Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

The calculation process is. . . Crossing vertical and horizontal multiplication vertical and horizontal multiplication vertical and horizontal multiplication vertical and horizontal multiplication vertical and horizontal multiplication vertical and horizontal multiplication vertical and horizontal multiplication vertical. . . . The algebra that is finally used for the program is:


Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

Through this formula, the coordinate point after the rotation of the route can be calculated.

Then we package them separately and make a function call first:
 Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks 

See here, congratulations, you have completed 50% of the workload! If you are in the exam, you will list the two formulas, and you will have half the score without writing the answer.

Start with the simplest scenario

A rectangular plot with the route level on the x-axis:

Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

This is probably a size of 200 x 200 rectangle, the apex latitude and longitude of the upper left corner nw (northwest), the apex latitude and longitude of the upper right corner for the ne (Northeast), the apex latitude and longitude for the lower right corner of se (southeast), the apex latitude and longitude of the lower left corner For sw (southwest), set the drone flight interval to 10. You don't consider the connection order of the polylines first, just consider how each horizontal line is generated. Observe that you will find the following rules:
  1. The interval between the two horizontal lines is 20
  2. Each horizontal line can be expressed as y=N , and N is a constant, indicating a certain latitude value.
  3. Each horizontal line segment is generated by the intersection of y=N and the rectangle, that is, each horizontal line segment is the result of the intersection of the rectangular land and the dimension.

Then, the latitude and longitude of the four vertices of the rectangle are now known, and the interval of flight of the drone is also known. It is unknown how many latitude lines the rectangle needs to intersect, and the N of each horizontal line is unknown. The latitude of two points to the left and right of a horizontal line segment is unknown. According to the known unknown, your goal has been very clear, a very simple geometric problem:

  • How many latitude lines the rectangle needs to intersect:
 Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks 
  • Find N for each horizontal line:
 Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks 
  • 因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
    聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
    你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
    好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

    这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。
 因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks 
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

 因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks 
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

因为矩形的两条边是垂直的,所以,横线段左右两个点的经度分别为nw.lng , ne.lng 。这样我们就可以绘制出来了: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks场景开始变形!锵锵,我们把矩形上面的边往东挪50米,得到一个平行四边形: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
聪明的你一定发现了,平行四边形在Y轴上的投影根本没有发生变化嘛,即使变了之后,穿过地块的纬度线数目还是不变嘛,只不过,这次因为两条边不是垂直的,所以,我们需要计算斜边与纬度线的交点。等等,你这时候想起了,最开始50%工作量里面所封装的那个calcPointInLineWithY函数!
你已经知道斜边两个点的坐标,然后你又知道y=N ,那你通过一次函数的两点表达式,完全就可以知道x ,也就是经度是多少啦:那你可以再变一变,让y轴上的投影也发生变化,就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks
好了,这下你观察到,每条边都跟纬度线相交了,也就是说,这次你要遍历一下这个平行四边形四个顶点。等等,你似乎忘记了一个问题,这个四边形在y轴上的投影发生了变化,相交纬度线数目也跟着发生变化了。这时候你想到,要不给这个多边形做个外接矩形?就像这样: Anatomy of UAV route planning, based on reciprocating motion of convex polygonal blocks

这样是不是又回归了最开始的场景?只是把calcPointInLineWithY函数加上去之后,你可以得到任意凸多边形与纬度线相交的模型。

Education Tablet

As a mobile multi-purpose platform, tablet computers also provide many possibilities for mobile teaching. The touch-based learning & entertainment teaching platform allows children to efficiently improve their academic performance in a relaxed and pleasant atmosphere. Such tablet computers generally integrate two learning sections of various courses and systematic learning functions. Generally, it includes multi-disciplinary high-quality teaching resources. The education tablet has the following main functions: it has the functions of touch screen input, text editing, picture editing, data storage, data management, wired and wireless Internet access that ordinary tablet computers have; Management functions, search methods support manual search, query by keyword, query by time; text and pictures can be scanned and converted into documents to save.

Education Tablet,learning tablet,leaning machine,New learning tablet

Jingjiang Gisen Technology Co.,Ltd , https://www.jsgisengroup.com