The X-Plane Connect Toolbox is an open-source research tool used to interact with the commercial flight simulator software X-Plane. XPC allows users to control aircraft and receive real-time state information from aircraft simulated in X-Plane using functions written in C, C++, Java, MathWorks’ MATLAB, or Python in real time over the network. This research tool has been used to visualize flight paths, test control algorithms, generate ghost traffic, create third-party autopilot, perform hardware-in-the-loop testing, simulate an active airspace, or generate out-the-window visuals for in-house flight simulation software. Possible applications include active control of an X-Plane simulation, flight visualization, recording states during a flight, or interacting with a mission over UDP.

XPC was originally created to support prognostic-based automated aviation decision-making technologies developed by the diagnostics and prognostics group at NASA Ames Research Center. Prior to the creation of the X-Plane Connect Toolbox, researchers had no means to perform detailed software-in-the-loop verification tests of control algorithms running in the MathWorks environments in preparation for performing full-scale flights. This tool has since been generalized and expanded to facilitate use by hobbyists, researchers, and others.

Communication between the MATLAB, C/C++, Java, or Python clients and X-Plane is established using an X-Plane plug-in. The clients communicate with X-Plane over UDP to control a vehicle or environments by setting parameters like throttle, various control surface positions, brakes, etc., or to receive live state information. The plug-in uses the standard XPlane software development kit to accomplish this. UDP communications in MATLAB are conducted using Java commands, which run natively in MATLAB, and do not require any additional MATLAB toolboxes. Code examples have also been included in the open-source distribution.

This work was done by Christopher Teubert, Jason Watkins, and Brian Bole of Ames Research Center. This software is available for use. To request a copy, please visit .