org.placelab.client.tracker
Class BeaconAndGPSParticleFilterTracker

java.lang.Object
  extended byorg.placelab.client.tracker.Tracker
      extended byorg.placelab.client.tracker.BeaconTracker
          extended byorg.placelab.client.tracker.BeaconAndGPSParticleFilterTracker
All Implemented Interfaces:
SpotterListener, VisualizableParticleFilter

public class BeaconAndGPSParticleFilterTracker
extends BeaconTracker
implements VisualizableParticleFilter

A Tracker for beacons and GPS that uses a probabilistic technique to produce Estimates.

Sophisticated users could write a motion model and plug it into the BeaconParticleFilter used by this class to produce more accurate results than those produced by the CentroidTracker.


Nested Class Summary
 class BeaconAndGPSParticleFilterTracker.TEST_PROBE2
           
 
Field Summary
 
Fields inherited from class org.placelab.client.tracker.BeaconTracker
WIFI_MAX_DISTANCE
 
Constructor Summary
BeaconAndGPSParticleFilterTracker(Mapper m)
           
BeaconAndGPSParticleFilterTracker(Mapper m, double maxX, double maxY, double gridIncr)
           
BeaconAndGPSParticleFilterTracker(Mapper m, int minParticles, int maxParticles)
           
 
Method Summary
 boolean acceptableMeasurement(Measurement m)
          Returns true if the tracker can make use of this reading to meaningfully update the estimate.
 Estimate getEstimate()
          return an estimate based on the last set of measurements we saw
 BeaconAndGPSParticleFilter getParticleFilter()
           
 java.util.Vector getParticleList()
           
protected  void resetImpl()
          Subclasses should implement this to reset themselves to their initial state.
 java.lang.String toString()
           
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 durationMillis)
          This method notifies a tracker that time has elapsed without a new mesurement.
 
Methods inherited from class org.placelab.client.tracker.BeaconTracker
findBeacon, findBeacon, getMapper, pickBeacon, pickBeacon
 
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

BeaconAndGPSParticleFilterTracker

public BeaconAndGPSParticleFilterTracker(Mapper m)

BeaconAndGPSParticleFilterTracker

public BeaconAndGPSParticleFilterTracker(Mapper m,
                                         int minParticles,
                                         int maxParticles)

BeaconAndGPSParticleFilterTracker

public BeaconAndGPSParticleFilterTracker(Mapper m,
                                         double maxX,
                                         double maxY,
                                         double gridIncr)
Method Detail

toString

public java.lang.String toString()

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

getParticleList

public java.util.Vector getParticleList()
Specified by:
getParticleList in interface VisualizableParticleFilter
Returns:
A Vector of the paritcles in this particle filter to be used by the visualization framework (like in MapDemo) to draw particles on the screen.

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 - return true if this is a BeaconMeasurement

updateEstimateImpl

protected 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()
return an estimate based on the last set of measurements we saw

Specified by:
getEstimate in class Tracker
Returns:
The Tracker's latest Estimate

getParticleFilter

public BeaconAndGPSParticleFilter getParticleFilter()

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