Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: pull GPS coordinates from the device and store them as a field during registration [12h] #1376

Open
anvmn opened this issue Nov 24, 2024 · 4 comments
Assignees

Comments

@anvmn
Copy link
Collaborator

anvmn commented Nov 24, 2024

Scope for Proof of Concept (POC): E-Heza App GPS Coordinate Acquisition

Objective:

The objective of this Proof of Concept (POC) is to demonstrate the ability of a mobile application to acquire accurate GPS coordinates of the user’s location. Additionally, the app will provide alternative methods for location input, including manual text entry and a map interface, in scenarios where GPS acquisition is unavailable due to bandwidth constraints or technical issues.


Key Features

GPS Coordinate Acquisition
Automatically acquire the user's current location using the device's built-in GPS capabilities.
Display acquired coordinates in real-time within the app interface.

Manual Location Entry
Allow users to input latitude and longitude manually through a dedicated text input field.
Validate input to ensure proper format (e.g., decimal degrees or degrees/minutes/seconds).

Map-Based Location Entry
Integrate a map interface allowing users to select a location by:

  • Dropping a pin on the map.
  • Searching for an address or place name.
  • Display the selected location’s coordinates in the app.

Data Storage

  • Store acquired or entered coordinates on the backend in a standardized format.
  • Provide an option to export or share coordinates for further use in a visual map format.

Assumptions

  • Bandwith cannot be totally relied upon to work at all or to produce accurate results - alternate input/confirmation is required
  • Physical addresses are not available, nor would they be contained in any lookup reference (e.g., Google Maps) to product coordinates based on a text address.
  • Users would be familiar with the location where they are providing the input coordinates (i.e., they could find it on a map).

This POC will validate the technical feasibility of the proposed functionality and serve as a foundation for future development.

@anvmn anvmn self-assigned this Nov 24, 2024
@adamhstewart adamhstewart changed the title POC: pull GPS coordinates from the device and store them as a field during registration POC: pull GPS coordinates from the device and store them as a field during registration [12h] Nov 24, 2024
@anvmn anvmn added this to the TIP - Maintenance milestone Nov 26, 2024
@anvmn
Copy link
Collaborator Author

anvmn commented Nov 26, 2024

@adamhstewart

Since our APP runs in browser, we'll have to rely on Chrome to provides access to GPS coordinates (through the Geolocation API, a part of the browser's Web API).
Note that Chrome requests permission from the user to access the location.

For mobile devices (with built-in GPS sensors), Geolocation API fetches coordinates from the sensor, and IP network (Mobile/Wifi).
For desktops, IP network is used.

Since mobile devices have GPS sensors enabled as a default, and desktops got internet, so it seems to me that in majority of cases, we'll be able to get coordinates from Chrome.

Manual Location Entry

There are 2 coordinates, 9 digits each. For example:

Registraiton longitude:  34.8987359
Registraiton laitude: 32.0785488

I don't think it's something that should be filled manually.

Map-Based Location Entry

I don't think there is a utility that will be able to provide required data in offline mode.
If online, we should be able to get the coordinates from IP network.

@anvmn
Copy link
Collaborator Author

anvmn commented Nov 26, 2024

@adamhstewart

Demo : #1377 (comment)

Also deployed this to CHW env, so you can try it out yourself.

@adamhstewart
Copy link
Member

@anvmn great PoC - for the real feature we would need some way to input GPS data because in addition to bandwidth conditions, there the likely scenario where the patient is at a health facility and not their home. In these case we'd need tp provide an override.

I wonder if we could offload this entirely to a third-party app. See here for instance Google Maps on desktop:

https://www.loom.com/share/731884e0826e475a86cf0c2f89ddfd13?sid=b57606f3-f61b-41a8-baa8-24affdd3f13e

@anvmn
Copy link
Collaborator Author

anvmn commented Nov 26, 2024

@adamhstewart

Well, if you talk about internet bandwidth, it's not related to GPS.
As far as I know, GPS can receive signal when within building, or at least store last location it had.

I wonder if we could offload this entirely to a third-party app

The thing is that it seems to be too heavy for device to run in offline mode.
If we're online, to me it seems that the data from IP network should be better choice than manual input.

It would be good if we could try the feature as it is on field and examine the data we receive, and based on that decide on how to proceed.

@anvmn anvmn moved this from To do to In progress in E-Heza Development Nov 28, 2024
@anvmn anvmn moved this from In progress to Ready for Review in E-Heza Development Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Review
Development

No branches or pull requests

2 participants