|
||||||||||
| 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.SmoothingTracker
This simple smoother creates a reading that is a mix of the last 2 Estimates produced by a wrapped Tracker. X and Y will not change by more than a fixed percentage, nor will the error if the Estimate has one.
| Constructor Summary | |
SmoothingTracker(Tracker t)
|
|
| 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()
|
Tracker |
getTracker()
|
protected void |
resetImpl()
Subclasses should implement this to reset themselves to their initial state. |
void |
setDeviationThreshold(double newThreshold)
Sets the threshold at which a new Estimate from the wrapped Tracker will have its standard deviation used without being smoothed with a previous Estimate's standard deviation. |
void |
setDistanceThreshold(double newThreshold)
Sets the threshold at which a new Estimate from the wrapped Tracker will have its coordinate used without being smoothed with a previous Estimate's coordinate. |
void |
setMinDeviation(double newMin)
Sets the minimum standard deviation an Estimate produced by this SmoothingTracker will have. |
void |
setNewToOldDeviationRatio(double newRatio)
Sets the percentage by which the Estimate's standard deviation produced by this SmoothingTracke will change from its last Estimate in light of a new Estimate produced by its wrapped Tracker |
void |
setNewToOldRatio(double newRatio)
Sets the percentage by which the Estimate's coordinate produced by this SmoothingTracker will change from its last Estimate in light of a new Estimate produced by its wrapped Tracker. |
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 |
| Constructor Detail |
public SmoothingTracker(Tracker t)
| Method Detail |
public java.lang.String toString()
public Tracker getTracker()
public void setDistanceThreshold(double newThreshold)
setDeviationThreshold(double)public void setNewToOldRatio(double newRatio)
newLat = previousLat + (incomingEstimateLat * .5)
and the same for the longitude.
setNewToOldDeviationRatio(double)public void setDeviationThreshold(double newThreshold)
setDistanceThreshold(double)public void setNewToOldDeviationRatio(double newRatio)
public void setMinDeviation(double newMin)
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 Trackerprotected void resetImpl()
Tracker
resetImpl in class Tracker
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 Estimate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||