diff --git a/changelog.json b/changelog.json index a1a1b30..386301c 100644 --- a/changelog.json +++ b/changelog.json @@ -1,4 +1,16 @@ [ + { + "version": "0.27.1", + "date": "", + "en": [ + "Elecraft console: the S-meter is calibrated against a real K3 — S9 and the +dB readings now match the radio’s own display (they read about two S-units low).", + "Elecraft console: an SWR spike (the K3’s own blip at the end of an FT8 frame) no longer fades over twelve seconds — the peak shows briefly, then the meter returns straight to the live reading." + ], + "fr": [ + "Console Elecraft : le S-mètre est calibré sur un vrai K3 — S9 et les +dB correspondent désormais à l’affichage de la radio (il lisait environ deux points S trop bas).", + "Console Elecraft : un pic de ROS (le sursaut du K3 en fin de trame FT8) ne s’estompe plus pendant douze secondes — le pic s’affiche brièvement, puis le ros-mètre revient directement à la valeur réelle." + ] + }, { "version": "0.27.0", "date": "", diff --git a/frontend/src/components/ElecraftPanel.tsx b/frontend/src/components/ElecraftPanel.tsx index 0ec38ad..0908c7e 100644 --- a/frontend/src/components/ElecraftPanel.tsx +++ b/frontend/src/components/ElecraftPanel.tsx @@ -42,18 +42,22 @@ const ZERO: KenwoodState = { // nobody notices are missing. const FILTERS = [200, 400, 700, 1000, 1800, 2400, 2800, 4000]; -// Raw S-meter → S units. The K3 answers 0-21 across S0…S9+60; S9 is taken at -// raw 9 and each step above it as 6 dB. PROVISIONAL, like the rest of the -// scaling: the raw value is on screen and in the log, so a real radio settles -// it rather than this comment. -const S9_RAW = 9; -const DB_PER_RAW = 6; -function sParts(rawV: number): { s: number; over: number; label: string } { - if (rawV >= S9_RAW) { - const over = Math.max(0, Math.round((rawV - S9_RAW) * DB_PER_RAW)); +// Raw S-meter → S units, CALIBRATED against a real K3 beside its own display +// (2026-08): raw 5 reads S7 on the radio, raw 9 reads S9+20. So S9 sits near +// raw 6.5 — not 9, which showed everything two S-units low — and each raw step +// above it is worth ~8 dB, shown in the 10 dB steps the K3's own meter uses. +// A Kenwood answers 0-30 on the same command and keeps the simple 1-per-raw +// scale until someone calibrates one against a real radio too. +const K3_S9_RAW = 6.5; +const K3_DB_PER_RAW = 8; +function sParts(rawV: number, elecraft: boolean): { s: number; over: number; label: string } { + const s9raw = elecraft ? K3_S9_RAW : 9; + if (rawV >= s9raw) { + let over = Math.max(0, Math.round((rawV - s9raw) * (elecraft ? K3_DB_PER_RAW : 6))); + if (elecraft) over = Math.round(over / 10) * 10; return { s: 9, over, label: over > 0 ? `S9+${over}` : 'S9' }; } - const s = Math.max(0, Math.min(9, rawV)); + const s = Math.max(0, Math.min(9, Math.round(rawV * (elecraft ? 9 / K3_S9_RAW : 1)))); return { s, over: 0, label: `S${s}` }; } @@ -211,10 +215,10 @@ export function ElecraftPanel({ onReportRST }: { onReportRST?: (rst: string) =>