great_circle_distance_calculator 1.0.4 copy "great_circle_distance_calculator: ^1.0.4" to clipboard
great_circle_distance_calculator: ^1.0.4 copied to clipboard

Calculate the great-circle distance on the Earth having a pair of Latitude,Longitude points using the Spherical law of cosines, Haversine formula or Vincenty`s formula

example/main.dart

import 'package:great_circle_distance_calculator/great_circle_distance_calculator.dart';

final lat1 = 41.139129;
final lon1 = 1.402244;

final lat2 = 41.139074;
final lon2 = 1.402315;
main() {
  var gcd = new GreatCircleDistance.fromDegrees(
      latitude1: lat1, longitude1: lon1, latitude2: lat2, longitude2: lon2);

  print(
      'Distance from location 1 to 2 using the Spherical Law of Cosines is: ${gcd.sphericalLawOfCosinesDistance()}');
  print(
      'Distance from location 1 to 2 using the Vicenty`s formula is: ${gcd.vincentyDistance()}');
}
9
likes
130
pub points
79%
popularity

Publisher

verified publishertechbuzs.ml

Calculate the great-circle distance on the Earth having a pair of Latitude,Longitude points using the Spherical law of cosines, Haversine formula or Vincenty`s formula

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on great_circle_distance_calculator