Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIU Smart Campus Navigator

A polished terminal application that plans walking routes between locations on the Dhaka International University campus. It is 100% pure C11 and runs from a single executable and a single launcher script.


Contributors

# Name Student ID
1 Abdullah Alif 252-15-834
2 MD. Musfikur Rahman 252-15-248
3 Irfanul Hoque Taseen 252-15-300
4 Tamim Mohammed Nur Syed 252-15-938

1. Project name

DIU Smart Campus Navigator (nav_camp.c, nav_camp.exe, run.bat).

2. What the application does

You pick a starting location and a destination. The Navigator plans the best walking route and prints one screen with:

  • Best Route — the shortest weighted walking distance.
  • Fewest-Stops Route — the route with the smallest number of intermediate stops.
  • Campus Walk — a depth-first traversal that visits the destination.
  • Route Verified — a second engine cross-checks the shortest distance; the two engines agree on every route on the campus graph.
  • Route Summary — a one-glance comparison.

You can then open Route Analysis to compare two routes and to inspect the pattern of segment distances.

3. Features

Feature Page
Plan a route [1] Start Navigation
See the campus layout [2] View Campus Map
Browse all 18 locations [3] View All Locations
Read product info [4] About Navigator
Compare two routes post-screen → [2] Compare Routes
Inspect segment pattern post-screen → [2] Compare Routes

4. Main menu

============================================================
                  DIU SMART CAMPUS NAVIGATOR
============================================================
              Smart Campus Route Planning
------------------------------------------------------------

   [1] Start Navigation
   [2] View Campus Map
   [3] View All Locations
   [4] About Navigator

   [0] Exit

------------------------------------------------------------
   Select an option:

Algorithm names are intentionally not on the menu. The user picks where they want to go, and the engine decides which path is best.

5. Navigation flow

1)  [Start Navigation]           <- choose [1] from the main menu
2)  [Select Starting Location]   <- numbered list of 18 locations
3)  [Select Destination]         <- numbered list, source is shown
4)  [Planning Route]             <- brief status screen
5)  [Route Recommendations]      <- single unified result page
6)  Post-screen submenu:
       [1] Start Another Navigation
       [2] Compare Routes
       [3] Return to Main Menu
       [0] Exit

If the source and destination are the same, the Navigator prints You are already at <name>. No navigation is required. and does not run the engines.

[2] Compare Routes opens the Route Analysis page (see below) without re-running the navigation engines.

6. Route algorithms

The Navigator plans routes using these algorithms internally:

Role Algorithm What it gives the user
Best route Dijkstra Shortest weighted walking distance
Fewest stops BFS Minimum number of hops between stops
Campus walk DFS A depth-first traversal of the graph
Cross-verification Bellman-Ford Recomputes the shortest distance
Route similarity LCS Longest common subsequence of routes
Segment pattern LIS Longest increasing pattern of segments

Dijkstra, BFS, DFS, and Bellman-Ford are navigation primitives. LCS and LIS are analysis tools. None of the algorithm names are exposed through the menu.

7. Route analysis

Choosing [2] Compare Routes from the post-screen submenu opens the Route Analysis page. It does not pick new routes — it describes the routes the Navigator has already produced:

  • [LCS] Route Similarity — compares the Best Route (Dijkstra) with the Campus Walk (DFS) as integer node-ID sequences, runs the Longest-Common-Subsequence DP on them, and prints the common locations in order. If both routes happen to follow the same campus path, LCS correctly returns the full route and the page says so explicitly.

  • [LIS] Route Segment Pattern — extracts the actual edge-weight sequence of the Best Route and reports the longest strictly increasing subsequence of those segment distances. This is an analysis of the route's segment-distance pattern; it does not determine the shortest route.

LIS and LCS are analysis tools. They do not determine the shortest route.

8. Campus model

Locations 18 named spots
Edges 24 walking connections
Type Undirected weighted graph
Distance Approximate walking-path estimate (metres)
Walking speed ~80 m / minute (~4.8 km/h)

The graph is stored as an int[18][18] adjacency matrix inside nav_camp.c. If a new walkway is added on campus, see Adding a new path below.

Calibrated distances

Route Distance Time
Engineering Campus ↔ Main Entrance ~800 m ~10 min
Parking Area ↔ Green Garden ~470 m ~6 min
Food Court ↔ YKSG-2 Male Hall ~360 m ~5 min
Main Entrance ↔ Food Court ~250 m ~3 min
Main Entrance ↔ Green Garden ~250 m ~3 min
DSC Lake ↔ YKSG-3 Male Hall ~160 m ~2 min

These are approximate estimates, not GPS measurements.

9. How to compile

gcc nav_camp.c -Wall -Wextra -Wpedantic -std=c11 -O2 -o nav_camp.exe

Required: 0 errors, 0 warnings. Run from PowerShell or CMD in the project directory. run.bat does this automatically.

10. How to run

From PowerShell, in the project directory:

.\run.bat

run.bat will:

  1. Switch the console to UTF-8 (chcp 65001) so arrows and emoji render correctly.
  2. Move to its own directory (cd /d "%~dp0").
  3. Verify that gcc is on PATH.
  4. Compile nav_camp.c with the strict flags above.
  5. Stop if compilation fails (does not run an old executable).
  6. Print [ OK ] BUILD SUCCESSFUL and launch nav_camp.exe.
  7. Print a short Navigator closed. message after the application exits.

To run the executable directly:

.\nav_camp.exe

11. Distance disclaimer

Distances are approximate campus-scale walking estimates and are not GPS measurements. Edge weights are calibrated so the shortest walk from Main Entrance to the Engineering Campus is roughly 800 m (~10 minutes) at the configured walking speed. The application is for campus-scale planning; it does not replace a real map application for turn-by-turn directions.

12. Limitations

  • Distances are approximate walking-path estimates, not GPS-measured.
  • The graph is undirected; one-way paths are not modelled.
  • The ASCII campus map is a stylised overview; it does not show every internal walkway.
  • The graph reflects only the roads visible in campus_map.png. If a new path is added on campus, it must be added to initialize_graph() before the Navigator will use it.
  • Walking speed is fixed at 80 m/min, not configurable.
  • The route engine is for planning; it does not replace a real map application for turn-by-turn directions.

Project files

File Purpose
nav_camp.c Pure C11 source — graph, six algorithms, unified RouteResult, UI, ASCII map, route validation.
campus_map.png Reference image used to trace the campus road network.
run.bat Build + launch the application (single launcher; sets UTF-8 code page).
nav_camp.exe Built executable.
README.md This file.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages