wiiusej.wiiusejevents.physicalevents
Class MotionSensingEvent

java.lang.Object
  extended by wiiusej.wiiusejevents.GenericEvent
      extended by wiiusej.wiiusejevents.physicalevents.MotionSensingEvent

public class MotionSensingEvent
extends GenericEvent

Class which represents a motion sensing event.

Author:
guiguito

Field Summary
private  RawAcceleration acceleration
           
private  int accelerationThreshold
           
private  float alphaSmoothing
           
private  GForce gforce
           
private  boolean isSmoothingActive
           
private  Orientation orientation
           
private  float orientationThreshold
           
 
Constructor Summary
MotionSensingEvent(int id, float orientationThreshold, int accelerationThreshold, boolean smoothingState, float alphaSmooth, float r, float p, float ya, float ar, float ap, float x, float y, float z, short xx, short yy, short zz)
          Constructor for a Motion Sensing Event.
 
Method Summary
 int getAccelerationThreshold()
          Get acceleration threshold.
 float getAlphaSmoothing()
          Get alpha smoothing.
 GForce getGforce()
          Get the gravity force.
 Orientation getOrientation()
           
 float getOrientationThreshold()
          Get orientation threshold.
 RawAcceleration getRawAcceleration()
          Get the raw acceleration.
 boolean isSmoothingActive()
          Tell if the option SMOOTHING is activated.
private  void setOrientationAndGforce(float r, float p, float ya, float ar, float ap, float x, float y, float z, short xx, short yy, short zz)
          Set orientation, gravity force and raw acceleration.
 java.lang.String toString()
           
 
Methods inherited from class wiiusej.wiiusejevents.GenericEvent
getWiimoteId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

orientation

private Orientation orientation

gforce

private GForce gforce

acceleration

private RawAcceleration acceleration

orientationThreshold

private float orientationThreshold

accelerationThreshold

private int accelerationThreshold

alphaSmoothing

private float alphaSmoothing

isSmoothingActive

private boolean isSmoothingActive
Constructor Detail

MotionSensingEvent

public MotionSensingEvent(int id,
                          float orientationThreshold,
                          int accelerationThreshold,
                          boolean smoothingState,
                          float alphaSmooth,
                          float r,
                          float p,
                          float ya,
                          float ar,
                          float ap,
                          float x,
                          float y,
                          float z,
                          short xx,
                          short yy,
                          short zz)
Constructor for a Motion Sensing Event.

Parameters:
id - id of the wiimote concerned.
orientationThreshold - value of the minimum angle between two events with the accelerometer.
accelerationThreshold - value of the value variation between two events with the accelerometer.
smoothingState - true if smoothing flag is activated.
alphaSmooth - value of the alpha smoothing parameter.
r - roll.
p - pitch.
ya - yaw.
ar - absolute roll.
ap - absolute pitch.
x - gravity force on x axis.
y - gravity force on y axis.
z - gravity force on z axis.
xx - raw acceleration on x axis.
yy - raw acceleration on y axis.
zz - raw acceleration on z axis.
Method Detail

setOrientationAndGforce

private void setOrientationAndGforce(float r,
                                     float p,
                                     float ya,
                                     float ar,
                                     float ap,
                                     float x,
                                     float y,
                                     float z,
                                     short xx,
                                     short yy,
                                     short zz)
Set orientation, gravity force and raw acceleration.

Parameters:
r - roll
p - pitch
ya - yaw
ar - absolute roll
ap - absolute pitch
x - gravity force on x axis
y - gravity force on y axis
z - gravity force on z axis
xx - raw acceleration on x axis
yy - raw acceleration on y axis
zz - raw acceleration on z axis

getOrientation

public Orientation getOrientation()
Returns:
the orientation

getGforce

public GForce getGforce()
Get the gravity force.

Returns:
the gforce

getRawAcceleration

public RawAcceleration getRawAcceleration()
Get the raw acceleration.

Returns:
the raw acceleration

getOrientationThreshold

public float getOrientationThreshold()
Get orientation threshold.

Returns:
the orientationThreshold

getAccelerationThreshold

public int getAccelerationThreshold()
Get acceleration threshold.

Returns:
the accelerationThreshold

getAlphaSmoothing

public float getAlphaSmoothing()
Get alpha smoothing.

Returns:
the alphaSmoothing

isSmoothingActive

public boolean isSmoothingActive()
Tell if the option SMOOTHING is activated.

Returns:
the isSmoothingActive

toString

public java.lang.String toString()
Specified by:
toString in class GenericEvent