# head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones architecture

> Architecture diagram of the GitHub repository head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones
- Repository: https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones

## Overview

PALMS and PALMS+ are indoor-localization systems that turn floor plans and either LiDAR/plane observations or RGB-derived depth and point clouds into a location estimate; PALMS+ also supports sequential tracking. The README documents the three entry-point workflows and the major capabilities, while sampled source and the SOURCE INDEX support several internal module relationships. Runner-to-module calls and some unsampled stages are not visible, so those links are omitted rather than inferred.

Main entry points: [`utils/dataset.py`](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/dataset.py) (Dataset loaders), [`observation_module/alignment.py`](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/alignment.py) (Scale alignment), [`palms_src/simulator.py`](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/palms_src/simulator.py) (Tracking simulator), [`layout_matching_module/CES.py`](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/layout_matching_module/CES.py) (CES layout matching)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_palms["PALMS localization"]
  node_palms_run["PALMS runner<br/>[test_palms.py]"]
  node_single_run["PALMS+ single-shot<br/>[test_pp.py]"]
  node_sequence_run["PALMS+ sequential<br/>[test_pp_seq.py]"]
  node_simulator["Tracking simulator<br/>[simulator.py]"]
  node_particle_filter["Particle filter<br/>[particle_filter.py]"]
  node_ces["CES layout matching<br/>[CES.py]"]
end

subgraph group_observation["Image observations"]
  node_depth_estimator["Monocular depth"]
  node_depth_tools["Depth processing<br/>[depth.py]"]
  node_observation_builder["Observation builder"]
  node_scale_alignment["Scale alignment<br/>[alignment.py]"]
  node_ground_plane["Ground plane<br/>[ground_plane.py]"]
  node_pointcloud["Point-cloud projection<br/>[pointcloud.py]"]
end

subgraph group_data["Data and mapping"]
  node_dataset["Dataset loaders<br/>[dataset.py]"]
  node_constants["Dataset constants<br/>[const.py]"]
end

subgraph group_shared["Shared utilities"]
  node_file_io["File and map I/O<br/>[file_io.py]"]
  node_camera["Camera geometry<br/>[camera_utils.py]"]
  node_geometry["Geometry operations<br/>[geometry_utils.py]"]
  node_image_sampling["Image sampling<br/>[image_sampling.py]"]
  node_visualization["Visualization<br/>[visualization.py]"]
end

node_user(("Researcher"))

node_user -->|"runs"| node_palms_run
node_user -->|"runs"| node_single_run
node_user -->|"runs"| node_sequence_run
node_simulator -->|"invokes"| node_particle_filter
node_observation_builder -->|"uses"| node_scale_alignment
node_observation_builder -->|"uses"| node_depth_tools
node_depth_estimator -->|"uses"| node_depth_tools
node_depth_estimator -->|"uses"| node_file_io
node_depth_estimator -->|"uses"| node_camera
node_scale_alignment -->|"uses"| node_ground_plane
node_scale_alignment -->|"uses"| node_pointcloud
node_scale_alignment -->|"uses"| node_image_sampling
node_scale_alignment -->|"uses"| node_camera
node_pointcloud -->|"uses"| node_geometry
node_dataset -->|"masks depths"| node_depth_tools
node_dataset -->|"uses"| node_file_io
node_dataset -->|"uses"| node_camera
node_dataset -->|"uses"| node_image_sampling
node_dataset -->|"uses"| node_constants
node_simulator -->|"uses"| node_geometry
node_simulator -->|"uses"| node_visualization
node_particle_filter -->|"uses"| node_geometry
node_ces -->|"uses"| node_file_io
node_ces -->|"uses"| node_geometry
node_ces -->|"uses"| node_visualization
node_palms_run -.->|"runs tracking"| node_simulator
node_single_run -.->|"builds observations"| node_observation_builder
node_sequence_run -.->|"builds observations"| node_observation_builder
node_single_run -.->|"matches layout"| node_ces
node_sequence_run -.->|"tracks posterior"| node_simulator

