uwcse.location.core
Class SmoothCentroidTracker

java.lang.Object
  |
  +--uwcse.location.core.Tracker
        |
        +--uwcse.location.core.MobileTracker
              |
              +--uwcse.location.core.CentroidTracker
                    |
                    +--uwcse.location.core.SmoothCentroidTracker

public class SmoothCentroidTracker
extends CentroidTracker

A class containing functionality to track a physical object or set of grouped physical objects where the tracked object is placed at the centroid of the position's of the last n sensors making measurements, smoothed by the history of previous centroids. The history size is the number of past estimated positions (including the current) that are averaged to estimate the tracked object's current position. A history size of 1 results in no smoothing.

Version:
$Revision: 1.2 $
Author:
Jeffrey Hightower

Field Summary
protected  State[] m_history
           
protected  int m_historyIndex
           
 
Fields inherited from class uwcse.location.core.CentroidTracker
m_index, m_useWeighting, m_values, m_window
 
Fields inherited from class uwcse.location.core.MobileTracker
m_motionModel
 
Fields inherited from class uwcse.location.core.Tracker
m_elapsedTime, m_lastMeasurement, m_lastUpdateTime, m_trueStateMeasurement, m_worldMap
 
Constructor Summary
SmoothCentroidTracker(SmoothCentroidTracker tracker)
          Create a point object tracker as a copy of this one.
SmoothCentroidTracker(WorldMap map, MotionModel motion, boolean useWeighting)
          Create a centroid tracker with a window size of 3 and a smoothing history size of 2.
SmoothCentroidTracker(WorldMap map, MotionModel motion, boolean useWeighting, int windowSize, int historySize)
          Create a centroid tracker with the given centroid window size, weighting, and smoothing history.
 
Method Summary
 Object clone()
          Create a point object tracker as a copy of the given one.
 LocationReport createLocationReport()
          Compute a state location report for the object being tracked.
 int getHistorySize()
          Get the history size, that is, the number of past estimated positions (including the current) that are averaged to estimate the tracked object's current position.
 void initLocation(LocationReport report)
          Initialize the tracker to the given location.
 void merge(Tracker tracker)
          Incorporate information contained in given tracker into this tracker.
 String toString()
          Return a string representation of this particle filter tracker.
 void update(Measurement meas, LocationSensor sensor, LocationReport sensorLocation)
          Update to reflect the given measurement taken by the given location sensor.
 
Methods inherited from class uwcse.location.core.CentroidTracker
getWindowSize
 
Methods inherited from class uwcse.location.core.MobileTracker
getMotionModel, setMotionModel
 
Methods inherited from class uwcse.location.core.Tracker
getLastMeasurement, getRMSError, getTimestamp, getTrueStateMeasurement, getWorldMap, setTrueStateMeasurement
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_history

protected State[] m_history

m_historyIndex

protected int m_historyIndex
Constructor Detail

SmoothCentroidTracker

public SmoothCentroidTracker(WorldMap map,
                             MotionModel motion,
                             boolean useWeighting)
Create a centroid tracker with a window size of 3 and a smoothing history size of 2.


SmoothCentroidTracker

public SmoothCentroidTracker(WorldMap map,
                             MotionModel motion,
                             boolean useWeighting,
                             int windowSize,
                             int historySize)
Create a centroid tracker with the given centroid window size, weighting, and smoothing history. The smoothing history size must be greater than 0 or an IllegalArgumentException will be thrown.


SmoothCentroidTracker

public SmoothCentroidTracker(SmoothCentroidTracker tracker)
Create a point object tracker as a copy of this one.

Method Detail

clone

public Object clone()
Create a point object tracker as a copy of the given one.

Overrides:
clone in class CentroidTracker

update

public void update(Measurement meas,
                   LocationSensor sensor,
                   LocationReport sensorLocation)
Update to reflect the given measurement taken by the given location sensor. The tracked object's new position is window size measurements plus this one whose sensor positions are averaged.

Overrides:
update in class CentroidTracker

getHistorySize

public int getHistorySize()
Get the history size, that is, the number of past estimated positions (including the current) that are averaged to estimate the tracked object's current position.


createLocationReport

public LocationReport createLocationReport()
Compute a state location report for the object being tracked.

Overrides:
createLocationReport in class CentroidTracker

toString

public String toString()
Return a string representation of this particle filter tracker.

Overrides:
toString in class CentroidTracker

initLocation

public void initLocation(LocationReport report)
Initialize the tracker to the given location. This implementation fills the window with the given report's most likely state.

Overrides:
initLocation in class CentroidTracker

merge

public void merge(Tracker tracker)
Incorporate information contained in given tracker into this tracker.

Overrides:
merge in class CentroidTracker


This documentation is for the Location Stack v0.8. The latest distribution, the documentation, and the list of contributors to the Location Stack can always be found at http://portolano.cs.washington.edu/projects/location/

© Copyright 2004 University of Washington CSE