Haversine Formulas (Or ACOS/COS/SINor SQT) Not functioning with Sensor Location

Is there a formula that would give higher accuracy

You can look it up, Maye you might find one. However if you like the figures that excel gives you, you might want to change your program so it uses excel to perform the computation. Readthe excel file, then provide the lat-longs into 4 cells, run it through excel. Then pick up the value from the result cell.

If you have time to pursue it, you might try the vincenty formula. I haven’t tried it. You will probably find it working in excel but maybe off after you transcribe to thunkable.

1 Like

I had started doing that a day ago.

That’s what I thought.

My thought is probably need to have a user id loading in background

When push data to sheets , returns all associated with user id

I know sheets weren’t live updates

Has Thunkable fixed that

Thanks for the help

Was able to get the results of sin1, cos1, cos 2, sin2

They match excel

Thinkable won’t compute sin1+cos1xcos2xsin2

In the Vincenty formula

Can you send me the link to the vincenty formula you’re trying to transcribe to thinkable. thanks

https://x.thunkable.com/projects/6587784c856ddf4fb5cabc7d/a1d0388b-3667-4498-b7bd-bbbbcea516d4/blocks

Can you give me a link to the vincenty formula you Are trying to use? I got your thunkable program but i want to see where you’re copying from

You had posted a Google sheet spreadsheet a couple years ago.

Some of it is relevant in regards to the vencinty formula.

I adjusted some of the formulas to find specific answers.

But really I was trying to copy the picture above

I’m thinking through the Google sheet data source.

Couple issues

Everyone who uses the app would be pushing data to the sheet

  1. if it was only going to one cell line , would everyone’s data be updating every time a person was using.

  2. if inputs were added, how would it know the latest input from a specific user. I had thought about creating unique user ids.

But, upon an input , how can it just update a current input from the user.

Instead of making multiple inputs

Just thoughts

Google sheet math and return is fairly quick.

I have concerns with it not being local logic

But, trying to make it work

i’m attaching my google sheet again

there is no mention of vincenty - the sheet has always been about haversine.

in demo, i included calculations for a,c d (original haversine formulas) along with C_reduced (which is the reduction of a,c,d into a single formula) - but demo thunkable program uses only the formula of C_reduced.
so there’s no point in recoding formulas for a and c - it’s already reduced to the single formula in c_reduced. the value of c is the same as the value of c_reduce.

i haven’t found any vincenty formula that i could transfer to excel form for testing.

i am not the right person to ask about how thunkable can effectively use a single sheet for multi-user. i have no experience in that area.

however i’ve included in the attached , sheet named rowcalc that shows how you can rewrite the formula to one row per user. presumably you provide (valid) value for unit, and the lat and lon values for the 2 points and the distance is automatically compuited.

1 Like

Hey manyone,

So I have toyed around with some other logic. The decimals do go longer than a certain point than we thought. Shown in the red logic. But orange for some reason it is auto rounding even though I dont have a round block in there.

So the ACOS is fine. Seems like a glitch. It is the exact same code for both.

Not sure if someone from Thunkable can research this.

Numbers for red. Not exact but end result is the same.

Orange D Long

image

Not sure why on the second it is rounding to .0000200000000 but the other is fine