## 3 System Architecture and Methodology
### Data Flow and the Realisation of Real-Time Transmission  
Standalone simulators for flight operations and ATC operations are widely available in the commercial market. Nonetheless, the core aim was to establish a communication channel between simulators so that a real-time representation of the flight operations could be realised in a radar map. The current focus was to provide a communication channel for flight data to transmit from the flight simulator to the ATC simulator. Therefore, a diagram indicating the data flow from data requesting to data responding is presented in Figure 3. Figure 4 supplements Figure 3 by demonstrating the application of the TCP/IP model. Figure 3: Data flow diagram. Figure 2: The physical layout of the system architecture. In the data flow, W-ATCOs could be considered as the client requesting data and W-Visual could be considered as the server responding to said request. It should be noted that W-Flightdeck is not involved in the data flow. A standalone data request application that can be called via BlueSky is used to support the data flow. It was coded in C++ language using Microsoft Visual Studio Community 2013, with the aid of the _SimConnect_ API. The application calls the _SimConnect_ API to return five crucial flight parameters, including the latitude, the longitude, the altitude, the ground speed, and the heading of the aircraft simulated in Prepar3D at a specified frequency \(f\) (either 1 Hz or 6 Hz). In other words, the refresh rate of the data acquisition application allowed receiving data every second or every 0.1666 s, according to Equation (1). \[T=\frac{1}{f}. \tag{1}\]  
The data transmission process is first initiated from the client side by activating the data request application in BlueSky. Then, the _SimConnect_ API is regularly called at specified intervals to send a request for obtaining the required flight parameters. A detailed description of the process is given below. Initially, the data request is generated in the application layer by the data request application. It is then passed to the transport layer for data block division and TCP encapsulation. A TCP header consisting of a random source port number and a designated destination port number 500 is joined with the data blocks of the data request to compose TCP segments. After that, the TCP segments are passed to the internet layer to form IP packets. An IP header is added to each TCP segment with the source IP address of 192.168.0.247 (W-ATCOs) and a destination IP address of 192.168.0.130 (W-Visual). The destination IP address and the communication protocol (IPv4) are set in a configuration file located in the client. The IP packets eventually reach the host-to-network layer, and a frame header and trailer are added to form Wireless LAN (WLAN) frames. They are then emitted as frames from the client through wireless media to the wireless access point. The WLAN frames of the request would first reach the wireless access point for routing. They subsequently depart from the wireless access point to reach the server. Upon receiving the request, the server decapsulates the WLAN frames to IP packets and  
Figure 4: Application of TCP/IP model in the data flow. further to TCP segments. The arriving TCP segments are rearranged in an appropriate order and joined together to return to the original request transmitted. With the aid of the destination port number, the TCP also allows exploring a suitable application for reaching the application layer. The port number 500 on the server side is the port number for the _SimConnect_ API to connect with Prepar3D, as specified in an XML file located in the server. Lastly, in the application layer of the server side, the request is executed to retrieve the instantaneous flight parameters. After the retrieval of the required flight parameters, a similar process is conducted but in reverse order. The response to the data request can be treated as a new data transmission process independent from the request. The process starts from the server side.