uwcse.location.core
Class LinearDistanceMeasurement

java.lang.Object
  |
  +--uwcse.location.core.Measurement
        |
        +--uwcse.location.core.LinearDistanceMeasurement

public class LinearDistanceMeasurement
extends Measurement

The LinearDistanceMeasurement class represents a linear distance measured between a sensor and an object.

Version:
$Revision: 1.3 $
Author:
Jeffrey Hightower

Nested Class Summary
 
Nested classes inherited from class uwcse.location.core.Measurement
Measurement.TimestampComparator
 
Field Summary
protected  double m_distanceInMeters
           
 
Fields inherited from class uwcse.location.core.Measurement
m_objectName, m_sensorName, m_timestamp
 
Constructor Summary
LinearDistanceMeasurement()
          Create a linear distance measurement with length 0.
LinearDistanceMeasurement(String objectName, String sensorName, double distanceInMeters)
          Create a linear distance measurement in meters.
LinearDistanceMeasurement(LinearDistanceMeasurement ldm)
          Creates a linear distance measurement as a copy of the given one.
 
Method Summary
 Object clone()
          Create a deep copy of this LinearDistanceMeasurement.
 boolean equals(Object o)
          Test this object for semantic equality with another LinearDistanceMeasurement.
static double feetToMeters(double feet)
          Static helper function to convert feet to meters with high precision using the International Bureau of Standards conversion values without truncation
 double getDistanceInFeet()
          Get the distance in feet represented by this linear measurement.
 double getDistanceInMeters()
          Get the distance in meters represented by this linear measurement.
 double getDistanceInMiles()
          Get the distance in miles represented by this linear measurement.
static double metersToFeet(double meters)
          Static helper function to convert meters to feet with high precision using the International Bureau of Standards conversion values without truncation
static double metersToMiles(double meters)
          Static helper function to convert meters to statute miles with high precision using the International Bureau of Standards conversion values without truncation
static double milesToMeters(double miles)
          Static helper function to convert statute miles to meters with high precision using the International Bureau of Standards conversion values without truncation
 String toString()
          Return a string representation of this LinearDistanceMeasurement.
 
Methods inherited from class uwcse.location.core.Measurement
getObjectName, getSensorName, getTimestamp, hashCode, setObjectName, setSensorName, setTimestamp
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_distanceInMeters

protected double m_distanceInMeters
Constructor Detail

LinearDistanceMeasurement

public LinearDistanceMeasurement()
Create a linear distance measurement with length 0.


LinearDistanceMeasurement

public LinearDistanceMeasurement(LinearDistanceMeasurement ldm)
Creates a linear distance measurement as a copy of the given one.


LinearDistanceMeasurement

public LinearDistanceMeasurement(String objectName,
                                 String sensorName,
                                 double distanceInMeters)
Create a linear distance measurement in meters.

Method Detail

equals

public boolean equals(Object o)
Test this object for semantic equality with another LinearDistanceMeasurement.

Overrides:
equals in class Measurement
Returns:
true if the object name, sensor name, and timestamp of both both Measurements are the same.

clone

public Object clone()
Create a deep copy of this LinearDistanceMeasurement.

Overrides:
clone in class Measurement

toString

public String toString()
Return a string representation of this LinearDistanceMeasurement.

Overrides:
toString in class Measurement

metersToFeet

public static double metersToFeet(double meters)
Static helper function to convert meters to feet with high precision using the International Bureau of Standards conversion values without truncation


feetToMeters

public static double feetToMeters(double feet)
Static helper function to convert feet to meters with high precision using the International Bureau of Standards conversion values without truncation


metersToMiles

public static double metersToMiles(double meters)
Static helper function to convert meters to statute miles with high precision using the International Bureau of Standards conversion values without truncation


milesToMeters

public static double milesToMeters(double miles)
Static helper function to convert statute miles to meters with high precision using the International Bureau of Standards conversion values without truncation


getDistanceInMeters

public double getDistanceInMeters()
Get the distance in meters represented by this linear measurement.


getDistanceInFeet

public double getDistanceInFeet()
Get the distance in feet represented by this linear measurement.


getDistanceInMiles

public double getDistanceInMiles()
Get the distance in miles represented by this linear measurement.



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