|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.placelab.client.tracker.Tracker
org.placelab.client.tracker.HamsterTracker
A Tracker that wraps another Tracker and makes it behave like a Hamster in a ball. This makes it possible to reduce jitter in some Trackers. That is, the wrapped Tracker must produce Estimates whose positions lie outside the radius of a center circle in order to move the Estimate produced by the HamsterTracker. When such an Estimate is encountered, the HamsterTracker's Estimate is shifted by no more than 50% of the distance to the new Estimate's location.
| Field Summary | |
double |
RADIUS
|
| Constructor Summary | |
HamsterTracker(Tracker insideTracker)
|
|
| Method Summary | |
boolean |
acceptableMeasurement(Measurement m)
Returns true if the tracker can make use of this reading to meaningfully update the estimate. |
void |
estimateUpdated(Tracker t,
Estimate e,
Measurement m)
Implement this method to respond to updates from the Tracker(s) you are registered with. |
Estimate |
getEstimate()
|
double |
getRadius()
|
protected void |
resetImpl()
Subclasses should implement this to reset themselves to their initial state. |
void |
setRadius(double newRadius)
Sets the radius for which Estimates produced by the wrapped Tracker must fall away from the previous center to be incorporated into this HamsterTracker's Estimate. |
java.lang.String |
toString()
|
void |
updateEstimate(Measurement m)
Called to give the tracker a new measurement. |
protected void |
updateEstimateImpl(Measurement m)
Subclasses should implement this to do the actual work of updating their Estimate with the given Measurement. |
void |
updateWithoutMeasurement(long timeSinceMeasurementMillis)
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double RADIUS
| Constructor Detail |
public HamsterTracker(Tracker insideTracker)
| Method Detail |
public double getRadius()
public void setRadius(double newRadius)
protected void updateEstimateImpl(Measurement m)
TrackerEstimate with the given Measurement.
updateEstimateImpl in class Trackerm - use this to update your Estimatepublic void updateEstimate(Measurement m)
Tracker
updateEstimate in class Trackerm - A measurement from a Spotter.Tracker.acceptableMeasurement(Measurement)public Estimate getEstimate()
getEstimate in class Trackerpublic boolean acceptableMeasurement(Measurement m)
Tracker
acceptableMeasurement in class Trackerpublic void updateWithoutMeasurement(long timeSinceMeasurementMillis)
Tracker
updateWithoutMeasurement in class Trackerpublic java.lang.String toString()
public void estimateUpdated(Tracker t,
Estimate e,
Measurement m)
EstimateListener
estimateUpdated in interface EstimateListenert - the Tracker producing the Estimatee - the Estimate produced by the Trackerm - the latest Measurement used by the Tracker to produce the Estimateprotected void resetImpl()
Tracker
resetImpl in class Tracker
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||