|
Data Structures |
struct | _CPhidgetSpatial_SpatialEventData |
Typedefs |
typedef struct _CPhidgetSpatial * | CPhidgetSpatialHandle |
typedef struct
_CPhidgetSpatial_SpatialEventData | CPhidgetSpatial_SpatialEventData |
typedef struct
_CPhidgetSpatial_SpatialEventData * | CPhidgetSpatial_SpatialEventDataHandle |
Functions |
int | CPhidgetSpatial_create (CPhidgetSpatialHandle *phid) |
int | CPhidgetSpatial_getAccelerationAxisCount (CPhidgetSpatialHandle phid, int *count) |
int | CPhidgetSpatial_getGyroAxisCount (CPhidgetSpatialHandle phid, int *count) |
int | CPhidgetSpatial_getCompassAxisCount (CPhidgetSpatialHandle phid, int *count) |
int | CPhidgetSpatial_getAcceleration (CPhidgetSpatialHandle phid, int index, double *acceleration) |
int | CPhidgetSpatial_getAccelerationMax (CPhidgetSpatialHandle phid, int index, double *max) |
int | CPhidgetSpatial_getAccelerationMin (CPhidgetSpatialHandle phid, int index, double *min) |
int | CPhidgetSpatial_getAngularRate (CPhidgetSpatialHandle phid, int index, double *angularRate) |
int | CPhidgetSpatial_getAngularRateMax (CPhidgetSpatialHandle phid, int index, double *max) |
int | CPhidgetSpatial_getAngularRateMin (CPhidgetSpatialHandle phid, int index, double *min) |
int | CPhidgetSpatial_getMagneticField (CPhidgetSpatialHandle phid, int index, double *magneticField) |
int | CPhidgetSpatial_getMagneticFieldMax (CPhidgetSpatialHandle phid, int index, double *max) |
int | CPhidgetSpatial_getMagneticFieldMin (CPhidgetSpatialHandle phid, int index, double *min) |
int | CPhidgetSpatial_zeroGyro (CPhidgetSpatialHandle phid) |
int | CPhidgetSpatial_getDataRate (CPhidgetSpatialHandle phid, int *milliseconds) |
int | CPhidgetSpatial_setDataRate (CPhidgetSpatialHandle phid, int milliseconds) |
int | CPhidgetSpatial_getDataRateMax (CPhidgetSpatialHandle phid, int *max) |
int | CPhidgetSpatial_getDataRateMin (CPhidgetSpatialHandle phid, int *min) |
int | CPhidgetSpatial_setCompassCorrectionParameters (CPhidgetSpatialHandle phid, 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) |
int | CPhidgetSpatial_resetCompassCorrectionParameters (CPhidgetSpatialHandle phid) |
int | CPhidgetSpatial_set_OnSpatialData_Handler (CPhidgetSpatialHandle phid, int(*fptr)(CPhidgetSpatialHandle phid, void *userPtr, CPhidgetSpatial_SpatialEventDataHandle *data, int dataCount), void *userPtr) |
Detailed Description
These calls are specific to the Phidget Spatial object. See your device's User Guide for more specific API details, technical information, and revision details. The User Guide, along with other resources, can be found on the product page for your device.
Typedef Documentation
Function Documentation
Creates a Phidget Spatial handle.
- Parameters:
-
| phid | A pointer to an unallocated Phidget Spatial handle. |
Gets the number of acceleration axes supplied by this board.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| count | The number of acceleration axes. |
Gets the number of gyroscope axes supplied by this board.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| count | The number of gyro axes. |
Gets the number of compass axes supplied by this board.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| count | The number of compass axes. |
Gets the current acceleration of an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The acceleration index. |
| acceleration | The acceleration in gs. |
Gets the maximum accleration supported by an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The acceleration index |
| max | The maximum acceleration |
Gets the minimum acceleration supported by an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The acceleration index |
| min | The minimum acceleration |
Gets the current angular rate of an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The angular rate index. |
| angularRate | The angular rate in degrees/second. |
Gets the maximum angular rate supported by an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The angular rate index |
| max | The maximum angular rate |
Gets the minimum angular rate supported by an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The angular rate index |
| min | The minimum angular rate |
Gets the current magnetic field stregth of an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The magnetic field index. |
| magneticField | The magnetic field strength in Gauss. |
Gets the maximum magnetic field stregth supported by an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The magnetic field index |
| max | The maximum magnetic field stregth |
Gets the minimum magnetic field stregth supported by an axis.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| index | The magnetic field index |
| min | The minimum magnetic field stregth |
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.
- Parameters:
-
| phid | An attached phidget spatial handle. |
Get the data rate.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| milliseconds | The data rate in milliseconds. |
Sets the data rate. Note that data at rates faster then 8ms will be delivered to events as an array of data.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| milliseconds | The data rate in milliseconds. |
Gets the maximum supported data rate.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| max | Data rate in ms. |
Gets the minimum supported data rate.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| min | Data rate in ms. |
int CPhidgetSpatial_setCompassCorrectionParameters |
( |
CPhidgetSpatialHandle |
phid, |
|
|
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. This can be used to correcting any sensor errors, including hard and soft iron offsets and sensor error factors.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| 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. |
Resets the compass correction factors. Magnetic field data will be presented directly as reported by the sensor.
- Parameters:
-
| phid | An attached phidget spatial handle. |
Set a Data event handler. This is called at /ref CPhidgetSpatial_getDataRate, up to 8ms, for faster then 8ms data, multiple sets of data are supplied in a single event.
- Parameters:
-
| phid | An attached phidget spatial handle. |
| fptr | Callback function pointer. |
| userPtr | A pointer for use by the user - this value is passed back into the callback function. |