7 #include "PlusConfigure.h" 13 #include <vtkMatrix4x4.h> 15 #include <vtkObjectFactory.h> 16 #include <vtkTransform.h> 26 const char WIT_IMU_DATA_FRAME = 0x55;
27 const char WIT_ACCELERATION_FRAME = 0x51;
28 const char WIT_VELOCITY_FRAME = 0x52;
29 const char WIT_ORIENTATION_FRAME = 0x53;
34 : Accelerometer(nullptr)
49 LOG_ERROR(
"Unable to locate tool with PortName=\"OrientationSensor\". This is required.");
60 StreamBufferType::size_type usRxLength;
66 if (this->
StreamData.data()[0] == WIT_IMU_DATA_FRAME && this->
StreamData.data()[1] == WIT_ORIENTATION_FRAME)
82 vtkNew<vtkTransform> tran;
102 case WIT_ACCELERATION_FRAME:
111 case WIT_VELOCITY_FRAME:
120 case WIT_ORIENTATION_FRAME:
int Read(BYTE *data, int maxNumberOfBytesToRead)
virtual PlusStatus ToolTimeStampedUpdate(const std::string &aToolSourceId, vtkMatrix4x4 *matrix, ToolStatus status, unsigned long frameNumber, double unfilteredtimestamp, const igsioFieldMapType *customFields=NULL)
std::array< double, 4 > Velocity
virtual PlusStatus InternalUpdate()
std::array< double, 4 > Acceleration
vtkPlusWitMotionTracker()
virtual PlusStatus NotifyConfigured()
std::array< double, 4 > Orientation
PlusStatus GetToolByPortName(const char *aPortName, vtkPlusDataSource *&aSource)
vtkStandardNewMacro(vtkPlusWitMotionTracker)
vtkPlusDataSource * Accelerometer
Interface for acquiring data from a Microchip MM7150 motion module.
unsigned int GetNumberOfBytesAvailableForReading() const
StreamBufferType StreamData
~vtkPlusWitMotionTracker()