Instructions:
The project focuses on the use of FMCW radar.
It is used for data collection, point detection, tracking and other functions.
The project is broken down into several modules.
The aim of this division is to decouple as much as possible the functionalities present in each module, and make the development of new functionalities more flexible and rapid.

Modules documentation will be provided in json format below.
Your goal is to create a markdown documentation of the entire project.
This documentation is intended to guide a developer who is new to the project.

Informations:
{
  "modules_doc": [
    {
      "module": "radar_visuals",
      "doc": "# radar_visuals Module Documentation\n\n## Overview\n\nThe radar_visuals module is a dedicated visualization package within a project focused on the use of Frequency Modulated Continuous Wave (FMCW) radar. It is designed to provide tools and utilities for the rendering of radar data in various visual formats, supporting functionalities like data collection, point detection, and tracking analysis. The module aims to facilitate rapid development and integration of new visualization features through a decoupled and flexible structure.\n\n## Module Structure\n\nThe radar_visuals module currently contains the following file:\n\n- display.py: A Python script offering a suite of classes and functions for creating dynamic and static displays for radar data visualization.\n\n## Module Files Documentation\n\n### display.py\n\nThe display.py file within the radar_visuals package encompasses multiple visualization methods and is central to the module. Below is a summary of the provided documentation:\n\n#### Overview\nThe script is essential for visualizing radar data and includes capabilities for 2D, 3D, and polar plotting. It is versatile enough to accommodate both real-time and static data presentations.\n\n#### Components\nEnums such as PlayingMode, Projection, and GraphType allow the user to define the display behavior, the plot\u00e2\u20ac\u2122s projection type, and the graph style, respectively. Along with utility functions like color_from_id and plot_signal, the script provides two main classes:\n\n- UpdatableDisplay: The abstract base class for displays that can be updated, initializing the figure, axes, and other graphical elements.\n- SimpleUpdatableDisplay: A concrete implementation of UpdatableDisplay that prepares and updates displays with new data points.\n\n#### Functionalities\nThe primary functionalities include creating interactive graphs to visualize radar data, updating them according to predefined playing modes, and ensuring compatibility with different data types and visual projections.\n\n#### Data Flow\nThe typical workflow involves:\n1. Initializing a display object with the required properties.\n2. Accumulating or simulating radar data points.\n3. Updating the display as new data arrives through the show() method.\n4. Presenting the visual representation of the radar data to users based on the set playing mode.\n\n#### Developer Notes\nDevelopers are advised to match data dimensions with graph types and projections, manage update rates effectively, and assign unique colors to data sources using UUIDs for better data distinction.\n\n#### Integration\nDespite being part of the radar_visuals package, display.py operates independently from other components, specifically focusing on visualization purposes and not on signal processing.\n\n## Usage\n\nThe module can be employed to:\n\n- Visualize FMCW radar-related data points, signals, and more complex datasets.\n- Develop new visualization tools tailored to the specifics of radar data.\n- Enhance the interpretation of radar data through graphically rich plots.\n\n## Conclusion\n\nradar_visuals is a crucial module for the graphical representation and analysis of radar data within a larger FMCW radar-focused project. The modular structure accommodates efficient development, enabling users and developers to easily integrate new visualization techniques suited to their specific needs. The module\u00e2\u20ac\u2122s design streamlines the translation of complex data into understandable and insightful visual formats, supporting a wide range of functionalities from debugging to presentation."
    },
    {
      "module": "radar_toolbox",
      "doc": "# radar_toolbox Module Documentation\n\n## Overview\n\nThe radar_toolbox module is a collection of tools designed for interfacing with Frequency Modulated Continuous Wave (FMCW) radar systems. It is utilized for various purposes such as data collection, point detection, tracking, and other radar signal processing functions. The module is structured to decouple functionalities into distinct units to promote flexibility and rapid development of new features.\n\n## Module Structure\n\nThe radar_toolbox module is composed of the following elements:\n\n- conf/\n  - Various configuration files setting parameters for radar initialization and different processing steps, such as profile_vs1642_exp.cfg which provides specific settings for radar models and data handling.\n- capture_session/\n  - This submodule contains scripts for setting up and managing radar data capture sessions, with scripts like main.py for starting, monitoring, and saving raw radar captures.\n- raw_data/\n  - A collection of code dealing with raw data handling, including adc.py for interfacing with Analog-to-Digital Converters and scripts to convert raw binary radar data into structured formats for analysis.\n- TI_data/\n  - Contains tools and scripts to communicate, configure, and process data from Texas Instruments (TI) mmWave radar boards, including sensor_com.py which outlines communication protocols and data parsing mechanisms.\n- fmcw_utils.py\n  - This utility file offers essential classes and functions for the processing and analysis of FMCW radar data, such as radar model enums and functions for loading and converting radar data.\n- utils.py\n  - General utility functions and classes that support the operation of the radar_toolbox module, with methods for loading configurations, data parsing, and more.\n\n## Module Files Documentation\n\nDevelopers new to radar_toolbox will find documentation for several key files within the module. An outline of this documentation includes:\n\n- fmcw_utils\n  - Detailed information on handling FMCW radar systems, managing configurations, processing radar signals, and transforming them into analyzable forms.\n- utils\n  - A comprehensive overview of utility functions that aid in loading configurations, preprocessing radar data, and assisting with model training and coordinate adjustments.\n- capture_session/main\n  - Instructions on setting up and conducting recording sessions with scripts that interact with the radar system to initiate and manage data capture.\n- raw_data/adc\n  - Documentation of the adc.py script which serves as an interface to ADC hardware, allowing for the capture and real-time processing of radar data streams.\n- raw_data/raw_bin_to_numpy\n  - Explains the process of converting raw binary radar data into a NumPy array and the steps involved in ensuring data integrity during conversion.\n- raw_data/record_raw_data\n  - A guide to a script focused on raw data recording, detailing the initiation of data capture and subsequent data stream management.\n- TI_data/record_ti_data\n  - Documentation for a script specific to TI radar hardware, describing real-time data capture and CSV data storage functionality.\n- TI_data/sensor_com\n  - Communication protocols and data structure parsing methods for TI mmWave radar boards are outlined for managing interactions with these devices.\n\n## Usage\n\nDevelopers can use the radar_toolbox module to:\n\n- Set up FMCW radar data capture sessions.\n- Record and process raw radar data.\n- Convert binary radar data captures into formats suitable for analysis, such as NumPy arrays.\n- Interact and configure TI mmWave radars for data acquisition.\n\n## Data Flow Summary\n\nThe data flow within the radar_toolbox module follows these general steps:\n\n1. Configuration is set up using JSON files and configuration profiles for the specific radar models.\n2. Data recording sessions are initiated, capturing the radar data and storing it in binary format.\n3. Raw binary data is processed, filtered, and organized into structured data arrays.\n4. Data is made ready for analysis, transformed into point clouds or other representations necessary for further processing and interpretation.\n\n## External Dependencies\n\nWhile the module works as an independent toolkit within the project scope, it interfaces with radar hardware and other software modules that handle advanced data analysis, visualization, and machine learning applications.\n\n## Overall Significance\n\nThe radar_toolbox module serves as the foundational toolset for FMCW radar systems, streamlining the process from initial data capture to data preparation for analytics. It emphasizes modularity, making it easier to grow and adapt the project with new functionalities."
    },
    {
      "module": "radar_tracking",
      "doc": "# FMCW Radar Tracking Project Documentation\n\n## radar_tracking Module\n\nThe radar_tracking module sits at the heart of the FMCW radar project, providing algorithms and utilities focused on the tracking of objects detected by the radar system.\n\n### Module Structure\n\nThe module is composed of several scripts and a configuration file organized as follows:\n\n- tracking_utils.py: Utilities for configuring and initializing tracking components.\n- conf/tracking.json: A JSON-formatted configuration file specifying parameters for the tracking system.\n- inference/:\n  - example_kalman_filter.py: Perform inference using Kalman filters.\n  - example_tracking.py: An example script demonstrating the tracking process.\n- models/:\n  - kalman.py: Implementations of Kalman filter for state estimation.\n  - tracking.py: The main tracking algorithm handling the temporal correlation of clusters.\n- clustering/:\n  - cluster.py: Data structure for managing clusters of points.\n  - cluster_predictor.py: Class for predicting clustering behavior based on certain algorithms.\n  - optimizer.py: Optimization utilities for clustering performance.\n- algos/:\n  - clustering_algorithm.py: Abstract base algorithms for clustering.\n  - dbscan.py: DBSCAN clustering algorithm implementation.\n  - gaussian_mixture.py: Gaussian Mixture Model clustering implementation.\n  - meanshift.py: Mean Shift clustering algorithm implementation.\n- visuals/display.py: Visualization classes for displaying the tracking data.\n\n### Dependencies\n\nThe radar_tracking module relies on other parts of the FMCW radar project:\n\n- radar_toolbox:\nA toolkit for interacting with the radar hardware and processing raw radar data.\n\n- radar_visuals:\nProvides dynamic and static displays to visualize radar data, which can be helpful to show tracking results in an accessible form.\n\n## Development Notes\n\nDevelopers new to this project will want to familiarize themselves with the radar_tracking module by reviewing existing documentation and code comments.\n\nFor practical understanding, developers are encouraged to interact with example scripts inside the inference subdirectory. They illustrate how the various components come together to achieve object tracking.\n\n## Conclusion\n\nThe radar_tracking module integrates sophisticated algorithms and diverse data sets to track objects with high precision. It exemplifies a well-organized codebase that promotes decoupled architecture, thus expediting the development of innovative functionalities in radar-based tracking systems."
    },
    {
      "module": "radar_area_detection",
      "doc": "# radar_area_detection Module Documentation\n\n## Overview\n\nThe radar_area_detection module forms a crucial part of an FMCW radar-based project, focusing on detecting objects within specific areas and managing the corresponding alerts. The module contains a collection of Python scripts, configuration files, and communication protocols designed to collaborate with other parts of the radar system, allowing it to perform tasks such as area detection, alarm triggering, and inter-system communications.\n\n## Module Structure\n\nThe radar_area_detection module comprises the following files organized into scripts and configuration files:\n\n- Scripts:\n  - detection.py: Handles the definition of detection areas and alerting mechanism.\n  - display.py: Provides visualization for area detection status.\n  - live_area_detection.py: Orchestrates real-time area detection using radar data.\n  - comm/camera_alert.py: Implements alerts via camera control.\n  - comm/rabbitmq.py: Manages message dispatching to RabbitMQ for alerting and communication.\n\n\n- Configuration Files:\n  - conf/6432_ti_config.cfg: Configuration for TI 6432 model radars.\n  - conf/6843_ti_config.cfg: Configuration for TI 6843 model radars.\n  - conf/detection_conf.json: General detection settings.\n  - conf/live_area_detection.json: Configuration for live area detection scenario.\n  - conf/rabbitmq_conf.json: Settings for RabbitMQ communication.\n  - conf/tracking_conf.json: Parameters for tracking configuration.\n\n## Documented Files\n\nEach file within the radar_area_detection module has its specific role and functionality as documented below:\n\n- detection.md: Provides details on the classes dealing with area detection and the alerting framework. It introduces Area, Alert, and AreaDetector classes.\n\n- display.md: Describes the AreasDisplay2D class, which extends visualization functionality from the radar_tracking module to display detection areas in a 2D plot, reflecting their status.\n\n- live_area_detection.md: Covers the implementation and operational flow of real-time area detection, including radar setup, data parsing, detection, and alerting processes.\n\n- comm/camera_alert.md: Explains the CameraAlert class that triggers networked cameras based on area detection alerts via HTTP requests.\n\n- comm/rabbitmq.md: Details about the RabbitMQSender class, discussing its role in setting up a connection to RabbitMQ servers and sending JSON formatted messages.\n\n## Integration with Other Modules\n\nThis module relies on other parts of the radar system to function optimally:\n\n- radar_toolbox: Supplies utilities for radar setup, raw data manipulation, and configuration handling, which are essential for the initial steps in detection and tracking.\n\n- radar_tracking: Provides object tracking algorithms that input into the detection process within radar_area_detection. It contains clustering techniques and mathematical models for accurate object location and movement extrapolation.\n\n- radar_visuals: Offers visualization tools, which can be employed by the display scripts within the radar_area_detection module, necessary for real-time or static representation of radar data and detection status.\n\n## Usage\n\nDevelopers involved in this project can use the radar_area_detection module to implement and fine-tune area detection for specific radar applications, manage alerting protocols, and integrate visualizations into the radar system. The module\u00e2\u20ac\u2122s clear structure and documented components facilitate an understanding of its workings and the means to extend or modify its capabilities.\n\n## Data Flow Summary\n\n- Data captured by radar hardware is processed using utilities from the radar_toolbox.\n- Processed data is fed into tracking algorithms provided by radar_tracking.\n- Based on tracking results, radar_area_detection determines if detected objects enter predefined areas and triggers appropriate alerts.\n- Alerts can be visualized locally or sent through messaging systems like RabbitMQ, and camera systems are activated as part of the alert response."
    },
    {
      "module": "radar_fall_detection",
      "doc": "# radar_fall_detection Module Documentation\n\n## Overview\n\nThe radar_fall_detection module is a critical component within an FMCW radar project that focuses on the detection of falls using radar data. It complements the radar\u00e2\u20ac\u2122s capability to detect and track objects by identifying patterns indicative of a fall event. The module is particularly useful in monitoring and safety applications, such as in elder care or hazardous work environments, where rapid response to falls can significantly impact outcomes.\n\n## Module Structure\n\nThe radar_fall_detection module consists of several key scripts and configuration files that together enable the detection and visualization of falls:\n\n- algo.py: Contains the algorithmic logic for detecting falls based on processed cluster data.\n- display.py: Handles the visualization of fall events, marking suspected and confirmed falls.\n- live_fall_detection.py: A script for real-time fall detection using live radar data.\n- conf/: A directory containing various configuration files:\n- fall_conf.json: Configures the parameters for the fall detection algorithm.\n- live_fall_detection.json: Points to the configuration for live fall detection.\n- ti_conf.json: Specifies radar hardware interface settings.\n- tracking.json: Configures the tracking system that precedes fall detection.\n\nThe module aims to separate each aspect of fall detection into discrete units, creating a clear flow from data acquisition to alert generation.\n\n### Configuration Files\n\n- fall_conf.json: Sets thresholds such as minimum height and fall duration required to confirm a fall.\n- live_fall_detection.json: Directs the module to specific configuration files necessary for live fall detection.\n- ti_conf.json: Informs the module of the radar hardware settings, enabling proper initialization and data acquisition.\n- tracking.json: Contains the configuration for tracking, including settings that may affect fall detection, like cluster definitions.\n\n## Module Dependencies\n\nThe radar_fall_detection module interacts with several others within the FMCW radar project ecosystem:\n\n- radar_tracking: Shares processed cluster data with the fall detection algorithms and may receive configurations related to tracking.\n- radar_visuals: Provides visualization capabilities to graphically represent detected falls alongside typical radar tracking data.\n- radar_toolbox: A toolkit used for interfacing with radar systems and could be employed for preprocessing data before being ingested by the fall detection mechanisms.\n\n## Integration with Other Modules\n\n- Fall Detection Logic (algo.py): Relies on cluster data from the radar_tracking module to identify potential falls.\n- Visualization (display.py): May utilize classes and functions from the radar_visuals module for display implementations.\n- Real-Time Fall Detection (live_fall_detection.py): Uses utilities from radar_toolbox for data handling and interfaces with radar hardware for live data acquisition.\n\n## Documentation Details\n\nEach file within the module has its detailed documentation outlining specific functions, classes, and usage patterns:\n\n- algo.py: Outlines the FallDetector class that operationalizes the fall detection logic based on radar data clusters.\n- display.py: Describes enhanced visualization classes FallDisplay and FallDisplay2D for falls representation in 2D and 3D.\n- live_fall_detection.py: Focuses on integrating the entire process from radar data acquisition to visualizing detected falls.\n\n## Developer Notes\n\n- Ensure that the radar hardware is properly configured and that the radar data are appropriately preprocessed before they are passed onto tracking and fall detection scripts.\n- In the implementation and deployment of the module, consider environmental factors that might affect the accuracy of fall detection such as noise, occlusion, and the presence of multiple moving objects.\n\n## Conclusion\n\nThe radar_fall_detection module is designed with flexibility and modularity in mind, dedicated to detecting falls with rapid deployment capabilities. It incorporates critical functionalities from data manipulation all the way to user-level alerting and visualization. This modular approach allows for the swift development and integration of new features, enabling enhanced safety monitoring applications that can potentially save lives and mitigate risks in various settings."
    }
  ]
}