Calculate distance between 2 GPS points

Dev777

Active member
This is super cool. You can actually use this as a manual geofence. Exclude areas which are more than x km from the centre of a geofence using a variable
 

Dm114

Well-known member
いや、あなたのマクロは誤差が大きすぎる。
以前正確なアクションブロックを作ったことがあるので参考にしてほしい。
No, your macro has too much error.
I have created an accurate action block before, so please use this as a reference.
You are quite right: I noticed the problem a few days ago (due to bad interpretation of some trigonometrical functions).

I made the correction for my personal use but didn't have time to update the Template Store yet...
 

mapriex

Active member
This is super cool. You can actually use this as a manual geofence. Exclude areas which are more than x km from the centre of a geofence using a variable
as i read your comment, my idea is similar.
i am going to use this as an debugging helper implemented in my geofences macros. i will need it, if my geofences and triggers will be falsely executed. then i can check how far the geofence was offset.
 

Dm114

Well-known member
いや、あなたのマクロは誤差が大きすぎる。
以前正確なアクションブロックを作ったことがあるので参考にしてほしい。
No, your macro has too much error.
I have created an accurate action block before, so please use this as a reference.
I just updated the Template Store with corrected formula.

Both of us now get very close results and are quite close to the "real" figures given by Vincenty module, which is THE reference in this field. Unfortunately his calculations are too sophisticated to be translated/replicated in MD.

I consider that, as none of MD user will use MD to make airplane schedules 😉, our very tiny differences are negligible.

When I have some free time I'll look to details of your interesting formula...
 
Last edited:
Top