Class PositionFile

    • Field Detail

      • doc

        org.jdom2.Document doc
      • root

        org.jdom2.Element root
    • Method Detail

      • prepare

        public void prepare()
        Initialize for writing information.

        This is followed by multiple "set" calls, then a "store".

      • setConstants

        public void setConstants​(double vSound,
                                 int offset,
                                 java.lang.String algorithm)
      • setReceiver

        public void setReceiver​(int n,
                                javax.vecmath.Point3d p,
                                boolean active)
      • positionElement

        org.jdom2.Element positionElement​(javax.vecmath.Point3d p)
      • positionFromElement

        public javax.vecmath.Point3d positionFromElement​(org.jdom2.Element position)
      • timeElement

        org.jdom2.Element timeElement​(double time)
      • store

        public void store​(java.io.File file)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • loadFile

        public void loadFile​(java.io.File f)
                      throws org.jdom2.JDOMException,
                             java.io.IOException
        Read in the file, and make available for examination.
        Parameters:
        f - file to load.
        Throws:
        org.jdom2.JDOMException - other errors
        java.io.IOException - error accessing file
      • maxReceiver

        public int maxReceiver()
        FInd the highest numbered receiver in the file
        Returns:
        highest numbered receiver.
      • getReceiverPosition

        public javax.vecmath.Point3d getReceiverPosition​(int n)
        Get the nth receiver position in the file.
        Parameters:
        n - receiver index.
        Returns:
        null if not present
      • getReceiverActive

        public boolean getReceiverActive​(int n)
        Get the nth receiver active state in the file.
        Parameters:
        n - receiver index.
        Returns:
        true if not present
      • getReceiverMin

        public int getReceiverMin​(int n)
        Get the nth receiver min time.
        Parameters:
        n - receiver index.
        Returns:
        0 if not present
      • getReceiverMax

        public int getReceiverMax​(int n)
        Get the nth receiver max time.
        Parameters:
        n - receiver index.
        Returns:
        0 if not present
      • getCalibrationPosition

        public javax.vecmath.Point3d getCalibrationPosition​(int n)
        Get the nth calibration position in the file.
        Parameters:
        n - calibration index.
        Returns:
        null if not present
      • getCalibrationReading

        public Reading getCalibrationReading​(int n)
        Get the nth calibration reading in the file.
        Parameters:
        n - reading index.
        Returns:
        null if not present