uwcse.location.core
Class Tracker

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

public abstract class Tracker
extends Object

An abstract class containing functionality to track a physical object.

Version:
$Revision: 1.6 $
Author:
Jeffrey Hightower

Field Summary
protected  long m_elapsedTime
           
protected  Measurement m_lastMeasurement
           
protected  long m_lastUpdateTime
           
protected  TrueStateMeasurement m_trueStateMeasurement
           
protected  WorldMap m_worldMap
           
 
Constructor Summary
Tracker(Tracker tracker)
          Create a tracker as a copy of the given one.
Tracker(WorldMap map)
          Create a tracker.
 
Method Summary
abstract  LocationReport createLocationReport()
          Compute a location report for the object being tracked.
 Measurement getLastMeasurement()
          Get the last measurement which was applied to this tracker.
 double getRMSError()
          Compute the root-mean-square error of the position estimate contained in this tracker against the last known ground truth TrueStateMeasurement.
 long getTimestamp()
          Get the last system time in milliseconds that a measurement update was applied to this tracker.
 TrueStateMeasurement getTrueStateMeasurement()
          Get the measurement containing the last known ground truth position of the object being tracked by this tracker.
 WorldMap getWorldMap()
          Get the world map for this tracker.
abstract  void initLocation(LocationReport report)
          Initialize the tracker to the given location.
abstract  void merge(Tracker tracker)
          Incorporate information contained in given tracker into this tracker.
 void setTrueStateMeasurement(TrueStateMeasurement trueMeas)
          Set the given ground truth measurement as the known true position of the object being tracked by this tracker.
 void update(Measurement meas, LocationSensor sensor, LocationReport sensorLocation)
          Update the tracker to reflect the given measurement taken by the given location sensor along with predictive motion up to the measurement's timestamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_worldMap

protected WorldMap m_worldMap

m_lastMeasurement

protected Measurement m_lastMeasurement

m_trueStateMeasurement

protected TrueStateMeasurement m_trueStateMeasurement

m_lastUpdateTime

protected long m_lastUpdateTime

m_elapsedTime

protected long m_elapsedTime
Constructor Detail

Tracker

public Tracker(WorldMap map)
Create a tracker.


Tracker

public Tracker(Tracker tracker)
Create a tracker as a copy of the given one.

Method Detail

update

public void update(Measurement meas,
                   LocationSensor sensor,
                   LocationReport sensorLocation)
Update the tracker to reflect the given measurement taken by the given location sensor along with predictive motion up to the measurement's timestamp. Extending classes should always call super.update() first so the timestamps are maintained appropriately.


getWorldMap

public WorldMap getWorldMap()
Get the world map for this tracker.


setTrueStateMeasurement

public void setTrueStateMeasurement(TrueStateMeasurement trueMeas)
Set the given ground truth measurement as the known true position of the object being tracked by this tracker.


getTrueStateMeasurement

public TrueStateMeasurement getTrueStateMeasurement()
Get the measurement containing the last known ground truth position of the object being tracked by this tracker. Returns null if no ground truth is known.


getRMSError

public double getRMSError()
Compute the root-mean-square error of the position estimate contained in this tracker against the last known ground truth TrueStateMeasurement. Returns Double.NAN if ground truth is unknown (i.e. getTrueStateMeasurement would return null). This implementation compares ground truth agains the most likely state returned by createLocationReport().


getLastMeasurement

public Measurement getLastMeasurement()
Get the last measurement which was applied to this tracker.


getTimestamp

public long getTimestamp()
Get the last system time in milliseconds that a measurement update was applied to this tracker.


initLocation

public abstract void initLocation(LocationReport report)
Initialize the tracker to the given location.


createLocationReport

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


merge

public abstract void merge(Tracker tracker)
Incorporate information contained in given tracker into this tracker. Used by the database to link an existing object as a child of another object.



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