|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.phidgets.Phidget
com.phidgets.SpatialPhidget
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.
Field Summary |
Constructor Summary | |
SpatialPhidget()
|
Method Summary | |
void |
addSpatialDataListener(SpatialDataListener l)
Adds a spatial data listener. |
double |
getAcceleration(int index)
Returns the acceleration of a particular axis. |
int |
getAccelerationAxisCount()
Returns the number of accelerometer axes. |
double |
getAccelerationMax(int index)
Returns the maximum acceleration value that this axis will report. |
double |
getAccelerationMin(int index)
Returns the minimum acceleration value that this axis will report. |
double |
getAngularRate(int index)
Returns the angularRate of a particular axis. |
double |
getAngularRateMax(int index)
Returns the maximum angularRate value that this axis will report. |
double |
getAngularRateMin(int index)
Returns the minimum angularRate value that this axis will report. |
int |
getCompassAxisCount()
Returns the number of compass axes. |
int |
getDataRate()
Returns the data rate, in milliseconds. |
int |
getDataRateMax()
Returns the maximum data rate, in milliseconds. |
int |
getDataRateMin()
Returns the minimum data rate, in milliseconds. |
int |
getGyroAxisCount()
Returns the number of gyro axes. |
double |
getMagneticField(int index)
Returns the magneticField of a particular axis. |
double |
getMagneticFieldMax(int index)
Returns the maximum magneticField value that this axis will report. |
double |
getMagneticFieldMin(int index)
Returns the minimum magneticField value that this axis will report. |
void |
removeSpatialDataListener(SpatialDataListener l)
|
void |
resetCompassCorrectionParameters()
Resets the compass correction factors. |
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)
Sets the compass correction factors. |
void |
setDataRate(int rate)
Sets the data rate, in milliseconds. |
void |
zeroGyro()
Zeroes the gyroscope. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SpatialPhidget() throws PhidgetException
Method Detail |
public int getAccelerationAxisCount() throws PhidgetException
PhidgetException
public double getAcceleration(int index) throws PhidgetException
index
- index of the axis
PhidgetException
- If 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.public double getAccelerationMax(int index) throws PhidgetException
PhidgetException
public double getAccelerationMin(int index) throws PhidgetException
PhidgetException
public int getGyroAxisCount() throws PhidgetException
PhidgetException
public double getAngularRate(int index) throws PhidgetException
index
- index of the axis
PhidgetException
- If 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.public double getAngularRateMax(int index) throws PhidgetException
PhidgetException
public double getAngularRateMin(int index) throws PhidgetException
PhidgetException
public int getCompassAxisCount() throws PhidgetException
PhidgetException
public double getMagneticField(int index) throws PhidgetException
index
- index of the axis
PhidgetException
- If 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.public double getMagneticFieldMax(int index) throws PhidgetException
PhidgetException
public double getMagneticFieldMin(int index) throws PhidgetException
PhidgetException
public int getDataRate() throws PhidgetException
PhidgetException
- If 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.public void setDataRate(int rate) throws PhidgetException
rate
- data rate
PhidgetException
- If 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.public int getDataRateMin() throws PhidgetException
PhidgetException
- If 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.public int getDataRateMax() throws PhidgetException
PhidgetException
- If 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.public void zeroGyro() throws PhidgetException
PhidgetException
- If 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.public 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
magField
- Local magnetic field strength.offset0
- Axis 0 offset correction.offset1
- Axis 1 offset correction.offset2
- Axis 2 offset correction.gain0
- Axis 0 gain correction.gain1
- Axis 1 gain correction.gain2
- Axis 2 gain correction.T0
- Non-orthogonality correction factor 0.T1
- Non-orthogonality correction factor 1.T2
- Non-orthogonality correction factor 2.T3
- Non-orthogonality correction factor 3.T4
- Non-orthogonality correction factor 4.T5
- Non-orthogonality correction factor 5.
PhidgetException
- If 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.public void resetCompassCorrectionParameters() throws PhidgetException
PhidgetException
- If 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.public final void addSpatialDataListener(SpatialDataListener l)
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.
l
- An implemetation of the SpatialDataListener
interfacepublic final void removeSpatialDataListener(SpatialDataListener l)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |