# safwansatil/yeah-science- architecture

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

- Interactive diagram: https://gitdiagram.com/safwansatil/yeah-science-
- Repository: https://github.com/safwansatil/yeah-science-

## Overview

Yeah, Science is a desktop ground station paired with a separate local rover simulator. The main workflow is: an operator connects and drives through the Qt interface; the station coordinates controls and UDP traffic; the simulator applies differential-drive motion and reports telemetry for display in the field view and metrics. Session notes and event logging are additional station capabilities. The README documents the UI features and startup wiring; sampled source confirms the coordinator, packet, transport, and simulator behavior, but not the internal QML bindings.

Main entry points: [`app/controller.py`](https://github.com/safwansatil/yeah-science-/blob/main/app/controller.py) (Station coordinator), [`simulator/__main__.py`](https://github.com/safwansatil/yeah-science-/blob/main/simulator/__main__.py) (Simulator process), [`app/__main__.py`](https://github.com/safwansatil/yeah-science-/blob/main/app/__main__.py) (Station launcher), [`app/telemetry.py`](https://github.com/safwansatil/yeah-science-/blob/main/app/telemetry.py) (Telemetry state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Ground Station UI"]
  node_main_window["Station window<br/>[Main.qml]"]
  node_drive_controls["Mouse controls<br/>[DrivePad.qml]"]
  node_metrics["Telemetry cards<br/>[Metric.qml]"]
  node_field_view["Rover field view<br/>[RoverView.qml]"]
  node_event_log["Session notes<br/>[EventLog.qml]"]
  node_settings["Settings panel<br/>[SettingsPanel.qml]"]
end

subgraph group_station["Station Coordination"]
  node_app_entry["Station launcher<br/>[__main__.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_station_core["Station coordinator<br/>[controller.py]"]
  node_telemetry_store["Telemetry state<br/>[telemetry.py]"]
end

subgraph group_link["UDP Link"]
  node_packets["Packet codec<br/>[packets.py]"]
  node_udp_link["Station UDP link<br/>[udp.py]"]
end

subgraph group_sim["Rover Simulator"]
  node_sim_entry["Simulator process<br/>[__main__.py]"]
  node_rover["Rover motion model<br/>[rover.py]"]
end

node_operator(("Operator"))

node_operator -->|"uses controls"| node_drive_controls
node_operator -->|"views station"| node_main_window
node_app_entry -->|"loads settings"| node_config
node_app_entry -->|"creates coordinator"| node_station_core
node_app_entry -->|"loads window"| node_main_window
node_main_window -->|"presents controls"| node_drive_controls
node_drive_controls -->|"sets drive"| node_station_core
node_settings -->|"changes speed"| node_station_core
node_station_core -->|"updates telemetry"| node_telemetry_store
node_station_core -->|"encodes commands"| node_packets
node_station_core -->|"decodes replies"| node_packets
node_station_core -->|"sends and polls"| node_udp_link
node_telemetry_store -->|"supplies readings"| node_metrics
node_telemetry_store -->|"supplies pose"| node_field_view
node_station_core -->|"supplies events"| node_event_log
node_udp_link -->|"exchanges datagrams"| node_sim_entry
node_sim_entry -->|"decodes and encodes"| node_packets
node_sim_entry -->|"applies commands"| node_rover
node_rover -->|"provides telemetry"| node_sim_entry

click node_app_entry "https://github.com/safwansatil/yeah-science-/blob/main/app/__main__.py"
click node_config "https://github.com/safwansatil/yeah-science-/blob/main/app/config.py"
click node_station_core "https://github.com/safwansatil/yeah-science-/blob/main/app/controller.py"
click node_telemetry_store "https://github.com/safwansatil/yeah-science-/blob/main/app/telemetry.py"
click node_main_window "https://github.com/safwansatil/yeah-science-/blob/main/qml/Main.qml"
click node_drive_controls "https://github.com/safwansatil/yeah-science-/blob/main/qml/DrivePad.qml"
click node_metrics "https://github.com/safwansatil/yeah-science-/blob/main/qml/Metric.qml"
click node_field_view "https://github.com/safwansatil/yeah-science-/blob/main/qml/RoverView.qml"
click node_event_log "https://github.com/safwansatil/yeah-science-/blob/main/qml/EventLog.qml"
click node_settings "https://github.com/safwansatil/yeah-science-/blob/main/qml/SettingsPanel.qml"
click node_packets "https://github.com/safwansatil/yeah-science-/blob/main/link/packets.py"
click node_udp_link "https://github.com/safwansatil/yeah-science-/blob/main/link/udp.py"
click node_sim_entry "https://github.com/safwansatil/yeah-science-/blob/main/simulator/__main__.py"
click node_rover "https://github.com/safwansatil/yeah-science-/blob/main/simulator/rover.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_main_window,node_drive_controls,node_metrics,node_field_view,node_event_log,node_settings toneBlue
class node_app_entry,node_config,node_station_core,node_telemetry_store toneAmber
class node_packets,node_udp_link toneMint
class node_sim_entry,node_rover toneRose
class node_operator toneIndigo
```

## Components

### Ground Station UI

- [Station window](https://github.com/safwansatil/yeah-science-/blob/main/qml/Main.qml): `qml/Main.qml`
- [Mouse controls](https://github.com/safwansatil/yeah-science-/blob/main/qml/DrivePad.qml): `qml/DrivePad.qml`
- [Telemetry cards](https://github.com/safwansatil/yeah-science-/blob/main/qml/Metric.qml): `qml/Metric.qml`
- [Rover field view](https://github.com/safwansatil/yeah-science-/blob/main/qml/RoverView.qml): `qml/RoverView.qml`
- [Session notes](https://github.com/safwansatil/yeah-science-/blob/main/qml/EventLog.qml): `qml/EventLog.qml`
- [Settings panel](https://github.com/safwansatil/yeah-science-/blob/main/qml/SettingsPanel.qml): `qml/SettingsPanel.qml`

### Station Coordination

- [Station launcher](https://github.com/safwansatil/yeah-science-/blob/main/app/__main__.py): `app/__main__.py`
- [Configuration](https://github.com/safwansatil/yeah-science-/blob/main/app/config.py): `app/config.py`
- [Station coordinator](https://github.com/safwansatil/yeah-science-/blob/main/app/controller.py): `app/controller.py`
- [Telemetry state](https://github.com/safwansatil/yeah-science-/blob/main/app/telemetry.py): `app/telemetry.py`

### UDP Link

- [Packet codec](https://github.com/safwansatil/yeah-science-/blob/main/link/packets.py): `link/packets.py`
- [Station UDP link](https://github.com/safwansatil/yeah-science-/blob/main/link/udp.py): `link/udp.py`

### Rover Simulator

- [Simulator process](https://github.com/safwansatil/yeah-science-/blob/main/simulator/__main__.py): `simulator/__main__.py`
- [Rover motion model](https://github.com/safwansatil/yeah-science-/blob/main/simulator/rover.py): `simulator/rover.py`

### Other components

- **Operator**

## Connections

- Operator → Mouse controls: uses controls
- Operator → Station window: views station
- Station launcher → Configuration: loads settings
- Station launcher → Station coordinator: creates coordinator
- Station launcher → Station window: loads window
- Station window → Mouse controls: presents controls
- Mouse controls → Station coordinator: sets drive
- Settings panel → Station coordinator: changes speed
- Station coordinator → Telemetry state: updates telemetry
- Station coordinator → Packet codec: encodes commands
- Station coordinator → Packet codec: decodes replies
- Station coordinator → Station UDP link: sends and polls
- Telemetry state → Telemetry cards: supplies readings
- Telemetry state → Rover field view: supplies pose
- Station coordinator → Session notes: supplies events
- Station UDP link → Simulator process: exchanges datagrams
- Simulator process → Packet codec: decodes and encodes
- Simulator process → Rover motion model: applies commands
- Rover motion model → Simulator process: provides telemetry
