Creating a method using Haversine Formula, Android V2

Try this, much simpler than Haversine!

Location me   = new Location("");
Location dest = new Location("");

me.setLatitude(myLat);
me.setLongitude(myLong);

dest.setLatitude(destLat);
dest.setLongitude(destLong);

float dist = me.distanceTo(dest);

Leave a Comment