diff --git a/server/datahandler.js b/server/datahandler.js index 7d54f1a..1f4af93 100644 --- a/server/datahandler.js +++ b/server/datahandler.js @@ -416,7 +416,8 @@ function handleData(wss, receivedData, rdsWss) { azi: currentTx.azimuth, id: currentTx.id, pi: currentTx.pi, - reg: currentTx.reg + reg: currentTx.reg, + otherMatches: currentTx.others }; } }) diff --git a/server/endpoints.js b/server/endpoints.js index af3f429..fabc411 100644 --- a/server/endpoints.js +++ b/server/endpoints.js @@ -416,7 +416,7 @@ router.get('/log_fmlist', (req, res) => { client: { request_ip: clientIp }, - type: (req.query.type && dataHandler.dataToSend.txInfo.dist > 700) ? req.query.type : 'tropo', + type: req.query.type ? req.query.type : 'tropo', log_msg: "Logged PS: " + dataHandler.dataToSend.ps.replace(/\s+/g, '_') + ", PI: " + dataHandler.dataToSend.pi + ", Signal: " + (dataHandler.dataToSend.sig - 11.25).toFixed(0) + " dBµV", }); diff --git a/server/tx_search.js b/server/tx_search.js index 4cca38b..2380cce 100644 --- a/server/tx_search.js +++ b/server/tx_search.js @@ -149,10 +149,10 @@ function evaluateStation(station) { return score; } -// Fetch data from cached database +// Fetch data from maps async function fetchTx(freq, piCode, rdsPs) { let match = null; - // let multiMatches = []; + let multiMatches = []; const now = Date.now(); freq = parseFloat(freq); @@ -192,7 +192,7 @@ async function fetchTx(freq, piCode, rdsPs) { loc.score = evaluateStation(loc); } match = filteredLocations.reduce((max, obj) => obj.score > max.score ? obj : max, filteredLocations[0]); - // multiMatches = filteredLocations.filter(obj => obj !== match); + multiMatches = filteredLocations.filter(obj => obj !== match); } else if (filteredLocations.length === 1) { match = filteredLocations[0]; } @@ -218,7 +218,7 @@ async function fetchTx(freq, piCode, rdsPs) { pi: match.pi, foundStation: true, reg: match.detectedByPireg, - // others: multiMatches, + others: multiMatches, }; } else { return Promise.resolve(); diff --git a/web/index.ejs b/web/index.ejs index df37edf..5cce173 100644 --- a/web/index.ejs +++ b/web/index.ejs @@ -287,7 +287,7 @@ [] - kW [] • • + kW [] • • @@ -406,6 +406,17 @@ +
Possible transmitters
+ +