DistanceCalc : Calculate distance between two places from coordinates

Well…
I am here to present my first extension (ever) to this community.
As you have read in title DistanceCalc calculates distance (sometimes accurate) between two places from coordinates (latitudes and longitudes).

Blocks
Just a single block…

Usage
It has just one function/block as you can see in above screenshot.
12-19_18_00

It accepts four coordinates in format like lat1,lng1,lat2, and lng2 and all of them should be integers(double).It returns distance in KiloMetres.
But you can convert distance(Km) in different units by using some math blocks.
An example can be this:

Aix or Extension download link
As some users are experiencing a mysterious ‘bug’ in community so here are two download links.

Download Link1: distancecalc.aix (5.9 KB)
Download Link2: distancecalc.aix - Google Drive

Aia
Learn to use this ‘basic’ extension from this Aia:
Download Link1: DistanceCalc.aia (7.4 KB)
Download Link2: DistanceCalc.aia - Google Drive

Open Source
I want to make my extension open source so that beginners can learn from this.
Here is Java file:
DistanceCalc.java (2.0 KB)

Credits
I want to say thank you to @Souvik_Bera and @The_Developer_2.0 for video on YouTube and some useful posts in Community and @KodularCreator (of course) for such a great platform(as always).

Thank you…:heart:

19 Likes

That’s a nice one. Which formula do you use to calculate the distance?

2 Likes

Congratulations brother. very nice extension and awsome start:heart_eyes:

2 Likes

Thank you

Haversine Formula.

Inspired from a KodeJam challenge

4 Likes

That was my first guess :grin:

For everybody who wants to read up on this formula

10 Likes

Secret is getting spoiled…:joy:
I am thinking to make it open source.
As I have learned to make extension from some open source extensions , it is my responsibility to do same.
It will be open source soon…

7 Likes

That’s great to make others learn from your code.

4 Likes

@vknow360 Nice start. Keep it up :+1:

5 Likes

I completed my promise.
Here is Java file:
DistanceCalc.java (2.0 KB)

Hope this will be helpful!

11 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.