Skip to content

Vaishnaviiii-23/AirTrafficControlSimulation

Repository files navigation

✈️ Multithreaded Air Traffic Control Simulation

A C++ console-based simulation of an Air Traffic Control System that demonstrates multithreading, thread-safe queues, and synchronization using std::mutex and std::condition_variable.


📌 Overview

This project simulates multiple aircraft requests (landing and takeoff) and manages them using a thread-safe queue system.
It highlights concurrency in C++ with proper synchronization and logging.


🚀 Features

  • 🛬 Handles multiple aircraft requests (landing & takeoff)
  • 🧵 Implements real multithreading using std::thread
  • 🛫 Thread-safe runway management with mutex & condition_variable
  • 🗂️ Queue system for scheduling aircrafts
  • 📝 Logs all operations to a file (log.txt)

🛠 Tech Stack

C++
Multithreading
Synchronization


📁 File Structure

AirTrafficControlSimulation/
├── main.cpp             # Entry point  
├── Aircraft.h/.cpp      # Aircraft class with simulation logic  
├── RunwayManager.h/.cpp # Handles aircraft queue & processing  
├── Logger.h/.cpp        # Thread-safe logging system  
└── log.txt              # Output log file  

🔧 How to Compile & Run

Use g++ with pthread support:

g++ main.cpp Aircraft.cpp RunwayManager.cpp Logger.cpp -o AirTrafficSim -pthread ./AirTrafficSim

📊 Sample Output

Aircraft AC1001 requested landing.

Runway cleared for aircraft AC1001 (landing)

Aircraft AC1001 has landed.

🤝 Contributing

Contributions and improvements are welcome! Feel free to fork this repository and submit pull requests.

⭐ Support

If you like this project, don’t forget to star ⭐ the repo!

About

Multithreaded C++ simulation for managing aircraft landing and takeoff using thread-safe queueing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages