|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openuat.sensors.SamplesSource
org.openuat.sensors.AsciiLineReaderBase
org.openuat.sensors.XsensLogReader
public class XsensLogReader
This class implements a reader for the data format generated by Carl Fischer's Linux "logger" tool for sampling accelerometer data from Xsens devices.
| Field Summary | |
|---|---|
static int |
SAMPLE_RATE
The sample rate in Hz. |
static int |
VALUE_RANGE
|
| Fields inherited from class org.openuat.sensors.AsciiLineReaderBase |
|---|
port, reader, reopenStreamFrom |
| Fields inherited from class org.openuat.sensors.SamplesSource |
|---|
maxNumLines |
| Constructor Summary | |
|---|---|
XsensLogReader(java.io.InputStream stream)
Initializes the parallel port PWM log reader. |
|
XsensLogReader(java.lang.String filename)
Initializes the parallel port PWM log reader. |
|
| Method Summary | |
|---|---|
TimeSeries_Int.Parameters |
getParameters_Int()
Instead of to [-1;1], these integer parameters map to [-1024;1024], i.e. |
TimeSeries.Parameters |
getParameters()
Provides appropriate parameters for interpreting the values to normalize to the [-1;1] range. |
static void |
main(java.lang.String[] args)
|
protected void |
parseLine(java.lang.String line)
A helper function to parse single line of the format produced by parport-pulsewidth. |
| Methods inherited from class org.openuat.sensors.AsciiLineReaderBase |
|---|
dispose, handleSample |
| Methods inherited from class org.openuat.sensors.SamplesSource |
|---|
addSink, addSink, addSink, emitSample, emitSample, getMaxNumLines, removeSink_Int, removeSink, removeSink, simulateSampling, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int VALUE_RANGE
public static final int SAMPLE_RATE
| Constructor Detail |
|---|
public XsensLogReader(java.lang.String filename)
throws java.io.FileNotFoundException
filename - The log to read from. This may either be a normal log file
when simulation is intended or it can be a FIFO/pipe to read
online data.
java.io.FileNotFoundException - When filename does not exist or can not be opened.public XsensLogReader(java.io.InputStream stream)
stream - Specifies the InputStream to read from.| Method Detail |
|---|
protected void parseLine(java.lang.String line)
parseLine in class AsciiLineReaderBaseline - The line to parse.public TimeSeries.Parameters getParameters()
getParameters in class SamplesSourcepublic TimeSeries_Int.Parameters getParameters_Int()
getParameters_Int in class SamplesSource
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||