# WitMotion sensor for Motion compensation

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FHwpWQZQHJL8QmKHk3FeC%2FTopView.png?alt=media&#x26;token=cf3e5086-8a39-4c3c-91fe-d72619951a0e" alt=""><figcaption></figcaption></figure>

## Introduction

If your actuators are slow, imprecise, or unpredictable, motion compensation may become inaccurate. When tuning motion compensation smoothing or scaling is not enough to fill the gap, adding a physical sensor can significantly improve the result.

The physical sensor will help Simhub to know the real orientation and feed accordingly the motion compensation layer ( [openxr-motion-compensation](https://manual.simhubdash.com/motion-addon/openxr-motion-compensation "mention") or [openvr-motion-compensation](https://manual.simhubdash.com/motion-addon/openvr-motion-compensation "mention"))\
\
Physical sensors can measure the following three components:

* Yaw (can sometime overshoot or drift) in case of high velocity
* Pitch angle
* Roll angle

However, physical sensors are not perfect. Because this type of sensor applies strong internal smoothing, the measured position can be delayed. It also cannot measure heave, sway, or surge movements.

Nevertheless, when a sensor is available, SimHub blends its data with internal calculations to build complete motion compensation. If the sensor is disconnected or missing, SimHub will continue working using only its internal computations. Naturally, the result will differ — otherwise, there would be no reason to add a sensor.

> <mark style="color:yellow;">Before investing in hardware, please note that both OpenVR and OpenXR motion compensation rely on third-party software</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**that is not guaranteed to work with every game or headset**</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">and may become incompatible following VR framework or game updates</mark>.
>
> <mark style="color:yellow;">Physical sensor</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**is not supported on stacked setups**</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">(IE : seat mover installed on top of a 3DOFs) : for such setup please does not install the sensor at a location</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**not moving**</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">with the top seat mover.</mark>

## Required hardware

The WitMotion range has many variations, so please pay close attention to the model you purchase.<br>

* Sensor : WT901C-**232** , 9-Axis Vibration Inclinometer MPU9250, Asin B01N91GCJX

> <mark style="color:yellow;">This exists in two models, RS232 or TTL, you need the</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**RS232**</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">version (WT901C-</mark><mark style="color:yellow;">**232)**</mark>

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FAfqyFctCyHEAOZRPbQGN%2Fimage.png?alt=media&#x26;token=e2eabea5-2e2e-4b48-b0b8-0d584de9cdbc" alt="" width="375"><figcaption></figcaption></figure>

* Official RS232 to USB Adapter with CH340 chip, Asin : B07WF7BJJH

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FP085D3cFEaDR0c8MoH1X%2Fimage.png?alt=media&#x26;token=6b172c64-b901-4e58-995e-ba01e2c63327" alt="" width="375"><figcaption></figcaption></figure>

The kit (sensor + adapter) can be found here&#x20;

* ERacing lab : <https://eracing-lab.com/collections/diy-projects/products/witmotion>
* Amazon:&#x20;
  * Sensor : <https://amzn.eu/d/7a48q7o>
  * Cable : <https://amzn.eu/d/39y4NYL>

## Physical installation

### Wiring<br>

* Plug the cable to the sensor
* Plug the sensor to an usb port

### Mounting

Install firmly the sensor on your simulator, you can install it vertically or horizontally .&#x20;

> <mark style="color:yellow;">Ensure it is installed far from magnetic interference sources (motors, wheels, bass shakers).</mark>

#### Horizontal mounting&#x20;

In horizontal mounting you must have **label on top**, connector pointing **to the right**.  \
You can adjust later the rotation if you could not keep the connector pointing to the right, but try to keep it as flat as possible.

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FCxXIyzhXwc18rfxfwcnw%2Fimage.png?alt=media&#x26;token=d87d2b54-bf06-4ed5-a51a-355ae57ba8c7" alt=""><figcaption></figcaption></figure>

#### Vertical mounting

In vertical mounting you must have label **on the right**, connector pointing **to the floor**.\
You can adjust later the rotation if you could not keep the label pointing to the right, but try to keep it as vertical as possible.

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2F3CRyFoz37tZ8c8fFO7qj%2Fimage.png?alt=media&#x26;token=b683a419-6f92-4234-ae2e-7f0115eeaf6c" alt=""><figcaption></figcaption></figure>

#### **Reversed Horizontal** mounting&#x20;

In reversed  horizontal mounting you must have label pointing **to the floor,** connector pointing **to the right**.  \
You can adjust later the rotation if you could not keep the connector pointing to the right, but try to keep it as flat as possible.

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FizA7JdjAvdv1jN5lLXCP%2Fimage.png?alt=media&#x26;token=12a3bfe3-0795-49af-a0b0-823734e0a81e" alt=""><figcaption></figcaption></figure>

## Simhub Setup

In motion compensation settings, go into the physical sensor tab.

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FiNDdyo6TxkEOOJcf8NN6%2Fimage.png?alt=media&#x26;token=8cac84fa-0b01-41a9-9b3b-03ffc66e2515" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2F3IOsbpGufddRTmcsAVLZ%2Fimage.png?alt=media&#x26;token=3e27bfb2-b987-46df-a8eb-d3523dff7fa3" alt=""><figcaption></figcaption></figure>

* Enable the sensor
* Select the serial port
* Select the mounting mode
* Adjust the yaw offset if you could not align the sensor as shown in the [#mounting](#mounting "mention") instructions; the preview will display a visual representation of the offset (for example, a 45° rotation).

  <figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FsKY6k7juT4Yots2PgNVz%2Fimage.png?alt=media&#x26;token=719852e0-fa64-49ea-9c68-0a2317bbab6a" alt=""><figcaption></figcaption></figure>

> <mark style="color:yellow;">Adjusting the yaw offset is critical, as it ensures SimHub correctly interprets the sensor’s mounting orientation, including:</mark>
>
> * <mark style="color:yellow;">Pitch and roll direction: if the sensor is rotated by 90°, pitch and roll will be swapped, and their directions may also be reversed.</mark>&#x20;
> * <mark style="color:yellow;">Pitch and roll reference: an incorrect offset will result in mixed pitch and roll components.</mark>
>
> <mark style="color:yellow;">**SimHub takes care of it, as long as you give it the correct offset.**</mark>

* Perform an initial zero calibration.
* Optional: Enable yaw drift correction to progressively compensate for yaw drifts.

> <mark style="color:yellow;">About yaw drift : Yaw drift on the Witmotion sensor occurs easily, Simhub will only adjust the drift when expected yaw and sensor yaw are steady (and expected yaw close to 0). This means it will not attempt to compensate for unstable values during active yaw movements, even if drifting occurs.</mark>

## Calibration

* Start your platform. If it remains idle (outside of a game), use the "Force Unpark" button to unpark it, then open the VR MC Monitor dialog. If the settings are not visible, click on "Show MC Settings."

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FvhVsyQl8UPWPEa6y0yxQ%2Fimage.png?alt=media&#x26;token=b06da3ec-0e1e-4dae-8c4a-013c173d9579" alt=""><figcaption></figcaption></figure>

* When the platform is running and flat, click on calibrate zero :

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FLiVvG66ODCWGh2xbg9D8%2Fimage.png?alt=media&#x26;token=0c6c9e91-6df2-459b-bc49-ba6130b5874e" alt=""><figcaption></figcaption></figure>

> <mark style="color:yellow;">Calibration is not required every time, but it is recommended to redo it periodically or after any significant rig movement or modifications.</mark>

## Motion compensation mixing

SimHub allows you to "mix" and "tune" sensor-based motion compensation with its own calculations, offering the best of both worlds.

Open the MC monitor (see [#fine-calibration](#fine-calibration "mention")) and open the Global tab

<figure><img src="https://2616364922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fji2kP9A59gwaulGOIlxw%2Fuploads%2FWIDaSJ1YcWbA2io62tfB%2Fimage.png?alt=media&#x26;token=e8388e54-2093-4bda-bced-0fe2308f3bee" alt=""><figcaption></figcaption></figure>

You can now adjust for each motion compensation components how much of the compensation you want by enabling the `physical sensor mixing`.&#x20;

* 100% means Simhub will only trust the sensor
* 50% means simhub will average evenly the simhub expected position with the sensor.

If the sensor reports slightly off values you can also scale it using the `sensor gain`

> <mark style="color:yellow;">Motion is complex and not limited to yaw, pitch, and roll alone. Some missing components will still be computed by SimHub (and the "mixing" option won't be available), you can smoth,scale, or disable those at your will.</mark>

Smoothing **should not be necessary** for the sensor, as its internal smoothing and latency are already significant and additional smoothing would increase latency further.

> <mark style="color:yellow;">Physical sensor values are injected into the compensation system using the same center of rotation as SimHub’s computations. Please pay attention to the following parameters:</mark>
>
> * <mark style="color:yellow;">In Simhub's geometry settings : Seat position and height for 2/3/6 DOFs and traction loss dimensions</mark>
> * <mark style="color:yellow;">In Game, make sure to get a matching COR (see OpenXr or OpenVR instructions).</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**Unmatched COR, makes any computations senseless.**</mark>
