# theta-limited/openathena-legacy-python architecture

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

- Interactive diagram: https://gitdiagram.com/theta-limited/openathena-legacy-python
- Repository: https://github.com/theta-limited/openathena-legacy-python

## Overview

OpenAthena is a legacy Python tool that estimates a ground target’s location from drone camera metadata and terrain elevation. Its principal workflow extracts image position and camera orientation, loads a GeoTIFF elevation model, resolves the camera’s line of sight against terrain, and reports target coordinates; it can also publish Cursor on Target (CoT) messages. A separate find-me mode supports relative bearing-and-distance targeting for search teams. The graph follows documented calls and references; some module behavior is unsampled, so uncertain connections are omitted.

Main entry points: [`src/getTarget.py`](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/getTarget.py) (Target Resolver), [`src/parseImage.py`](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/parseImage.py) (Image Metadata Parser), [`src/find_me_mode.py`](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/find_me_mode.py) (Find-Me Mode), [`src/parseGeoTIFF.py`](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/parseGeoTIFF.py) (Elevation Sampler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_image["Image Processing"]
  node_image_parser["Image Metadata Parser<br/>[parseImage.py]"]
  node_find_mode["Find-Me Mode<br/>[find_me_mode.py]"]
end

subgraph group_terrain["Terrain Targeting"]
  node_target_math["Target Resolver<br/>[getTarget.py]"]
  node_dem_parser["Elevation Sampler<br/>[parseGeoTIFF.py]"]
  node_runtime_config["Runtime Settings<br/>[config.py]"]
end

subgraph group_coordinates["Coordinate Conversion"]
  node_datum_translator["WGS84-SK42 Translator"]
  node_grid_projector["Gauss-Kruger Projector"]
end

subgraph group_outputs["Target Outputs"]
  node_cot_sender["CoT Publisher"]
end

node_operator(("Operator"))
node_drone_image["Drone Image"]
node_dem_file["GeoTIFF DEM"]
node_target_location["Target Location"]
node_cot_network(("UDP Multicast Network"))

node_operator -->|"submits image"| node_image_parser
node_drone_image -->|"provides metadata"| node_image_parser
node_image_parser -->|"resolves target"| node_target_math
node_operator -.->|"selects terrain"| node_dem_file
node_dem_file -->|"provides elevations"| node_dem_parser
node_image_parser -->|"converts coordinates"| node_datum_translator
node_image_parser -->|"projects coordinates"| node_grid_projector
node_grid_projector -->|"uses translator"| node_datum_translator
node_target_math -->|"samples elevation"| node_dem_parser
node_target_math -->|"sends target"| node_cot_sender
node_target_math -->|"returns coordinates"| node_target_location
node_cot_sender -->|"multicasts message"| node_cot_network
node_operator -->|"enters relative target"| node_find_mode
node_find_mode -->|"loads terrain"| node_dem_parser
node_find_mode -->|"resolves target"| node_target_math
node_target_math -->|"reads settings"| node_runtime_config

click node_image_parser "https://github.com/theta-limited/openathena-legacy-python/blob/main/src/parseImage.py"
click node_find_mode "https://github.com/theta-limited/openathena-legacy-python/blob/main/src/find_me_mode.py"
click node_target_math "https://github.com/theta-limited/openathena-legacy-python/blob/main/src/getTarget.py"
click node_dem_parser "https://github.com/theta-limited/openathena-legacy-python/blob/main/src/parseGeoTIFF.py"
click node_runtime_config "https://github.com/theta-limited/openathena-legacy-python/blob/main/src/config.py"
click node_datum_translator "https://github.com/theta-limited/openathena-legacy-python/blob/main/src/WGS84_SK42_Translator.py"
click node_grid_projector "https://github.com/theta-limited/openathena-legacy-python/blob/main/src/SK42_Gauss_Kruger.py"
click node_cot_sender "https://github.com/theta-limited/openathena-legacy-python/blob/main/src/cursor_on_target.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_image_parser,node_find_mode toneBlue
class node_target_math,node_dem_parser,node_runtime_config toneAmber
class node_datum_translator,node_grid_projector toneMint
class node_cot_sender toneRose
class node_operator,node_drone_image,node_dem_file,node_target_location,node_cot_network toneIndigo
```

## Components

### Image Processing

- [Image Metadata Parser](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/parseImage.py): `src/parseImage.py`
- [Find-Me Mode](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/find_me_mode.py): `src/find_me_mode.py`

### Terrain Targeting

- [Target Resolver](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/getTarget.py): `src/getTarget.py`
- [Elevation Sampler](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/parseGeoTIFF.py): `src/parseGeoTIFF.py`
- [Runtime Settings](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/config.py): `src/config.py`

### Coordinate Conversion

- [WGS84-SK42 Translator](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/WGS84_SK42_Translator.py): `src/WGS84_SK42_Translator.py`
- [Gauss-Kruger Projector](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/SK42_Gauss_Kruger.py): `src/SK42_Gauss_Kruger.py`

### Target Outputs

- [CoT Publisher](https://github.com/theta-limited/openathena-legacy-python/blob/main/src/cursor_on_target.py): `src/cursor_on_target.py`

### Other components

- **Operator**
- **Drone Image**
- **GeoTIFF DEM**
- **Target Location**
- **UDP Multicast Network**

## Connections

- Operator → Image Metadata Parser: submits image (evidence: `src/parseImage.py`)
- Drone Image → Image Metadata Parser: provides metadata (evidence: `src/parseImage.py`)
- Image Metadata Parser → Target Resolver: resolves target (evidence: `src/parseImage.py`)
- Operator → GeoTIFF DEM: selects terrain (evidence: `README.md`)
- GeoTIFF DEM → Elevation Sampler: provides elevations (evidence: `src/parseGeoTIFF.py`)
- Image Metadata Parser → WGS84-SK42 Translator: converts coordinates (evidence: `src/parseImage.py`)
- Image Metadata Parser → Gauss-Kruger Projector: projects coordinates (evidence: `src/parseImage.py`)
- Gauss-Kruger Projector → WGS84-SK42 Translator: uses translator (evidence: `src/SK42_Gauss_Kruger.py`)
- Target Resolver → Elevation Sampler: samples elevation (evidence: `src/getTarget.py`)
- Target Resolver → CoT Publisher: sends target (evidence: `src/getTarget.py`)
- Target Resolver → Target Location: returns coordinates (evidence: `src/getTarget.py`)
- CoT Publisher → UDP Multicast Network: multicasts message (evidence: `src/cursor_on_target.py`)
- Operator → Find-Me Mode: enters relative target (evidence: `src/find_me_mode.py`)
- Find-Me Mode → Elevation Sampler: loads terrain (evidence: `src/find_me_mode.py`)
- Find-Me Mode → Target Resolver: resolves target (evidence: `src/find_me_mode.py`)
- Target Resolver → Runtime Settings: reads settings (evidence: `src/getTarget.py`)
