SO2R: two radios in one instance (#46) (#137)

* Spec: SO2R with two radios in one instance (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Plan: SO2R implementation (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Move the rotator command rules into RotatorControl (#46)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Store the SO2R switch, the second Win-Test station and rotator 2 (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Route frequency reports to radio 1 or 2 (#46)

Add the RadioSlot enum (FIRST, SECOND) with its QRG and QTF targets, and
the pure RadioSlotRouter that decides per RadioInfo packet and per
Win-Test station which radio a report belongs to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Send RadioInfo of radio 2 to SECONDQRG when SO2R is on (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Send Win-Test STATUS of the second station to SECONDQRG when SO2R is on (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Run a second PSTRotator for radio 2 with SO2R (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Start rotator 2 only while an ON4KST session runs (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Settings for SO2R, the second Win-Test station and rotator 2 (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Turn antenna 2 and show QTF2 with SO2R (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Make the SO2R switches observable so Apply shows them (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Document SO2R (#46)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Refuse clashing PSTRotator ports in both directions (#46)

Writing either port now checks same-or-adjacent against the drafted value of
the other; rotor 1 is only checked while SO2R and rotor 2 are on. Also fixes
a misplaced Javadoc, stale WinTest parseStatus Javadoc, docs wording and
removes an unused import and dead comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove the executed SO2R plan (#46)

The plan's content lives on in the commits, the spec and PROJECT_CONTEXT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Rsclub2_2andClaude Opus 5.5 authored and GitHub committed 2026-10-16 19:14:27 +02:00
1 parent feb4b4e2c9
commit 5b7c774f5f
37 files changed
+1587 -266

No files matched your search

+2
View File
@@ -30,6 +30,8 @@ Mehrere Operateure an einem Rechner können jetzt eigene Rufzeichen, Locators un
- **Eigene Standorthöhe und höchster Punkt des Gegenstationsfelds in der Streckenanalyse:** Der Reiter **Station** hat im Abschnitt der Streckenanalyse zwei neue Einstellungen. **Eigene Standorthöhe über NN, Meter** ersetzt den Wert des Höhenmodells am eigenen Locatormittelpunkt durch die Höhe des tatsächlichen Standorts; bleibt das Feld leer, entscheidet wie bisher das Höhenmodell. **Gegenstation auf dem höchsten Punkt ihres Locatorfelds**, standardmäßig eingeschaltet, lässt die Strecke am höchsten von 25 abgetasteten Punkten des Locatorfelds der Gegenstation enden statt in dessen Mitte, weil Conteststationen meist vom höchsten Punkt ihres Feldes aus arbeiten. Die Suche kostet pro Gegenstationsfeld und Sitzung eine zusätzliche Anfrage an den Höhendienst; schlägt sie fehl, rechnet die Analyse wie bisher mit der Feldmitte.
- **SO2R mit zwei Funkgeräten:** Die neue Option **SO2R** im Reiter **TRX-Abgleich** (standardmäßig aus) führt zwei Geräte getrennt. N1MM, DXLog und UCXLog werden über `RadioNr` zugeordnet: Gerät 1 setzt MYQRG, Gerät 2 setzt SECONDQRG. Für Win-Test wird je Gerät ein Stationsname eingetragen. Ein zweiter PSTRotator (eigener Host und Port, im Reiter **Station**) bringt **Antenne 2 drehen** neben **Antenne 1 drehen** und ein Feld QTF2 neben QTF. Ohne SO2R bleibt alles wie bisher. Das setzt den ersten Teil von [Issue #46](https://github.com/praktimarc/kst4contest/issues/46) um.
### Geändert
- **Zwischenspeicher der Geländeprofile getrennt:** Berechnete Geländeprofile liegen jetzt in der eigenen, gemeinsam genutzten Datei `terrainprofilecache.db` und werden nach Besitzer getrennt gespeichert. Bisher wurde der gesamte Zwischenspeicher gelöscht, sobald sich Rufzeichen oder Locator änderten; bei einem Profilwechsel wäre damit jedes berechnete Profil verloren gegangen.
+12 -2
View File
@@ -184,7 +184,7 @@ Weitere Informationen zu den Textvariablen: [Makros und Variablen](de-Makros-und
### Mehrere Logger oder Funkgeräte
Alle aktivierten QRG-Quellen schreiben in denselben Wert `MYQRG`. KST4Contest ordnet eingehende `RadioInfo`- oder `STATUS`-Pakete derzeit weder einem bestimmten Funkgerät noch einer Chat-Kategorie zu.
Ohne SO2R schreiben alle aktivierten QRG-Quellen in denselben Wert `MYQRG`. KST4Contest ordnet eingehende `RadioInfo`- oder `STATUS`-Pakete weder einem bestimmten Funkgerät noch einer Chat-Kategorie zu.
Sind der allgemeine RadioInfo-Listener und die Win-Test-Synchronisation gleichzeitig aktiviert, bestimmt deshalb das zuletzt verarbeitete Paket die angezeigte QRG. Dasselbe gilt, wenn mehrere Logger ihre Frequenzpakete an dieselbe KST4Contest-Instanz senden.
@@ -197,6 +197,16 @@ Für ein Setup mit mehreren Funkgeräten gilt daher:
Anders ausgedrückt: Mehrere Worked-Quellen lassen sich sinnvoll zusammenführen. Mehrere gleichzeitig sendende Frequenzquellen erzeugen dagegen keine zusätzliche Information, sondern lediglich einen Wettbewerb darum, welches Paket zuletzt angekommen ist.
### SO2R: zwei Funkgeräte getrennt führen
Mit der Option **SO2R: zwei Geräte getrennt führen (Gerät 2 schreibt SECONDQRG)** ordnet KST4Contest die Frequenzpakete dem jeweiligen Funkgerät zu. Die Option ist standardmäßig aus; ohne SO2R verhält sich alles wie in den Abschnitten oben beschrieben.
- **N1MM+, DXLog.net, UCXLog:** Die Zuordnung erfolgt über das Feld `RadioNr` im `RadioInfo`-Paket. Dafür ist nichts einzustellen. Gerät 1 setzt `MYQRG`, Gerät 2 setzt `SECONDQRG`.
- **Win-Test:** Hier gibt es kein `RadioNr`, deshalb wird je Gerät ein Stationsname eingetragen, zum Beispiel `STN1` für Gerät 1 im bisherigen Stationsfilter und `STN2` im Feld **Win-Test-Stationsname von Gerät 2**. Das Feld ist ohne SO2R ausgegraut.
- **Zweiter PSTRotator:** Nach **Apply** erscheint im Reiter **Station** der Abschnitt **PSTRotator 2 (SO2R)** mit Schalter, Host und Port. Die zweite Instanz braucht einen eigenen Port, zum Beispiel `12010`; sie antwortet dann auf `12011`. Derselbe Port wie bei PSTRotator 1 oder ein direkt benachbarter wird beim Übernehmen abgelehnt. Der zweite Rotor startet mit der ON4KST-Sitzung.
- **Bedienung:** Im Bereich der gewählten Station steht neben **Antenne 1 drehen** nun **Antenne 2 drehen …**, und in der Sendezeile zeigt ein reines Anzeigefeld QTF2 die Richtung der zweiten Antenne. Der Tooltip von `SECONDQRG` nennt Gerät 2.
- **QTF-Filter:** Die QTF-Filter der Stationsliste folgen weiterhin Rotor 1.
Nach Abschluss der Konfiguration **Save Settings** verwenden.
---
@@ -715,7 +725,7 @@ Eine mögliche Antwort lautet:
[KST4C Automsg] QRG is: 144.300.00
```
Die Werte stammen aus denselben QRG-Feldern, die auch von `MYQRG` und `SECONDQRG` verwendet werden. Die Haupt-QRG kann manuell eingetragen oder durch die [TRX-Synchronisation](#trx-sync-einstellungen) aktualisiert werden. Für die zweite Kategorie wird der dort konfigurierte beziehungsweise manuell eingetragene Wert verwendet.
Die Werte stammen aus denselben QRG-Feldern, die auch von `MYQRG` und `SECONDQRG` verwendet werden. Die Haupt-QRG kann manuell eingetragen oder durch die [TRX-Synchronisation](#trx-sync-einstellungen) aktualisiert werden. Für die zweite Kategorie wird der dort konfigurierte beziehungsweise manuell eingetragene Wert verwendet; mit SO2R schreibt Funkgerät 2 dieses Feld (`SECONDQRG`).
Ist für die betreffende Kategorie keine QRG vorhanden, sendet KST4Contest keine unvollständige Antwort. Eine Nachricht wie `QRG is:` ohne Frequenz würde zwar auf die Frage reagieren, dem Anfragenden aber keine Information liefern. Sie wird deshalb bereits vor der Übergabe an die Sendequeue verworfen.
+2
View File
@@ -30,6 +30,8 @@ Several operators sharing one computer can now use their own callsigns, locators
- **Own site height and highest point of the remote square in the path analysis:** the **Station** tab has two new settings in its path-analysis section. **Own ground height ASL, metres** replaces the elevation-model value at the own locator centre by the height of the actual site; left empty, the elevation model decides as before. **Target station on the highest point of its locator square**, on by default, ends the path at the highest of 25 sampled points of the remote locator square instead of at its centre, because contest stations usually operate from the high ground of their square. The lookup costs one additional request to the elevation service per remote square and session; if it fails, the analysis uses the square centre as before.
- **SO2R with two radios:** the new option **SO2R** on the **TRX sync** tab (off by default) keeps two radios apart. N1MM, DXLog and UCXLog are assigned by `RadioNr`: radio 1 updates MYQRG, radio 2 updates SECONDQRG. For Win-Test, enter one station name per radio. A second PSTRotator (own host and port, on the **Station** tab) adds **Turn ant2** next to **Turn ant1** and a QTF2 field next to QTF. Without SO2R everything stays as before. This implements the first part of [Issue #46](https://github.com/praktimarc/kst4contest/issues/46).
### Changed
- **The terrain profile cache is separate:** computed terrain profiles now live in their own shared file `terrainprofilecache.db` and are stored per owner. Previously the whole cache was dropped whenever the callsign or locator changed, which would have discarded every computed profile on each profile switch.
+12 -2
View File
@@ -238,7 +238,7 @@ Further information about text variables: [Macros and Variables](en-Macros-and-V
### Multiple Loggers or Radios
Every enabled QRG source writes to the same `MYQRG` value. KST4Contest does not currently assign incoming `RadioInfo` or `STATUS` packets to a particular radio or chat category.
Without SO2R, every enabled QRG source writes to the same `MYQRG` value. KST4Contest does not assign incoming `RadioInfo` or `STATUS` packets to a particular radio or chat category.
If the general RadioInfo listener and Win-Test synchronisation are enabled at the same time, the most recently processed packet therefore determines the displayed QRG. The same applies when several logging applications send frequency packets to one KST4Contest instance.
@@ -251,6 +251,16 @@ For a setup containing several radios:
In other words, combining several Worked sources is useful. Combining several simultaneously transmitting frequency sources merely creates a contest over which packet arrived last.
### SO2R: Keeping Two Radios Apart
The option **SO2R: keep two radios apart (radio 2 writes SECONDQRG)** makes KST4Contest assign frequency packets to the respective radio. It is off by default; without SO2R everything behaves as described in the sections above.
- **N1MM+, DXLog.net, UCXLog:** assignment uses the `RadioNr` field of the `RadioInfo` packet. Nothing needs to be configured. Radio 1 updates `MYQRG`, radio 2 updates `SECONDQRG`.
- **Win-Test:** there is no `RadioNr` here, so one station name per radio is entered, for example `STN1` for radio 1 in the existing station filter and `STN2` in the field **Win-Test station name of radio 2**. The field is greyed out without SO2R.
- **Second PSTRotator:** after **Apply**, the **Station** tab shows the section **PSTRotator 2 (SO2R)** with a switch, host and port. The second instance needs its own port, for example `12010`; it answers on `12011`. The same port as PSTRotator 1, or one next to it, is refused on Apply. The second rotator starts with the ON4KST session.
- **Operation:** the selected-station panel gets **Turn ant2 to ...** next to **Turn ant1**, and the send line shows a display-only QTF2 field for the second antenna. The tooltip of `SECONDQRG` names radio 2.
- **QTF filters:** the QTF filters of the station list still follow rotator 1.
Click **Save Settings** after completing the configuration.
---
@@ -715,7 +725,7 @@ A possible reply is:
[KST4C Automsg] QRG is: 144.300.00
```
The values come from the same QRG fields used by `MYQRG` and `SECONDQRG`. The primary QRG may be entered manually or updated through [TRX synchronisation](#trx-sync-settings). The second category uses the value configured or entered for that category.
The values come from the same QRG fields used by `MYQRG` and `SECONDQRG`. The primary QRG may be entered manually or updated through [TRX synchronisation](#trx-sync-settings). The second category uses the value configured or entered for that category; with SO2R, radio 2 writes this field (`SECONDQRG`).
If no QRG is available for the incoming category, KST4Contest does not send an incomplete reply. A message containing `QRG is:` without a frequency would technically answer the request while providing no useful information. It is therefore rejected before reaching the transmit queue.