# routes/  — Pages

### / — Dashboard (Home)

**File:* `<em class="editor-theme-code editor-theme-italic">routes/+page.svelte</em>`*

The main operator screen. A CSS grid layout combining six components into a single view.

<span style="white-space: pre-wrap;">Components: </span>`<span class="editor-theme-code">Double_Video</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">Map</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">NavigationPlan</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">TaskCompletion</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">IMU</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">Model</span>`<span style="white-space: pre-wrap;"> (3D scene).</span>

---

### /navigation — Navigation

**File:* `<em class="editor-theme-code editor-theme-italic">routes/navigation/+page.svelte</em>`*

The navigation task screen. Focuses on map-based rover guidance.

Layout: a 2×2 grid with the map top-left, navigation plan and IMU bottom-left, double video feed top-right, and costmap bottom-right.

<span style="white-space: pre-wrap;">Components: </span>`<span class="editor-theme-code">Map</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">NavigationPlan</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">IMU</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">DoubleVideo</span>`<span style="white-space: pre-wrap;"> (depth + front cameras), </span>`<span class="editor-theme-code">Costmap</span>`.

---

### /maintenance — Maintenance

**File:* `<em class="editor-theme-code editor-theme-italic">routes/maintenance/+page.svelte</em>`*

The maintenance task screen. Focuses on the rover arm and diagnostics.

Layout: left side has two video feeds (arm camera and depth camera) each with a side panel for arm feedback and arm position data. Right side shows the maintenance task list.

<span style="white-space: pre-wrap;">Components: </span>`<span class="editor-theme-code">Video</span>`<span style="white-space: pre-wrap;"> (arm camera), </span>`<span class="editor-theme-code">Video</span>`<span style="white-space: pre-wrap;"> (depth camera), </span>`<span class="editor-theme-code">MaintenanceTasks</span>`.

---

### /probing — Probing

**File:* `<em class="editor-theme-code editor-theme-italic">routes/probing/+page.svelte</em>`*

The probing task screen. Used when the rover is searching for and picking up probes.

Layout: map top-left, interest locations and probes list top-right, double video bottom-left, pickup mode toggle and IMU bottom-right.

<span style="white-space: pre-wrap;">The page reads and syncs </span>`<span class="editor-theme-code">pickup_mode</span>`<span style="white-space: pre-wrap;"> from the backend on mount, and toggles it via the Drive/Pick-up Mode button, which also switches camera 1 between the depth camera and arm camera.</span>

<span style="white-space: pre-wrap;">Components: </span>`<span class="editor-theme-code">Map</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">InterestLocations</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">Probes</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">DoubleVideo</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">IMU</span>`.

---

### /science — Science

**File:* `<em class="editor-theme-code editor-theme-italic">routes/science/+page.svelte</em>`*

The science task screen. Used when the rover is collecting and analysing rock or soil samples.

<span style="white-space: pre-wrap;">Layout: left side has a map and double video feed with small side panels for locations of interest and the pickup mode toggle. Right side is fully occupied by the </span>`<span class="editor-theme-code">SamplingLocations</span>`<span style="white-space: pre-wrap;"> component.</span>

<span style="white-space: pre-wrap;">Like the probing route, it syncs </span>`<span class="editor-theme-code">pickup_mode</span>`<span style="white-space: pre-wrap;"> on mount and switches camera 1 between depth and arm camera accordingly.</span>

<span style="white-space: pre-wrap;">Components: </span>`<span class="editor-theme-code">Map</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">DoubleVideo</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">SamplingLocations</span>`.

---

### /settings — Settings

**File:* `<em class="editor-theme-code editor-theme-italic">routes/settings/+page.svelte</em>`*

The settings page. Contains developer and diagnostic utilities, not used during rover operation.

**Diagnostic controls:**<span style="white-space: pre-wrap;"> Ping Rust, Clear Cache, Ping UDP, Ping GPS, Ping pH — these call the corresponding backend commands and are used to verify the Tauri bridge and UDP connection are working.</span>

**Dummy stream controls:**<span style="white-space: pre-wrap;"> Start/Stop dummy IMU stream, Start/Stop full dummy stream — start or stop the backend simulator for development without hardware.</span>

**File management:**<span style="white-space: pre-wrap;"> List, view, and delete files from the </span>`<span class="editor-theme-code">tasks/</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">images/</span>`<span style="white-space: pre-wrap;">, and </span>`<span class="editor-theme-code">maps/</span>`<span style="white-space: pre-wrap;"> storage directories. Files can be clicked to view their contents inline.</span>

**Snapshot:**<span style="white-space: pre-wrap;"> Saves a single JPEG frame from port 5000 as a test image.</span>

**Model debug:**<span style="white-space: pre-wrap;"> Calls </span>`<span class="editor-theme-code">debug_resource_dir</span>`<span style="white-space: pre-wrap;"> and prints the result to the console — useful for verifying model bundling in a production build.</span>

**IP check:**<span style="white-space: pre-wrap;"> Fetches the operator laptop's public IP from </span>`<span class="editor-theme-code">api.ipify.org</span>`<span style="white-space: pre-wrap;"> and displays it. Useful for network configuration when connecting to the rover.</span>