| # Emergency Module Audit |
|
|
| The `emergency_maps_service.py` is responsible for locating nearby emergency services. |
|
|
| ## Key Findings: |
| 1. **Fallback Logic**: It supports Google Maps but seamlessly falls back to local OpenStreetMap (OSM) via Overpass API queries (`fetch_emergency_nearby_sync`). |
| 2. **Categories Supported**: Hospital, Fire Station, Police, Ambulance, Emergency Supplies. |
| 3. **Simulated Traffic/ETA**: Uses Haversine distance and simulates driving metrics (assumes 25% longer route, 40km/h average speed, and +18% delay for moderate traffic). |
| 4. **Resilience**: Has mirrors for Overpass API (`overpass-api.de` and `overpass.kumi.systems`). |
|
|
| ## Recommendations: |
| - Add caching for the `fetch_emergency_nearby_sync` to reduce external API hits. |
| - Make the traffic delay multiplier configurable. |
|
|