ATC Monitor is a desktop application built with Qt 6 and C++17 that simulates a simplified air traffic monitoring system:
- 2D radar display (custom QWidget) with moving aircraft
- Detailed flights table with sorting and conflict filtering
- Conflict detection between aircraft based on configurable distance threshold
- Background simulation in a worker thread
- Event log for conflicts and simulation lifecycle
- Simple settings dialog + persistent configuration (.ini file)
- Basic unit tests for the conflict detection logic
-
Radar View
- Custom
QWidget(RadarView) painted withQPainter - Normalized coordinates based on latitude/longitude
- Aircraft in conflict highlighted in red
- Custom
-
Flights Table
QAbstractTableModel(FlightsModel) holdingFlightstructs- Columns: ID, Latitude, Longitude, Altitude, Speed, Heading, Status (OK/CONFLICT)
QSortFilterProxyModel(FlightsProxyModel) for:- column sorting
- "Show conflicts only" filtering
-
Simulation
DataGeneratorruns in a separateQThread- Internal
QTimerticks at a configurable interval - Generates and updates a set of flights with random positions and headings
- Emits
flightsUpdated(std::vector<Flight>)to update the UI
-
Conflict Detection
ConflictDetector– pure C++ module- Checks pairwise distances between flights and flags conflicts under a threshold
- Threshold is configurable from the settings dialog
-
Logging
QTextEditused as an event log- Events logged:
- Simulation start/stop
- New flight entering the radar area
- Flight leaving the radar area (if implemented)
- Conflict detected / resolved
-
Settings & Persistence
SettingsDialogto configure:- Number of flights
- Conflict distance threshold
- Simulation update interval (ms)
AppConfig+AppConfigManageruseQSettingswith an.inifileatcmonitor.inistored next to the executable
-
Tests
- Qt Test–based unit tests in
tests/ ConflictDetectorTestscovers basic scenarios:- no conflict
- single conflict
- Qt Test–based unit tests in
- CMake >= 3.16
- Qt 6 (or Qt 5) with Widgets and Test modules
- A C++17–capable compiler
mkdir build
cd build
cmake ..
cmake --build .