1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

Fix algorithm choice and change Es mode distance

Fix hard-coded algorithm weighting values back to config values and increase distance for Es weighting to be applied
This commit is contained in:
Adam Wisher
2025-06-12 13:58:25 +01:00
parent fb68f26d82
commit 72d48b0c2e

View File

@@ -209,11 +209,11 @@ function validPsCompare(rdsPs, stationPs) {
function evaluateStation(station) {
let esMode = checkEs();
let weightDistance = station.distanceKm;
if (esMode && station.distanceKm > 500) {
if (esMode && station.distanceKm > 700) {
weightDistance = Math.abs(station.distanceKm - 1500) + 200;
}
let erp = station.erp && station.erp > 0 ? station.erp : 1;
let extraWeight = erp > 30 && station.distanceKm <= 500 ? 0.3 : 0;
let extraWeight = erp > weightedErp && station.distanceKm <= weightDistance ? 0.3 : 0;
let score = 0;
// If ERP is 1W, use a simpler formula to avoid zero-scoring.
if (erp === 0.001) {