7 #include "PlusConfigure.h" 10 #include "MadgwickAhrsAlgo.h" 11 #include "MahonyAhrsAlgo.h" 14 #include "vtkMatrix4x4.h" 15 #include "vtkObjectFactory.h" 17 #include "vtkTransform.h" 18 #include "vtkXMLDataElement.h" 19 #include "vtksys/SystemTools.hxx" 29 class PhidgetSpatialCallbackClass
37 Phidget_getDeviceSerialNumber(spatial, &serialNo);
39 LOG_DEBUG(
"Phidget spatial sensor attached to device " << tracker->
GetDeviceId() <<
". Serial number: " << serialNo);
46 Phidget_getDeviceSerialNumber(spatial, &serialNo);
47 LOG_DEBUG(
"Phidget spatial sensor detached: " << serialNo);
53 LOG_ERROR(
"Phidget spatial sensor error: " << ErrorCode <<
" (" << unknown <<
")");
67 if (!tracker->TrackerTimeToSystemTimeComputed)
69 const double timeSystemSec = vtkIGSIOAccurateTimer::GetSystemTime();
70 tracker->TrackerTimeToSystemTimeSec = timeSystemSec - timeTrackerMsec/1000.0;
71 tracker->TrackerTimeToSystemTimeComputed =
true;
74 const double timeSystemSec = timeTrackerMsec/1000.0 + tracker->TrackerTimeToSystemTimeSec;
75 if (tracker->AccelerometerTool != NULL)
77 tracker->LastAccelerometerToTrackerTransform->Identity();
78 tracker->LastAccelerometerToTrackerTransform->SetElement(0, 3,
acceleration[0]);
79 tracker->LastAccelerometerToTrackerTransform->SetElement(1, 3,
acceleration[1]);
80 tracker->LastAccelerometerToTrackerTransform->SetElement(2, 3,
acceleration[2]);
83 if (tracker->GyroscopeTool != NULL)
85 tracker->LastGyroscopeToTrackerTransform->Identity();
86 tracker->LastGyroscopeToTrackerTransform->SetElement(0, 3,
angularRate[0]);
87 tracker->LastGyroscopeToTrackerTransform->SetElement(1, 3,
angularRate[1]);
88 tracker->LastGyroscopeToTrackerTransform->SetElement(2, 3,
angularRate[2]);
91 if (tracker->MagnetometerTool != NULL)
101 tracker->LastMagnetometerToTrackerTransform->Identity();
102 tracker->LastMagnetometerToTrackerTransform->SetElement(0, 3,
magneticField[0]);
103 tracker->LastMagnetometerToTrackerTransform->SetElement(1, 3,
magneticField[1]);
104 tracker->LastMagnetometerToTrackerTransform->SetElement(2, 3,
magneticField[2]);
109 if (tracker->TiltSensorTool != NULL)
112 vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
115 vtkMath::Normalize(downVector_Sensor);
117 igsioMath::ConstrainRotationToTwoAxes(downVector_Sensor, tracker->TiltSensorWestAxisIndex, tracker->LastTiltSensorToTrackerTransform);
122 if (tracker->OrientationSensorTool != NULL)
127 tracker->
ToolTimeStampedUpdateWithoutFiltering(tracker->OrientationSensorTool->GetId(), tracker->LastOrientationSensorToTrackerTransform, TOOL_INVALID, timeSystemSec, timeSystemSec);
137 if (tracker->AhrsUseMagnetometer)
139 tracker->AhrsAlgo->UpdateWithTimestamp(
146 tracker->AhrsAlgo->UpdateIMUWithTimestamp(
152 double rotQuat[4] = { 0 };
153 tracker->AhrsAlgo->GetOrientation(rotQuat[0], rotQuat[1], rotQuat[2], rotQuat[3]);
155 double rotMatrix[3][3] = { 0 };
156 vtkMath::QuaternionToMatrix3x3(rotQuat, rotMatrix);
158 for (
int c = 0; c < 3; c++)
160 for (
int r = 0; r < 3; r++)
162 tracker->LastOrientationSensorToTrackerTransform->SetElement(r, c, rotMatrix[r][c]);
169 if (tracker->FilteredTiltSensorTool != NULL)
171 tracker->FilteredTiltSensorAhrsAlgo->UpdateIMUWithTimestamp(
175 double rotQuat[4] = { 0 };
176 tracker->AhrsAlgo->GetOrientation(rotQuat[0], rotQuat[1], rotQuat[2], rotQuat[3]);
178 double rotMatrix[3][3] = { 0 };
179 vtkMath::QuaternionToMatrix3x3(rotQuat, rotMatrix);
181 double filteredDownVector_Sensor[4] = { rotMatrix[2][0], rotMatrix[2][1], rotMatrix[2][2], 0 };
182 vtkMath::Normalize(filteredDownVector_Sensor);
184 igsioMath::ConstrainRotationToTwoAxes(filteredDownVector_Sensor, tracker->FilteredTiltSensorWestAxisIndex, tracker->LastFilteredTiltSensorToTrackerTransform);
189 for (
int c = 0; c < 3; c++)
191 for (
int r = 0; r < 3; r++)
193 rotMatrix[r][c] = tracker->LastFilteredTiltSensorToTrackerTransform->GetElement(r, c);
196 double filteredTiltSensorRotQuat[4] = { 0 };
197 vtkMath::Matrix3x3ToQuaternion(rotMatrix, filteredTiltSensorRotQuat);
198 tracker->FilteredTiltSensorAhrsAlgo->SetOrientation(filteredTiltSensorRotQuat[0], filteredTiltSensorRotQuat[1], filteredTiltSensorRotQuat[2], filteredTiltSensorRotQuat[3]);
208 this->SpatialDeviceHandle = NULL;
210 this->TrackerTimeToSystemTimeSec = 0;
211 this->TrackerTimeToSystemTimeComputed =
false;
212 this->ZeroGyroscopeOnConnect =
false;
214 this->AccelerometerTool = NULL;
215 this->GyroscopeTool = NULL;
216 this->MagnetometerTool = NULL;
217 this->TiltSensorTool = NULL;
218 this->FilteredTiltSensorTool = NULL;
219 this->OrientationSensorTool = NULL;
221 this->LastAccelerometerToTrackerTransform = vtkMatrix4x4::New();
222 this->LastGyroscopeToTrackerTransform = vtkMatrix4x4::New();
223 this->LastMagnetometerToTrackerTransform = vtkMatrix4x4::New();
224 this->LastTiltSensorToTrackerTransform = vtkMatrix4x4::New();
225 this->LastFilteredTiltSensorToTrackerTransform = vtkMatrix4x4::New();
226 this->LastOrientationSensorToTrackerTransform = vtkMatrix4x4::New();
227 this->FilteredTiltSensorWestAxisIndex = 1;
228 this->TiltSensorWestAxisIndex = 1;
231 this->AhrsAlgo =
new MadgwickAhrsAlgo;
232 this->AhrsUseMagnetometer =
true;
233 this->AhrsAlgorithmGain[0] = 1.5;
234 this->AhrsAlgorithmGain[1] = 0.0;
235 this->AhrsLastUpdateTime = -1;
238 this->FilteredTiltSensorAhrsAlgo =
new MadgwickAhrsAlgo;
239 this->FilteredTiltSensorAhrsAlgorithmGain[0] = 1.5;
240 this->FilteredTiltSensorAhrsAlgorithmGain[1] = 0.0;
241 this->FilteredTiltSensorAhrsLastUpdateTime = -1;
249 this->CompassCorrectionParameters[
i] = 0;
262 this->LastAccelerometerToTrackerTransform->Delete();
263 this->LastAccelerometerToTrackerTransform = NULL;
264 this->LastGyroscopeToTrackerTransform->Delete();
265 this->LastGyroscopeToTrackerTransform = NULL;
266 this->LastMagnetometerToTrackerTransform->Delete();
267 this->LastMagnetometerToTrackerTransform = NULL;
268 this->LastTiltSensorToTrackerTransform->Delete();
269 this->LastTiltSensorToTrackerTransform = NULL;
270 this->LastFilteredTiltSensorToTrackerTransform->Delete();
271 this->LastFilteredTiltSensorToTrackerTransform = NULL;
272 this->LastOrientationSensorToTrackerTransform->Delete();
273 this->LastOrientationSensorToTrackerTransform = NULL;
281 if (this->SpatialDeviceHandle != NULL)
283 const char* deviceType = NULL;
284 Phidget_getDeviceClassName((
PhidgetHandle)this->SpatialDeviceHandle, &deviceType);
285 os <<
"Device type: " << deviceType << std::endl;
287 Phidget_getDeviceSerialNumber((
PhidgetHandle)this->SpatialDeviceHandle, &serialNo);
288 os <<
"Serial Number: " << serialNo << std::endl;
290 Phidget_getDeviceVersion((
PhidgetHandle)this->SpatialDeviceHandle, &version);
291 os <<
"Version: " << version << std::endl;
292 int numAccelAxes = 0;
294 os <<
"Number of Accel Axes: " << numAccelAxes << std::endl;
297 os <<
"Number of Gyro Axes: " << numGyroAxes << std::endl;
298 int numCompassAxes = 0;
300 os <<
"Number of Compass Axes: " << numCompassAxes << std::endl;
301 uint32_t dataRateMax = 0;
302 PhidgetSpatial_getMaxDataInterval((
PhidgetSpatialHandle)this->SpatialDeviceHandle, &dataRateMax);
303 os <<
"Maximum data rate: " << dataRateMax << std::endl;
304 uint32_t dataRateMin = 0;
305 PhidgetSpatial_getMinDataInterval((
PhidgetSpatialHandle)this->SpatialDeviceHandle, &dataRateMin);
306 os <<
"Minimum data rate: " << dataRateMin << std::endl;
307 uint32_t dataRate = 0;
309 os <<
"Current data rate: " << dataRate << std::endl;
313 os <<
"Spatial device is not available" << std::endl;
321 LOG_TRACE(
"vtkPlusPhidgetSpatialTracker::Connect");
323 this->AccelerometerTool = NULL;
326 this->GyroscopeTool = NULL;
329 this->MagnetometerTool = NULL;
332 this->TiltSensorTool = NULL;
335 this->FilteredTiltSensorTool = NULL;
338 this->OrientationSensorTool = NULL;
353 LOG_ERROR(
"Device " << this->
GetDeviceId() <<
" failed to create Spatial channel");
358 Phidget_setOnAttachHandler((
PhidgetHandle)this->SpatialDeviceHandle, PhidgetSpatialCallbackClass::AttachHandler,
this);
359 Phidget_setOnDetachHandler((
PhidgetHandle)this->SpatialDeviceHandle, PhidgetSpatialCallbackClass::DetachHandler,
this);
360 Phidget_setOnErrorHandler((
PhidgetHandle)this->SpatialDeviceHandle, PhidgetSpatialCallbackClass::ErrorHandler,
this);
364 Phidget_setDeviceSerialNumber((
PhidgetHandle)this->SpatialDeviceHandle, this->SerialNumber);
368 PhidgetSpatial_setOnSpatialDataHandler((
PhidgetSpatialHandle)this->SpatialDeviceHandle, PhidgetSpatialCallbackClass::SpatialDataHandler,
this);
371 this->TrackerTimeToSystemTimeSec = 0;
372 this->TrackerTimeToSystemTimeComputed =
false;
375 LOG_DEBUG(
"Waiting for phidget spatial device to be attached...");
378 const char* err = NULL;
379 Phidget_getErrorDescription(res, &err);
382 LOG_ERROR(
"Device " << this->
GetDeviceId() <<
" cannot connect to PhidgetSpatial hardware device (serial number: any). Problem waiting for attachment (" << err <<
")");
386 LOG_ERROR(
"Device " << this->
GetDeviceId() <<
" cannot connect to PhidgetSpatial hardware device (serial number: " << this->SerialNumber <<
"). Problem waiting for attachment (" << err <<
")");
394 int32_t serialNo = 0;
395 Phidget_getDeviceSerialNumber((
PhidgetHandle)this->SpatialDeviceHandle, &serialNo);
396 LOG_INFO(
"Phidget spatial sensor attached to device " << this->
GetDeviceId() <<
". Serial number: " << serialNo);
402 if (requestedUserDataRateMsec < 12) { requestedUserDataRateMsec = 8; }
403 else if (requestedUserDataRateMsec < 24) { requestedUserDataRateMsec = 16; }
404 else if (requestedUserDataRateMsec < 48) { requestedUserDataRateMsec = 32; }
405 else if (requestedUserDataRateMsec < 96) { requestedUserDataRateMsec = 64; }
406 else if (requestedUserDataRateMsec < 192) { requestedUserDataRateMsec = 128; }
407 else if (requestedUserDataRateMsec < 384) { requestedUserDataRateMsec = 256; }
408 else if (requestedUserDataRateMsec < 756) { requestedUserDataRateMsec = 512; }
409 else { requestedUserDataRateMsec = 1000; }
410 PhidgetSpatial_setDataInterval((
PhidgetSpatialHandle)this->SpatialDeviceHandle, requestedUserDataRateMsec);
412 uint32_t userDataRateMsec = 0;
413 PhidgetSpatial_getDataInterval((
PhidgetSpatialHandle)this->SpatialDeviceHandle, &userDataRateMsec);
415 LOG_DEBUG(
"DataRate (msec):" << userDataRateMsec <<
" (requested: " << requestedUserDataRateMsec <<
")");
418 this->AhrsAlgo->SetSampleFreqHz(1000.0 / userDataRateMsec);
419 this->AhrsAlgo->SetGain(this->AhrsAlgorithmGain[0], this->AhrsAlgorithmGain[1]);
420 this->FilteredTiltSensorAhrsAlgo->SetSampleFreqHz(1000.0 / userDataRateMsec);
421 this->FilteredTiltSensorAhrsAlgo->SetGain(this->FilteredTiltSensorAhrsAlgorithmGain[0], this->FilteredTiltSensorAhrsAlgorithmGain[1]);
428 double magField = this->CompassCorrectionParameters[0];
429 double offset0 = this->CompassCorrectionParameters[1];
430 double offset1 = this->CompassCorrectionParameters[2];
431 double offset2 = this->CompassCorrectionParameters[3];
432 double gain0 = this->CompassCorrectionParameters[4];
433 double gain1 = this->CompassCorrectionParameters[5];
434 double gain2 = this->CompassCorrectionParameters[6];
435 double T0 = this->CompassCorrectionParameters[7];
436 double T1 = this->CompassCorrectionParameters[8];
437 double T2 = this->CompassCorrectionParameters[9];
438 double T3 = this->CompassCorrectionParameters[10];
439 double T4 = this->CompassCorrectionParameters[11];
440 double T5 = this->CompassCorrectionParameters[12];
442 magField,
offset0,
offset1,
offset2,
gain0,
gain1,
gain2,
T0,
T1,
T2,
T3,
T4,
T5);
446 LOG_ERROR(
"Failed to set compass correction parameters: 13 parameters were expected");
451 LOG_DEBUG(
"No compass correction parameters are specified");
454 if (this->ZeroGyroscopeOnConnect)
465 LOG_TRACE(
"vtkPlusPhidgetSpatialTracker::Disconnect");
469 this->SpatialDeviceHandle = NULL;
470 this->AccelerometerTool = NULL;
471 this->GyroscopeTool = NULL;
472 this->MagnetometerTool = NULL;
473 this->TiltSensorTool = NULL;
474 this->FilteredTiltSensorTool = NULL;
475 this->OrientationSensorTool = NULL;
482 LOG_TRACE(
"vtkPlusPhidgetSpatialTracker::Probe");
490 LOG_TRACE(
"vtkPlusPhidgetSpatialTracker::InternalStartRecording");
497 LOG_TRACE(
"vtkPlusPhidgetSpatialTracker::InternalStopRecording");
506 XML_READ_BOOL_ATTRIBUTE_OPTIONAL(ZeroGyroscopeOnConnect, deviceConfig);
508 XML_READ_SCALAR_ATTRIBUTE_OPTIONAL(
int, SerialNumber, deviceConfig);
510 int tiltSensorWestAxisIndex = 0;
511 if (deviceConfig->GetScalarAttribute(
"TiltSensorWestAxisIndex", tiltSensorWestAxisIndex))
513 if (tiltSensorWestAxisIndex < 0 || tiltSensorWestAxisIndex > 2)
515 LOG_ERROR(
"TiltSensorWestAxisIndex is invalid. Specified value: " << tiltSensorWestAxisIndex <<
". Valid values: 0, 1, 2. Keep using the default value: " 516 << this->TiltSensorWestAxisIndex);
520 this->TiltSensorWestAxisIndex = tiltSensorWestAxisIndex;
524 int FilteredTiltSensorWestAxisIndex = 0;
525 if (deviceConfig->GetScalarAttribute(
"FilteredTiltSensorWestAxisIndex", FilteredTiltSensorWestAxisIndex))
527 if (FilteredTiltSensorWestAxisIndex < 0 || FilteredTiltSensorWestAxisIndex > 2)
529 LOG_ERROR(
"FilteredTiltSensorWestAxisIndex is invalid. Specified value: " << FilteredTiltSensorWestAxisIndex <<
". Valid values: 0, 1, 2. Keep using the default value: " 530 << this->FilteredTiltSensorWestAxisIndex);
534 this->FilteredTiltSensorWestAxisIndex = FilteredTiltSensorWestAxisIndex;
538 XML_READ_VECTOR_ATTRIBUTE_OPTIONAL(
double, 2, AhrsAlgorithmGain, deviceConfig);
539 XML_READ_VECTOR_ATTRIBUTE_OPTIONAL(
double, 2, FilteredTiltSensorAhrsAlgorithmGain, deviceConfig);
541 const char* ahrsAlgoName = deviceConfig->GetAttribute(
"AhrsAlgorithm");
542 if (ahrsAlgoName != NULL)
544 if (STRCASECMP(
"MADGWICK_MARG", ahrsAlgoName) == 0 || STRCASECMP(
"MADGWICK_IMU", ahrsAlgoName) == 0)
546 if (dynamic_cast<MadgwickAhrsAlgo*>(this->AhrsAlgo) == 0)
550 delete this->AhrsAlgo;
551 this->AhrsAlgo =
new MadgwickAhrsAlgo;
553 if (STRCASECMP(
"MADGWICK_MARG", ahrsAlgoName) == 0)
555 this->AhrsUseMagnetometer =
true;
559 this->AhrsUseMagnetometer =
false;
562 else if (STRCASECMP(
"MAHONY_MARG", ahrsAlgoName) == 0 || STRCASECMP(
"MAHONY_IMU", ahrsAlgoName) == 0)
564 if (dynamic_cast<MahonyAhrsAlgo*>(this->AhrsAlgo) == 0)
568 delete this->AhrsAlgo;
569 this->AhrsAlgo =
new MahonyAhrsAlgo;
571 if (STRCASECMP(
"MAHONY_MARG", ahrsAlgoName) == 0)
573 this->AhrsUseMagnetometer =
true;
577 this->AhrsUseMagnetometer =
false;
582 LOG_ERROR(
"Unable to recognize AHRS algorithm type: " << ahrsAlgoName <<
". Supported types: MADGWICK_MARG, MAHONY_MARG, MADGWICK_IMU, MAHONY_IMU");
586 const char* FilteredTiltSensorAhrsAlgoName = deviceConfig->GetAttribute(
"FilteredTiltSensorAhrsAlgorithm");
587 if (FilteredTiltSensorAhrsAlgoName != NULL)
589 if (STRCASECMP(
"MADGWICK_IMU", FilteredTiltSensorAhrsAlgoName) == 0)
591 if (dynamic_cast<MadgwickAhrsAlgo*>(this->FilteredTiltSensorAhrsAlgo) == 0)
595 delete this->FilteredTiltSensorAhrsAlgo;
596 this->FilteredTiltSensorAhrsAlgo =
new MadgwickAhrsAlgo;
599 else if (STRCASECMP(
"MAHONY_IMU", FilteredTiltSensorAhrsAlgoName) == 0)
601 if (dynamic_cast<MahonyAhrsAlgo*>(this->FilteredTiltSensorAhrsAlgo) == 0)
605 delete this->FilteredTiltSensorAhrsAlgo;
606 this->FilteredTiltSensorAhrsAlgo =
new MahonyAhrsAlgo;
611 LOG_ERROR(
"Unable to recognize AHRS algorithm type for Filtered Tilt: " << FilteredTiltSensorAhrsAlgoName <<
". Supported types: MADGWICK_IMU, MAHONY_IMU");
626 if (this->ZeroGyroscopeOnConnect)
628 deviceConfig->SetAttribute(
"ZeroGyroscopeOnConnect",
"TRUE");
633 deviceConfig->SetIntAttribute(
"SerialNumber", this->SerialNumber);
636 if (this->TiltSensorTool)
638 deviceConfig->SetIntAttribute(
"TiltSensorWestAxisIndex", this->TiltSensorWestAxisIndex);
641 if (this->FilteredTiltSensorTool)
643 deviceConfig->SetIntAttribute(
"FilteredTiltSensorWestAxisIndex", this->FilteredTiltSensorWestAxisIndex);
644 if (this->FilteredTiltSensorAhrsAlgorithmGain[1] == 0.0)
647 deviceConfig->SetDoubleAttribute(
"FilteredTiltSensorAhrsAlgorithmGain", this->FilteredTiltSensorAhrsAlgorithmGain[0]);
651 deviceConfig->SetVectorAttribute(
"FilteredTiltSensorAhrsAlgorithmGain", 2, this->FilteredTiltSensorAhrsAlgorithmGain);
654 if (dynamic_cast<MadgwickAhrsAlgo*>(this->FilteredTiltSensorAhrsAlgo) != 0)
656 deviceConfig->SetAttribute(
"FilteredTiltSensorAhrsAlgorithm",
"MADGWICK_IMU");
658 else if (dynamic_cast<MahonyAhrsAlgo*>(this->FilteredTiltSensorAhrsAlgo) != 0)
660 deviceConfig->SetAttribute(
"FilteredTiltSensorAhrsAlgorithm",
"MAHONY_IMU");
664 LOG_ERROR(
"Unknown AHRS algorithm type for Filtered Tilt Sensor. Cannot write name to XML.");
668 if (this->OrientationSensorTool)
670 if (this->AhrsAlgorithmGain[1] == 0.0)
673 deviceConfig->SetDoubleAttribute(
"AhrsAlgorithmGain", this->AhrsAlgorithmGain[0]);
677 deviceConfig->SetVectorAttribute(
"AhrsAlgorithmGain", 2, this->AhrsAlgorithmGain);
680 if (dynamic_cast<MadgwickAhrsAlgo*>(this->AhrsAlgo) != 0)
682 if (this->AhrsUseMagnetometer)
684 deviceConfig->SetAttribute(
"AhrsAlgorithm",
"MADGWICK_MARG");
688 deviceConfig->SetAttribute(
"AhrsAlgorithm",
"MADGWICK_IMU");
691 else if (dynamic_cast<MahonyAhrsAlgo*>(this->AhrsAlgo) != 0)
693 if (this->AhrsUseMagnetometer)
695 deviceConfig->SetAttribute(
"AhrsAlgorithm",
"MAHONY_MARG");
699 deviceConfig->SetAttribute(
"AhrsAlgorithm",
"MAHONY_IMU");
704 LOG_ERROR(
"Unknown AHRS algorithm type. Cannot write name to XML.");
714 deviceConfig->RemoveAttribute(
"CompassCorrectionParameters");
723 LOG_INFO(
"Zeroing the gyroscope. Keep the sensor stationary for 2 seconds.");
761 if (this->CompassCorrectionParameters[
i] != 0)
vtkStandardNewMacro(vtkPlusPhidgetSpatialTracker)
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
struct _PhidgetMagnetometer * PhidgetMagnetometerHandle
double double double double double double double double double double double double T4
#define XML_FIND_DEVICE_ELEMENT_REQUIRED_FOR_WRITING(deviceConfig, rootConfigElement)
virtual PlusStatus ToolTimeStampedUpdateWithoutFiltering(const std::string &aToolSourceId, vtkMatrix4x4 *matrix, ToolStatus status, double unfilteredtimestamp, double filteredtimestamp, const igsioFieldMapType *customFields=NULL)
vtkPlusPhidgetSpatialTracker()
struct _PhidgetAccelerometer * PhidgetAccelerometerHandle
~vtkPlusPhidgetSpatialTracker()
virtual std::string GetDeviceId() const
struct _PhidgetGyroscope * PhidgetGyroscopeHandle
bool RequirePortNameInDeviceSetConfiguration
void PrintSelf(ostream &os, vtkIndent indent)
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *config)
double double double double double double double gain2
#define PHIDGET_NUMBER_OF_COMPASS_CORRECTION_PARAMETERS
virtual bool IsResettable()
bool IsCompassCorrectionParametersDefined()
PlusStatus InternalStopRecording()
virtual double GetAcquisitionRate() const
struct _Phidget * PhidgetHandle
double double double double double double double double double double double double double T5
double double double double double double gain1
double double double double double double double double double double T2
virtual PlusStatus InternalDisconnect()
double double double double double double double double double double double T3
PlusStatus GetToolByPortName(const char *aPortName, vtkPlusDataSource *&aSource)
PlusStatus InternalStartRecording()
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *config)
double double double double offset2
double double double double double double double double T0
virtual PlusStatus Reset()
double double double double double double double double double T1
virtual PlusStatus StopRecording()
double double double double double gain0
#define XML_FIND_DEVICE_ELEMENT_REQUIRED_FOR_READING(deviceConfig, rootConfigElement)
Interface for the Phidget 3/3/3 tracker.
virtual bool IsRecording() const
struct _PhidgetSpatial * PhidgetSpatialHandle
static const int SERIAL_NUMBER_UNDEFINED
double double double offset1
PlusStatus InternalConnect()