← All projects

Project · 2023 · completed · Academic

Real-time airport flight management

A Java client-server simulator for coordinating aircraft, routes, and operational states from a control-tower dashboard.

Problem

An airport control tower must coordinate several aircraft at the same time while tracking flight assignments, positions, fuel-related risks, collisions, and operational states. The project explores this problem as a distributed simulation in which every aircraft behaves as an independent network client and a central server maintains the shared operational picture.

Approach

The system uses a control-tower server and multiple aircraft clients connected through Java sockets. Each accepted connection receives its own handler thread, allowing aircraft to report state changes concurrently. The server keeps registries for flights, aircraft, and stations, while a Swing interface exposes a radar view and monitoring tables. Routing candidates are ordered by distance to support shortest-route decisions.

Technical implementation

The server listens on port 5555, exchanges serialized Java objects through object streams, and stores active handlers in a thread-safe Vector. Domain classes model flights, positions, stations, aircraft states, and routing distances. A priority queue with a custom comparator orders route options. The desktop interface renders the radar, animates aircraft positions, and uses green, yellow, and red indicators to distinguish safe, at-risk, and broken aircraft.

while (true) {
    Socket aircraft = serverSocket.accept();
    ClientHandler handler = new ClientHandler(aircraft, input, output);
    activeClients.add(handler);
    new Thread(handler).start();
}