Skip to content

✈️ Flight tracking and collision detection system featuring quad-tree spatial optimization, built in the first year at Epitech.

License

Notifications You must be signed in to change notification settings

mallory-scotton/radar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✈️ MyRadar - Flight Simulation System

A sophisticated real-time aircraft traffic control and collision detection simulator built with CSFML. This project implements advanced spatial partitioning algorithms and interactive visualization for monitoring aircraft movements, collision detection, and air traffic management.

🎯 Project Overview

MyRadar is a comprehensive flight simulation system designed to visualize and monitor aircraft movements in real-time. The simulator features advanced collision detection algorithms, quadtree spatial partitioning for optimal performance, and an intuitive user interface for air traffic control operations.

Language: C
Graphics Library: CSFML (Simple and Fast Multimedia Library)
Build System: Makefile
Architecture: Modular object-oriented design in C

✨ Features

Core Simulation

  • Real-time Aircraft Tracking: Monitor multiple aircraft trajectories simultaneously
  • Advanced Collision Detection: Sophisticated algorithms for aircraft-to-aircraft and aircraft-to-tower collision detection
  • Quadtree Spatial Partitioning: Efficient spatial data structure for performance optimization
  • Dynamic Time Control: Adjustable simulation speed and time manipulation
  • Interactive Visualization: Real-time rendering of aircraft positions, paths, and collision zones

User Interface

  • Settings Panel: Comprehensive configuration window with real-time adjustments
  • Statistical Dashboard: Live statistics tracking for arrivals, crashes, and current traffic
  • Visual Toggles: Enable/disable sprites, hitboxes, and quadtree visualization
  • Mouse Interaction: Hover effects showing aircraft trajectories and information
  • Keyboard Controls: Extensive keyboard shortcuts for simulation control

Advanced Features

  • Tower Collision Zones: Configurable control towers with adjustable safety radii
  • Path Visualization: Dynamic flight path rendering with customizable colors
  • Performance Monitoring: Real-time FPS and simulation time tracking
  • Configurable Scenarios: Script-based aircraft and tower configuration
  • Comprehensive Testing: Unit test suite with coverage reporting

🖼️ Gallery

Main Simulation Window

Main Simulation Real-time aircraft tracking with collision detection and quadtree visualization

Settings Configuration Panel

Settings Panel Interactive settings window with color customization and feature toggles

Demonstration

Animated Demonstration Real-time aircraft tracking demonstration

📦 Installation

Prerequisites

  • GCC compiler with C99 support
  • CSFML development libraries
  • Make build system
  • Git (for cloning)

Quick Start

# Clone the repository
git clone <repository-url>
cd radar

# Build the project
make re

# Run the simulator with a scenario file
./my_radar [PATH_TO_SCRIPT]

🚀 Usage

Command Line Options

./my_radar [OPTIONS] [SCRIPT_FILE]

OPTIONS:
  -h, --help    Display usage information and exit

Interactive Controls

Key Action
L Toggle hitboxes and collision areas
S Toggle aircraft sprites
Q Toggle quadtree visualization
I Open/close settings window
Increase simulation time speed
Decrease simulation time speed
ESC Exit simulation
Mouse Hover Display aircraft trajectory and information

Scenario File Format

Create custom scenarios using the following format:

A departure_x departure_y arrival_x arrival_y speed delay
T tower_x tower_y radius

Example:

A 100 200 800 400 5 10
A 200 100 600 500 3 15
T 400 300 50
T 600 200 75

🔧 Build Instructions

Standard Build

make          # Build the project
make re       # Clean and rebuild
make clean    # Remove object files
make fclean   # Remove all generated files

Testing and Coverage

make tests_run    # Run unit tests with coverage report

The test suite includes:

  • Unit tests for all utility functions
  • Coverage analysis with gcovr
  • HTML coverage report generation
  • Automated test execution

Development Build

# Debug build with additional flags
make CFLAGS="-Wall -Wextra -g3 -DDEBUG"

📋 Dependencies

Required Libraries

  • CSFML: Complete multimedia library suite
    • libcsfml-system
    • libcsfml-window
    • libcsfml-graphics
    • libcsfml-audio
  • Math Library: libm

Development Dependencies

  • Criterion: Unit testing framework
  • gcovr: Coverage analysis tool
  • GCC: GNU Compiler Collection

Installation on Ubuntu/Debian

sudo apt update
sudo apt install libcsfml-dev libcriterion-dev gcovr gcc make

📄 License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Copyright (c) 2025 Tekyo Drift

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

🤝 Contributing

We welcome contributions to MyRadar! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Standards

  • Follow the existing code style and conventions
  • Add unit tests for new functionality
  • Ensure all tests pass before submitting
  • Update documentation as needed

📞 Contact

Developer: Mallory Scotton
Email: [email protected]
GitHub: @mallory-scotton

For bug reports, feature requests, or technical questions, please open an issue on GitHub or contact the development team directly.


MyRadar - Advanced flight simulation and collision detection system
Coded with ❤️ by passionate developers for the aviation simulation community

About

✈️ Flight tracking and collision detection system featuring quad-tree spatial optimization, built in the first year at Epitech.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published