A GPS-free navigation app for Android (BETA) that uses pedestrian dead reckoning (PDR) to track your position when GPS is unavailable. Built with Android, OSMDroid, and sensor fusion algorithms.
Created with AI assistance
- Add custom markers with emoji icons and labels
- 18 emoji options: π π π π’ π π β π π β½ π¨ π π
βοΈ β β€οΈ π΄ π’ - Persistent storage: Markers are saved and restored between sessions
- Drag to move: Long-press and drag markers to reposition
- Two-finger rotation: Rotate the map like Google Maps
- Intuitive gesture: Place two fingers and rotate
- Better navigation: Align map with your direction of travel
- Clear tracks only
- Clear markers only
- Clear everything
- Confirmation dialog to prevent accidents
- GPS Tracking: Accurate GPS positioning when available
- Dead Reckoning: Continue tracking when GPS signal is lost
- Step Counting: Automatic step detection using accelerometer
- Heading Estimation: Sensor fusion of gyroscope + magnetometer for accurate direction
- Manual Mode: Manual direction control (turn left/right/around)
- 360Β° Dial: Visual compass dial for selecting direction in manual mode
- Trip History: Save and view past trips
- GPX Export: Export trips in GPX format for use in other apps
- CSV Export: Export trip data including all path points
- Custom Export Location: Choose where to save exported files
- Foreground Service: Tracking continues when app is in background
- Screen Off Support: Sensors continue collecting data when screen is off
- Wake Lock: Prevents device from sleeping during active tracking
- Switch Apps: Continue tracking while using other apps
- GPS Calibration: Automatic calibration using GPS data to correct drift
- Magnetometer Calibration: Built-in compass calibration
- Step Calibration: Calibrate step length for accurate distance
Major improvements:
- No offline maps or offline map manager.
- Improved compass mode in "no GPS" mode.
Minor improvements:
- In "no GPS" mode, the route no longer follows GPS data.
- Added the project URL to the "About" menu.
- Fixed the GPS status display in the main view.
The app uses Pedestrian Dead Reckoning (PDR) to estimate position:
- Step Detection: Uses accelerometer to detect pedestrian steps via peak detection
- Heading Estimation: Combines gyroscope (short-term accuracy) + magnetometer (long-term stability) using a complementary filter
- Position Update:
New Position = Previous Position + Step Length Γ Heading Vector
x_new = x_old + step_length Γ sin(heading)
y_new = y_old + step_length Γ cos(heading)
When GPS is available, the app continuously calibrates:
- Scale Factor: Ratio of GPS distance to estimated distance
- Heading Bias: Difference between compass heading and actual GPS bearing
This correction is applied when GPS is unavailable, significantly improving accuracy.
- Android Studio (Arctic Fox or later recommended)
- Java JDK 11 or later
- Android SDK with API 22+ (minimum), API 34 (target)
-
Clone the repository
git clone https://github.com/SaturnXIII/Dead-Reckoning-Pro cd DeadReckoning -
Open in Android Studio
- File β Open β Select the project folder
- Wait for Gradle sync to complete
-
Configure SDK
- Go to File β Project Structure β SDK Location
- Ensure Android SDK is configured
-
Build Debug APK
- Build β Build Bundle(s) / APK(s) β Build APK(s)
- Or press
Ctrl+F9(Windows/Linux) /Cmd+F9(Mac)
-
Install on Device
- Enable USB debugging on your Android device
- Connect device and run from Android Studio
- Or manually install:
adb install app/build/outputs/apk/debug/app-debug.apk
The app requests these permissions:
ACCESS_FINE_LOCATION- GPS trackingACCESS_COARSE_LOCATION- Network-based locationACCESS_BACKGROUND_LOCATION- Background locationFOREGROUND_SERVICE- Background trackingFOREGROUND_SERVICE_LOCATION- Location in backgroundWAKE_LOCK- Prevent device sleepHIGH_SAMPLING_RATE_SENSORS- High-frequency sensor dataACTIVITY_RECOGNITION- Step countingPOST_NOTIFICATIONS- Android 13+ notification permissionINTERNET- Map tiles downloadACCESS_NETWORK_STATE- Network status check
- Open the app and grant all requested permissions
- Wait for GPS to lock (status shows "GPS: OK")
- Tap the Start button to begin tracking
- Walk while the app records your path
- Tap the + button (orange) to enter marker mode
- Tap on the map where you want to place the marker
- Select an emoji icon from the list
- Optionally enter a label for the marker
- Tap Confirm to save
- Place two fingers on the map
- Rotate in a circular motion
- The map will rotate 360Β°
- Double-tap to reset to North-up
- Tap Mode: Auto to switch to Manual mode
- Use arrow buttons to turn left/right (90Β°) or U-turn
- Or tap the compass icon to open the 360Β° dial
- Drag the dial to select your exact heading, then confirm
- Tap No GPS button to switch to dead reckoning mode
- The app will continue tracking using steps + heading
- Use manual controls to indicate turns
- When GPS returns, tap No GPS again to re-enable GPS tracking
- Navigate to History from the main menu
- Tap a trip to view details
- Tap View on Map to see the trip path
- Use export options to save as GPX or CSV
From History screen:
- Export CSV (choose folder) - Select custom save location
- Export GPX (choose folder) - Select custom save location
- Export to Downloads - Save directly to Downloads folder
- Tap the trash icon (red) in the bottom right
- Choose an option:
- Tracks only: Clear current path
- Markers only: Delete all saved markers
- Everything: Clear both tracks and markers
- Confirm your choice
| Screen | Description |
|---|---|
| Map View | Main tracking screen with GPS status, steps, distance, heading |
| Markers | Custom emoji markers on the map with labels |
| History | List of saved trips with export options |
| Calibration | Step length calibration tools |
app/src/main/java/nisargpatel/deadreckoning/
βββ activity/ # UI Activities and Fragments
β βββ MapFragment.java # Main map view with tracking + markers
β βββ MainNavigationActivity.java # Activity wrapper
β βββ HistoryActivity.java # Trip history list
β βββ GuideActivity.java # Help & guide
β βββ ...
βββ sensor/ # Core sensor processing
β βββ DeadReckoningEngine.java # Position calculation
β βββ PreciseHeadingEstimator.java # Sensor fusion
β βββ GPSCalibrator.java # GPS correction
βββ stepcounting/ # Step detection algorithms
βββ orientation/ # Orientation estimation
βββ model/ # Data models (Trip, Marker, TurnEvent)
βββ storage/ # Trip & Marker persistence
β βββ TripStorage.java # Trip data storage
β βββ MarkerStorage.java # Marker data storage
βββ service/ # Background tracking service
βββ view/ # Custom views (DegreeDialView)
app/src/main/res/
βββ layout/ # XML layouts
βββ drawable/ # Icons and graphics
βββ values/ # Strings, colors, styles
βββ ...
| Class | Description |
|---|---|
DeadReckoningEngine |
Core PDR algorithm, combines steps + heading |
PreciseHeadingEstimator |
Sensor fusion (gyro + magnetometer + Kalman filter) |
GPSCalibrator |
Calculates scale/heading correction from GPS |
EnhancedStepCounter |
Peak detection step counting |
TrackingService |
Foreground service for background tracking |
DegreeDialView |
Custom 360Β° compass dial view |
Trip |
Trip data model with GPX/CSV export |
Marker |
Custom marker model with emoji + label |
MarkerStorage |
JSON persistence for markers |
| Sensor | Purpose |
|---|---|
TYPE_GRAVITY |
Stable gravity vector for orientation |
TYPE_MAGNETIC_FIELD |
Compass heading |
TYPE_GYROSCOPE |
Rate of turn for short-term heading |
TYPE_LINEAR_ACCELERATION |
Step detection |
FusedLocationProvider |
GPS positioning |
- Map Provider: OSMDroid (OpenStreetMap)
- Location: Google Play Services FusedLocationProvider
- Matrix Library: EJML for calculations
- Min SDK: 22 (Android 5.1)
- Target SDK: 34 (Android 14)
Original Project: nisargnp/DeadReckoning
Fork & Modifications: https://github.com/SaturnXIII/Dead-Reckoning-Pro
Libraries Used:
- OSMDroid (OpenStreetMap)
- Google Play Services Location
- Material Components for Android
- EJML (Efficient Java Matrix Library)
- AChartEngine
License: Open Source - Feel free to contribute and modify!
- Ensure the app has activity recognition permission
- Keep phone in pocket or hand while walking
- Try calibrating step length in Settings
- Calibrate magnetometer (go to Calibration in menu)
- Keep phone away from metal objects
- Use manual mode for better control
- Ensure location permission is granted
- Check GPS is enabled in phone settings
- Wait for initial lock (may take 30-60 seconds)
- Check storage permission
- Try "Export to Downloads" option
- Ensure enough free storage space
- Make sure you've selected an emoji and confirmed
- Try zooming in on the map
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Note: This app is for educational and research purposes. GPS should be used as the primary navigation source when available. Dead reckoning provides estimates that may drift over time, especially without regular GPS calibration.


