Calculating GPS accuracy against a fixed threshold value

Hi,

My field force is running a survey in a densely populated urban area, where GPS accuracy matters a lot. While GPS on the phone starts from wider accuracy and gradually pinpoints it to exact location, I want the user to be able to proceed only if the GPS accuracy has pinpointed to a certain value (for example: 30 meters). When the user captures the GPS and moves to next question, there should be a calculation that checks if the accuracy is less than 30 meters. If yes, OK to move ahead. If not, it should alert the user to repeat the location question with more wait time.

How can I do it?

Thanks,
Saad

1 Like

Hello @Saad,

See attached for a workaround of the issue. You can simplify the codes to run in fewer lines. Basically, the Geopoint data are stored in a delimited string. I used selected-at() and specified the index of accuracy 3 and converted that to number() in oder to apply the math validation <=, >=, etc..

I am sure there might be other simpler ways, but that's what I could think of, for now.

Cheers,
Jules R
GPS_Testing.xlsx (10.0 KB)

4 Likes

The note is a great approach if you want to provide more context to the enumerator! You can also put selected-at(., 3) < 10 directly on the constraint of the geopoint question and show a constraint message warning that accuracy should be better than 10 meters or whatnot.

4 Likes