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

Autofill GPS coordinates not validating #213

Open
emileyfadrosh opened this issue Dec 18, 2024 · 1 comment
Open

Autofill GPS coordinates not validating #213

emileyfadrosh opened this issue Dec 18, 2024 · 1 comment
Labels
beta-feedback Related to feedback received from beta testers bug Something isn't working v1-release 🚀 Features and bug fixes that must be included in the first public release (i.e. general release)

Comments

@emileyfadrosh
Copy link

Bug summary

With latest version, the "Use GPS location" fills in current lat/lon, but indicates "Value does not match pattern."

Bug details

Expected to have the autofill function populate the current GPS coordinates, but comes up with error. I first selected a "one time" GSP location. Here is a screenshot of what I see.
IMG_8370170DE7DA-1

Steps to reproduce

Start a new sample, use plant-associated template, click "Use GPS location".

Anything else?

Under "Emiley's test" study

App version

0.1.0(8)

Device type

Apple

Operating system version

iOS 18.1.1

@emileyfadrosh emileyfadrosh added the bug Something isn't working label Dec 18, 2024
@pkalita-lbl pkalita-lbl added v1-release 🚀 Features and bug fixes that must be included in the first public release (i.e. general release) beta-feedback Related to feedback received from beta testers labels Dec 18, 2024
@pkalita-lbl
Copy link
Collaborator

pkalita-lbl commented Dec 18, 2024

I'm shocked -- SHOCKED I say -- that this user couldn't see that the regular expression plainly states that only up to 8 decimal points are allowed. What part of [-+]?([1-8]?\d(\.\d{1,8})?|90(\.0{1,8})?)\s[-+]?(180(\.0{1,8})?|((1[0-7]\d)|([1-9]?\d))(\.\d{1,8})?) did they not understand?

Sarcasm aside, the schema is probably well within its rights to limit to 8 decimal points. The 8th decimal point of latitude and longitude represents about 1mm of accuracy. Despite what a phone might provide (a whopping 14 decimal places in this case -- you're getting down to supposed atomic levels of accuracy), anything past the 8th decimal point (honestly past the 5th or 6th) is just garbage.

So the path forward is probably to round off whatever we get from the device to 6 decimal places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-feedback Related to feedback received from beta testers bug Something isn't working v1-release 🚀 Features and bug fixes that must be included in the first public release (i.e. general release)
Projects
Status: Backlog
Development

No branches or pull requests

2 participants