Class Measurement

java.lang.Object
jmri.jmrix.rps.Measurement

public class Measurement extends Object
Encodes a single measurement point for RPS.

Immutable

  • Field Details

  • Constructor Details

  • Method Details

    • getReading

      public Reading getReading()
      Return the Reading this measurement made from.

      By definition, Reading objects are immutable

      Returns:
      the reading.
    • getId

      public String getId()
      Return the ID int of the transmitter this measurement describes.
      Returns:
      transmitter ID.
    • getX

      public double getX()
    • getY

      public double getY()
    • getZ

      public double getZ()
    • getVSound

      public double getVSound()
    • isValidPosition

      public boolean isValidPosition()
    • setValidPosition

      public void setValidPosition(boolean val)
    • getCode

      public int getCode()
      Error code, defined specifically by generator.
      Returns:
      error code.
    • isOkPoint

      public boolean isOkPoint()
      Should this be considered a valid measurement?
      Returns:
      if getCode greater 0.
    • textCode

      public String textCode()
      Get the error code as a human-readable string.
      Returns:
      readable error code.
    • getPoint

      public javax.vecmath.Point3d getPoint()
    • getVector

      public javax.vecmath.Vector3d getVector()
    • getSource

      public String getSource()
      Get name of the source.
      Returns:
      source name.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • truncate

      double truncate(double x)