Is there a way in Survey123 to compare the spatial distance in meters between 2 GPS coordinates (on fixed GPS coordinates and the other one is the actual location of the device/enumerator)?
If the distance is, say, more than 30m, show an error message "You are far away, please go to the designated location"?
Solved! Go to Solution.
Here I send in the DesignLat/Long and compare to the current (which someone called easting/northing and it drives me nuts). Can compare any 2 with it.
round(acos(sin(${Northing} * pi() div 180)*sin(${DesignLat} * pi() div 180) + cos(${Northing} * pi() div 180)*cos(${DesignLat} * pi() div 180)*cos((${DesignLong} * pi() div 180)-(${Easting} * pi() div 180))) * 6371000,2)
meters
Here I send in the DesignLat/Long and compare to the current (which someone called easting/northing and it drives me nuts). Can compare any 2 with it.
round(acos(sin(${Northing} * pi() div 180)*sin(${DesignLat} * pi() div 180) + cos(${Northing} * pi() div 180)*cos(${DesignLat} * pi() div 180)*cos((${DesignLong} * pi() div 180)-(${Easting} * pi() div 180))) * 6371000,2)
meters
Thanks
Does it work if one of those GPS coordinates (DesignLat/Long) are taken from Collector app through a custom URL scheme using the ¢er or Survey123 will be lost here?
I send these using a URL. Just send it into a field in the form then compare.
Doesn't the center (¢er=43.567,-117.380) in the custom URL sets ALL the geopoint questions to those coordinates? In that case, should I sent those coordinates from the Collector app to a text field in Survey123 and then compare?
Yes do not use center just send them as text into a field in the form. Then have a second set of lat/long using pulldata to get the form GPS lat/long. Then compare those 2 fields. Sorry that was not clear.
Thanks for the explanation. On a side note, can we collect the GPS automatically (hidden way) without showing or clicking on the GPS button or map in the form (using the field app)?
I think you can hide the GPS question using the new body::esri:visible column.