Plus applications user manual  2.9.0.d0fd355
Software library for tracked ultrasound image acquisition, calibration, and processing.
Phidgets Spatial 3/3/3 magnetic, angular rate, and gravity (MARG) sensor

Supported hardware devices

Supported platforms

The device manufacturer supports additional platforms. On request, Plus toolkit will be extended to support this device on other platforms, too.

Installation

Device configuration settings

Tracker coordinate system: South-West-Down. Sensor coordinate system is drawn on the sensor PCB. If the PCB is laying flat on the table with cable socket towards East then the axis directions are: South-West-Down.

If magnetic fields are nearby the sensor have non-negligible effect then compass can be ignored by choosing an IMU AHRS algorithm (as opposed to MARG) or compass correction may be performed (see http://www.phidgets.com/docs/Compass_Primer). The magnetometer has an internal calibration mechanism, which is running continuously. During this internal calibration no measurement data can be retrieved from the magnetometer. When magnetometer data is not available then the associated tool status is set to INVALID.

  • attribute.png
    Type = "PhidgetSpatial"
    required.png
  • attribute.png
    AcquisitionRate
    optional.png
    Default = "125"
  • attribute.png
    SerialNumber If specified then connection is made to the devices that has a matching SerialNumber. Useful if multiple devices are connected to the computer. If the value is -1 then connections is made to the first available device (and the serial number of the connected device is logged as INFO).
    optional.png
    Default = "-1"
  • attribute.png
    LocalTimeOffsetSec
    optional.png
    Default = "0"
  • attribute.png
    ToolReferenceFrame
    optional.png
    Default = "Tracker"
  • attribute.png
    ZeroGyroscopeOnConnect A flag for zeroing the gyroscope when connecting to the device. If enabled then the sensor should not be moved for 2 seconds while connecting to the device if the OrientationSensor or Accelerometer tool is used. The device can also be zero'd at any time if the client application (for example fCal) supports it
    optional.png
    Default = "FALSE"
  • attribute.png
    TiltSensorWestAxisIndex In tilt sensor mode we don't use the magnetometer, so we have to provide a direction reference. The orientation is specified by specifying an axis that will always point to the "West" direction.
    optional.png
    Default = "1"
    Recommended values:
    • If sensor axis 0 points down (the sensor plane is about vertical) => TiltSensorDownAxisIndex ="2".
    • If sensor axis 1 points down (the sensor plane is about vertical) => TiltSensorDownAxisIndex ="0".
    • If sensor axis 2 points down (the sensor plane is about horizontal) => TiltSensorDownAxisIndex ="1".
  • attribute.png
    FilteredTiltSensorWestAxisIndex Same as TiltSensorWestAxisIndex but for the filtered tool.
    optional.png
    Default = "1"
  • attribute.png
    AhrsAlgorithm It is a combined parameter. The first part specifies the AHRS algorithm method MADGWICK (only one parameter) or MAHONY (two parameters proportional and integral). The second part determines whether the magnetometer is used ( MARG where heading estimated using magnetometer data, it is less noisy but sensitive to magnetic filed disortions) or not ( IMU where heading estimated using gyroscope data only, it is more noisy but not sensitive to magnetic filed disortions). Supported types: "MADGWICK_MARG", "MADGWICK_IMU", "MAHONY_MARG" or "MAHONY_IMU"
    optional.png
    Default = "MADGWICK_MARG"
  • attribute.png
    FilteredTiltSensorAhrsAlgorithm It is a combined parameter that specifies the AHRS algorithm type for Filtered Tilt. The first part specifies the AHRS algorithm method MADGWICK (only one parameter) or MAHONY (two parameters proportional and integral). It is a tilt sensor and does not uses the magnetometer so the second part has to be IMU. Supported types: "MADGWICK_IMU", "MAHONY_IMU"
    optional.png
    Default = "MADGWICK_IMU"
  • attribute.png
    AhrsAlgorithmGain Gain values used by the AHRS algorithm (Mahony: first parameter is proportional, second is integral gain; Madgwick: only the first parAhrsAlgorithmGain but for the filtered tool.
    optional.png
    Default = "1.5 0.0"
  • attribute.png
    FilteredTiltSensorAhrsAlgorithmGain Same as AhrsAlgorithmGain but for the filtered tool.
    optional.png
    Default = "1.5 0.0"
  • attribute.png
    CompassCorrectionParameters Sets correction parameters for the magnetometer sensor. This is for filtering out hard and soft iron offsets, and scaling the output to match the local field strength. These parameters can be obtained from the compass calibration program provided by Phidgets Inc (http://www.phidgets.com/docs/Compass_Primer). The following 13 parameter values are have to be provided (separated by spaces):
    optional.png
    Default = " "
    • magField: The reference field to use. Generally, use the local expected field strength, or 1.0.
    • offset0,1,2: Applies offset to the compass data in axes 0,1,2.
    • gain0,1,2: Applies gain corrections in axes 0,1,2.
    • T0,1,2,3,4,5: Applies corrections for non-orthogonality of the ellipsoid.
  • element.png
    DataSources One DataSource child element for each sensor.
    required.png
    • element.png
      DataSource
      required.png
      • attribute.png
        PortName
        required.png
        • Accelerometer Raw sensor measurement. The values are stored in the translation part of the transformation matrix. The rotation part is identity.
        • Gyroscope Raw sensor measurement. The values are stored in the translation part of the transformation matrix. The rotation part is identity.
        • Magnetometer Raw sensor measurement. The values are stored in the translation part of the transformation matrix. The rotation part is identity.
        • TiltSensor 2-DOF sensor tilt is computed as a rotation matrix. Only the accelerometer is used.
        • OrientationSensor 3-DOF sensor orientation is computed using sensor fusion. With IMU algorithm only the accelerometer and gyroscope data are used. With AHRS algorithm accelerometer, gyroscope, and magnetometer data are used.
      • attribute.png
        BufferSize
        optional.png
        Default = "150"
      • attribute.png
        AveragedItemsForFiltering
        optional.png
        Default = "20"

Example configuration file PlusDeviceSet_Server_PhidgetSpatial.xml

<PlusConfiguration version="2.1">
<DataCollection StartupDelaySec="1.0">
<DeviceSet
Name="PlusServer: PhidgetSpatial MARG sensor"
Description="Broadcasting tool tracking data through OpenIGTLink
Keep the device stationary for 2 seconds after connect for accurate gyroscope initialization."
/>
<Device
Id="TrackerDevice"
Type="PhidgetSpatial"
AhrsAlgorithm="MADGWICK_MARG"
AhrsAlgorithmGain="1.5"
TiltSensorWestAxisIndex="1"
FilteredTiltSensorAhrsAlgorithm="MADGWICK_IMU"
FilteredTiltSensorAhrsAlgorithmGain="0.01"
FilteredTiltSensorWestAxisIndex="1"
ToolReferenceFrame="Tracker" >
<DataSources>
<DataSource Type="Tool" Id="OrientationSensor" PortName="OrientationSensor" />
<DataSource Type="Tool" Id="TiltSensor" PortName="TiltSensor" />
<DataSource Type="Tool" Id="FilteredTiltSensor" PortName="FilteredTiltSensor" />
<DataSource Type="Tool" Id="Accelerometer" PortName="Accelerometer" />
<DataSource Type="Tool" Id="Gyroscope" PortName="Gyroscope" />
<DataSource Type="Tool" Id="Magnetometer" PortName="Magnetometer" />
</DataSources>
<OutputChannels>
<OutputChannel Id="TrackerStream" >
<DataSource Id="OrientationSensor"/>
<DataSource Id="TiltSensor"/>
<DataSource Id="FilteredTiltSensor"/>
<DataSource Id="Accelerometer"/>
<DataSource Id="Gyroscope"/>
<DataSource Id="Magnetometer"/>
</OutputChannel>
</OutputChannels>
</Device>
<Device
Id="CaptureDevice"
Type="VirtualCapture"
BaseFilename="RecordingTest.igs.mha"
EnableCapturingOnStart="FALSE" >
<InputChannels>
<InputChannel Id="TrackerStream" />
</InputChannels>
</Device>
</DataCollection>
<PlusOpenIGTLinkServer
MaxNumberOfIgtlMessagesToSend="1"
MaxTimeSpentWithProcessingMs="50"
ListeningPort="18944"
OutputChannelId="TrackerStream" >
<DefaultClientInfo>
<MessageTypes>
<Message Type="TRANSFORM" />
</MessageTypes>
<TransformNames>
<Transform Name="OrientationSensorToTracker" />
<Transform Name="TiltSensorToTracker" />
<Transform Name="FilteredTiltSensorToTracker" />
<xTransform Name="AccelerometerToTracker" />
<xTransform Name="GyroscopeToTracker" />
<xTransform Name="MagnetometerToTracker" />
</TransformNames>
</DefaultClientInfo>
</PlusOpenIGTLinkServer>
</PlusConfiguration>