![]() |
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.
#define SPATIAL_ACCEL_GYRO_CALIB_TABLE_LENGTH 64 |
Definition at line 234 of file cphidgetspatial.h.
#define SPATIAL_AccelCalibTable_ID 1001 |
Definition at line 238 of file cphidgetspatial.h.
#define SPATIAL_AD7689_BITS_PER_VOLT (0x10000 / SPATIAL_VOLTAGE_REF) |
Definition at line 259 of file cphidgetspatial.h.
#define SPATIAL_ANALOG 0x01 |
Definition at line 179 of file cphidgetspatial.h.
#define SPATIAL_ANALOG_ACCEL_CALIB_TABLE_INDEX 1 |
Definition at line 228 of file cphidgetspatial.h.
#define SPATIAL_ANALOG_AND_DIGITAL 0x00 |
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.
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. |
Definition at line 178 of file cphidgetspatial.h.
#define SPATIAL_ANALOG_GYRO_CALIB_TABLE_INDEX 3 |
Definition at line 230 of file cphidgetspatial.h.
#define SPATIAL_COMPASS_CALIB_TABLE_INDEX 4 |
Definition at line 231 of file cphidgetspatial.h.
#define SPATIAL_COMPASS_CALIB_TABLE_LENGTH 56 |
Definition at line 235 of file cphidgetspatial.h.
#define SPATIAL_COMPASS_TEMP_CALIB_TABLE_INDEX 5 |
Definition at line 232 of file cphidgetspatial.h.
#define SPATIAL_DATA_BUFFER_SIZE ((SPATIAL_MIN_DATA_RATE * 2 + 200)/SPATIAL_MAX_DATA_RATE) |
Definition at line 212 of file cphidgetspatial.h.
#define SPATIAL_DIGITAL 0x02 |
Definition at line 180 of file cphidgetspatial.h.
#define SPATIAL_DIGITAL_ACCEL_CALIB_TABLE_INDEX 0 |
Definition at line 227 of file cphidgetspatial.h.
#define SPATIAL_DIGITAL_GYRO_CALIB_TABLE_INDEX 2 |
Definition at line 229 of file cphidgetspatial.h.
#define SPATIAL_GyroCalibTable_ID 1000 |
Definition at line 237 of file cphidgetspatial.h.
Definition at line 276 of file cphidgetspatial.h.
#define SPATIAL_HMC5883L_GAUSS_PER_BIT 0.00303 |
Definition at line 275 of file cphidgetspatial.h.
#define SPATIAL_KXR94_2050_VOLTS_PER_G 0.660 |
Definition at line 270 of file cphidgetspatial.h.
#define SPATIAL_KXR94_2050_w_AD7689_BITS_PER_G (SPATIAL_KXR94_2050_VOLTS_PER_G * SPATIAL_AD7689_BITS_PER_VOLT) |
Definition at line 271 of file cphidgetspatial.h.
#define SPATIAL_L3GD20_BITS_PER_DPS (1 / SPATIAL_L3GD20_DPS_PER_BIT) |
Definition at line 268 of file cphidgetspatial.h.
#define SPATIAL_L3GD20_DPS_PER_BIT 0.07 |
Definition at line 267 of file cphidgetspatial.h.
#define SPATIAL_LPR410AL_VOLTS_PER_DPS 0.0025 |
Definition at line 261 of file cphidgetspatial.h.
#define SPATIAL_LRP410AL_w_AD7689_BITS_PER_DPS (SPATIAL_LPR410AL_VOLTS_PER_DPS * SPATIAL_AD7689_BITS_PER_VOLT) |
Definition at line 262 of file cphidgetspatial.h.
#define SPATIAL_LY330ALH_VOLTS_PER_DPS 0.003752 |
Definition at line 264 of file cphidgetspatial.h.
#define SPATIAL_LY330ALH_w_AD7689_BITS_PER_DPS (SPATIAL_LY330ALH_VOLTS_PER_DPS * SPATIAL_AD7689_BITS_PER_VOLT) |
Definition at line 265 of file cphidgetspatial.h.
#define SPATIAL_MAX_ACCELAXES 3 |
Definition at line 203 of file cphidgetspatial.h.
#define SPATIAL_MAX_COMPASSAXES 3 |
Definition at line 205 of file cphidgetspatial.h.
#define SPATIAL_MAX_DATA_RATE 1 |
Definition at line 208 of file cphidgetspatial.h.
#define SPATIAL_MAX_GYROAXES 3 |
Definition at line 204 of file cphidgetspatial.h.
#define SPATIAL_MIN_DATA_RATE 1000 |
Definition at line 210 of file cphidgetspatial.h.
#define SPATIAL_MMA8451Q_BITS_PER_G 1024 |
Definition at line 273 of file cphidgetspatial.h.
#define SPATIAL_PACKET_CALIB 0x80 |
Definition at line 219 of file cphidgetspatial.h.
#define SPATIAL_PACKET_DATA 0x00 |
Definition at line 218 of file cphidgetspatial.h.
#define SPATIAL_READCALIB 0x01 |
Definition at line 221 of file cphidgetspatial.h.
#define SPATIAL_SET_POLLING_TYPE 0x02 |
Definition at line 222 of file cphidgetspatial.h.
#define SPATIAL_UNZERO_GYRO 0x04 |
Definition at line 224 of file cphidgetspatial.h.
#define SPATIAL_VOLTAGE_REF 3.3 |
M3 Spatial constants (1041, 1042, 1043, 1044) -Values are transmitted as signed integers with a unit of 'bits' -Values are calibrated in-firmware -Values are centered at zero
Precision Voltage Ref is 3.3 V AD7689 ADC is 16-bit
LPR410AL x,y Analog Gyro is 2.5 mV/dps and +-400 dps LY330ALH z-axis Analog Gyro is 3.752 mV/dps and +-300 dps L3GD20 Digital Gyro is 70 mdps/bit and +-2000 dps
KXR94-2050 Analog Accelerometer is 660 mV/g and +-2g MMA8451Q Digital Accelerometer is 1024 bits/g and +-8g
HMC5883L Digital Compass is 3.03 mG/bit and +-5.6 Gauss
Definition at line 258 of file cphidgetspatial.h.
#define SPATIAL_ZERO_GYRO 0x03 |
Definition at line 223 of file cphidgetspatial.h.
#define SPATIAL_ZERO_GYRO_TIME 2000 |
Definition at line 214 of file cphidgetspatial.h.
Timestamped position data returned by the CPhidgetSpatial_set_OnSpatialData_Handler event.
typedef struct _CPhidgetSpatial_SpatialEventData * CPhidgetSpatial_SpatialEventDataHandle |
PHIDGET_SPATIAL_ANALOG_AND_DIGITAL |
Analog failover to digital |
PHIDGET_SPATIAL_ANALOG |
Analog only |
PHIDGET_SPATIAL_DIGITAL |
Digital only |
Definition at line 182 of file cphidgetspatial.h.
PHIDGET21_API int CCONV CPhidgetSpatial_resetCompassCorrectionParameters | ( | CPhidgetSpatialHandle | phid | ) |
Get the data rate.
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. |
phid | An attached phidget spatial handle. |
milliseconds | The data rate in milliseconds. Gets the maximum supported data rate. |
phid | An attached phidget spatial handle. |
max | Data rate in ms. Gets the minimum supported data rate. |
phid | An attached phidget spatial handle. |
min | Data rate in ms. Sets the compass correction factors. This can be used to correcting any sensor errors, including hard and soft iron offsets and sensor error factors. |
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. |
phid | An attached phidget spatial handle. |
Definition at line 1414 of file cphidgetspatial.c.
PHIDGET21_API int CCONV CPhidgetSpatial_setAnalogAccelCalibrationValues | ( | CPhidgetSpatialHandle | phid, |
double | gainPositive[3], | ||
double | gainNegative[3], | ||
double | offset[3], | ||
double | factor1[3], | ||
double | factor2[3] | ||
) |
Definition at line 1638 of file cphidgetspatial.c.
PHIDGET21_API int CCONV CPhidgetSpatial_setAnalogGyroCalibrationValues | ( | CPhidgetSpatialHandle | phid, |
double | gainPositive[3], | ||
double | gainNegative[3], | ||
double | offset[3], | ||
double | factor1[3], | ||
double | factor2[3] | ||
) |
Definition at line 1624 of file cphidgetspatial.c.
PHIDGET21_API int CCONV CPhidgetSpatial_setDigitalAccelCalibrationValues | ( | CPhidgetSpatialHandle | phid, |
double | gainPositive[3], | ||
double | gainNegative[3], | ||
double | offset[3], | ||
double | factor1[3], | ||
double | factor2[3] | ||
) |
Definition at line 1631 of file cphidgetspatial.c.
PHIDGET21_API int CCONV CPhidgetSpatial_setDigitalGyroCalibrationValues | ( | CPhidgetSpatialHandle | phid, |
double | gainPositive[3], | ||
double | gainNegative[3], | ||
double | offset[3], | ||
double | factor1[3], | ||
double | factor2[3] | ||
) |
Definition at line 1617 of file cphidgetspatial.c.
Definition at line 1590 of file cphidgetspatial.c.
Gets the number of acceleration axes supplied by this board.
phid | An attached phidget spatial handle. |
count | The number of acceleration axes. Gets the number of gyroscope axes supplied by this board. |
phid | An attached phidget spatial handle. |
count | The number of gyro axes. Gets the number of compass axes supplied by this board. |
phid | An attached phidget spatial handle. |
count | The number of compass axes. Gets the current acceleration of an axis. |
phid | An attached phidget spatial handle. |
index | The acceleration index. |
acceleration | The acceleration in gs. Gets the maximum accleration supported by an axis. |
phid | An attached phidget spatial handle. |
index | The acceleration index |
max | The maximum acceleration Gets the minimum acceleration supported by an axis. |
phid | An attached phidget spatial handle. |
index | The acceleration index |
min | The minimum acceleration Gets the current angular rate of an axis. |
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. |
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. |
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. |
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. |
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. |
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. |
phid | An attached phidget spatial handle. |
Definition at line 1372 of file cphidgetspatial.c.