w3c / geolocation

W3C Geolocation API
https://www.w3.org/TR/geolocation/
81 stars 56 forks source link

Correction: Update acquisition algorithm to define data types and handle cached positions #153

Closed marcoscaceres closed 1 month ago

marcoscaceres commented 2 months ago

Enhance the "Acquire a Position" algorithm to include explicit data type definitions and unit specifications for each piece of acquired position data, aligning with the [[WGS84]] coordinate system standards. This update ensures each parameter (latitude, longitude, altitude, etc.) is clearly defined at the point of data acquisition.

Additionally, refine the handling of cached position data within the algorithm. Introduce conditional logic to terminate the algorithm early if a valid cached position is used, preventing unnecessary data acquisition steps. This change improves efficiency and clarity in the geolocation process, ensuring that position data is handled correctly based on its freshness and accuracy requirements.

Key Changes:

Closes #137

This change is editorial and just contains corrections.


Preview | Diff

marcoscaceres commented 2 months ago

@jyasskin, can you check this also to make sure the caching issue is addressed?

marcoscaceres commented 2 months ago

@reillyeon, I relocated your original corrections to where the system position is acquired. I think they make more sense there, and are then passed to the GeolocationPosition constructor.

marcoscaceres commented 1 month ago

@reillyeon, just a heads up, I'm going to rebase this to deal with the merge conflicts.

Apologies in advance for the lost commits! Hope that's ok.

marcoscaceres commented 1 month ago

@jyasskin, I added the definitions for each type of data, not just the type.

@reillyeon, can you check the definitions also to see if they make sense?

marcoscaceres commented 1 month ago

@reillyeon, gentle ping 🛎️. Or let me know when you think you might have time. Happy to answer any questions.