7 Replies Latest reply on Apr 4, 2016 6:16 AM by dburnham

# Formula to calculate distance in yards between two locations?

I'm looking for a formula that will calculate the distance between two locations (as returned by the Location function in FM on IOS)?

Anyone have a way to do this?

• ###### 1. Re: Formula to calculate distance in yards between two locations?

If you look in Brian Dunning's custom function web site, you will find several custom functions that calculate distance between points.  I've used them to calculate distance in miles between zip codes, and I suspect that if you know the geo-coordinates from the location function then it would work for you.  Worst case would be that if the custom function returns a result in miles, you just divide by 1760

• ###### 3. Re: Formula to calculate distance in yards between two locations?

I found one that works perfectly.  Thanks.

BTW, you meant multiple (rather than divide) by 1760.

• ###### 4. Re: Formula to calculate distance in yards between two locations?

jjfcpa wrote:

I found one that works perfectly.  Thanks.

BTW, you meant multiple (rather than divide) by 1760.

Which one did you settle on using.

• ###### 6. Re: Formula to calculate distance in yards between two locations?

I opted for this one because it was the easiest to modify.  I only wanted it to calculate yards - it's for a golf app that I'm working on.  Still need to test it on the course to make sure it's accurate.

http://www.briandunning.com/cf/1747

• ###### 7. Re: Formula to calculate distance in yards between two locations?

mea culpa