org.android.activityminer.model.timeseries
Class AccSensorObservationImpl

Package class diagram package AccSensorObservationImpl
java.lang.Object
  extended by org.android.activityminer.model.timeseries.AbstractSensorObservation<AccSensorObservationDimensions>
      extended by org.android.activityminer.model.timeseries.AccSensorObservationImpl
All Implemented Interfaces:
ObservableEvent, DeviceData, SensorObservation<AccSensorObservationDimensions,Double>

public class AccSensorObservationImpl
extends AbstractSensorObservation<AccSensorObservationDimensions>

Implementation of a sensor data observation from the accelerometer sensor.


Field Summary
 
Fields inherited from class org.android.activityminer.model.timeseries.AbstractSensorObservation
ts, values
 
Constructor Summary
AccSensorObservationImpl(Long ts, AccelerometerData acc)
          Constructor
AccSensorObservationImpl(Long ts, Double[] values)
          Constructor for serialization
AccSensorObservationImpl(Long ts, Double magintude, Double accX, Double accY, Double accZ, Double gx, Double gy, Double gz)
          Constructor
 
Method Summary
 SensorObservation<AccSensorObservationDimensions,Double> cloneWithTimeStamp(long ts)
          Does clone a sensor observation with the given time stamp.
 AccSensorObservationDimensions[] getDimensions()
          Getter for the dimensions types
 
Methods inherited from class org.android.activityminer.model.timeseries.AbstractSensorObservation
get, getTimeStamp, getValues, hasEqualValues, set, setTimeStamp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccSensorObservationImpl

public AccSensorObservationImpl(Long ts,
                                AccelerometerData acc)
Constructor

Parameters:
ts - the time stamp
acc - the accelerometer sample data

AccSensorObservationImpl

public AccSensorObservationImpl(Long ts,
                                Double magintude,
                                Double accX,
                                Double accY,
                                Double accZ,
                                Double gx,
                                Double gy,
                                Double gz)
Constructor

Parameters:
ts - the time stamp
magintude - the acceleration norm
accX - the x acceleration
accY - the y acceleration
accZ - the z acceleration
gx - the force of gravity for axis x
gy - the force of gravity for axis y
gz - the force of gravity for axis z

AccSensorObservationImpl

public AccSensorObservationImpl(Long ts,
                                Double[] values)
Constructor for serialization

Parameters:
ts - the time stamp
values - the values
Method Detail

getDimensions

public final AccSensorObservationDimensions[] getDimensions()
Description copied from interface: SensorObservation
Getter for the dimensions types

Returns:
the dimensions type array

cloneWithTimeStamp

public SensorObservation<AccSensorObservationDimensions,Double> cloneWithTimeStamp(long ts)
Description copied from interface: SensorObservation
Does clone a sensor observation with the given time stamp.

Parameters:
ts - the time stamp of the cloned observation
Returns:
a clone of this observation with the given time stamp