org.placelab.client.tracker
Class CentroidTracker
java.lang.Object
org.placelab.client.tracker.Tracker
org.placelab.client.tracker.BeaconTracker
org.placelab.client.tracker.CentroidTracker
- All Implemented Interfaces:
- SpotterListener
- public class CentroidTracker
- extends BeaconTracker
A simple tracker that computes the geometric center of the current set of
readings.
Right now, this is the best general purpose Tracker for WiFi
because it produces the most accurate Measurements.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CentroidTracker
public CentroidTracker(Mapper m)
getEstimate
public Estimate getEstimate()
- Specified by:
getEstimate in class Tracker
- Returns:
- The Tracker's latest Estimate
updateEstimateImpl
public void updateEstimateImpl(Measurement m)
- updateEstimateImpl uses the passed measurement to compute a simple
geometic center.
- Specified by:
updateEstimateImpl in class Tracker
- Parameters:
m - use this to update your Estimate
acceptableMeasurement
public boolean acceptableMeasurement(Measurement m)
- Description copied from class:
Tracker
- Returns true if the tracker can make use of this reading to meaningfully
update the estimate.
- Overrides:
acceptableMeasurement in class BeaconTracker
- Parameters:
m - returns true if this is a BeaconMeasurement
updateWithoutMeasurement
public void updateWithoutMeasurement(long durationMillis)
- Description copied from class:
Tracker
- This method notifies a tracker that time has elapsed without a new
mesurement. This gives the tracker a chance to update its estimate to
account for predicted motion.
- Specified by:
updateWithoutMeasurement in class Tracker
resetImpl
protected void resetImpl()
- Description copied from class:
Tracker
- Subclasses should implement this to reset themselves to their initial state.
- Specified by:
resetImpl in class Tracker