This project simulates an Automated Air Traffic Control System (ATCS) at a multi-runway international airport, developed in C++ using core Operating Systems concepts.
AirControlX manages flight scheduling, runway allocation, air traffic monitoring, and violation tracking for an international airport with multiple runways.
The system simulates:
- Multiple airlines and aircraft types
- Runway allocation based on aircraft direction and type
- Flight movement through various phases
- Speed monitoring and violation detection
- Emergency handling
AirControlX/
│
├── include/ # Header files
├── src/ # Implementation files
├── obj/ # Object files (generated during build)
├── docs/ # Documentation files
├── build/ # Build directory for CMake (generated during build)
├── run.sh # Script to configure, build, and run the project
├── CMakeLists.txt # CMake configuration file
└── README.md # This file
- Operating System: Linux/Unix environment (e.g., Ubuntu)
- C++ Compiler: g++ with C++11 support
- CMake: Version 3.10 or higher
- SFML: Version 2.5 or higher (for visualization in
VisualSimulator.cpp) - Build Tools:
make(for "Unix Makefiles" generator) - Git: For cloning the repository
-
Install Basic Tools:
sudo apt update sudo apt install build-essential cmake git
-
Install SFML:
sudo apt install libsfml-dev
- This installs SFML libraries and development headers (version 2.6.1 or similar, depending on your system).
This project uses CMake to manage the build process, with a unified build/ directory for both VS Code and CLion. Follow the instructions below to set up and run the project in your preferred IDE.
The simplest way to configure, build, and run the project is to use the provided shell script:
./run.shThis will:
- Configure the project using CMake (
build/directory, "Unix Makefiles" generator) - Build the project
- Run the resulting executable (
build/aircontrolx)
-
Clone the Repository:
git clone <repository-url> cd OS-Project
-
Install VS Code Extensions:
- Open VS Code.
- Go to Extensions (
Ctrl+Shift+X). - Install:
- CMake Tools (by Microsoft)
- C/C++ (by Microsoft)
-
Configure CMake Tools:
- Open the project in VS Code:
File > Open Folder > Select AirControlX. - Press
Ctrl+Shift+P, type "CMake: Edit User-Local CMake Kits," and select it. - Edit the kit configuration (e.g.,
~/.local/share/CMakeTools/cmake-tools-kits.json) to use "Unix Makefiles":[ { "name": "GCC", "compilers": { "C": "/usr/bin/gcc", "CXX": "/usr/bin/g++" }, "preferredGenerator": { "name": "Unix Makefiles" } } ] - Press
Ctrl+Shift+P, type "CMake: Select Kit," and choose "GCC".
- Open the project in VS Code:
-
Configure the Project:
- Press
Ctrl+Shift+P, type "CMake: Configure," and select it. - This generates build files in the
build/directory.
- Press
-
Build and Run:
- Run the
run.shscript in the terminal:./run.sh
- Alternatively, press
Ctrl+Shift+Bto build (iftasks.jsonis set up to run./run.sh).
- Run the
-
Clone the Repository:
git clone <repository-url> cd AirControlX
-
Open in CLion:
- Launch CLion.
- Go to
File > Open, select theAirControlXdirectory, and choose "Open as Project."
-
Configure Build Directory and Generator:
- Go to
File > Settings > Build, Execution, Deployment > CMake. - Set "Generation path" to
build. - Set "Generator" to "Unix Makefiles".
- Click "Apply" and "OK."
- Go to
-
Reload CMake:
- Go to
Tools > CMake > Reload CMake Project. - Check the "CMake" tab for successful configuration.
- Go to
-
Set Up Run Configuration:
- Go to
Run > Edit Configurations. - Add a "CMake Application" configuration:
- Name:
Run AirControlX - Target:
aircontrolx - Executable:
build/aircontrolx - Working directory: Path to
AirControlXdirectory - Click "Apply" and "OK."
- Name:
- Go to
-
Build and Run:
- Build: Press
Ctrl+F9or click the hammer icon. - Run: Press
Shift+F10or click the play icon.
- Build: Press
The CMakeLists.txt uses file(GLOB ...) to automatically include all .cpp files in the src/ directory. When you add a new file:
- VS Code: Run
./run.shor pressCtrl+Shift+P> "CMake: Configure" to reconfigure CMake. - CLion: Go to
Tools > CMake > Reload CMake Project.
This ensures the new file is included in the build.
This project uses SFML for visualization (in VisualSimulator.cpp). To verify SFML is working, a commented-out test code is included in main.cpp under the section /* sfml testing out code here starting from include statements until the end */. Uncomment this code, build, and run to check if SFML is set up correctly. The test code opens a simple window with a green circle.
-
Module 1: System Rules & Restrictions
- Defines airline restrictions, flight speeds, and violation rules
-
Module 2: ATCS Core Functionalities
- Flight scheduling, runway allocation, and priority handling
-
Module 3: Subsystems & Airline Integration
- Violation detection, AVN generation, and payment processing
This project was developed for the Operating Systems course (Spring 2025).