Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
com.phidgets.SpatialPhidget Class Reference
Inheritance diagram for com.phidgets.SpatialPhidget:
Inheritance graph
[legend]

List of all members.

Public Member Functions

final void addSpatialDataListener (SpatialDataListener l)
native double getAcceleration (int index) throws PhidgetException
native int getAccelerationAxisCount () throws PhidgetException
native double getAccelerationMax (int index) throws PhidgetException
native double getAccelerationMin (int index) throws PhidgetException
native double getAngularRate (int index) throws PhidgetException
native double getAngularRateMax (int index) throws PhidgetException
native double getAngularRateMin (int index) throws PhidgetException
native int getCompassAxisCount () throws PhidgetException
native int getDataRate () throws PhidgetException
native int getDataRateMax () throws PhidgetException
native int getDataRateMin () throws PhidgetException
native int getGyroAxisCount () throws PhidgetException
native double getMagneticField (int index) throws PhidgetException
native double getMagneticFieldMax (int index) throws PhidgetException
native double getMagneticFieldMin (int index) throws PhidgetException
final void removeSpatialDataListener (SpatialDataListener l)
native void resetCompassCorrectionParameters () throws PhidgetException
native void setCompassCorrectionParameters (double magField, double offset0, double offset1, double offset2, double gain0, double gain1, double gain2, double T0, double T1, double T2, double T3, double T4, double T5) throws PhidgetException
native void setDataRate (int rate) throws PhidgetException
 SpatialPhidget () throws PhidgetException
native void zeroGyro () throws PhidgetException

Private Member Functions

final void enableDeviceSpecificEvents (boolean b)
native void enableSpatialDataEvents (boolean b)
void fireSpatialData (SpatialDataEvent e)

Static Private Member Functions

static native long create () throws PhidgetException

Private Attributes

long nativeSpatialDataHandler = 0
LinkedList spatialDataListeners = new LinkedList ()

Detailed Description

This class represents a Phidget Spatial. All methods for a PhidgetSpatial are implemented in this class.

The Phidget Spatial may provide up to 3 axes of acceleration data, 3 axes of angular rate data and 3 axes of magnetic field data.

Author:
Phidgets Inc.

Definition at line 17 of file SpatialPhidget.java.


Constructor & Destructor Documentation

Definition at line 19 of file SpatialPhidget.java.


Member Function Documentation

final void com.phidgets.SpatialPhidget.addSpatialDataListener ( SpatialDataListener  l) [inline]

Adds a spatial data listener. The spatial data handler is a method that will be called at a rate of DataRate that has been set for the device. This event contains data for all axes of all sensors.

There is no limit on the number of spatial data handlers that can be registered for a particular Phidget.

Parameters:
lAn implemetation of the SpatialDataListener interface

Definition at line 182 of file SpatialPhidget.java.

static native long com.phidgets.SpatialPhidget.create ( ) throws PhidgetException [static, private]
final void com.phidgets.SpatialPhidget.enableDeviceSpecificEvents ( boolean  b) [inline, private]

Reimplemented from com.phidgets.Phidget.

Definition at line 170 of file SpatialPhidget.java.

void com.phidgets.SpatialPhidget.fireSpatialData ( SpatialDataEvent  e) [inline, private]

Definition at line 196 of file SpatialPhidget.java.

Returns the acceleration of a particular axis.

Parameters:
indexindex of the axis
Returns:
acceleration of the selected axis
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Returns the number of accelerometer axes.

Returns:
number of axes of acceleration

Returns the maximum acceleration value that this axis will report.

Returns:
maximum acceleration

Returns the minimum acceleration value that this axis will report.

Returns:
minimum acceleration
native double com.phidgets.SpatialPhidget.getAngularRate ( int  index) throws PhidgetException

Returns the angularRate of a particular axis.

Parameters:
indexindex of the axis
Returns:
angularRate of the selected axis
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Returns the maximum angularRate value that this axis will report.

Returns:
maximum angularRate

Returns the minimum angularRate value that this axis will report.

Returns:
minimum angularRate

Returns the number of compass axes.

Returns:
number of axes of magneticField

Returns the data rate, in milliseconds.

Returns:
data rate
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Returns the maximum data rate, in milliseconds.

Returns:
maximum data rate
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Returns the minimum data rate, in milliseconds.

Returns:
minimum data rate
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Returns the number of gyro axes.

Returns:
number of axes of angularRate

Returns the magneticField of a particular axis.

Parameters:
indexindex of the axis
Returns:
magneticField of the selected axis
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Returns the maximum magneticField value that this axis will report.

Returns:
maximum magneticField

Returns the minimum magneticField value that this axis will report.

Returns:
minimum magneticField
final void com.phidgets.SpatialPhidget.removeSpatialDataListener ( SpatialDataListener  l) [inline]

Definition at line 190 of file SpatialPhidget.java.

Resets the compass correction factors. Magnetic field data will be presented directly as reported by the sensor.

Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.
native void com.phidgets.SpatialPhidget.setCompassCorrectionParameters ( double  magField,
double  offset0,
double  offset1,
double  offset2,
double  gain0,
double  gain1,
double  gain2,
double  T0,
double  T1,
double  T2,
double  T3,
double  T4,
double  T5 
) throws PhidgetException

Sets the compass correction factors. This can be used to correcting any sensor errors, including hard and soft iron offsets and sensor error factors.

Parameters:
magFieldLocal magnetic field strength.
offset0Axis 0 offset correction.
offset1Axis 1 offset correction.
offset2Axis 2 offset correction.
gain0Axis 0 gain correction.
gain1Axis 1 gain correction.
gain2Axis 2 gain correction.
T0Non-orthogonality correction factor 0.
T1Non-orthogonality correction factor 1.
T2Non-orthogonality correction factor 2.
T3Non-orthogonality correction factor 3.
T4Non-orthogonality correction factor 4.
T5Non-orthogonality correction factor 5.
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Sets the data rate, in milliseconds.

Parameters:
ratedata rate
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Zeroes the gyroscope. This takes about two seconds and the gyro zxes will report 0 during the process. This should only be called when the board is not moving.

Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the index is out of range. See open for information on determining if a device is attached.

Member Data Documentation

Definition at line 189 of file SpatialPhidget.java.

LinkedList com.phidgets.SpatialPhidget.spatialDataListeners = new LinkedList () [private]

Definition at line 188 of file SpatialPhidget.java.


The documentation for this class was generated from the following file:


pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:23