org.placelab.client.tracker
Class PositionTracker

java.lang.Object
  extended byorg.placelab.client.tracker.Tracker
      extended byorg.placelab.client.tracker.PositionTracker
All Implemented Interfaces:
SpotterListener

public class PositionTracker
extends Tracker

A Tracker that takes PositionMeasurement objects and returns the latest measurement as its estimate of position.


Constructor Summary
PositionTracker()
           
 
Method Summary
 boolean acceptableMeasurement(Measurement m)
          Returns true if the tracker can make use of this reading to meaningfully update the estimate.
 Estimate getEstimate()
           
protected  void resetImpl()
          Subclasses should implement this to reset themselves to their initial state.
 java.lang.String toString()
           
 void updateEstimateImpl(Measurement m)
          Subclasses should implement this to do the actual work of updating their Estimate with the given Measurement.
 void updateWithoutMeasurement(long durationMillis)
          This method notifies a tracker that time has elapsed without a new mesurement.
 
Methods inherited from class org.placelab.client.tracker.Tracker
addEstimateListener, fireEstimateUpdate, getLastUpdatedTime, gotMeasurement, numberOfMeasurements, removeEstimateListener, reset, spotterExceptionThrown, updateEstimate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PositionTracker

public PositionTracker()
Method Detail

toString

public java.lang.String toString()

updateEstimateImpl

public void updateEstimateImpl(Measurement m)
Description copied from class: Tracker
Subclasses should implement this to do the actual work of updating their Estimate with the given Measurement.

Specified by:
updateEstimateImpl in class Tracker
Parameters:
m - use this to update your Estimate

getEstimate

public Estimate getEstimate()
Specified by:
getEstimate in class Tracker
Returns:
The Tracker's latest 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.

Specified by:
acceptableMeasurement in class Tracker

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