Skip to content

Driver Navigation & Location Integration #45

@Josemiles-ctr

Description

@Josemiles-ctr

Description

Implement turn-by-turn navigation for drivers to reach patient location.

Detailed Requirements

  • When request assigned:

    • Patient location shown on map
    • Start navigation button
    • Navigate button integrates with Google Maps/Waze
    • Shows real-time route and ETA
    • Distance to patient shown
  • While navigating:

    • Location updates sent every 10 seconds
    • Patient sees ambulance location
    • Hospital sees ambulance location
    • Estimated arrival time shown to patient
  • Arrival:

    • "Arrived" button to mark arrival
    • Confirmation dialog
    • Status updated to ARRIVED
    • Patient notified

Technical Details

  • Navigation: Integrate Google Maps SDK
  • Permissions: ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION
  • Intent: Launch external navigation app (Google Maps, Waze, Apple Maps)
  • Distance: Use haversine formula or Google Distance Matrix API
  • ETA: Calculate based on road distance and speed estimates

Acceptance Criteria

  • Patient location shown on map when request assigned
  • Navigate button opens Google Maps with patient location
  • Location updates sent to patient every 10 seconds
  • Location updates sent to hospital every 10 seconds
  • Patient sees estimated arrival time
  • Estimated arrival time updates as driver moves
  • Distance to patient shown
  • "Arrived" button present when near patient
  • Clicking "Arrived" shows confirmation
  • Status changes to ARRIVED
  • Patient and hospital notified of arrival
  • Background location tracking works
  • Location stops updating after arrival
  • Unit tests for navigation (min 80% coverage)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions