Location sensor for tracking distance

Your “d” value in the formula1 function is returning zero. I’m not sure why but you need to fix that equation. I’d suggest starting from scratch with that line of code (not the whole formula, just the calculation for “d”).

I’d also base your equations off of the screenshot in this post (Calculate distance travelled - #2 by manyone

Little changes you’ve made such as multiplying app variable d by a constant later instead of as part of the calculation of app variable d can have impacts that you don’t expect.

Also a note that I’ve used the Haversine formula to calculate relatively large distances like 0.5 miles but I’ve never used it for distances of just a few feet. I don’t know if it’s accurate at such small scale.

·····················································································································
Need help? How to Ask Great Questions :sparkles: Debugging A Project :sparkles: API JSON Tutorial

Want to hire a Certified Thunkable Expert? Elevate your app with Tatiang on Fiverr