Package lejos.robotics
Class FixedRangeScanner
- java.lang.Object
-
- lejos.robotics.FixedRangeScanner
-
- All Implemented Interfaces:
RangeScanner
public class FixedRangeScanner extends java.lang.Object implements RangeScanner
- Author:
- Roger Glassey
-
-
Field Summary
Fields Modifier and Type Field Description protected float[]anglesprotected intMAX_RELIABLE_RANGE_READINGprotected RotateMoveControllerpilotprotected RangeFinderrangeFinderprotected RangeReadingsreadingsprotected intZERO
-
Constructor Summary
Constructors Constructor Description FixedRangeScanner(RotateMoveController aPilot, RangeFinder rangeFinder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RangeFindergetRangeFinder()returns the rangeFinder - allows other objects to get a range value.RangeReadingsgetRangeValues()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.voidsetAngles(float[] angleSet)Set the array of angles at which range readings are to be taken
-
-
-
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:
getRangeValuesin interfaceRangeScanner- Returns:
- the set of range readings
-
setAngles
public void setAngles(float[] angleSet)
Description copied from interface:RangeScannerSet the array of angles at which range readings are to be taken- Specified by:
setAnglesin interfaceRangeScanner- Parameters:
angleSet-
-
getRangeFinder
public RangeFinder getRangeFinder()
returns the rangeFinder - allows other objects to get a range value.- Specified by:
getRangeFinderin interfaceRangeScanner- Returns:
- the range finder
-
-