de.unikassel.android.sdcframework.data.independent
Class OrientationSampleData

Package class diagram package OrientationSampleData
java.lang.Object
  extended by de.unikassel.android.sdcframework.data.independent.AbstractSampleData
      extended by de.unikassel.android.sdcframework.data.independent.OrientationSampleData
All Implemented Interfaces:
SampleData, SerializableData

public final class OrientationSampleData
extends AbstractSampleData

The orientation sensor device specific sample data, which are heading (angle between the magnetic north direction and the y-axis, 0=North, 90=East, 180=South, 270=West ), pitch ( rotation around x-axis,-180 to 180, with positive values when the z-axis moves toward the y-axis) and roll ( rotation around y-axis, -90 to 90, with positive values when the x-axis moves toward the z-axis ).

See Also:
OrientationDevice, OrientationDeviceScanner

Field Summary
private  float heading
          The ambient angle between the magnetic north direction and the y-axis
private  float pitch
          The rotation around the x-axis
private  float roll
          The rotation around the y-axis
 
Constructor Summary
OrientationSampleData()
          Constructor
OrientationSampleData(OrientationSampleData sampleData)
          Constructor
 
Method Summary
 SampleData doClone()
          Method to clone sample data
 boolean equals(Object o)
           
 float getHeading()
          Getter for the angle between the magnetic north direction and the y-axis
 float getPitch()
          Getter for the rotation around the x-axis
 float getRoll()
          Getter for the rotation around the y-axis
 void setHeading(float heading)
          Setter for the angle between the magnetic north direction and the y-axis
 void setPitch(float pitch)
          Setter for the rotation around the x-axis
 void setRoll(float roll)
          Setter for the rotation around the y-axis
 
Methods inherited from class de.unikassel.android.sdcframework.data.independent.AbstractSampleData
clone, getRelatedData, toXML, updateRelatedData
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

heading

private float heading
The ambient angle between the magnetic north direction and the y-axis


pitch

private float pitch
The rotation around the x-axis


roll

private float roll
The rotation around the y-axis

Constructor Detail

OrientationSampleData

public OrientationSampleData()
Constructor


OrientationSampleData

public OrientationSampleData(OrientationSampleData sampleData)
Constructor

Parameters:
sampleData - the sample data to copy construct from
Method Detail

doClone

public final SampleData doClone()
Description copied from interface: SampleData
Method to clone sample data

Returns:
a copy of the sample data

equals

public final boolean equals(Object o)
Overrides:
equals in class Object

getHeading

public final float getHeading()
Getter for the angle between the magnetic north direction and the y-axis

Returns:
the angle between the magnetic north direction and the y-axis

setHeading

public final void setHeading(float heading)
Setter for the angle between the magnetic north direction and the y-axis

Parameters:
heading - the angle between the magnetic north direction and the y-axis to set

getPitch

public final float getPitch()
Getter for the rotation around the x-axis

Returns:
the rotation around the x-axis

setPitch

public final void setPitch(float pitch)
Setter for the rotation around the x-axis

Parameters:
pitch - the rotation around the x-axis to set

getRoll

public final float getRoll()
Getter for the rotation around the y-axis

Returns:
the rotation around the y-axis

setRoll

public final void setRoll(float roll)
Setter for the rotation around the y-axis

Parameters:
roll - the rotation around the y-axis to set