Automate the distance bearing from geopoint

145
1
Jump to solution
12-02-2021 08:47 AM
ParksBrian
New Contributor II

In my survey, I would like to take a photo and then automatically calculate the distance (meters) and the bearing to the geopoint that is recorded for the site. Currently I just have the distance and bearing as text boxes to be filled in manually. Can these be automated?

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Notable Contributor

Not sure on bearing but here is the code to calc distance in meters between any two lat/long pairs.

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)

Hope that helps

View solution in original post

1 Reply
DougBrowning
MVP Notable Contributor

Not sure on bearing but here is the code to calc distance in meters between any two lat/long pairs.

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)

Hope that helps