Class Measurement


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

    Immutable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int code  
      (package private) Reading r  
      (package private) java.lang.String source  
      (package private) boolean valid  
      (package private) double vsound  
      (package private) double x  
      (package private) double y  
      (package private) double z  
    • Constructor Summary

      Constructors 
      Constructor Description
      Measurement​(Reading r)  
      Measurement​(Reading r, double x, double y, double z, double vsound, int code, java.lang.String source)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()
      Error code, defined specifically by generator.
      java.lang.String getId()
      Return the ID int of the transmitter this measurement describes.
      javax.vecmath.Point3d getPoint()  
      Reading getReading()
      Return the Reading this measurement made from.
      java.lang.String getSource()
      Get name of the source.
      javax.vecmath.Vector3d getVector()  
      double getVSound()  
      double getX()  
      double getY()  
      double getZ()  
      boolean isOkPoint()
      Should this be considered a valid measurement?
      boolean isValidPosition()  
      void setValidPosition​(boolean val)  
      java.lang.String textCode()
      Get the error code as a human-readable string.
      java.lang.String toString()  
      (package private) double truncate​(double x)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Measurement

        public Measurement​(Reading r,
                           double x,
                           double y,
                           double z,
                           double vsound,
                           int code,
                           java.lang.String source)
    • Method Detail

      • getReading

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

        By definition, Reading objects are immutable

        Returns:
        the reading.
      • getId

        public java.lang.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()
      • 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 java.lang.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 java.lang.String getSource()
        Get name of the source.
        Returns:
        source name.
      • toString

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

        double truncate​(double x)