mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-08-23 18:47:34 +02:00
fixed scoreservice. Not-QRV stations and such which dont provide needed bands now never could appear at the prirotity list
This commit is contained in:
@@ -166,7 +166,15 @@ public final class ScoreService {
|
||||
scoreByCallRaw.put(callRaw, score);
|
||||
preferredCategoryByCallRaw.put(callRaw, representative.getChatCategory());
|
||||
|
||||
topAll.add(new TopCandidate(callRaw, representative.getCallSign(), representative.getChatCategory(), score));
|
||||
if (Double.isFinite(score) && score > 0.0) {
|
||||
topAll.add(new TopCandidate(
|
||||
callRaw,
|
||||
representative.getCallSign(),
|
||||
representative.getChatCategory(),
|
||||
score
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 3) Build Top-N
|
||||
|
||||
@@ -2,6 +2,7 @@ package kst4contest.controller;
|
||||
|
||||
import kst4contest.logic.SignalDetector;
|
||||
import kst4contest.model.ChatPreferences;
|
||||
import kst4contest.model.ChatMember;
|
||||
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Deque;
|
||||
@@ -21,7 +22,7 @@ import java.util.regex.Pattern;
|
||||
public final class StationMetricsService {
|
||||
|
||||
/** /cq <CALL> ... */
|
||||
private static final Pattern OUTBOUND_CQ_PATTERN = Pattern.compile("(?i)^\\s*/cq\\s+([A-Z0-9/]+)\\b.*");
|
||||
private static final Pattern OUTBOUND_CQ_PATTERN = Pattern.compile("(?i)^\\s*/cq\\s+([A-Z0-9/-]+)\\b.*");
|
||||
|
||||
/** Rolling window timestamps for momentum scoring. */
|
||||
private static final int MAX_STORED_INBOUND_TIMESTAMPS = 32;
|
||||
@@ -195,7 +196,7 @@ public final class StationMetricsService {
|
||||
|
||||
private static String normalizeCallRaw(String s) {
|
||||
if (s == null) return null;
|
||||
return s.trim().toUpperCase();
|
||||
return ChatMember.normalizeCallSignToBaseCallSign(s);
|
||||
}
|
||||
|
||||
private static final class StationMetrics {
|
||||
|
||||
Reference in New Issue
Block a user