Spatial disorientation is a common issue in aviation, often leading to poor decisions and accidents. To address this, this project focus on enhancing situational awareness through intuitive haptic feedback. This repository gathers two projects developed during my engineering internship. Both interact with the X-Plane flight simulator :
- A Python program that retrieves real-time flight data from X-Plane and triggers haptic feedback using the bHaptics TactSuit X40.
- A C++ plugin for X-Plane that displays an interactive window with buttons to trigger failures, adjust weather, or test control surfaces.
- Windows 10/11
- Python 3.13.5 (tested)
- Visual studio code (recommended)
- Microsoft visual studio (recommended)
- bHaptics player 2.6.3.86 (86) (at least)
- XPlane 11/12 (tested)
All the librairies needed are listed in requirements.txt.
keyboard==0.13.5
pybind11==3.0.0
pygame==2.6.1
pygame_widgets==1.2.2
setuptools==80.8.0
websocket_client==0.57.0
tactcombine==0.1You can install all the standard python libraries with :
pip install keyboard==0.13.5 pybind11==3.0.0 pygame==2.6.1 pygame_widgets==1.2.2 setuptools==80.8.0 websocket_client==0.57.0Since tactcombine is a custom library, you will need to build it manually from the python_interface/combine/ directory using pybind11 :
pip install ./python_interface/combineThe library will be added to your python PATH.
(A precompiled version of the tactcombine library is also included for Windows. This allows immediate use without requiring compilation)
You will also need the following dependencies :
- bHaptics python SDK included here
- XPlane connect Plugin included here (Python)
-
XPlane connect Plugin included here (XPlane plugin)
Copy the folder into :
C:\X-Plane 12\Resources\plugins
-
The bHaptics player needs to be launched first
-
Connect the TactSuit and launch XPlane
-
Run the main program
python main.py
- The GUI will automatically opens at launch
- Real-time flight data displayed
- Real-time haptic cues displayed
You can use the buttons to switch between the different operating logics. Three sliders allows you tu adjust the intensity of the vibrations as well as the roll and pitch activation threshold.
The differents vibrating logics are implemented and can be modified through the logic1.py, logic2.py, logic3.py and logic4.py files.
You can either use the pre-compiled plugin and put it into :
C:\X-Plane 12\Resources\plugins
Or you can edit the source code and compile it yourself :
-
Build the plugin using a C++ compiler with the XPlane SDK included here
-
Copy the compiled folder with the
.xpland.pdbfiles into :C:\X-Plane 12\Resources\plugins -
Launch X-Plane and use the plugin
- The control panel will automatically opens in XPlane
- Provides buttons to:
- Trigger and reset failures (engine, bird strike, control surfaces)
- Change weather conditions
If you close the control panel, you can still re-open on the upper menu :
XPlane-Haptic-Interface/
│
├── python_interface/
├── assets/
├── combine/
├── libs/
├── patterns/
└── main.py
├── control_panel_xp/
├── SDK/
├── XPlaneConnect/
├── plugin_output/
└── control_panel.cpp
├── images/
├── .gitignore
└── README.md
Pierre Bourrandy, 4th year Mechatronics Engineering student - ENSIL-ENSCI This project was part of my internship at IISRI.
Thanks to Mr. Houshyar Asadi for the inspiring topic, support, and trust throughout the internship.
[email protected] (ENSIL-ENSCI)


