An application for prototyping and testing Pearl magnetic mount detection algorithms.
MagneticMountDetector
receives sensor data and passes it to a SensorAlgo
which returns a confidence double
between FULL_CONFIDENCE_OFF_MAGNET
and FULL_CONFIDENCE_ON_MAGNET
, with ZERO_CONFIDENCE
being the midpoint.
To add algorithms, you implement the SensorAlgo
interface, then call magneticMountDetector.setAlgo(yourAlgo)
.
Currently, the YZThresholdAlgo
seems to be the most effective, as it leverages the fact that the placement of the Pearl mount provokes nearly equal and opposite field readings on the Y and Z axes.
ChartView is a basic chart plotter using Android Canvas APIs.