Skip to content

bkmed/CheckInerairyMapBox

Repository files navigation

Itinerary Debug Viewer

A specialized React application built with TypeScript and Vite to debug and visualize complex pathfinding and segment generation logic for multi-level buildings.

Overview

This project provides a sandbox for testing the useActiveSegments hook, which is responsible for transforming a GeoJSON itinerary into a set of active segments (vertical and horizontal) across multiple zones and levels.

Key Features

  • Itinerary Visualization: Select from multiple predefined itineraries to see how they are processed.
  • Segment Breakdown: Clear visualization of vertical (elevators, escalators) and horizontal (walking) segments.
  • Dynamic Configuration: Utilizes building level configurations and zone graph access to determine path validity.

Getting Started

Prerequisites

  • Node.js (v18 or higher recommended)
  • npm or yarn

Installation

  1. Clone the repository:

    git clone https://github.com/bkmed/pocItinerairy.git
    cd pocItinerairy
  2. Install dependencies:

    npm install

Running the App

Start the development server:

npm run dev

The application will be available at http://localhost:5173.

Project Structure

  • src/utils.ts: Contains the core logic for useActiveSegments.
  • src/constants.ts: Defines building levels, zone access graphs, and test itineraries.
  • src/App.tsx: The main debug viewer interface.

Logic: Segment Generation Rules

The useActiveSegments hook follows these principles:

  1. Vertical Segments:
    • In a Descent, vertical segments are assigned to the arrival level.
    • In an Ascent, vertical segments are assigned to the exit level.
  2. Horizontal Segments: Added at the "pivot level" where a zone change occurs.
  3. Graph Access: Zone changes are only permitted at levels defined in the graphAccess configuration.
  4. No Duplicates: Ensures the same segment isn't added multiple times.

🌐 Public Link

Access the live version of the application here:

🔗 Medicare Reminder Public Link

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors