**5. Visualized Ground Control Station for Quadcopter Using Mixed Reality Simulation**

A ground control station (GCS) is an essential part of UAV flight, especially in the case of long-time missions. In this study, we developed a visualized GCS for a quadcopter UAV using a MATLAB/Simulink-based control system with our developed MR simulation technique. By using the visualized GCS, we controlled a quadcopter from a remote location, without a remote controller. Figure 10 illustrates the outline of the visualized GCS. In the first phase, we developed an open-loop control system in MATLAB/Simulink to control the quadcopter by a joystick. Note that for sending the control commands from the MATLAB/Simulink control system to the quadcopter, here, we attached a Raspberry Pi (Model 3 B+) single-board computer to the Pixhawk flight controller by a serial connection.

**Figure 10.** Overview of the visualized ground control station.

In the second phase, the MATLAB/Simulink control system sends the control commands (throttle, roll, pitch, and yaw command) to the Raspberry Pi. To do so, we developed a UDP interface in MATLAB/Simulink, which sent the control commands to Raspberry Pi via Wi-Fi. Figure 11 shows the control system with the UDP interface in MATLAB/Simulink. For communication between the Raspberry Pi and Pixhawk, here, we imported DroneKit-Python [35] in Raspberry Pi. DroneKit-Python is an open-source Python program package used to communicate with ArduPilot flight controllers, including Pixhawk. The DroneKit-Python coding in the Raspberry Pi sends the receiving control commands from the MATLAB/Simulink control system to Pixhawk.

**Figure 11.** Control system with user datagram protocol (UDP) interface in MATLAB/Simulink.

In the third phase, we integrated our developed MR simulation technique with the control part for the visualization. The setup of the visualized GCS is shown in Figure 12. Note that the control part worked on a computer (Computer 1) with a joystick, and the visualization part ran on another computer (Computer 2) with the MR simulation setup. Therefore, instead of a remote controller, Computer 1 with the joystick controlled the quadcopter from a remote location using the visualization part on Computer 2.

**Figure 12.** Visualized ground control station (GCS) setup.
