AirWatcher is a C++ application for managing and analyzing air quality sensor data (AQI). It allows you to query average AQI over a specified area and time period, compare sensors by similarity, and visualize users associated with sensors via an interactive terminal interface. Automated unit tests with performance checks are included.
AirWatcher is designed to simplify the ingestion, processing, and analysis of air quality data from multiple sensors. It provides:
- Automatic data loading from text files (CSV-style).
- Authentification of the diffirent types of users (Government Agents/ Private Users / Providers)
- AQI average queries over a geographic area and time range.
- Similarity comparing of sensors .
- User–sensor association visualization.
- Interactive terminal interface for easy navigation.
- Automated unit tests to verify functionality and performance.
The core processing logic is encapsulated in the GestionnaireSysteme class, following a modular, object-oriented architecture.
-
Data Ingestion
- Automatically scan a specified folder and load sensor data files into memory.
- Support for large datasets with efficient parsing (C++17 I/O and STL).
-
AQI Averaging
- Compute the average AQI for all sensors within a user-defined geographic bounding box (latitude/longitude) over a specified time interval.
- Handles time‐series data filtering (timestamps in
YYYY-MM-DD HH:MM:SSformat).
-
Sensor comparing
- Calculate a distance metric between 2 sensor based on their AQI in a given time stamp.
- Return a float if the value is 0 then the sensors perfectly match/ the higher the value is the more different are the sensors.
-
User–Sensor Associations
- Load user metadata and associate each user with one or more sensors.
- Display user details alongside their linked sensor IDs.
-
Interactive CLI
- Menu‐driven interface with options to run queries, view sensor rankings, list users, and exit.
- Input prompts for entering coordinates, time ranges, and sensor IDs.
-
Unit Tests & Performance Checks
- Automated tests covering:
- Distance/dissimilarity computation between sensors.
- Measurement count validation.
- AQI average accuracy.
- Sensor ranking logic.
- User loading and associations.
- Basic performance benchmarks to ensure sub-second query response times on moderate datasets.
- Automated tests covering:
Before installing and running AirWatcher, ensure you have:
-
Operating System:
- Linux (Ubuntu 18.04+ or similar)
- Windows (Windows 10 with WSL recommended, or native MinGW)
-
Compiler:
- A C++17‐compatible compiler (e.g.,
g++ 7.4+,clang++ 8+, or Visual Studio 2019+)
- A C++17‐compatible compiler (e.g.,
-
Build Tools:
make(GNU Make) or an equivalent build system on Windows (e.g., MinGW’smingw32-make)
-
Terminal/Console:
- Access to a shell or command prompt to run executables and tests.
Clone the repository and compile the application and tests using the provided Makefile.
- Clone via Git
git clone https://github.com/Ibra2477/Airwatcher cd Airwatcher
B3330 : Shili / Chakroun /Marcil