37 CPhidgetSpatial_SpatialEventDataHandle *data,
40 for (
int i = 0; i < count; ++i)
42 double ts = data[i]->timestamp.seconds +
43 (data[i]->timestamp.microseconds / 1000.0 / 1000.0);
45 ->dataHandler(data[i]->acceleration, data[i]->angularRate,
46 data[i]->magneticField, ts);
52 const double magneticField[3],
double timestamp)
62 double cc_offset1,
double cc_offset2,
63 double cc_gain0,
double cc_gain1,
64 double cc_gain2,
double cc_T0,
65 double cc_T1,
double cc_T2,
66 double cc_T3,
double cc_T4,
69 return CPhidgetSpatial_setCompassCorrectionParameters(
70 imu_handle_, cc_mag_field, cc_offset0, cc_offset1, cc_offset2, cc_gain0,
71 cc_gain1, cc_gain2, cc_T0, cc_T1, cc_T2, cc_T3, cc_T4, cc_T5);
void setDataRate(int rate)
virtual void dataHandler(const double acceleration[3], const double angularRate[3], const double magneticField[3], double timestamp)
int setCompassCorrectionParameters(double cc_mag_field, double cc_offset0, double cc_offset1, double cc_offset2, double cc_gain0, double cc_gain1, double cc_gain2, double cc_T0, double cc_T1, double cc_T2, double cc_T3, double cc_T4, double cc_T5)
static int SpatialDataHandler(CPhidgetSpatialHandle spatial, void *userptr, CPhidgetSpatial_SpatialEventDataHandle *data, int count)
CPhidgetSpatialHandle imu_handle_
void init(CPhidgetHandle handle)