XPMP2

XPMP2 - Developer’s documentation

These pages, available as GitHub pages, document both usage and internals of the XPMP2 library.

Content and availability status:

Requirements

Coding, Building, Deployment

These aspects are relevant for developers using XPMP2 in their own plugin:

Building XPMP2

XPMP2 can be included into your projects as GitHub submodule, and into a CMake build plan via add_subdirectory. XCode projects, Visual Studio solutions, and a Docker environment for Linux and Mac OS builds are provided. The details are documented here.

How to Use XPMP2

This part will probably need more attention, but find some first information here and study the working sample plugin in the XPMP2-Sample folder.

API and Code Documentation

All header (and code) files are documented using Doxygen-style comments. The generated doxygen files are checked in, too, so that the are available online:

Backward Compatibility

If you are familiar with the original libxplanemp and are using it already in your plugins, then you will find these information on backward compatibility useful, which explain how you can replace libxplanemp with XPMP2 with limited effort.

Deploying Your Plugin

Apart from the binaries that you build you will need to ship the files provided here in the ‘Resources’ folder. Also, users will need to install CSL models. Find more details here.

CSL Models and Packages

These aspects are relevant for CSL model developers and package providers:

xsb_aircraft.txt File Format

The xsb_aircraft.txt file defines the content of one CSL model packages. It´s format is define here.

dataRefs available to CSL Models

To drive CSL models’ ANIMations, a long list of dataRefs is provided by XPMP2. See its documentation here.

Copying .obj files on load

CSL packages come in different flavours. Popular ones for general use are the Bluebell and the X-CSL packages. Both come with different history. For XPMP2 to use all their features it needs to change their .obj files. Performing these changes is built into XPMP2. See here for details.

TCAS Override

The TCAS Override approach explains how TCAS information is provided, the classic multiplayer dataRefs are maintained and how 3rd party plugins can access this information. XPMP2 publishes data via the sim/cockpit2/tcas/targets dataRefs.

Wake Turbulence

X-Plane’s approach to Wake Turbulence support for TCAS targets is described in this blog post featuring LiveTraffic screenshots and this article on the dataRef details.

Original libxplanemp