1
0

Improve debug message

This commit is contained in:
2024-01-04 09:21:18 +01:00
parent 4248bf500b
commit d2546c7910

View File

@@ -97,8 +97,6 @@ function convertValue(value) {
}
function distanceFrom(locationA, locationB) {
console.debug(`Calculate distance between ${locationA} and ${locationB}`);
let lat1 = (locationA.split(',')[0]) * (Math.PI / 180);
let lon1 = (locationA.split(',')[1]) * (Math.PI / 180);
let lat2 = (locationB.split(',')[0]) * (Math.PI / 180);
@@ -122,7 +120,7 @@ function distanceFrom(locationA, locationB) {
// calculate the result
let result = `${(c * r).toFixed()} m`
console.debug('Result is ' + result);
console.debug(`Calculated distance between ${locationA} and ${locationB} is ${result}`);
return result;
}