Select to view content in your preferred language

control the distance between the field worker's location and the surveying feature

286
1
03-06-2022 12:52 AM
HalaAbdelmaksoud
Frequent Contributor

Hi all,

can I control the distance between the field worker's location and the surveying feature, for example: the user must be, at maximum, within a distance of 5meter from the surveying feature?  

To make sure that the field worker is at the location of the surveying feature.

 

Tags (1)
0 Kudos
1 Reply
DougBrowning
MVP Esteemed Contributor

Yes I do it by passing in the lat long they were supposed to go to from Field Maps.  Then I calc the distance from that to where they are in currently from the form.  Then I set a constraint on that distance.

DougBrowning_0-1646667086957.png

Formula for distance is

round(acos(sin(${SampledMidLatitude} * pi() div 180)*sin(${DesignLat} * pi() div 180) + cos(${SampledMidLatitude} * pi() div 180)*cos(${DesignLat} * pi() div 180)*cos((${DesignLong} * pi() div 180)-(${SampledMidLongitude} * pi() div 180))) * 6371000,2)

Hope that helps

0 Kudos