Package lejos.robotics
Interface DirectionFinder
-
- All Superinterfaces:
Calibrate
- All Known Implementing Classes:
DirectionFinderAdapter,GyroDirectionFinder
public interface DirectionFinder extends Calibrate
Abstraction for compasses and other devices than return the heading of a robot.- Author:
- Lawrie Griffiths
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetDegreesCartesian()Compass readings increase clockwise from 0 to 360, but Cartesian coordinate systems increase counter-clockwise.voidresetCartesianZero()Changes the current direction the compass is facing into the zero angle.-
Methods inherited from interface lejos.robotics.Calibrate
startCalibration, stopCalibration
-
-
-
-
Method Detail
-
getDegreesCartesian
float getDegreesCartesian()
Compass readings increase clockwise from 0 to 360, but Cartesian coordinate systems increase counter-clockwise. This method returns the Cartesian compass reading. Also, the resetCartesianZero() method can be used to designate any direction as zero, rather than relying on North as being zero.- Returns:
- Cartesian direction. Between 0 and 360, excluding 360. Values increase counter-clockwise.
-
resetCartesianZero
void resetCartesianZero()
Changes the current direction the compass is facing into the zero angle.
-
-