Real-Time Air Traffic Control System Using QNX RTOS

Air Traffic Control Project – A Real-Time System Implementation

In our COEN 320 course, we developed a simplified Air Traffic Monitoring and Control (ATC) system, focusing on the en-route airspace. This project was implemented in C/C++ and ran on the QNX real-time operating system, ensuring accurate timing constraints and efficient task scheduling.

Project Overview

Our ATC system simulates an en-route control center, responsible for tracking aircraft as they traverse a designated 3D airspace. The system continuously monitors aircraft positions, velocities, and separation distances, issuing alerts for potential collisions.

Implemented Modules

Technical Highlights

System Architecture

The system consists of five subsystems communicating through named QNX IPC channels. Each subsystem runs on its own thread(s) with explicit scheduling priorities under SCHED_SPORADIC. All inter-process communication uses QNX's synchronous message-passing (MsgSend/MsgReceive), ensuring deterministic, auditable data flow with no shared-memory race conditions. The simulated airspace is bounded at 100 km × 100 km × 25 km.

ATC system architecture diagram showing Plane, Radar, CompSys, CommSys, Operator, and Data Display subsystems connected via QNX IPC channels
Subsystem layout and QNX message-passing channels between Plane, Radar, CompSys, CommSys, Operator, and Data Display.

Plane

Each Plane object spawns two threads on construction:

Radar

A single thread running a server loop at priority 2. Listens on DA_RADAR_channel for plane telemetry. On message arrival, Radar immediately forwards it to CompSys via MsgSend() on COMP_SYS_channel, waits for the reply, then replies back to the originating plane. Radar is a pure relay — it performs no computation, just routing. All N planes funnel through this single Radar thread.

Computer System (CompSys)

The brain of the system. Spawns two threads:

Collision detection algorithm: For each pair of planes, the algorithm steps through discrete 1-second intervals from t=0 to t=180. At each step it computes future positions as x_future = x_current + vx * t and checks whether horizontal and vertical separation fall below threshold. One execution of the safety check processes all pairs across all 180 time steps — a complete traversal.

Communication System (CommSys)

A single thread at priority 3. Listens on COMP_SYS_channel_for_COMM for command messages from CompSys. When a command arrives, CommSys constructs the target plane's channel name (COMM_SYS_channel + plane ID), opens a connection via the QNX name service, and forwards the command via MsgSend(). CommSys is event-driven — it consumes zero CPU while blocked on MsgReceive(), waking only when CompSys sends work.

Operator

A single thread at priority 6 running a command-line interface. Supports four commands:

All commands are logged to command_log.txt for auditing. Commands are sent to CompSys via MsgSend() on COMP_SYS_channel with message type 0x01.

Data Display

Spawns two threads:

Test Scenarios

Three traffic density levels are generated by TestCaseSetUp:

Key Design Decisions

Project Description

View on mobile

Project Report

View on mobile