com.c5corp.c5Algorithms
Class StepwiseArcHiker

java.lang.Object
  extended by com.c5corp.c5Algorithms.AbstractHiker
      extended by com.c5corp.c5Algorithms.StepwiseArcHiker

public class StepwiseArcHiker
extends AbstractHiker

The StepwiseArcHiker examines the points along a 150 degree arc at approximately a 180 meter radius in front of it, with the center of the arc facing the destination. It chooses to go straight toward the target if it can without exceeding a very reasonable (mid-moderate) slope of 15%. If this fails however, it will choose the best of the paths to other arc points (comparing all one degree and three degree sub-segments produced internally) and moves forward in a stepwise manner, maintaining a bias toward the center but moving around obstacles if it must. It is not a very good hiker if the efficency of the algorithm is your main concern, (but it is faster than the slope reduction hiker.) It tends to provide very good, hikable tracks when the terrain allows it.

Since:
2.0

Field Summary
protected static int[][][] ARCER
          This 8x9x3 array is used to project from a starting point around an arc, projecting ~ 180 meters radious in the directions indicated in a regular grid, starting from relative position (0,0).
 
Fields inherited from class com.c5corp.c5Algorithms.AbstractHiker
CARDINAL_BITS, MOVE, table
 
Constructor Summary
StepwiseArcHiker(int zone, java.lang.String zoneChar, UtmCoordinatePair start, UtmCoordinatePair target, java.sql.Connection connection)
          Note that all Virtual Hikers need the grid zone designation character (GZD).
StepwiseArcHiker(int zone, java.lang.String zoneChar, UtmCoordinatePair start, UtmCoordinatePair target, int padding, java.sql.Connection connection)
           
 
Method Summary
 VirtualHikerTrackLog getSmoothTrack()
          Returns a VirtualHikerTrackLog object representing the results of the StepwiseArcHiker.
 VirtualHikerTrackLog getTrack()
          Returns a VirtualHikerTrackLog object representing the results of the StepwiseArcHiker
 UtmCoordinatePairElev[][] getUtmCoordinatePairElevArray()
          The class produces a UtmCoordinatePairElev[][] as part of its processing of the track.
 
Methods inherited from class com.c5corp.c5Algorithms.AbstractHiker
calculateAzimuth, calculateCardinalDirection, getCardinalIndex, getDistance, getTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARCER

protected static final int[][][] ARCER
This 8x9x3 array is used to project from a starting point around an arc, projecting ~ 180 meters radious in the directions indicated in a regular grid, starting from relative position (0,0). Each total arc covers ~150 degrees with the bias toward the center (The first line segment goes most directly toward the destination point, with the rest of the points splaying out from there at -15, 15, -30, 30, etc. To minimize left/right bias, the pairs are "flipped". It is a quick way to interatively index some possible directions of travel for a virtual hiker. The third value in the sub arrays is additional slope "devalue" used in the algorithm. Moving (mostly) straight toward the target is not devalued, (see the first of 10 elements in the primary/intercardinal arrays), and as it splays out along the arc, more slope devalue bias is added. This helps the hiker avoid trivially "better" perpendicular movment.

Constructor Detail

StepwiseArcHiker

public StepwiseArcHiker(int zone,
                        java.lang.String zoneChar,
                        UtmCoordinatePair start,
                        UtmCoordinatePair target,
                        java.sql.Connection connection)
Note that all Virtual Hikers need the grid zone designation character (GZD). If you do not know it, try using one in your hemisphere. Many GPS devices will correct.

Parameters:
zone - the UTM zone
zoneChar - the UTM grid zone designation character (GZD)
start - The starting coordinates of the virtual hiker
target - The target coordinates of the virtual hiker
connection - a connection object (see DbHelper)
See Also:
DbHelper

StepwiseArcHiker

public StepwiseArcHiker(int zone,
                        java.lang.String zoneChar,
                        UtmCoordinatePair start,
                        UtmCoordinatePair target,
                        int padding,
                        java.sql.Connection connection)
Parameters:
zone - the UTM zone
zoneChar - the UTM grid zone designation character (GZD)
start - The starting coordinates of the virtual hiker
target - The target coordinates of the virtual hiker
padding - the number of meters to add around the area - If less than 1000, a default padding of 1000 will be used.
connection - a connection object (see DbHelper)
See Also:
DbHelper
Method Detail

getSmoothTrack

public VirtualHikerTrackLog getSmoothTrack()
Returns a VirtualHikerTrackLog object representing the results of the StepwiseArcHiker. The StepwiseArcHiker

Returns:
a VirtualHikerTrackLog

getTrack

public VirtualHikerTrackLog getTrack()
Returns a VirtualHikerTrackLog object representing the results of the StepwiseArcHiker

Specified by:
getTrack in class AbstractHiker
Returns:
a VirtualHikerTrackLog

getUtmCoordinatePairElevArray

public UtmCoordinatePairElev[][] getUtmCoordinatePairElevArray()
The class produces a UtmCoordinatePairElev[][] as part of its processing of the track. This object can be useful for many things, such as imaging.

Returns:
a UtmCoordinatePairElev[][] array representing the area the vhiker searched