# PX4 with X-Plane and QGroundControl Setup Guide (v2.0.0, August 2024)
 Watch full setup guide and demonstration on YouTube: [PX4 X-Plane Plugin Tutorial](https://www.youtube.com/watch?v=aRJxsnf24k4).
	
        	
                    Watch full setup guide and demonstration on YouTube: PX4 X-Plane Plugin Tutorial.
Download X-Plane 11 or 12 from the X-Plane Official Website.
Download the Quadricopter eVTOL Air Taxi from the X-Plane Forum. Install it in the Aircraft/ folder.
Download QGroundControl from the Official Download Page.
Download the precompiled binary from PX4xplane Releases.
Copy the px4xplane folder to the specific drone's plugin folder in X-Plane: X-Plane Installation Folder/Aircraft/Quadricopter-Piloted/Plugins
For global installation: X-Plane Installation Folder/Resources/Plugins
Note for Mac and Linux Users: No extra steps are required for setting up the environment on Mac and Linux systems.
WSL2 (Windows Subsystem for Linux) allows you to run a Linux environment directly in Windows. This setup is necessary for Windows users to run PX4 simulation.
First, ensure virtualization (Virtualization Technology, Intel VT-x, AMD-V) is enabled in BIOS.
For Windows 10 (build 19041 or higher) and Windows 11, Open Command Prompt as administrator and install WSL2 with Ubuntu 22.04:
wsl --install	
            If you need more help or information about WSL, consider the following resources:
Hint: If you want a different version of Ubuntu or need to manage multiple WSL instances, you can specify the distribution during installation using commands like wsl --install -d Ubuntu-20.04.
Hint: Some steps might change over time. Make sure to check latest instruction from PX4 Official Documentation.
In WSL2, clone and set up the PX4 environment:
git clone https://github.com/PX4/PX4-Autopilot.git --recursive	
            Navigate to the cloned directory:
cd PX4-Autopilot	
            Run the setup script:
bash ./Tools/setup/ubuntu.sh	
            Restart System:
If using WSL:
exit	
            wsl --shutdown	
            wsl	
            Start X-Plane and load the Quadricopter eVTOL Air Taxi.
In Windows Terminal, check your IP address:(eg. 172.21.144.1)
ipconfig	
            In the WSL Terminal and inside the PX4-Autopilot, Set the PX4 simulation hostname with your IP:
export PX4_SIM_HOSTNAME=172.21.144.1	
            Start the simulation:
make px4_sitl none_iris	
            For direct connection on Mac/Linux, QGroundControl should auto-connect.
For remote connection (e.g., WSL2):
In X-Plane, go to the plugin menu and connect to SITL by following these steps:
To load parameters:
Calibrate your joystick as needed in X-Plane or QGroundControl.
make clean, make distclean, and rebuild PX4.