click node_palms_run "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/test_palms.py"
click node_single_run "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/test_pp.py"
click node_sequence_run "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/test_pp_seq.py"
click node_simulator "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/palms_src/simulator.py"
click node_particle_filter "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/palms_src/particle_filter.py"
click node_ces "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/layout_matching_module/CES.py"
click node_depth_estimator "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/depth_pro_estimator.py"
click node_depth_tools "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/depth.py"
click node_observation_builder "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/observation_module.py"
click node_scale_alignment "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/alignment.py"
click node_ground_plane "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/ground_plane.py"
click node_pointcloud "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/pointcloud.py"
click node_dataset "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/dataset.py"
click node_constants "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/pp_src/const.py"
click node_file_io "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/file_io.py"
click node_camera "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/camera_utils.py"
click node_geometry "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/geometry_utils.py"
click node_image_sampling "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/image_sampling.py"
click node_visualization "https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/visualization.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_palms_run,node_single_run,node_sequence_run,node_simulator,node_particle_filter,node_ces toneBlue
class node_depth_estimator,node_depth_tools,node_observation_builder,node_scale_alignment,node_ground_plane,node_pointcloud toneAmber
class node_dataset,node_constants toneMint
class node_file_io,node_camera,node_geometry,node_image_sampling,node_visualization toneRose
class node_user toneIndigo
```

## Components

### PALMS localization

- [PALMS runner](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/test_palms.py): `test_palms.py`
- [PALMS+ single-shot](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/test_pp.py): `test_pp.py`
- [PALMS+ sequential](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/test_pp_seq.py): `test_pp_seq.py`
- [Tracking simulator](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/palms_src/simulator.py): `palms_src/simulator.py`
- [Particle filter](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/palms_src/particle_filter.py): `palms_src/particle_filter.py`
- [CES layout matching](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/layout_matching_module/CES.py): `layout_matching_module/CES.py`

### Image observations

- [Monocular depth](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/depth_pro_estimator.py): `observation_module/depth_pro_estimator.py`
- [Depth processing](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/depth.py): `observation_module/depth.py`
- [Observation builder](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/observation_module.py): `observation_module/observation_module.py`
- [Scale alignment](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/alignment.py): `observation_module/alignment.py`
- [Ground plane](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/ground_plane.py): `observation_module/ground_plane.py`
- [Point-cloud projection](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/observation_module/pointcloud.py): `observation_module/pointcloud.py`

### Data and mapping

- [Dataset loaders](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/dataset.py): `utils/dataset.py`
- [Dataset constants](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/pp_src/const.py): `pp_src/const.py`

### Shared utilities

- [File and map I/O](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/file_io.py): `utils/file_io.py`
- [Camera geometry](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/camera_utils.py): `utils/camera_utils.py`
- [Geometry operations](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/geometry_utils.py): `utils/geometry_utils.py`
- [Image sampling](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/image_sampling.py): `utils/image_sampling.py`
- [Visualization](https://github.com/head-inthe-cloud/palms-plane-based-accessible-indoor-localization-using-mobile-smartphones/blob/main/utils/visualization.py): `utils/visualization.py`

### Other components

- **Researcher**

## Connections

- Researcher → PALMS runner: runs (evidence: `README.md`)
- Researcher → PALMS+ single-shot: runs (evidence: `README.md`)
- Researcher → PALMS+ sequential: runs (evidence: `README.md`)
- Tracking simulator → Particle filter: invokes (evidence: `palms_src/simulator.py`)
- Observation builder → Scale alignment: uses (evidence: `observation_module/observation_module.py`)
- Observation builder → Depth processing: uses (evidence: `observation_module/observation_module.py`)
- Monocular depth → Depth processing: uses (evidence: `observation_module/depth_pro_estimator.py`)
- Monocular depth → File and map I/O: uses (evidence: `observation_module/depth_pro_estimator.py`)
- Monocular depth → Camera geometry: uses (evidence: `observation_module/depth_pro_estimator.py`)
- Scale alignment → Ground plane: uses (evidence: `observation_module/alignment.py`)
- Scale alignment → Point-cloud projection: uses (evidence: `observation_module/alignment.py`)
- Scale alignment → Image sampling: uses (evidence: `observation_module/alignment.py`)
- Scale alignment → Camera geometry: uses (evidence: `observation_module/alignment.py`)
- Point-cloud projection → Geometry operations: uses (evidence: `observation_module/pointcloud.py`)
- Dataset loaders → Depth processing: masks depths (evidence: `utils/dataset.py`)
- Dataset loaders → File and map I/O: uses (evidence: `utils/dataset.py`)
- Dataset loaders → Camera geometry: uses (evidence: `utils/dataset.py`)
- Dataset loaders → Image sampling: uses (evidence: `utils/dataset.py`)
- Dataset loaders → Dataset constants: uses (evidence: `utils/dataset.py`)
- Tracking simulator → Geometry operations: uses (evidence: `palms_src/simulator.py`)
- Tracking simulator → Visualization: uses (evidence: `palms_src/simulator.py`)
- Particle filter → Geometry operations: uses (evidence: `palms_src/particle_filter.py`)
- CES layout matching → File and map I/O: uses (evidence: `layout_matching_module/CES.py`)
- CES layout matching → Geometry operations: uses (evidence: `layout_matching_module/CES.py`)
- CES layout matching → Visualization: uses (evidence: `layout_matching_module/CES.py`)
- PALMS runner → Tracking simulator: runs tracking
- PALMS+ single-shot → Observation builder: builds observations
- PALMS+ sequential → Observation builder: builds observations
- PALMS+ single-shot → CES layout matching: matches layout
- PALMS+ sequential → Tracking simulator: tracks posterior
