> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/rt-lab-library/opxplane.md).

# OpXPlane

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-063236876fde9d4f42208bd7e9114e88fed8aeec%2FRTL_opxplane_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **OpXPlane** block, located in the **RT-LAB/Miscellanous** library, sends aircraft position data to the X-Plane visualization tool over UDP/IP.

To enable X-Plane to receive data from an external component, configure it as follows:

* Start X-Plane.
* Open **settings->Data Input & Output->int2**.
* Set the IP address for “*IP address of data sender*” to the simulator that will run the OpXPlane block. For example, if you add the OpXPlane block in an SM subsystem and run this subsystem on a QNX-based simulator, use the IP address of that simulator.
* Close this menu.
* Open **settings->rendering options**.
* Set the “*number of aircraft*” to render. This value must match the number specified in the OpXPlane block mask.
* Close this menu. X-Plane is now configured to receive data from an external component.

{% hint style="danger" %}
Start X-Plane manually before executing the simulation.
{% endhint %}

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-714d501a789f44b3cf7e6b320f7e86a797c0b12b%2FRTL_opxplane_mask.png?alt=media" alt="" width="329"><figcaption></figcaption></figure>

<table><thead><tr><th width="251.4000244140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>IP address of X-Plane software</strong></td><td>IP address of the computer running X-Plane software.</td></tr><tr><td><strong>Number of planes</strong></td><td>Number of aircraft controlled by this block. An input will be added for each plane.</td></tr><tr><td><strong>Decimation</strong></td><td>Decimation factor for the communication.</td></tr><tr><td><strong>Aircraft</strong></td><td>Name of the aircraft to load when connecting to X-Plane. If this block controls many aircraft, the same name will be applied to all aircraft.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="251.39996337890625">Input</th><th>Description</th></tr></thead><tbody><tr><td>Plane inputs</td><td>One input for each plane. Each input is a vector with seven (7) elements in the following order: Latitude, Longitude, Elevation (altitude), Heading, Pitch, Roll, Gear (0 for up or 1 for down).</td></tr></tbody></table>

## Outputs

This block has no outputs.

## Characteristics and limitations

| Characteristic       | Value |
| -------------------- | ----- |
| Direct Feedthrough   | Yes   |
| Discrete sample time | Yes   |
| XHP support          | No    |
| Work offline         | Yes   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/rt-lab-library/opxplane.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
