考虑速度的具体路径算法
我需要创建一个算法,其中“车辆”覆盖 1262 m x 1262 m 区域,每个“腿”之间有 20% 重叠。每条腿的宽度为103 m,根据我的计算,覆盖该区域需要16“腿”。在每个航段结束时,车辆都会180度转弯,并完成下一个搜索航段。车辆以23米/秒的恒定速度行驶
现在我问这个问题的原因是一些问题:
最好的处理方法是什么 车辆的“位置” 与速度的关系?一定要拿1 第二个“快照”,只需移动 车23米? (这看起来很亲切 边缘粗糙)..
我如何处理转弯处 每条腿的末端相对于 速度?
我应该预先分配搜索吗 腿参数(即找到边界 初始化时每条腿) 或动态计算这些 每个搜索段的末尾?
我最终会 实现该算法 Java...什么java 函数/库会帮助我 时间、数学等?
我还需要考虑什么?
编辑
(回答其中一个答案)
基本上,在整个搜索区域中都会随机放置需要找到的“对象”...一旦我拿到车辆,我就会解决这个问题沿着正确的路径前进并覆盖该区域。车辆转弯时确实覆盖了区域。最小转弯半径是 12 米。我只是想让它在每个搜索航段结束时转弯,然后排队进入下一个航段
I need to create an algorithm where a "vehicle" covers a 1262 m x 1262 m area with 20% overlap between each "leg". The width of each leg is 103 m, which by my calculations gives 16 "legs" needed to cover this area. At the end of each leg, the vehicle does a 180 degree turn, and completes the next search leg. The vehicle is traveling at a constant speed of 23 meters/second
Now the reason I am asking this on SO are some issues:
What is the best way to handle
the "position" of vehicle in
relation to the speed? Do take 1
second "snapshots" and just move the
vehicle 23 meters? (This seems kind
of rough around the edges)..How do I handle the turns at the
end of each leg with relation to the
speed?Should I preallocate the search
leg parameters (IE find the bounds
on each leg at initialization time)
or dynamically calculate these at
the end of each search leg?I will be eventually
implementing this algorithm in
Java... What java
functions/libraries will help me
with the timing, math, etc?What else do I need to consider?
EDIT
(Answering one of the responses)
Basically, there will be randomly placed "objects" throughout the search area that this needs to find... I was going to tackle that problem, once I got the vehicle going along the correct path and covering the area. The vehicle does cover area when it turns.. The minimum turn radius is 12 Meters.. I was just going to have it turn at the end of each search leg, and line up for the next leg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能会研究用于寻找失踪人员、飞机、沉船等的空中或潜水搜索的搜索算法。
另一个想法是研究“空间填充曲线”的使用。 Bartholdi 的一些作品可以在此处找到。
You might look into search algortihms designed for looking for aerial or diving searches for lost people, planes, shipwrecks, etc.
Another idea is to look into the use of "space-filling curves". Some of Bartholdi's work can be found here.
尽管我没有完全理解您描述背后的主要思想,但我尝试给出一些答案。
拍摄尽可能小的“快照”。在计算之间停止时间,然后根据时间移动您的车辆。下面的示例代码。
您的车辆每秒转动多少度?
如果这些没有改变,我会在开始时计算它们。
纯 Java SE 应该足以满足您的需求。检查 java.lang.Math 和 java.lang.System 的 API。
Even though, I do not completly get the main idea behind your describe, I try to give some answers.
Take "snapshots" as small as possible. Stop time between calculations, and then move your vehicle according to the time. Example code below.
How many degrees does your vehicle turn per second?
If those dont change, I would calculate those in the beginning.
Pure Java SE should be enough for your needs. Check the API for java.lang.Math and java.lang.System.