views:

122

answers:

3

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:

  1. 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)..

  2. How do I handle the turns at the end of each leg with relation to the speed?

  3. 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?

  4. I will be eventually implementing this algorithm in Java... What java functions/libraries will help me with the timing, math, etc?

  5. 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

A: 

What is the goal of this algorithm? Does it need to perform a "check" on all of the land, like is_there_wheat()? Are you just calculating the total time it takes to perform it's search/threshing? Does the vehicle cover distance when it turns, or is it like a SCAG lawn mower with an in-place pivot?

Alex Mcp
this is not an answer... try asking in comments.
Yuval
Yeah, 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.
Grasper
A: 

Even though, I do not completly get the main idea behind your describe, I try to give some answers.

  1. Take "snapshots" as small as possible. Stop time between calculations, and then move your vehicle according to the time. Example code below.

  2. How many degrees does your vehicle turn per second?

  3. If those dont change, I would calculate those in the beginning.

  4. Pure Java SE should be enough for your needs. Check the API for java.lang.Math and java.lang.System.


while(true) {
     final long time = System.currentTimeMillis();
     doSomeCalculations();
     doSomethingMore();
     long passedTime = System.currentTimeMillis() - time;
     vehicle.move(26.0 / 1000.0 * passedTime);
}
Nils Schmidt
+1  A: 

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.

Grembo
Interesting historical and quantitative reading here on naval search patterns for U-boatshttp://ormstomorrow.informs.org/archive/spring03/Submissions/carl_paper.pdfNaval Research Logistics Quarterly should be a good journal for the military side of search patterns.
Grembo