latlong library

Helps with latitude / longitude calculations.

For distance calculations the default algorithm Vincenty is used. Vincenty is a bit slower than Haversine but fare more accurate!

final Distance distance = new Distance();

// km = 423
final int km = distance.as(LengthUnit.Kilometer,
new LatLng(52.518611,13.408056),new LatLng(51.519475,7.46694444));

// meter = 422592
final int meter = distance(new LatLng(52.518611,13.408056),new LatLng(51.519475,7.46694444));

Find more infos on Movable Type Scripts and Movable Type Scripts - Vincenty  Classes

Circle
Circle-base GEO algorithms. [...]
Distance
Calculates the distance between points. [...]
DistanceCalculator
DistanceHaversine
Shortcut for final Distance distance = const Distance(calculator: const Haversine());
DistanceVincenty
Shortcut for final Distance distance = const Distance(calculator: const Vincenty());
Haversine
LatLng
Coordinates in Degrees [...]
LengthUnit
Path<T extends LatLng>
Path of LatLng values [...]
Vincenty

Constants

Equator radius in meter (WGS84 ellipsoid)
6378137.0
FLATTENING → const double
WGS84
1 / 298.257223563
PI → const double
The PI constant.
math.pi
Polar radius in meter (WGS84 ellipsoid)
6356752.314245

Functions

decimal2sexagesimal(double dec)
Converts a decimal coordinate value to sexagesimal format [...]