Step detection XML
From University of Washington - Ubicomp Research Page
Jump to navigationJump to search
The WorkDag contains the description of the dataflow. Its immediate sub-elements are "mills," logical steps in the computation. The DAG may specify many inputs (sensor mills) but has only one output mill, specified by the WorkDag attribute resultCollectionName. <xml> <?xml version="1.0" standalone="no"?>
<WorkDag resultCollectionName="features"
maxCheckupPeriod="1000000" >
</xml> We instantiate the accelerometer sensor mill. All sensor mills use only the UPDATE_UNCONDITIONAL update policy. The sample period is given in microseconds. Note that this sample period is only a cross-check; it is ultimately determined by msb-server from /msp/msb.ini. 1953 μs corresponds to 512 Hz. <xml>
<Sensor name="accel" updatePolicy="UPDATE_UNCONDITIONAL" sampPeriod="1953" />
</xml> <xml>
<ShortMag name="accelmag" srcName="accel" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" />
<Fft16 name="accelmag_fft" srcName="accelmag" updatePolicy="UPDATE_BY_NUM_NEW_SRC_SAMP" numSrcSampPerUpdate="1024" numSrcSampRqd="2048" />
<EnergyThreshold name="accelmag_fft_thresholded" srcName="accelmag_fft" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" threshold="250000" />
<EnergyFilter name="accelmag_fft_filtered" srcName="accelmag_fft_thresholded" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" threshold=".16" />
<Fft16I name="accelmag_smooth" srcName="accelmag_fft_filtered" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" overlap="1" />
<IntegerFirFilter name="deriv" srcName="accelmag_smooth" updatePolicy="UPDATE_BY_NUM_NEW_SRC_SAMP" numSrcSampPerUpdate="1" > 2 1 0 -1 -2 </IntegerFirFilter>
<ZeroCross name="peaks_max" srcName="deriv" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" edge="falling" /> <TimeDiffLim name="peaks_max_sane" srcName="peaks_max" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" minSamps="16" maxSamps="512" />
<WinSum name="steps_05s" srcName="peaks_max_sane" updatePolicy="UPDATE_BY_NUM_NEW_SRC_SAMP" numSrcSampPerUpdate="128" windowLength="2560" />
<TimeDiffShort name="stridelength" srcName="peaks_max_sane" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" windowLength="16" deltaMax="512" />
<SplitShort name="stridelength_mean" srcName="stridelength" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" componentName="mean" />
<SplitShort name="stridelength_stddev" srcName="stridelength" updatePolicy="UPDATE_BY_SRC_PIGGYBACK" componentName="stddev" />
<Collection name="debug" updatePolicy="UPDATE_BY_PERIOD" sampPeriod="1953" > <component name="accelmag" /> <component name="accelmag_smooth" /> <component name="deriv" /> <component name="peaks_max_sane" /> </Collection>
<Collection name="features" updatePolicy="UPDATE_BY_PERIOD" sampPeriod="250000" > <component name="steps_05s" /> <component name="stridelength_mean" /> <component name="stridelength_stddev" /> </Collection>
</WorkDag> </xml>