# atharvahunachagi/trident architecture

> Architecture diagram of the GitHub repository atharvahunachagi/trident, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atharvahunachagi/trident
- Repository: https://github.com/atharvahunachagi/trident

## Overview

TRIDENT is a seafloor metal-detection prototype with two distinct data paths: real ESP32 telemetry processing and a synthetic survey/mapping demonstration. The principal workflow records hardware readings, processes and segments them into anomaly results, then presents those results in a dashboard. A separate legacy synthetic pulse-analysis path and synthetic mapping visuals are also represented. Some source files were not sampled; edges are limited to relationships shown in excerpts, the SOURCE INDEX, or README documentation.

Main entry points: [`process_pipeline.py`](https://github.com/atharvahunachagi/trident/blob/main/process_pipeline.py) (Pipeline Runner), [`dashboard.py`](https://github.com/atharvahunachagi/trident/blob/main/dashboard.py) (Interactive Dashboard), [`trident_logger.py`](https://github.com/atharvahunachagi/trident/blob/main/trident_logger.py) (Serial Telemetry Logger), [`data/raw/trident_data.csv`](https://github.com/atharvahunachagi/trident/blob/main/data/raw/trident_data.csv) (Raw Telemetry CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hardware["Hardware Acquisition"]
  node_logger["Serial Telemetry Logger<br/>[trident_logger.py]"]
  node_firmware["ESP32 Firmware<br/>[sketch_sep17a.ino]"]
end

subgraph group_real["Real Telemetry Pipeline"]
  node_rawdata["Raw Telemetry CSV<br/>[trident_data.csv]"]
  node_hardware_processing["Hardware Processing"]
  node_pipeline["Pipeline Runner"]
  node_results["Event Results CSV<br/>[results.csv]"]
end

subgraph group_synthetic["Synthetic Survey Pipeline"]
  node_generator["Pulse Data Generator<br/>[generate_data.py]"]
  node_pulse_data["Synthetic Pulse and Metadata Data<br/>[raw_pulses.csv]"]
  node_loader["Data Validation<br/>[data_loader.py]"]
  node_signal["Signal Conditioning"]
  node_features["Transient Features"]
  node_classification["Pulse Classification<br/>[classification.py]"]
end

subgraph group_presentation["Dashboard and Mapping"]
  node_mapping["Geospatial Survey Maps<br/>[mapping.py]"]
  node_synthetic_mapping["Synthetic Mapping Data"]
  node_dashboard["Interactive Dashboard<br/>[dashboard.py]"]
end

node_operator(("Operator"))
node_esp32{{"ESP32 PI Sensor"}}

node_operator -->|"operates"| node_esp32
node_esp32 -->|"streams telemetry"| node_logger
node_firmware -->|"drives sensing"| node_esp32
node_logger -->|"writes readings"| node_rawdata
node_operator -->|"runs"| node_pipeline
node_rawdata -->|"supplies input"| node_pipeline
node_pipeline -->|"processes telemetry"| node_hardware_processing
node_pipeline -->|"writes results"| node_results
node_results -->|"loads results"| node_dashboard
node_operator -->|"generates demo data"| node_generator
node_generator -->|"generates dataset"| node_pulse_data
node_pipeline -->|"loads and validates"| node_loader
node_pipeline -->|"conditions pulses"| node_signal
node_pipeline -->|"extracts features"| node_features
node_pipeline -->|"classifies pulses"| node_classification
node_pulse_data -->|"provides inputs"| node_loader
node_synthetic_mapping -->|"supplies demo visuals"| node_dashboard
node_dashboard -.->|"offers survey maps"| node_mapping

click node_logger "https://github.com/atharvahunachagi/trident/blob/main/trident_logger.py"
click node_firmware "https://github.com/atharvahunachagi/trident/blob/main/trident_arduino/sketch_sep17a/sketch_sep17a.ino"
click node_rawdata "https://github.com/atharvahunachagi/trident/blob/main/data/raw/trident_data.csv"
click node_hardware_processing "https://github.com/atharvahunachagi/trident/blob/main/src/hardware_processing.py"
click node_pipeline "https://github.com/atharvahunachagi/trident/blob/main/process_pipeline.py"
click node_results "https://github.com/atharvahunachagi/trident/blob/main/outputs/results.csv"
click node_generator "https://github.com/atharvahunachagi/trident/blob/main/generate_data.py"
click node_pulse_data "https://github.com/atharvahunachagi/trident/blob/main/data/raw_pulses.csv"
click node_loader "https://github.com/atharvahunachagi/trident/blob/main/src/data_loader.py"
click node_signal "https://github.com/atharvahunachagi/trident/blob/main/src/signal_processing.py"
click node_features "https://github.com/atharvahunachagi/trident/blob/main/src/feature_extraction.py"
click node_classification "https://github.com/atharvahunachagi/trident/blob/main/src/classification.py"
click node_mapping "https://github.com/atharvahunachagi/trident/blob/main/src/mapping.py"
click node_synthetic_mapping "https://github.com/atharvahunachagi/trident/blob/main/src/synthetic_mapping.py"
click node_dashboard "https://github.com/atharvahunachagi/trident/blob/main/dashboard.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_logger,node_firmware toneBlue
class node_rawdata,node_hardware_processing,node_pipeline,node_results toneAmber
class node_generator,node_pulse_data,node_loader,node_signal,node_features,node_classification toneMint
class node_mapping,node_synthetic_mapping,node_dashboard toneRose
class node_operator,node_esp32 toneIndigo
```

## Components

### Hardware Acquisition

- [Serial Telemetry Logger](https://github.com/atharvahunachagi/trident/blob/main/trident_logger.py): `trident_logger.py`
- [ESP32 Firmware](https://github.com/atharvahunachagi/trident/blob/main/trident_arduino/sketch_sep17a/sketch_sep17a.ino): `trident_arduino/sketch_sep17a/sketch_sep17a.ino`

### Real Telemetry Pipeline

- [Raw Telemetry CSV](https://github.com/atharvahunachagi/trident/blob/main/data/raw/trident_data.csv): `data/raw/trident_data.csv`
- [Hardware Processing](https://github.com/atharvahunachagi/trident/blob/main/src/hardware_processing.py): `src/hardware_processing.py`
- [Pipeline Runner](https://github.com/atharvahunachagi/trident/blob/main/process_pipeline.py): `process_pipeline.py`
- [Event Results CSV](https://github.com/atharvahunachagi/trident/blob/main/outputs/results.csv): `outputs/results.csv`

### Synthetic Survey Pipeline

- [Pulse Data Generator](https://github.com/atharvahunachagi/trident/blob/main/generate_data.py): `generate_data.py`
- [Synthetic Pulse and Metadata Data](https://github.com/atharvahunachagi/trident/blob/main/data/raw_pulses.csv): `data/raw_pulses.csv`
- [Data Validation](https://github.com/atharvahunachagi/trident/blob/main/src/data_loader.py): `src/data_loader.py`
- [Signal Conditioning](https://github.com/atharvahunachagi/trident/blob/main/src/signal_processing.py): `src/signal_processing.py`
- [Transient Features](https://github.com/atharvahunachagi/trident/blob/main/src/feature_extraction.py): `src/feature_extraction.py`
- [Pulse Classification](https://github.com/atharvahunachagi/trident/blob/main/src/classification.py): `src/classification.py`

### Dashboard and Mapping

- [Geospatial Survey Maps](https://github.com/atharvahunachagi/trident/blob/main/src/mapping.py): `src/mapping.py`
- [Synthetic Mapping Data](https://github.com/atharvahunachagi/trident/blob/main/src/synthetic_mapping.py): `src/synthetic_mapping.py`
- [Interactive Dashboard](https://github.com/atharvahunachagi/trident/blob/main/dashboard.py): `dashboard.py`

### Other components

- **Operator**
- **ESP32 PI Sensor**

## Connections

- Operator → ESP32 PI Sensor: operates (evidence: `README.md`)
- ESP32 PI Sensor → Serial Telemetry Logger: streams telemetry (evidence: `README.md`)
- ESP32 Firmware → ESP32 PI Sensor: drives sensing (evidence: `README.md`)
- Serial Telemetry Logger → Raw Telemetry CSV: writes readings (evidence: `README.md`)
- Operator → Pipeline Runner: runs (evidence: `README.md`)
- Raw Telemetry CSV → Pipeline Runner: supplies input (evidence: `README.md`)
- Pipeline Runner → Hardware Processing: processes telemetry (evidence: `process_pipeline.py`)
- Pipeline Runner → Event Results CSV: writes results (evidence: `README.md`)
- Event Results CSV → Interactive Dashboard: loads results (evidence: `README.md`)
- Operator → Pulse Data Generator: generates demo data (evidence: `README.md`)
- Pulse Data Generator → Synthetic Pulse and Metadata Data: generates dataset (evidence: `generate_data.py`)
- Pipeline Runner → Data Validation: loads and validates (evidence: `process_pipeline.py`)
- Pipeline Runner → Signal Conditioning: conditions pulses (evidence: `process_pipeline.py`)
- Pipeline Runner → Transient Features: extracts features (evidence: `process_pipeline.py`)
- Pipeline Runner → Pulse Classification: classifies pulses (evidence: `process_pipeline.py`)
- Synthetic Pulse and Metadata Data → Data Validation: provides inputs (evidence: `src/data_loader.py`)
- Synthetic Mapping Data → Interactive Dashboard: supplies demo visuals (evidence: `README.md`)
- Interactive Dashboard → Geospatial Survey Maps: offers survey maps
