Project · 2022 · completed · Academic
The Way campus navigation
An Android navigation app that guides students to buildings and facilities across the USTHB campus.
Problem
Large university campuses can be difficult to navigate, particularly for new students looking for lecture halls, departments, classrooms, cafeterias, and other facilities that may not be accurately represented on public maps. The application provides focused, lightweight guidance inside USTHB without depending on a full mapping service.
Approach
Users choose a category, search a curated list of campus destinations, and start a compass-based navigation view. Each destination has known geographic coordinates. The application combines the phone’s live location with accelerometer and magnetic-field measurements to rotate an on-screen direction indicator toward the selected place and continuously display the remaining distance.
Technical implementation
The Android app is written in Java for API 26 and later. FusedLocationProviderClient requests high-accuracy updates every 500 ms, while SensorManager builds a rotation matrix from accelerometer and magnetometer readings. Android’s Location.bearingTo and distanceTo functions calculate navigation values. Activities cover login, the main menu, searchable destination selection, and compass guidance; SceneView AR is included for augmented-reality presentation experiments.
float bearing = currentLocation.bearingTo(destination);
float distance = currentLocation.distanceTo(destination);
float heading = orientation[0] * 180f / (float) Math.PI;
compassView.setRotation(bearing - heading);
distanceView.setText(formatDistance(distance));