Class ProMoveSamples.Sample

java.lang.Object
com.inertia.promove.ProMoveSamples.Sample
Enclosing class:
ProMoveSamples

public static class ProMoveSamples.Sample
extends java.lang.Object
  • Field Details

  • Method Details

    • getRotVector

      public java.util.Vector<java.lang.Double> getRotVector()
      get a rotation vector representation of the quaternion
      Returns:
      rotation vector (x,y,z,angle)
    • getCsvLegend

      public static java.lang.String getCsvLegend()
      Returns:
      csv headers that are used in toCsvLine
    • toString

      public java.lang.String toString()
      string representation of the sample values, same as toCsvLine()
      Overrides:
      toString in class java.lang.Object
    • toCsvLine

      public java.lang.String toCsvLine()
      return the sample as a logline in csv format, the headers are available via getCsvLegend()
      Returns:
      csv representation of the sample (without newline)
    • parseCSVlegend

      public static int[] parseCSVlegend​(java.lang.String line)
      parse the legend of a csv logfile to identify the columns to use
      Parameters:
      line - a line with comma-separated values
      Returns:
      null when the legend exactly matches the default legend, or an array with: the field index of familiar columns, or -1 when it is not found in the legend
    • parseCSVline

      public static ProMoveSamples.Sample parseCSVline​(java.lang.String line, int[] csvColumns)
      parse a csv line, respecting csv columns when non-null
      Parameters:
      line - a line with comma-separated values
      csvColumns - an optional array with the field index of known columns
      Returns:
      parsed sample