Package com.inertia.promove
Class ProMoveSamples.Sample
java.lang.Object
com.inertia.promove.ProMoveSamples.Sample
- Enclosing class:
- ProMoveSamples
public static class ProMoveSamples.Sample
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ProMoveSamples.Sample.ADCDescriptor
Descriptor for ADC groups and inputs -
Field Summary
Fields Modifier and Type Field Description java.util.HashMap<java.lang.Integer,java.util.Vector<java.lang.Integer>>
adc
java.util.HashMap<java.lang.Integer,ProMoveSamples.Sample.ADCDescriptor>
adcDescriptors
double
ax
double
axhg
double
ay
double
ayhg
double
az
double
azhg
double
bat
double
cpuTemp
double
cx
double
cy
double
cz
double
extIn
ProMoveSamples.GPSsample
gps
double
gx
double
gy
double
gz
boolean
hasAccel
boolean
hasAccelHighG
boolean
hasADC
boolean
hasADCDescriptors
boolean
hasCompass
boolean
hasGyro
boolean
hasIMA
boolean
hasOrientation
boolean
hasPressure
boolean
hasRSSI
boolean
hasRTC
boolean
hasStatus
boolean
hasTemp
boolean
hasValidAccel
boolean
hasValidAccelHighG
boolean
hasValidCompass
boolean
hasValidGyro
boolean
hasValidPressure
boolean
hasValidRSSI
boolean
hasValidTemp
java.util.Vector<java.lang.Integer>
IMAs
int
index
int
lostSamples
int
nodeID
double
pressure
double
quat1
double
quat2
double
quat3
double
quat4
double
rssi
long
rtc
int
slot
long
sn
double
temp
double
timestamp
boolean
timestampValid
-
Method Summary
Modifier and Type Method Description static java.lang.String
getCsvLegend()
java.util.Vector<java.lang.Double>
getRotVector()
get a rotation vector representation of the quaternionstatic int[]
parseCSVlegend(java.lang.String line)
parse the legend of a csv logfile to identify the columns to usestatic ProMoveSamples.Sample
parseCSVline(java.lang.String line, int[] csvColumns)
parse a csv line, respecting csv columns when non-nulljava.lang.String
toCsvLine()
return the sample as a logline in csv format, the headers are available via getCsvLegend()java.lang.String
toString()
string representation of the sample values, same as toCsvLine()
-
Field Details
-
sn
public long sn -
slot
public int slot -
index
public int index -
nodeID
public int nodeID -
lostSamples
public int lostSamples -
timestamp
public double timestamp -
timestampValid
public boolean timestampValid -
rssi
public double rssi -
rtc
public long rtc -
ax
public double ax -
ay
public double ay -
az
public double az -
axhg
public double axhg -
ayhg
public double ayhg -
azhg
public double azhg -
cx
public double cx -
cy
public double cy -
cz
public double cz -
gx
public double gx -
gy
public double gy -
gz
public double gz -
bat
public double bat -
cpuTemp
public double cpuTemp -
extIn
public double extIn -
pressure
public double pressure -
temp
public double temp -
IMAs
public java.util.Vector<java.lang.Integer> IMAs -
quat1
public double quat1 -
quat2
public double quat2 -
quat3
public double quat3 -
quat4
public double quat4 -
adc
public java.util.HashMap<java.lang.Integer,java.util.Vector<java.lang.Integer>> adc -
adcDescriptors
-
hasAccel
public boolean hasAccel -
hasAccelHighG
public boolean hasAccelHighG -
hasCompass
public boolean hasCompass -
hasGyro
public boolean hasGyro -
hasValidAccel
public boolean hasValidAccel -
hasValidAccelHighG
public boolean hasValidAccelHighG -
hasValidCompass
public boolean hasValidCompass -
hasValidGyro
public boolean hasValidGyro -
hasRSSI
public boolean hasRSSI -
hasStatus
public boolean hasStatus -
hasPressure
public boolean hasPressure -
hasTemp
public boolean hasTemp -
hasValidRSSI
public boolean hasValidRSSI -
hasValidPressure
public boolean hasValidPressure -
hasValidTemp
public boolean hasValidTemp -
hasRTC
public boolean hasRTC -
hasIMA
public boolean hasIMA -
hasOrientation
public boolean hasOrientation -
hasADCDescriptors
public boolean hasADCDescriptors -
hasADC
public boolean hasADC -
gps
-
-
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 classjava.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
parse a csv line, respecting csv columns when non-null- Parameters:
line
- a line with comma-separated valuescsvColumns
- an optional array with the field index of known columns- Returns:
- parsed sample
-