# lorenniiis/qsp-telemetry-flight-lab architecture

> Architecture diagram of the GitHub repository lorenniiis/qsp-telemetry-flight-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lorenniiis/qsp-telemetry-flight-lab
- Repository: https://github.com/lorenniiis/qsp-telemetry-flight-lab

## Overview

QSP Telemetry Flight Lab is a local dashboard for cleaning flight telemetry and comparing simulator performance in VR versus monitor mode. The main workflow is to prepare or load a CSV, preprocess and filter it, then request scenario- and participant-specific metrics, visualizations, and statistical interpretation; metrics can also be exported. The README documents dashboard capabilities, but the supplied tree does not include its UI assets, and excerpts of both processing modules are partial, so the graph focuses on evidenced module boundaries and documented stages.

Main entry points: [`app.py`](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.py) (Request handler), [`analysis.py`](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py) (Scenario metrics), [`clean_telemetry.py`](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/clean_telemetry.py) (Archive cleaner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preparation["Data preparation"]
  node_cleaner["Archive cleaner<br/>[clean_telemetry.py]"]
end

subgraph group_application["Local application"]
  node_server["HTTP server<br/>[app.py]"]
  node_handler["Request handler<br/>[app.py]"]
  node_store[("Data store<br/>[app.py]")]
end

subgraph group_analysis["Analysis"]
  node_preprocess["Input preprocessing<br/>[analysis.py]"]
  node_demo["Demo data<br/>[analysis.py]"]
  node_scenario["Scenario metrics<br/>[analysis.py]"]
  node_scores["Participant scores<br/>[analysis.py]"]
  node_multivariate["Hotelling T²<br/>[analysis.py]"]
  node_conclusion["Interpretation<br/>[analysis.py]"]
end

subgraph group_outputs["Results"]
  node_dashboard["Analysis dashboard"]
  node_export["Metrics export<br/>[app.py]"]
end

node_researcher(("Researcher"))
node_archive["Study ZIP"]
node_csvfile["Telemetry CSV"]

node_researcher -->|"starts or opens"| node_server
node_researcher -->|"selects source"| node_archive
node_archive -->|"reads archive"| node_cleaner
node_cleaner -->|"writes cleaned data"| node_csvfile
node_researcher -->|"loads CSV"| node_csvfile
node_csvfile -->|"uploads CSV"| node_handler
node_handler -->|"loads or resets"| node_store
node_server -->|"dispatches requests"| node_handler
node_store -->|"creates initial data"| node_demo
node_store -->|"preprocesses input"| node_preprocess
node_handler -->|"requests analysis"| node_store
node_store -->|"builds analysis"| node_scenario
node_scenario -->|"computes participant metrics"| node_scores
node_scenario -->|"tests group differences"| node_multivariate
node_scenario -->|"builds interpretation"| node_conclusion
node_handler -->|"returns analysis JSON"| node_dashboard
node_handler -->|"requests export metrics"| node_scores
node_handler -->|"returns CSV"| node_export
node_researcher -->|"views results"| node_dashboard
node_researcher -->|"downloads metrics"| node_export

click node_cleaner "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/clean_telemetry.py"
click node_server "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.py"
click node_handler "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.py"
click node_store "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.py"
click node_preprocess "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py"
click node_demo "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py"
click node_scenario "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py"
click node_scores "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py"
click node_multivariate "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py"
click node_conclusion "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py"
click node_export "https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.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_cleaner toneBlue
class node_server,node_handler,node_store toneAmber
class node_preprocess,node_demo,node_scenario,node_scores,node_multivariate,node_conclusion toneMint
class node_dashboard,node_export toneRose
class node_researcher,node_archive,node_csvfile toneIndigo
```

## Components

### Data preparation

- [Archive cleaner](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/clean_telemetry.py): `clean_telemetry.py`

### Local application

- [HTTP server](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.py): `app.py`
- [Request handler](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.py): `app.py`
- [Data store](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.py): `app.py`

### Analysis

- [Input preprocessing](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py): `analysis.py`
- [Demo data](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py): `analysis.py`
- [Scenario metrics](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py): `analysis.py`
- [Participant scores](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py): `analysis.py`
- [Hotelling T²](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py): `analysis.py`
- [Interpretation](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/analysis.py): `analysis.py`

### Results

- **Analysis dashboard**
- [Metrics export](https://github.com/lorenniiis/qsp-telemetry-flight-lab/blob/main/app.py): `app.py`

### Other components

- **Researcher**
- **Study ZIP**
- **Telemetry CSV**

## Connections

- Researcher → HTTP server: starts or opens
- Researcher → Study ZIP: selects source
- Study ZIP → Archive cleaner: reads archive
- Archive cleaner → Telemetry CSV: writes cleaned data
- Researcher → Telemetry CSV: loads CSV
- Telemetry CSV → Request handler: uploads CSV
- Request handler → Data store: loads or resets
- HTTP server → Request handler: dispatches requests
- Data store → Demo data: creates initial data
- Data store → Input preprocessing: preprocesses input
- Request handler → Data store: requests analysis
- Data store → Scenario metrics: builds analysis
- Scenario metrics → Participant scores: computes participant metrics
- Scenario metrics → Hotelling T²: tests group differences
- Scenario metrics → Interpretation: builds interpretation
- Request handler → Analysis dashboard: returns analysis JSON
- Request handler → Participant scores: requests export metrics
- Request handler → Metrics export: returns CSV
- Researcher → Analysis dashboard: views results
- Researcher → Metrics export: downloads metrics
