It appears that when distanceBetween() is invoked with the following example values
lat1 = 39.55
lon1 = -83.99
lat2 = 39.55
lon2 = -83.99
distanceBetween( lat1, lon1, lat2, lon2)
does not return a very small distance as expected
When setting at the home location the following is returned
14:58:25.762 -> distanceBetween( 39.55, -83.99, 39.54, -83.99 )
14:58:25.762 -> Distance to home:
14:58:25.762 -> 1349.02
// Calculate the distance from the current location to "home"
double distanceToHome = gps.distanceBetween(latitude, longitude, hLatitude, hLongitude);
Serial.printf("distanceBetween( %s, %s, %s, %s )\n",String(latitude,2).c_str(), String(longitude,2).c_str(), String(homeLat,2).c_str(), String(homeLng,2).c_str());
Serial.println("Distance to home:");
Serial.println(distanceToHome);
where all values are doubles
It appears that when distanceBetween() is invoked with the following example values
lat1 = 39.55
lon1 = -83.99
lat2 = 39.55
lon2 = -83.99
distanceBetween( lat1, lon1, lat2, lon2)
does not return a very small distance as expected
When setting at the home location the following is returned
14:58:25.762 -> distanceBetween( 39.55, -83.99, 39.54, -83.99 )
14:58:25.762 -> Distance to home:
14:58:25.762 -> 1349.02
// Calculate the distance from the current location to "home"
double distanceToHome = gps.distanceBetween(latitude, longitude, hLatitude, hLongitude);
Serial.printf("distanceBetween( %s, %s, %s, %s )\n",String(latitude,2).c_str(), String(longitude,2).c_str(), String(homeLat,2).c_str(), String(homeLng,2).c_str());
Serial.println("Distance to home:");
Serial.println(distanceToHome);
where all values are doubles