org.android.activityminer.model.timeseries
Class SensorObservationImpl

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

public class SensorObservationImpl
extends AbstractSensorObservation<SensorObservationDimensions>

Implementation of the sensor data observation for all known sensors.


Field Summary
 
Fields inherited from class org.android.activityminer.model.timeseries.AbstractSensorObservation
ts, values
 
Constructor Summary
SensorObservationImpl(Long ts, AccelerometerData acc, NetworkLocationData loc)
          Constructor
SensorObservationImpl(Long ts, Double[] values)
          Constructor for serialization
SensorObservationImpl(Long ts, Double magintude, Double accX, Double accY, Double accZ, Double gx, Double gy, Double gz, Double lon, Double lat, Double speed)
          Constructor
 
Method Summary
 SensorObservation<SensorObservationDimensions,Double> cloneWithTimeStamp(long ts)
          Does clone a sensor observation with the given time stamp.
 SensorObservationDimensions[] 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

SensorObservationImpl

public SensorObservationImpl(Long ts,
                             AccelerometerData acc,
                             NetworkLocationData loc)
Constructor

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

SensorObservationImpl

public SensorObservationImpl(Long ts,
                             Double magintude,
                             Double accX,
                             Double accY,
                             Double accZ,
                             Double gx,
                             Double gy,
                             Double gz,
                             Double lon,
                             Double lat,
                             Double speed)
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
lon - the longitude
lat - the latitude
speed - the speed over ground

SensorObservationImpl

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

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

getDimensions

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

Returns:
the dimensions type array

cloneWithTimeStamp

public SensorObservation<SensorObservationDimensions,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