From d2546c791033f3fa2fda9153ea2dd7defb4ecc55 Mon Sep 17 00:00:00 2001 From: Christian Weimann Date: Thu, 4 Jan 2024 09:21:18 +0100 Subject: [PATCH] Improve debug message --- utils/lib.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/lib.js b/utils/lib.js index eeb70c8..9c82b7c 100644 --- a/utils/lib.js +++ b/utils/lib.js @@ -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; }