You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
TX search algorithm weighting adjustment
Weighting adjustment based on user feedback
This commit is contained in:
@@ -108,7 +108,7 @@ async function processData(data, piCode, rdsPs) {
|
|||||||
weightDistance = Math.abs(distance.distanceKm - 1500);
|
weightDistance = Math.abs(distance.distanceKm - 1500);
|
||||||
}
|
}
|
||||||
let erp = station.erp && station.erp > 0 ? station.erp : 1;
|
let erp = station.erp && station.erp > 0 ? station.erp : 1;
|
||||||
let extraWeight = erp >= 5 && distance.distanceKm <= 2500 ? 0.5 : 0;
|
let extraWeight = erp > 10 && distance.distanceKm <= 2500 ? 0.3 : 0;
|
||||||
const score = ((10 * Math.log10(erp * 1000)) / weightDistance) + extraWeight;
|
const score = ((10 * Math.log10(erp * 1000)) / weightDistance) + extraWeight;
|
||||||
if (score > maxScore) {
|
if (score > maxScore) {
|
||||||
maxScore = score;
|
maxScore = score;
|
||||||
|
|||||||
Reference in New Issue
Block a user