Improve debug message
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user