Class DirectionFinderAdapter

    • Constructor Detail

      • DirectionFinderAdapter

        public DirectionFinderAdapter​(SampleProvider provider)
    • Method Detail

      • getDegreesCartesian

        public float getDegreesCartesian()
        Description copied from interface: DirectionFinder
        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.
        Specified by:
        getDegreesCartesian in interface DirectionFinder
        Returns:
        Cartesian direction. Between 0 and 360, excluding 360. Values increase counter-clockwise.
      • startCalibration

        public void startCalibration()
        Description copied from interface: Calibrate
        Starts calibration. Must call stopCalibration() when done.
        Specified by:
        startCalibration in interface Calibrate
      • stopCalibration

        public void stopCalibration()
        Description copied from interface: Calibrate
        Ends calibration sequence.
        Specified by:
        stopCalibration in interface Calibrate
      • resetCartesianZero

        public void resetCartesianZero()
        Description copied from interface: DirectionFinder
        Changes the current direction the compass is facing into the zero angle.
        Specified by:
        resetCartesianZero in interface DirectionFinder