# YawVR

The YawVR output connects DR Sim Manager to a **YawVR** motion simulator. It communicates over your local network using both TCP (for control commands like start, stop, park) and UDP (for real-time motion data streaming). YawVR is a compact, yaw-pitch-roll motion simulator designed for seated VR and sim racing experiences.

---

## Setup Steps

1. Ensure your YawVR device is powered on and connected to the same network as your PC.
2. In DR Sim Manager, go to the **Outputs** tab and click the **+** tab.
3. Select **YawVR** from the list.
4. Enter the **IP address** of your YawVR device, or click **Auto Detect** to find it automatically.
5. Verify the **TCP Port** (default: 50020) and **UDP Port** (default: 50010) match your YawVR's configuration.
6. Adjust the **Output Rate** if needed (default: 5 ms).
7. The output connects automatically once a valid IP address is configured.

---

## Settings

### Network Settings

- **IP Address** — The IP address of your YawVR device. You can enter it manually or use **Auto Detect** to find it automatically on your network.
- **TCP Port** — The port used for control commands (default: `50020`).
- **UDP Port** — The port used for streaming motion data (default: `50010`).
- **Output Rate** — How frequently position updates are sent, in milliseconds (default: **5 ms** / 200 Hz).

### Auto Detect

Click the **Auto Detect** button to scan your local network for YawVR devices. If a device is found, its IP address and TCP port are filled in automatically.

Auto detection works by broadcasting a discovery message on your local network. The YawVR device responds with its address and availability status. If no device is found within 1 second, detection times out.

> **note**
Auto Detect sends a broadcast on your local subnet. If your YawVR is on a different subnet or VLAN, you'll need to enter the IP address manually.

### Request Position

Enable **Request Position** to have DR Sim Manager listen for the YawVR's reported position (yaw, pitch, roll). This provides feedback on where the platform actually is, which can be useful for:

- Monitoring the platform's real-time position.
- Using reported position data with the [Virtual Tracker](virtual-tracker.md) for more accurate VR motion compensation.

### Park

Click the **Park** button to send the YawVR to its parked (home) position. This is useful for returning the platform to center without disconnecting.

---

## Connection Behavior

When DR Sim Manager connects to the YawVR, the following sequence occurs:

1. A TCP connection is established and a check-in command is sent.
2. The device confirms it is available (if it reports "RESERVED", another application is using it and connection will fail).
3. A start command is sent to activate the platform.
4. The current platform position is read via UDP.
5. The platform smoothly transitions from its current position to the neutral (zero) position. The speed of this transition is limited to 30°/second to prevent sudden movements.
6. Normal motion data streaming begins.

When disconnecting:

1. A stop command is sent.
2. An exit command is sent to release the device.
3. Both TCP and UDP connections are closed.

---

## Troubleshooting

### Auto Detect finds no device

1. **Check network** — Ensure the YawVR and your PC are on the same network and subnet.
2. **Check power** — Make sure the YawVR is powered on and has fully booted.
3. **Check firewall** — Windows Firewall may block the broadcast. Add an exception for DR Sim Manager or temporarily disable the firewall for testing.
4. **Enter IP manually** — If auto detection doesn't work, enter the YawVR's IP address directly.

### "Device is in use" error

Another application has reserved the YawVR. Close any other software controlling the YawVR (such as the YawVR Game Engine or another motion software), then try connecting again.

### Platform doesn't move after connecting

1. **Check the connection sequence** — DR Sim Manager transitions the platform to neutral before starting normal operation. Wait a few seconds for this transition to complete.
2. **Check source data** — Ensure a sim source is running and producing motion data. The YawVR output only sends data when a source is active.
3. **Check the output rate** — The default of 5 ms should work for most setups.

### Motion feels delayed or sluggish

- Reduce the **Output Rate** for faster updates (try 2 ms).
- Check your network for latency issues. A wired Ethernet connection is recommended over Wi-Fi.

### Connection drops intermittently

- Use a wired Ethernet connection instead of Wi-Fi.
- Check for network congestion or interference.
- Ensure no other application is competing for the YawVR's UDP port.
