uwcse.location.core
Class CentroidTracker

java.lang.Object
  |
  +--uwcse.location.core.Tracker
        |
        +--uwcse.location.core.MobileTracker
              |
              +--uwcse.location.core.CentroidTracker
Direct Known Subclasses:
SmoothCentroidTracker

public class CentroidTracker
extends MobileTracker

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.

Version:
$Revision: 1.3 $
Author:
Jeffrey Hightower

Field Summary
protected  int m_index
           
protected  boolean m_useWeighting
           
protected  double[] m_values
           
protected  State[] 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
CentroidTracker(CentroidTracker tracker)
          Create a point object tracker as a copy of this one.
CentroidTracker(WorldMap map, MotionModel motion, boolean useWeighting)
          Create a centroid tracker with a window size of 3.
CentroidTracker(WorldMap map, MotionModel motion, boolean useWeighting, int windowSize)
          Create a centroid tracker with the given centroid window size.
 
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 getWindowSize()
          Get the window size, that is, the number of sensor measurements whose sensor position is averaged to compute the tracked object's 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.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_window

protected State[] m_window

m_values

protected double[] m_values

m_index

protected int m_index

m_useWeighting

protected boolean m_useWeighting
Constructor Detail

CentroidTracker

public CentroidTracker(WorldMap map,
                       MotionModel motion,
                       boolean useWeighting)
Create a centroid tracker with a window size of 3.


CentroidTracker

public CentroidTracker(WorldMap map,
                       MotionModel motion,
                       boolean useWeighting,
                       int windowSize)
Create a centroid tracker with the given centroid window size. The window size must be greater than 1 or an IllegalArgumentException will be thrown.


CentroidTracker

public CentroidTracker(CentroidTracker 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 Object

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 Tracker

getWindowSize

public int getWindowSize()
Get the window size, that is, the number of sensor measurements whose sensor position is averaged to compute the tracked object's position.


createLocationReport

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


toString

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

Overrides:
toString in class MobileTracker

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.


merge

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



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