Changed Distance to meters

This commit is contained in:
C9Glax 2022-11-03 19:13:53 +01:00
parent 88ed5472a8
commit fcae3e5be2

View File

@ -9,7 +9,7 @@
public static float DistanceBetweenCoordinates(float lat1, float lon1, float lat2, float lon2) public static float DistanceBetweenCoordinates(float lat1, float lon1, float lat2, float lon2)
{ {
const int earthRadius = 6371; const int earthRadius = 6371000;
double differenceLat = DegreesToRadians(lat2 - lat1); double differenceLat = DegreesToRadians(lat2 - lat1);
double differenceLon = DegreesToRadians(lon2 - lon1); double differenceLon = DegreesToRadians(lon2 - lon1);