Package jmri.jmrix.rps
Class Measurement
- java.lang.Object
- 
- jmri.jmrix.rps.Measurement
 
- 
 public class Measurement extends java.lang.Object Encodes a single measurement point for RPS.Immutable 
- 
- 
Constructor SummaryConstructors Constructor Description Measurement(Reading r)Measurement(Reading r, double x, double y, double z, double vsound, int code, java.lang.String source)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()Error code, defined specifically by generator.java.lang.StringgetId()Return the ID int of the transmitter this measurement describes.javax.vecmath.Point3dgetPoint()ReadinggetReading()Return the Reading this measurement made from.java.lang.StringgetSource()Get name of the source.javax.vecmath.Vector3dgetVector()doublegetVSound()doublegetX()doublegetY()doublegetZ()booleanisOkPoint()Should this be considered a valid measurement?booleanisValidPosition()voidsetValidPosition(boolean val)java.lang.StringtextCode()Get the error code as a human-readable string.java.lang.StringtoString()(package private) doubletruncate(double x)
 
- 
- 
- 
Constructor Detail- 
Measurementpublic Measurement(Reading r) 
 - 
Measurementpublic Measurement(Reading r, double x, double y, double z, double vsound, int code, java.lang.String source) 
 
- 
 - 
Method Detail- 
getReadingpublic Reading getReading() Return the Reading this measurement made from.By definition, Reading objects are immutable - Returns:
- the reading.
 
 - 
getIdpublic java.lang.String getId() Return the ID int of the transmitter this measurement describes.- Returns:
- transmitter ID.
 
 - 
getXpublic double getX() 
 - 
getYpublic double getY() 
 - 
getZpublic double getZ() 
 - 
getVSoundpublic double getVSound() 
 - 
isValidPositionpublic boolean isValidPosition() 
 - 
setValidPositionpublic void setValidPosition(boolean val) 
 - 
getCodepublic int getCode() Error code, defined specifically by generator.- Returns:
- error code.
 
 - 
isOkPointpublic boolean isOkPoint() Should this be considered a valid measurement?- Returns:
- if getCode greater 0.
 
 - 
textCodepublic java.lang.String textCode() Get the error code as a human-readable string.- Returns:
- readable error code.
 
 - 
getPointpublic javax.vecmath.Point3d getPoint() 
 - 
getVectorpublic javax.vecmath.Vector3d getVector() 
 - 
getSourcepublic java.lang.String getSource() Get name of the source.- Returns:
- source name.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
truncatedouble truncate(double x) 
 
- 
 
-