lejos.robotics
Interface DirectionFinder

All Known Implementing Classes:
CompassSensor

public interface DirectionFinder

Abstraction for compasses and other devices than return the heading of a robot.

Author:
Lawrie Griffiths

Method Summary
 float getDegreesCartesian()
          Compass readings increase clockwise from 0 to 360, but Cartesian coordinate systems increase counter-clockwise.
 void resetCartesianZero()
          Changes the current direction the compass is facing into the zero angle.
 void startCalibration()
          Starts calibration.
 void stopCalibration()
          Ends calibration sequence.
 

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.

startCalibration

void startCalibration()
Starts calibration. Must call stopCalibration() when done.


stopCalibration

void stopCalibration()
Ends calibration sequence.


resetCartesianZero

void resetCartesianZero()
Changes the current direction the compass is facing into the zero angle.