# yatheendra-source/lunar-landing-trajectory-estimation architecture

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

- Interactive diagram: https://gitdiagram.com/yatheendra-source/lunar-landing-trajectory-estimation
- Repository: https://github.com/yatheendra-source/lunar-landing-trajectory-estimation

## Overview

This repository supports an educational workflow for recovering a lunar lander’s motion from descent-camera frames. A user’s saved notebook code is loaded by the Task 4 runner, which tracks consecutive frames, estimates camera motion, reconstructs a flight trajectory, and can compare tracking strategies. Other task modules explore feature matching and tracking behavior; notebook answers and saved outputs can be assembled into a report. The supplied excerpts show only parts of the runtime, so unverified subsystem connections are omitted.

Main entry points: [`run.py`](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/run.py) (Task 4 pipeline), [`report.py`](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/report.py) (Notebook report), [`steps.py`](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/steps.py) (Tracking experiments), [`notebook.py`](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/notebook.py) (Notebook code loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_notebooks["Notebook Tasks"]
  node_task_notebooks["Task notebooks<br/>[task1.ipynb]"]
  node_notebook_loader["Notebook code loader<br/>[notebook.py]"]
end

subgraph group_vision["Image Tracking"]
  node_frame_data["Descent frames"]
  node_frame_io["Frame and track I/O<br/>[io.py]"]
  node_sift["SIFT matching<br/>[sift.py]"]
  node_tracking_steps["Tracking experiments<br/>[steps.py]"]
  node_tracker_comparison["Tracker comparison"]
end

subgraph group_flight["Motion Reconstruction"]
  node_task4_runner["Task 4 pipeline<br/>[run.py]"]
  node_motion_model["Camera motion fitting<br/>[motion_model.py]"]
  node_trajectory["Flight trajectory<br/>[trajectory.py]"]
  node_mission_constants["Mission constants"]
end

subgraph group_results["Analysis Results"]
  node_plotting["Result plots<br/>[plotting.py]"]
  node_report["Notebook report<br/>[report.py]"]
  node_outputs["Saved results<br/>[summary.json]"]
end

node_user(("Engineer / student"))

node_user -->|"runs pipeline"| node_task4_runner
node_task4_runner -->|"loads functions"| node_notebook_loader
node_notebook_loader -->|"reads code"| node_task_notebooks
node_task4_runner -->|"tracks frames"| node_frame_data
node_task4_runner -->|"loads and saves"| node_frame_io
node_tracking_steps -->|"uses matching"| node_sift
node_tracker_comparison -->|"loads and saves"| node_frame_io
node_task4_runner -->|"fits motion"| node_motion_model
node_task4_runner -->|"reconstructs flight"| node_trajectory
node_task4_runner -->|"reads parameters"| node_mission_constants
node_report -->|"reads answers"| node_task_notebooks
node_report -->|"includes saved results"| node_outputs
node_tracking_steps -->|"plots comparisons"| node_plotting
node_task4_runner -->|"saves results"| node_outputs
node_user -->|"builds report"| node_report

click node_task_notebooks "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/task1.ipynb"
click node_notebook_loader "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/notebook.py"
click node_frame_io "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/io.py"
click node_sift "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/sift.py"
click node_tracking_steps "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/steps.py"
click node_tracker_comparison "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/compare_trackers.py"
click node_task4_runner "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/run.py"
click node_motion_model "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/motion_model.py"
click node_trajectory "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/trajectory.py"
click node_mission_constants "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/mission_constants.json"
click node_plotting "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/plotting.py"
click node_report "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/report.py"
click node_outputs "https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/summary.json"

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_task_notebooks,node_notebook_loader toneBlue
class node_frame_data,node_frame_io,node_sift,node_tracking_steps,node_tracker_comparison toneAmber
class node_task4_runner,node_motion_model,node_trajectory,node_mission_constants toneMint
class node_plotting,node_report,node_outputs toneRose
class node_user toneIndigo
```

## Components

### Notebook Tasks

- [Task notebooks](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/task1.ipynb): `task1.ipynb`
- [Notebook code loader](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/notebook.py): `notebook.py`

### Image Tracking

- **Descent frames**
- [Frame and track I/O](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/io.py): `io.py`
- [SIFT matching](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/sift.py): `sift.py`
- [Tracking experiments](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/steps.py): `steps.py`
- [Tracker comparison](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/compare_trackers.py): `compare_trackers.py`

### Motion Reconstruction

- [Task 4 pipeline](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/run.py): `run.py`
- [Camera motion fitting](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/motion_model.py): `motion_model.py`
- [Flight trajectory](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/trajectory.py): `trajectory.py`
- [Mission constants](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/mission_constants.json): `mission_constants.json`

### Analysis Results

- [Result plots](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/plotting.py): `plotting.py`
- [Notebook report](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/report.py): `report.py`
- [Saved results](https://github.com/yatheendra-source/lunar-landing-trajectory-estimation/blob/main/summary.json): `summary.json`

### Other components

- **Engineer / student**

## Connections

- Engineer / student → Task 4 pipeline: runs pipeline (evidence: `run.py`)
- Task 4 pipeline → Notebook code loader: loads functions (evidence: `run.py`)
- Notebook code loader → Task notebooks: reads code (evidence: `notebook.py`)
- Task 4 pipeline → Descent frames: tracks frames (evidence: `run.py`)
- Task 4 pipeline → Frame and track I/O: loads and saves (evidence: `run.py`)
- Tracking experiments → SIFT matching: uses matching (evidence: `steps.py`)
- Tracker comparison → Frame and track I/O: loads and saves (evidence: `compare_trackers.py`)
- Task 4 pipeline → Camera motion fitting: fits motion (evidence: `run.py`)
- Task 4 pipeline → Flight trajectory: reconstructs flight (evidence: `trajectory.py`)
- Task 4 pipeline → Mission constants: reads parameters
- Notebook report → Task notebooks: reads answers (evidence: `report.py`)
- Notebook report → Saved results: includes saved results (evidence: `report.py`)
- Tracking experiments → Result plots: plots comparisons (evidence: `steps.py`)
- Task 4 pipeline → Saved results: saves results (evidence: `run.py`)
- Engineer / student → Notebook report: builds report (evidence: `report.py`)
