# jyothish-kumar-s-d/towed-array architecture

> Architecture diagram of the GitHub repository jyothish-kumar-s-d/towed-array, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jyothish-kumar-s-d/towed-array
- Repository: https://github.com/jyothish-kumar-s-d/towed-array

## Overview

This repository’s primary product is a towed-sonar-array simulator that searches for the smallest safe vessel turning radius. The runtime workflow loads cable, fluid, sensor, and vessel telemetry; deploys and integrates the cable; attaches and simulates the sonar array; evaluates safety over the maneuver; and reports the radius search result. Supporting capabilities include telemetry-based array reconstruction and geometry visualization. The README also describes an older 3D prototype in the root. Some modules are documented but not sampled, so their internal wiring is omitted where uncertain.

Main entry points: [`TOWED_ARRAY/Simulation.cpp`](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/Simulation.cpp) (Trial and radius search), [`TOWED_ARRAY/main.cpp`](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/main.cpp) (Runner and setup), [`TOWED_ARRAY/plot_array.py`](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/plot_array.py) (Geometry visualization), [`towed_array.cpp`](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/towed_array.cpp) (Prototype simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Simulation workflow"]
  node_main["Runner and setup<br/>[main.cpp]"]
  node_simulation["Trial and radius search<br/>[Simulation.cpp]"]
  node_cablecfg["Cable parameters<br/>[cable_params.csv]"]
  node_fluidcfg["Fluid parameters<br/>[fluid_params.csv]"]
  node_arraycfg["Array configuration"]
  node_vesseldata["Vessel telemetry"]
  node_sensordata["Sensor telemetry"]
  node_result["Radius and safety report"]
  node_geometry["Cable geometry output<br/>[cable_geometry.csv]"]
  node_reconstructed["Reconstructed array output"]
  node_estimate["Array estimate output"]
end

subgraph group_physics["Physical models"]
  node_vessel["Vessel motion<br/>[Vessel.cpp]"]
  node_cable["Tow cable dynamics<br/>[TowCable.cpp]"]
  node_array["Sonar array dynamics<br/>[SonarArray.cpp]"]
end

subgraph group_analysis["Safety and analysis"]
  node_reconstruction["Array reconstruction"]
  node_estimator["Sensor estimation"]
  node_safety["Safety checks<br/>[SafetyChecker.cpp]"]
  node_plot["Geometry visualization<br/>[plot_array.py]"]
end

subgraph group_prototype["3D prototype"]
  node_fluidfield["Prototype fluid field<br/>[FluidField.h]"]
  node_elements["Prototype cable elements<br/>[components.h]"]
  node_prototypesim["Prototype simulator<br/>[towed_array.cpp]"]
end

node_operator(("Simulation operator"))

node_operator -->|"runs"| node_main
node_main -->|"loads"| node_cablecfg
node_main -->|"loads"| node_fluidcfg
node_main -->|"loads"| node_arraycfg
node_main -->|"starts search"| node_simulation
node_simulation -->|"loads"| node_vesseldata
node_simulation -->|"loads"| node_sensordata
node_simulation -->|"updates"| node_vessel
node_simulation -->|"integrates"| node_cable
node_simulation -->|"attaches and integrates"| node_array
node_simulation -->|"seeds and estimates"| node_reconstruction
node_simulation -->|"evaluates"| node_safety
node_simulation -->|"writes"| node_geometry
node_simulation -->|"writes"| node_reconstructed
node_simulation -->|"writes"| node_estimate
node_simulation -->|"returns report"| node_result
node_main -->|"prints search result"| node_result
node_plot -->|"reads"| node_geometry
node_plot -->|"reads"| node_reconstructed
node_prototypesim -.->|"coordinates"| node_elements
node_prototypesim -.->|"uses"| node_fluidfield

click node_main "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/main.cpp"
click node_simulation "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/Simulation.cpp"
click node_cablecfg "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/cable_params.csv"
click node_fluidcfg "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/fluid_params.csv"
click node_arraycfg "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/sensor_array_config.csv"
click node_vesseldata "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/vessel_telemetry.csv"
click node_sensordata "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/sensor_telemetry.csv"
click node_vessel "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/Vessel.cpp"
click node_cable "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/TowCable.cpp"
click node_array "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/SonarArray.cpp"
click node_reconstruction "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/ArrayReconstruction.cpp"
click node_estimator "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/SensorEstimator.cpp"
click node_safety "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/SafetyChecker.cpp"
click node_geometry "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/cable_geometry.csv"
click node_reconstructed "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/reconstructed_array.csv"
click node_estimate "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/reconstructed_array_estimate.csv"
click node_plot "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/plot_array.py"
click node_fluidfield "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/FluidField.h"
click node_elements "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/components.h"
click node_prototypesim "https://github.com/jyothish-kumar-s-d/towed-array/blob/main/towed_array.cpp"

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_main,node_simulation,node_cablecfg,node_fluidcfg,node_arraycfg,node_vesseldata,node_sensordata,node_result,node_geometry,node_reconstructed,node_estimate toneBlue
class node_vessel,node_cable,node_array toneAmber
class node_reconstruction,node_estimator,node_safety,node_plot toneMint
class node_fluidfield,node_elements,node_prototypesim toneRose
class node_operator toneIndigo
```

## Components

### Simulation workflow

- [Runner and setup](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/main.cpp): `TOWED_ARRAY/main.cpp`
- [Trial and radius search](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/Simulation.cpp): `TOWED_ARRAY/Simulation.cpp`
- [Cable parameters](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/cable_params.csv): `TOWED_ARRAY/cable_params.csv`
- [Fluid parameters](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/fluid_params.csv): `TOWED_ARRAY/fluid_params.csv`
- [Array configuration](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/sensor_array_config.csv): `TOWED_ARRAY/sensor_array_config.csv`
- [Vessel telemetry](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/vessel_telemetry.csv): `TOWED_ARRAY/vessel_telemetry.csv`
- [Sensor telemetry](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/sensor_telemetry.csv): `TOWED_ARRAY/sensor_telemetry.csv`
- **Radius and safety report**
- [Cable geometry output](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/cable_geometry.csv): `TOWED_ARRAY/cable_geometry.csv`
- [Reconstructed array output](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/reconstructed_array.csv): `TOWED_ARRAY/reconstructed_array.csv`
- [Array estimate output](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/reconstructed_array_estimate.csv): `TOWED_ARRAY/reconstructed_array_estimate.csv`

### Physical models

- [Vessel motion](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/Vessel.cpp): `TOWED_ARRAY/Vessel.cpp`
- [Tow cable dynamics](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/TowCable.cpp): `TOWED_ARRAY/TowCable.cpp`
- [Sonar array dynamics](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/SonarArray.cpp): `TOWED_ARRAY/SonarArray.cpp`

### Safety and analysis

- [Array reconstruction](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/ArrayReconstruction.cpp): `TOWED_ARRAY/ArrayReconstruction.cpp`
- [Sensor estimation](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/SensorEstimator.cpp): `TOWED_ARRAY/SensorEstimator.cpp`
- [Safety checks](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/SafetyChecker.cpp): `TOWED_ARRAY/SafetyChecker.cpp`
- [Geometry visualization](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/TOWED_ARRAY/plot_array.py): `TOWED_ARRAY/plot_array.py`

### 3D prototype

- [Prototype fluid field](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/FluidField.h): `FluidField.h`
- [Prototype cable elements](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/components.h): `components.h`
- [Prototype simulator](https://github.com/jyothish-kumar-s-d/towed-array/blob/main/towed_array.cpp): `towed_array.cpp`

### Other components

- **Simulation operator**

## Connections

- Simulation operator → Runner and setup: runs
- Runner and setup → Cable parameters: loads
- Runner and setup → Fluid parameters: loads
- Runner and setup → Array configuration: loads
- Runner and setup → Trial and radius search: starts search
- Trial and radius search → Vessel telemetry: loads
- Trial and radius search → Sensor telemetry: loads
- Trial and radius search → Vessel motion: updates
- Trial and radius search → Tow cable dynamics: integrates
- Trial and radius search → Sonar array dynamics: attaches and integrates
- Trial and radius search → Array reconstruction: seeds and estimates
- Trial and radius search → Safety checks: evaluates
- Trial and radius search → Cable geometry output: writes
- Trial and radius search → Reconstructed array output: writes
- Trial and radius search → Array estimate output: writes
- Trial and radius search → Radius and safety report: returns report
- Runner and setup → Radius and safety report: prints search result
- Geometry visualization → Cable geometry output: reads
- Geometry visualization → Reconstructed array output: reads
- Prototype simulator → Prototype cable elements: coordinates
- Prototype simulator → Prototype fluid field: uses
