lejos.robotics
Class FixedRangeScanner

java.lang.Object
  extended by lejos.robotics.FixedRangeScanner
All Implemented Interfaces:
RangeScanner

public class FixedRangeScanner
extends Object
implements RangeScanner

Author:
Roger Glassey

Field Summary
protected  float[] angles
           
protected  int MAX_RELIABLE_RANGE_READING
           
protected  RotateMoveController pilot
           
protected  RangeFinder rangeFinder
           
protected  RangeReadings readings
           
protected  int ZERO
           
 
Constructor Summary
FixedRangeScanner(RotateMoveController aPilot, RangeFinder rangeFinder)
           
 
Method Summary
 RangeFinder getRangeFinder()
          returns the rangeFinder - allows other objects to get a range value.
 RangeReadings getRangeValues()
          Return a set of range readings determined taken at the relative bearings defined in the angles array; The robot rotates back to its original heading at the end.
 void setAngles(float[] angleSet)
          Set the array of angles at which range readings are to be taken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rangeFinder

protected RangeFinder rangeFinder

pilot

protected RotateMoveController pilot

angles

protected float[] angles

MAX_RELIABLE_RANGE_READING

protected final int MAX_RELIABLE_RANGE_READING
See Also:
Constant Field Values

ZERO

protected final int ZERO
See Also:
Constant Field Values

readings

protected RangeReadings readings
Constructor Detail

FixedRangeScanner

public FixedRangeScanner(RotateMoveController aPilot,
                         RangeFinder rangeFinder)
Method Detail

getRangeValues

public RangeReadings getRangeValues()
Return a set of range readings determined taken at the relative bearings defined in the angles array; The robot rotates back to its original heading at the end.

Specified by:
getRangeValues in interface RangeScanner
Returns:
the set of range readings

setAngles

public void setAngles(float[] angleSet)
Description copied from interface: RangeScanner
Set the array of angles at which range readings are to be taken

Specified by:
setAngles in interface RangeScanner
Parameters:
angleSet -

getRangeFinder

public RangeFinder getRangeFinder()
returns the rangeFinder - allows other objects to get a range value.

Specified by:
getRangeFinder in interface RangeScanner
Returns:
the range finder