We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i calculate disantance between two points. Are there some methods in Location data classes ?
The text was updated successfully, but these errors were encountered:
It's not a topic or bug of this package.
Use a haversine method
/// Calculate between two locations in meter static double haversine(double lat1, double lon1, double lat2, double lon2) { // distance between latitudes and longitudes double dLat = radians(lat2 - lat1); double dLon = radians(lon2 - lon1); // convert to radians lat1 = radians(lat1); lat2 = radians(lat2); // apply formulae var a = pow(sin(dLat / 2), 2) + pow(sin(dLon / 2), 2) * cos(lat1) * cos(lat2); double rad = 6371; double c = 2 * asin(sqrt(a)); return rad * c*1000; }
Sorry, something went wrong.
No branches or pull requests
How can i calculate disantance between two points. Are there some methods in Location data classes ?
The text was updated successfully, but these errors were encountered: