public class DirectionFinderAdapter extends java.lang.Object implements DirectionFinder
Modifier and Type | Field and Description |
---|---|
private Calibrate |
calibrator |
private SampleProvider |
initialProvider |
private SampleProvider |
provider |
private float[] |
sample |
Constructor and Description |
---|
DirectionFinderAdapter(SampleProvider provider) |
Modifier and Type | Method and Description |
---|---|
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.
|
private Calibrate calibrator
private SampleProvider provider
private SampleProvider initialProvider
private float[] sample
public DirectionFinderAdapter(SampleProvider provider)
public float getDegreesCartesian()
DirectionFinder
getDegreesCartesian
in interface DirectionFinder
public void startCalibration()
Calibrate
startCalibration
in interface Calibrate
public void stopCalibration()
Calibrate
stopCalibration
in interface Calibrate
public void resetCartesianZero()
DirectionFinder
resetCartesianZero
in interface DirectionFinder