Let HQ send the crewed submarine orders, received by VLF (1.3.65)

The boat's VLF loop copies the broadcast below the mast down to 25 m (60 s
instead of 20 s, receive only). From broadcast 2 on a broadcast may carry
an HQ order while none is open (deterministic per seed and number, at most
4): proceed to an area in deep water, send a situation report, or keep
radio silence, each with a deadline. Radio page, chart and the Remote Crew
radio card show the open order. Saves are now v30 (crew.radio version 2).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TGvKG7oVxvDAFoEk15CCFZ
This commit is contained in:
Claude committed 2026-09-29 06:09:19 +00:00
1 parent 29abc6c76e
commit 735d8adfa9
37 files changed
+552 -90

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ body:
id: version
attributes:
label: Version
placeholder: "1.3.64"
placeholder: "1.3.65"
validations:
required: true
- type: input
+6 -6
View File
@@ -2,7 +2,7 @@
## Authority and scope
- This is U-Jagd 1.3.64 (`src/core/version.py`); current saves are v29-only. Treat these as compatibility contracts, not changelog entries.
- This is U-Jagd 1.3.65 (`src/core/version.py`); current saves are v30-only. Treat these as compatibility contracts, not changelog entries.
- Resolve conflicts in this order: executable code and focused tests; packaged JSON/runtime resources; `pyproject.toml` and provenance/license notices; `README.md`; design/history documents under `docs/`. A plan or old comment is not an implementation contract.
- Preserve explicit compatibility tests and user data unless a task intentionally changes the contract. Add a regression test for behavior changes.
- Older phase/milestone labels under `docs/GDD.md`, `docs/implementation-plan.md`, `docs/plan-0.1.6.md`, and `docs/plan-0.1.7.md` are historical. Current resumable work is tracked in `docs/plan-1.3.md` and `docs/resume.md`.
@@ -62,9 +62,9 @@
## Persistence and user content
- Runtime root is `~/.u-jagd/`: `settings.json`; `slot1.json` through `slot5.json`; `autosave.json` (a v29 save of the running mission every `AUTOSAVE_INTERVAL_S` and on a normal quit, deleted when a mission ends or a new one starts; "Continue" in the main menu loads it); editor files in `missions/` and `units/`. Tests replace save paths with temporary directories; never write real user paths from tests. `.u-jagd/`, build products, caches, and egg metadata stay untracked.
- Preferences persist language/fullscreen/audio/large text/tooltips in `settings.json`; v29 saves also retain the mission's tooltip state and the uConsole's local side. CLI `--windowed` and `--no-audio` override saved values for one launch; no inverse fullscreen or CLI-language switch exists.
- Write and load save v29 only. Require the exact `u-jagd-save-v29` schema (exact key sets live in `src/core/save_schema.py`) and the complete current catalog, platform, ESM, ASW, AIS, RNG and crewed-boat crew state (`crew` block: orders with the attack computer's stadimeter marks `tdc` and each tube's flooding state `tubes`, wires, plot, ESM picture with each emitter's last main-beam hit `last_peak`, radio room, feed, sonar station; a loaded boat keeps its binding for `UBOOT_RESTORE_HOLD_S` until its crew returns), plus foreign active pings still travelling to the frigate (`ping_intercepts`) and each conventional boat's diesel, charge rate and air stores (endurance state version 2) and every submarine's ballast, trim and high-pressure air (`ballast`) and its compartments, leaks, fires, gas and damage-control teams (`damage_control`), plus the HQ task board (`tasking`), the frigate's watch bill (`watch`; the boat's is `crew.watch`), the patrol aircraft (`mpa`) and each buoy's `owner`, plus the frigate's variable-depth sonar (`vds_state`, payout, depth and target), plus the frigate's radar mast blips and the OPZ's marks the AI hunters act on (`radar_marks`), plus the Bridge's autopilot route (`route`: waypoints, current index, manual or pattern), plus the frigate's depth charges in the water and own ASROC/depth-charge stores (`asw.depth_charges`, `asw.own_stores`). Reject malformed, non-integer, older, newer, incomplete, or unknown schemas without migration.
- Runtime root is `~/.u-jagd/`: `settings.json`; `slot1.json` through `slot5.json`; `autosave.json` (a v30 save of the running mission every `AUTOSAVE_INTERVAL_S` and on a normal quit, deleted when a mission ends or a new one starts; "Continue" in the main menu loads it); editor files in `missions/` and `units/`. Tests replace save paths with temporary directories; never write real user paths from tests. `.u-jagd/`, build products, caches, and egg metadata stay untracked.
- Preferences persist language/fullscreen/audio/large text/tooltips in `settings.json`; v30 saves also retain the mission's tooltip state and the uConsole's local side. CLI `--windowed` and `--no-audio` override saved values for one launch; no inverse fullscreen or CLI-language switch exists.
- Write and load save v30 only. Require the exact `u-jagd-save-v30` schema (exact key sets live in `src/core/save_schema.py`) and the complete current catalog, platform, ESM, ASW, AIS, RNG and crewed-boat crew state (`crew` block: orders with the attack computer's stadimeter marks `tdc` and each tube's flooding state `tubes`, wires, plot, ESM picture with each emitter's last main-beam hit `last_peak`, radio room with its HQ orders, feed, sonar station; a loaded boat keeps its binding for `UBOOT_RESTORE_HOLD_S` until its crew returns), plus foreign active pings still travelling to the frigate (`ping_intercepts`) and each conventional boat's diesel, charge rate and air stores (endurance state version 2) and every submarine's ballast, trim and high-pressure air (`ballast`) and its compartments, leaks, fires, gas and damage-control teams (`damage_control`), plus the HQ task board (`tasking`), the frigate's watch bill (`watch`; the boat's is `crew.watch`), the patrol aircraft (`mpa`) and each buoy's `owner`, plus the frigate's variable-depth sonar (`vds_state`, payout, depth and target), plus the frigate's radar mast blips and the OPZ's marks the AI hunters act on (`radar_marks`), plus the Bridge's autopilot route (`route`: waypoints, current index, manual or pattern), plus the frigate's depth charges in the water and own ASROC/depth-charge stores (`asw.depth_charges`, `asw.own_stores`). Reject malformed, non-integer, older, newer, incomplete, or unknown schemas without migration.
- Writes must stage beside the destination, flush and `fsync`, then atomically `os.replace`; failure leaves the prior file intact and save-and-quit quits only after success. Load into a candidate state and commit only after complete validation/restoration; failure must leave the live game and global ID counters unchanged.
- Treat imported/editor JSON as hostile. Require finite typed/bounded values, strict schemas, `user.<lowercase/digit/_/->` keys, confined destinations, and no symlinked root/file. Never interpret a logical reference as a filesystem path.
- Bundle import validates every item and collision before the first visible write, stages all files, rechecks confinement/symlinks, and rolls back the whole commit on failure. Preserve backups if rollback itself fails. JSON output must reject NaN/Infinity.
@@ -72,14 +72,14 @@
## Remote Crew multiplayer
- Remote Crew is authoritative-host multiplayer for multiple authenticated browser clients. The uConsole process remains the sole simulation authority. Browsers never run simulation, advance time, resolve physics, read live entities, or mutate game state from transport threads.
- Multiplayer protocol versions are independent of application and save versions. Remote Crew is protocol v2-only; every `/api/v1/*` route is retired and returns 404. Saves remain exact v29; credentials, clients, station leases, network queues, drafts, and unaccepted commands are transient and never enter saves or settings.
- Multiplayer protocol versions are independent of application and save versions. Remote Crew is protocol v2-only; every `/api/v1/*` route is retired and returns 404. Saves remain exact v30; credentials, clients, station leases, network queues, drafts, and unaccepted commands are transient and never enter saves or settings.
- Support a hard-bounded client count. Each client has an independent cryptographic session, expiry, request namespace, and revocation state. The host explicitly grants one exclusive station role per client and can revoke or take over any role. Reconnect never inherits another client's authority.
- Role capabilities are allowlisted. A granted browser may directly operate its station, including weapons when the host separately enables direct fire, but every action must pass the same observation freshness, damage, inventory, ROE, envelope, and readiness checks as local input. Save/load, reset, editors, options, quit, network administration, and credentials remain host-only, with one explicit exception: solo mode (below).
- The transport is `src/commander/server.py` (`CommanderServer`: sessions, leases, publications) with `src/commander/v2/` (`wire.py` constants and framing, `commands.py` the closed action registry and validators, `routes.py` HTTP and WebSocket handlers); `server.py` re-exports the v2 names. `src/commander/bridge.py` (`CommanderBridge`: projection pump and command application) applies station actions through the closed handler tables in `src/commander/actions.py`, which it re-exports. `/ws/v2/state` pushes the active role's projection (the same bytes as `GET /api/v2/state`, at most 4 Hz, heartbeat 2 s, latest state only) and the browser falls back to polling; both paths share one allowlist: `src/commander/v2/schema.py` is rendered into the generated block of `data/commander/js/state/schema.js` by `tools/gen_web_schema.py` (`--check` in CI). Transport handlers accept only strict, finite, size-bounded, versioned messages and enqueue detached envelopes. The main thread revalidates client, role, lease generation, world epoch, resource revision, freshness, and readiness immediately before applying each command. Never synthesize Pygame events or dispatch arbitrary method names from network data.
- Apply accepted remote commands exactly once in deterministic station order and per-client FIFO order before `Game.update()`. Wall clock, packet scheduling, polling frequency, browser rendering, and hash iteration must not affect simulation results. Role loss, disconnect, load/new game, and world replacement reject unsafe queued commands and clear held remote controls; local overlays and focus loss do not.
- Each normal role view receives only an allowlisted detached projection of own ship and commanded assets, published observations, annotations, and known geography. Never export simulation objects, hidden IDs, undiscovered positions, true hostile identity, RNG state, or save dumps through station state. The explicit host-granted SimLog capability is the sole diagnostic exception: its read-only history may include detached full-truth snapshots, but never simulation objects, RNG state, credentials, settings, or save dumps.
- Observers are a host-granted, never-persisted read-only pseudo-role (at most `OBSERVER_MAX` = 2): no lease, any station viewable through `stations/activate` with generation 0, every command rejected, SimLog included; occupancy and `station_leased()` ignore observers. Voice starts enabled in the web-host room and the host switches it off.
- Solo mode is a per-launch, never-persisted host decision (`--solo-crew` or the F9 "Crew mode" row; changing it revokes every session and rotates the code). One paired session then holds all nine stations and may use the closed host command surface: save/load slots 1-5, new game and the instructor environment, sent as pseudo-role `host` over the normal command pipeline (same CSRF/Origin, exactly-once, phase and world-session checks; rejected in crew mode). There is no pause or time-scale command. Editors, options, quit, network administration and credentials stay host-only, saves stay exact v29, and a world replacement keeps the solo session but re-leases every station and drops queued commands. The browser runs on a desktop PC, so the web UI targets large screens; `data/commander/` keeps the accessible single-column fallback for narrow windows only.
- Solo mode is a per-launch, never-persisted host decision (`--solo-crew` or the F9 "Crew mode" row; changing it revokes every session and rotates the code). One paired session then holds all nine stations and may use the closed host command surface: save/load slots 1-5, new game and the instructor environment, sent as pseudo-role `host` over the normal command pipeline (same CSRF/Origin, exactly-once, phase and world-session checks; rejected in crew mode). There is no pause or time-scale command. Editors, options, quit, network administration and credentials stay host-only, saves stay exact v30, and a world replacement keeps the solo session but re-leases every station and drops queued commands. The browser runs on a desktop PC, so the web UI targets large screens; `data/commander/` keeps the accessible single-column fallback for narrow windows only.
- Phone lookouts (`LOOKOUT_ROLES`: `lookout`, `uboot_lookout`) are Remote Crew roles outside `STATIONS`: a phone pairs through `/lookout` straight onto one (pair body `role`), never takes another station, and in solo mode may join beside the solo session (one phone per role). Their calls (`lookout_call`) are confirmed only against the host's own lookout/periscope sightings (`src/core/phone_lookout.py`); while a phone holds `lookout` the automatic lookout only feeds `game.lookout_eye`. All of this is transient, never saved. For the phone's gyroscope and microphone the F9 listener also serves HTTPS on port+1 with a self-signed certificate made in pure Python (`src/commander/tls.py`, `~/.u-jagd/tls/`); the pairing code is typed on the phone and never put in the QR URL.
- Browser sessions may use host-only HttpOnly SameSite cookies for reload recovery. Credentials never enter JavaScript, URLs, DOM, logs, settings, or saves. State-changing requests also require exact Origin and a separate CSRF token. Plain HTTP remains trusted-LAN-only; Internet-capable deployment requires a separately reviewed encrypted endpoint or reverse proxy. The local F9 listener accepts only its exact LAN `Host`/`http://` origin unless launched with `--public-origin https://…`; then it also accepts exactly that proxy host (plus explicit `:443`) and origin, and marks cookies `Secure` only on the HTTPS path. The `--web-host` room accepts its public origin only.
- Keep clients, histories, queues, projections, polling, and render work bounded for the uConsole. Cache immutable projections shared by clients with identical visibility, apply backpressure, and verify maximum-client CPU, memory, bandwidth, frame time, reconnect, and thermal behavior on real hardware.
+12
View File
@@ -4,6 +4,18 @@
Alle Versionen von U-Jagd, die neueste zuerst. Die [README](README.de.md) zeigt nur die neueste.
## 1.3.65
Version 1.3.65 lässt die Führung dem besetzten U-Boot während der Mission
Befehle geben. Unter dem Mast nimmt die VLF-Rahmenantenne den Rundspruch jetzt
bis 25 m Tiefe auf (langsamer als mit Mast und nur Empfang). Ab dem zweiten
Rundspruch kann ein Rundspruch einen Befehl enthalten: ein Seegebiet in tiefem
Wasser anlaufen, eine Lagemeldung absetzen oder Funkstille halten, jeweils mit
Frist. Funkraumseite, Karte und die Browserkarte Funkraum zeigen den offenen
Befehl und wie viele ausgeführt wurden; ein verpasster Rundspruch ist ein
verpasster Befehl. Spielstände sind jetzt v30 (sie behalten die Befehle);
v29-Stände laden nicht mehr.
## 1.3.64
Version 1.3.64 gibt dem Helikopter ein Seeraumradar. Solange er mit
+11
View File
@@ -4,6 +4,17 @@
Every U-Jagd release, newest first. The [README](README.md) shows only the latest one.
## 1.3.65
Release 1.3.65 lets HQ give the crewed submarine orders during the mission.
Below the mast the VLF loop antenna now copies the broadcast down to 25 m
(slower than with the mast up, and receive only). From the second broadcast
on, a broadcast may carry an HQ order: proceed to an area in deep water, send
a situation report, or keep radio silence, each with a deadline. The radio
room page, the chart and the browser's Radio room card show the open order and
how many were carried out; a missed broadcast is a missed order. Saves are now
v30 (they keep the orders); v29 saves no longer load.
## 1.3.64
Release 1.3.64 gives the helicopter a surface-search radar. Whenever it flies
+14 -12
View File
@@ -14,15 +14,17 @@ Sie führen eine fiktive Fregatte und wechseln zwischen neun Arbeitsplätzen, um
zu navigieren, zu suchen, Kontakte zu klassifizieren, Ziele zu bekämpfen und das
Schiff einsatzfähig zu halten.
Aktuelle Version: **1.3.64**
Aktuelle Version: **1.3.65**
Version 1.3.64 gibt dem Helikopter ein Seeraumradar. Solange er mit
eingeholtem Tauchsonar fliegt, sucht es aus 150 m: Schiffe bis 40 sm,
aufgetauchte U-Boote sowie ausgefahrene Schnorchel oder Sehrohre innerhalb
seines Radarhorizonts, einen Mast bei ruhiger See auf etwa 10 sm und bei
rauerer See nur auf wenige Meilen. Jeder Kontakt erreicht die OPZ als RADAR-
HELO-Track; die Helikopterseite und die Remote-Crew-Ansicht zeigen, ob das
Radar sucht. Spielstände bleiben v29.
Version 1.3.65 lässt die Führung dem besetzten U-Boot während der Mission
Befehle geben. Unter dem Mast nimmt die VLF-Rahmenantenne den Rundspruch jetzt
bis 25 m Tiefe auf (langsamer als mit Mast und nur Empfang). Ab dem zweiten
Rundspruch kann ein Rundspruch einen Befehl enthalten: ein Seegebiet in tiefem
Wasser anlaufen, eine Lagemeldung absetzen oder Funkstille halten, jeweils mit
Frist. Funkraumseite, Karte und die Browserkarte Funkraum zeigen den offenen
Befehl und wie viele ausgeführt wurden; ein verpasster Rundspruch ist ein
verpasster Befehl. Spielstände sind jetzt v30 (sie behalten die Befehle);
v29-Stände laden nicht mehr.
Frühere Versionen: [CHANGELOG.de.md](CHANGELOG.de.md).
@@ -432,7 +434,7 @@ Die Einstellungen für Sprache, Vollbildmodus, Audio, Großschrift und
Kontexthinweise werden in `~/.u-jagd/settings.json` geschrieben. Der Zustand der
Kontexthinweise gilt daher global und wird für die deterministische
Wiederherstellung bestehender Sitzungen zusätzlich in Spielständen des Formats
v29 gespeichert.
v30 gespeichert.
## Commander-LAN-Koop
@@ -514,7 +516,7 @@ Beim Überfahren eines nicht verfügbaren Browser-Bedienelements erscheint der
aktuelle lokalisierte Grund, etwa fehlende Freigabe, Stationsschaden, Abklingzeit,
leerer Bestand, ausstehender Befehl oder die TAS-Fahrtgrenze.
Anwendungsversion, API-Protokoll **v2** und Speicherformat **v29** sind
Anwendungsversion, API-Protokoll **v2** und Speicherformat **v30** sind
voneinander unabhängige Kompatibilitätsverträge. Remote Crew verwendet
ausschließlich Protokoll v2; sämtliche Legacy-Routen unter `/api/v1/*` sind
entfernt und liefern 404.
@@ -578,8 +580,8 @@ Version gilt:
## Spielstände und Benutzerdaten
Dieser Stand schreibt und lädt ausschließlich das Speicherformat **v29**. V29
verlangt das exakte Schema `u-jagd-save-v29` einschließlich der sinkenden Wasserbomben und der eigenen ASROC- und Wasserbombenbestände der Fregatte, der Autopilot-Route der Fregatte, der Umlaufzeit-Referenz des U-Boot-ESM, der Rohrzustände des besetzten U-Boots, der Radarpunkte und OPZ-Markierungen der Fregatte, der Marken des Angriffsrechners, des Tiefensonars
Dieser Stand schreibt und lädt ausschließlich das Speicherformat **v30**. V30
verlangt das exakte Schema `u-jagd-save-v30` einschließlich der Befehle der Führung an das besetzte U-Boot, der sinkenden Wasserbomben und der eigenen ASROC- und Wasserbombenbestände der Fregatte, der Autopilot-Route der Fregatte, der Umlaufzeit-Referenz des U-Boot-ESM, der Rohrzustände des besetzten U-Boots, der Radarpunkte und OPZ-Markierungen der Fregatte, der Marken des Angriffsrechners, des Tiefensonars
der Fregatte, des Funkraums des besetzten U-Boots, der Auftragstafel
der Führung, der Wachpläne beider Crews, des Seefernaufklärers und des Besitzers
jeder Boje, des aktuellen
+13 -12
View File
@@ -12,15 +12,16 @@ around the ClockworkPi uConsole's 1280 x 720 workspace. You command a fictional
frigate and move between nine workstations to navigate, search, classify,
engage, and keep the ship operational.
Current release: **1.3.64**
Current release: **1.3.65**
Release 1.3.64 gives the helicopter a surface-search radar. Whenever it flies
with the dipping sonar stowed it searches from 150 m: ships out to 40 NM,
surfaced submarines and raised snorkels or periscopes inside its radar
horizon, a mast at about 10 NM in calm water and only a few miles in a rougher
sea. Every contact reaches the OPZ as a RADAR-HELO track; the helicopter page
and the Remote Crew helicopter view show whether the radar is searching. Saves
stay v29.
Release 1.3.65 lets HQ give the crewed submarine orders during the mission.
Below the mast the VLF loop antenna now copies the broadcast down to 25 m
(slower than with the mast up, and receive only). From the second broadcast
on, a broadcast may carry an HQ order: proceed to an area in deep water, send
a situation report, or keep radio silence, each with a deadline. The radio
room page, the chart and the browser's Radio room card show the open order and
how many were carried out; a missed broadcast is a missed order. Saves are now
v30 (they keep the orders); v29 saves no longer load.
Earlier releases: [CHANGELOG.md](CHANGELOG.md).
@@ -400,7 +401,7 @@ between `en` and `de` and controls fullscreen, audio, large text, and tooltips.
Language, fullscreen, audio, large-text, and tooltip preferences are written to
`~/.u-jagd/settings.json`. Tooltip state is therefore global and is also stored
in v29 game saves for deterministic restoration of existing sessions.
in v30 game saves for deterministic restoration of existing sessions.
## Commander LAN Co-op
@@ -471,7 +472,7 @@ Hover over an unavailable browser control to see its current localized reason,
such as a missing grant, damaged station, cooldown, empty inventory, pending
order, or the TAS handling-speed limit.
The application version, API protocol **v2**, and save format **v29** are
The application version, API protocol **v2**, and save format **v30** are
independent compatibility contracts. Remote Crew uses protocol v2 only; every
legacy route under `/api/v1/*` is removed and returns 404.
@@ -526,8 +527,8 @@ Validated does not mean runtime-effective. In this release:
## Saves and User Data
This build writes and loads save format **v29** only. V29 requires the exact
`u-jagd-save-v29` schema, including the frigate's depth charges in the water and its own ASROC and depth-charge stores, the frigate's autopilot route, the crewed submarine's ESM scan-period reference, the crewed submarine's tube states, the frigate's radar blips and OPZ marks, the crewed submarine's attack-computer marks, the frigate's variable-depth sonar, the crewed submarine's radio room, the HQ task board, both crews' watch bills,
This build writes and loads save format **v30** only. V30 requires the exact
`u-jagd-save-v30` schema, including the crewed submarine's HQ orders, the frigate's depth charges in the water and its own ASROC and depth-charge stores, the frigate's autopilot route, the crewed submarine's ESM scan-period reference, the crewed submarine's tube states, the frigate's radar blips and OPZ marks, the crewed submarine's attack-computer marks, the frigate's variable-depth sonar, the crewed submarine's radio room, the HQ task board, both crews' watch bills,
the patrol aircraft and each buoy's owner, the current runtime catalog snapshot, all
deterministic continuation state, the crewed submarine's crew state (orders,
modes, mast, wires, plot, alarm bearings, its sonar station and its ESM
+10 -3
View File
@@ -206,10 +206,12 @@ export function validateV2State(state) {
interceptKinds: ["hull", "dipping", "buoy", "splash", "torpedo"],
advice: ["uboot.advice.torpedo", "uboot.advice.mast_down", "uboot.advice.slow_down", "uboot.advice.measure_layer", "uboot.advice.go_below", "uboot.advice.evade"],
evadePlan: ["type", "bearing", "course", "speed_kn", "depth_m", "silent", "decoy"],
radio: ["antenna", "broadcast", "copied", "next_s", "copy", "send", "transmitting", "sitreps", "ack_due", "report", "log"],
radioLog: ["seq", "type", "age_s", "number", "ack", "report"],
radio: ["antenna", "broadcast", "copied", "next_s", "copy", "send", "transmitting", "sitreps", "ack_due", "report", "log", "vlf", "order", "orders_done", "orders_failed"],
radioLog: ["seq", "type", "age_s", "number", "ack", "report", "order"],
radioLogKinds: ["broadcast", "sent", "aborted"],
radioReport: ["x", "y", "radius_nm", "course", "speed_kn", "age_s"],
radioOrder: ["id", "type", "x", "y", "radius_nm", "left_s"],
radioOrderKinds: ["area", "report", "silence"],
};
// END GENERATED
if (!validWeatherStation(state.weather_station, opforRoles.has(state.role) || state.role === "uboot_lookout", weatherFields)) throw new Error("protocol");
@@ -485,7 +487,12 @@ export function validateV2State(state) {
!finite(radio.next_s) || !nullableNumber(radio.copy) || !nullableNumber(radio.send) || !radioReport(radio.report) ||
!boundedArray(radio.log, 12) || radio.log.some((row) => !exactKeys(row, boatFields.radioLog) ||
!Number.isInteger(row.seq) || !boatFields.radioLogKinds.includes(row.type) || !nullableNumber(row.age_s) ||
(row.number !== null && !Number.isInteger(row.number)) || typeof row.ack !== "boolean" || !radioReport(row.report))) throw new Error("protocol");
(row.number !== null && !Number.isInteger(row.number)) || typeof row.ack !== "boolean" || !radioReport(row.report) ||
(row.order !== null && !Number.isInteger(row.order))) ||
typeof radio.vlf !== "boolean" || !Number.isInteger(radio.orders_done) || !Number.isInteger(radio.orders_failed) ||
(radio.order !== null && (!exactKeys(radio.order, boatFields.radioOrder) || !Number.isInteger(radio.order.id) ||
!boatFields.radioOrderKinds.includes(radio.order.type) || !finite(radio.order.left_s) ||
["x", "y", "radius_nm"].some((key) => !nullableNumber(radio.order[key]))))) throw new Error("protocol");
} else if (state.role === "weapons") {
if (!exactKeys(payload.settings, ["torpedo_type", "choices", "pattern", "enable_nm", "salvo"]) ||
!boundedArray(payload.settings.choices, 8) ||
+16 -3
View File
@@ -384,24 +384,37 @@ function radioLogText(row) {
const age = duration(row.age_s);
if (row.type === "broadcast") {
const text = t(row.report ? "uboot_radio_log_broadcast_report" : "uboot_radio_log_broadcast", {age, number: row.number});
return row.ack ? t("uboot_radio_log_with_ack", {entry: text}) : text;
const acked = row.ack ? t("uboot_radio_log_with_ack", {entry: text}) : text;
return row.order !== null ? t("uboot_radio_log_with_order", {entry: acked, number: row.order}) : acked;
}
return row.type === "sent" ? t("uboot_radio_log_sent", {age, number: row.number}) : t("uboot_radio_log_aborted", {age});
}
function radioOrderText(radio, nav) {
const order = radio.order;
if (order === null) return t("uboot_radio_order_none");
const left = duration(order.left_s);
if (order.type !== "area") return t(`uboot_radio_order_${order.type}`, {number: order.id, left});
const dx = order.x - nav.x, dy = order.y - nav.y;
return t("uboot_radio_order_area", {number: order.id, left, radius: number(order.radius_nm, 0),
bearing: number((Math.atan2(dx, -dy) * 180 / Math.PI + 360) % 360, 0), range: number(Math.hypot(dx, dy), 1)});
}
function renderRadio(radio, nav) {
const broadcast = radio.copied ? t("uboot_radio_copied", {number: radio.broadcast})
: radio.copy !== null ? t("uboot_radio_copying", {number: radio.broadcast, percent: number(radio.copy * 100, 0)})
: t("uboot_radio_missed", {number: radio.broadcast});
metrics($("uboot-radio"), [
["uboot_radio_antenna", t(radio.antenna ? "uboot_radio_antenna_up" : "uboot_radio_antenna_down")],
["uboot_radio_antenna", t(radio.antenna ? "uboot_radio_antenna_up" : radio.vlf ? "uboot_radio_vlf" : "uboot_radio_antenna_down")],
["uboot_radio_broadcast", broadcast], ["uboot_radio_next", duration(radio.next_s)],
["uboot_radio_sitreps", t(radio.ack_due ? "uboot_radio_sitreps_ack" : "uboot_radio_sitreps_value", {count: radio.sitreps})]]);
$("uboot-radio-warning").hidden = !radio.transmitting;
$("uboot-radio-warning").textContent = t("uboot_radio_on_air", {percent: number((radio.send ?? 0) * 100, 0)});
$("uboot-radio-send").dataset.ready = String(radio.antenna && !radio.transmitting);
$("uboot-radio-status").textContent = radio.antenna ? "" : t("uboot_radio_need_antenna");
metrics($("uboot-radio-report"), [["uboot_radio_report", radio.report ? radioReportText(radio.report, nav) : t("uboot_radio_no_report")]]);
metrics($("uboot-radio-report"), [["uboot_radio_report", radio.report ? radioReportText(radio.report, nav) : t("uboot_radio_no_report")],
["uboot_radio_order", radioOrderText(radio, nav)],
["uboot_radio_orders", t("uboot_radio_orders_value", {done: radio.orders_done, failed: radio.orders_failed})]]);
$("uboot-radio-log").replaceChildren(...(radio.log.length ? radio.log.map((row) => node("p", radioLogText(row), "uboot-log-line"))
: [node("p", t("uboot_radio_log_empty"), "uboot-log-line")]));
}
+25 -2
View File
@@ -5525,7 +5525,7 @@
"uboot.panel.hq_report": "FEINDLAGE VON DER FÜHRUNG",
"uboot.panel.radio_log": "FUNKTAGEBUCH",
"uboot.radio.antenna_up": "Antenne klar: Empfang und Sendebereitschaft",
"uboot.radio.antenna_down": "Antenne unten: auf Sehrohrtiefe Mast ausfahren (P)",
"uboot.radio.antenna_down": "Antenne unten: unter 25 m kein VLF; flacher gehen oder Mast ausfahren (P)",
"uboot.radio.broadcast_copied": "Rundspruch {number} aufgenommen",
"uboot.radio.broadcast_copying": "Rundspruch {number} wird aufgenommen ({percent} %)",
"uboot.radio.broadcast_missed": "Rundspruch {number} nicht aufgenommen",
@@ -5623,7 +5623,7 @@
"commander.web.uboot_radio_sitreps_value": "{count} gesendet",
"commander.web.uboot_radio_sitreps_ack": "{count} gesendet, Antwort im nächsten Rundspruch",
"commander.web.uboot_radio_on_air": "Lagemeldung wird gesendet ({percent} %): die Fregatte kann die KW-Sendung peilen.",
"commander.web.uboot_radio_need_antenna": "Für Empfang und Senden auf Sehrohrtiefe den Mast ausfahren.",
"commander.web.uboot_radio_need_antenna": "Zum Senden auf Sehrohrtiefe den Mast ausfahren; die VLF-Rahmenantenne empfängt bis 25 m.",
"commander.web.uboot_radio_no_report": "noch keine aufgenommen",
"commander.web.uboot_radio_report_value": "Fregatte {bearing}°, {range} sm (±{radius} sm), Kurs {course}°, {speed} kn, {age} min alt",
"commander.web.uboot_radio_log_broadcast": "-{age} Rundspruch {number}: nichts für uns",
@@ -5823,5 +5823,28 @@
"helo.radar_on": "Radar sucht: Kontakte an OPZ (RADAR-HELO)",
"helo.radar_off": "Radar aus (an Deck oder beim Tauchen)",
"commander.web.helicopter_radar": "Radar",
"uboot.radio.antenna_vlf": "VLF-Rahmenantenne: nur Empfang, langsame Aufnahme (zum Senden Mast ausfahren)",
"uboot.panel.hq_order": "BEFEHL DER FÜHRUNG",
"uboot.radio.order_none": "Kein offener Befehl der Führung.",
"uboot.radio.order_area": "Befehl {number}: Seegebiet {bearing}°, {range} sm anlaufen (auf {radius} sm), noch {left}",
"uboot.radio.order_report": "Befehl {number}: Lagemeldung absetzen, noch {left}",
"uboot.radio.order_silence": "Befehl {number}: Funkstille, nicht senden für {left}",
"uboot.radio.order_closed": "Befehle: {done} ausgeführt, {failed} nicht ausgeführt",
"uboot.radio.log.with_order": "{entry}, Befehl {number}",
"uboot.event.radio_order_area": "Funkraum: Befehl {number} der Führung, befohlenes Seegebiet anlaufen.",
"uboot.event.radio_order_report": "Funkraum: Befehl {number} der Führung, Lagemeldung absetzen.",
"uboot.event.radio_order_silence": "Funkraum: Befehl {number} der Führung, Funkstille halten.",
"uboot.event.order_done": "Funkraum: Befehl {number} der Führung ausgeführt.",
"uboot.event.order_failed": "Funkraum: Befehl {number} der Führung nicht ausgeführt.",
"commander.web.uboot_radio_vlf": "VLF-Rahmenantenne: nur Empfang",
"commander.web.uboot_radio_order_none": "Kein offener Befehl der Führung.",
"commander.web.uboot_radio_order_area": "Befehl {number}: Seegebiet {bearing}°, {range} sm anlaufen (auf {radius} sm), noch {left}",
"commander.web.uboot_radio_order_report": "Befehl {number}: Lagemeldung absetzen, noch {left}",
"commander.web.uboot_radio_order_silence": "Befehl {number}: Funkstille, noch {left}",
"uboot.radio.chart_order": "Befehl {number}",
"commander.web.uboot_radio_log_with_order": "{entry}, Befehl {number}",
"commander.web.uboot_radio_order": "Befehl der Führung",
"commander.web.uboot_radio_orders": "Befehle",
"commander.web.uboot_radio_orders_value": "{done} ausgeführt, {failed} nicht ausgeführt",
"weapons.control.asw.short": "A ASROC Z WaBo"
}
+25 -2
View File
@@ -5525,7 +5525,7 @@
"uboot.panel.hq_report": "HQ CONTACT REPORT",
"uboot.panel.radio_log": "RADIO LOG",
"uboot.radio.antenna_up": "Antenna up: receiving and ready to send",
"uboot.radio.antenna_down": "Antenna down: raise the mast at periscope depth (P)",
"uboot.radio.antenna_down": "Antenna down: VLF below 25 m is lost; come shallower or raise the mast (P)",
"uboot.radio.broadcast_copied": "broadcast {number} copied",
"uboot.radio.broadcast_copying": "copying broadcast {number} ({percent} %)",
"uboot.radio.broadcast_missed": "broadcast {number} not copied",
@@ -5623,7 +5623,7 @@
"commander.web.uboot_radio_sitreps_value": "{count} sent",
"commander.web.uboot_radio_sitreps_ack": "{count} sent, HQ answers next broadcast",
"commander.web.uboot_radio_on_air": "Situation report on the air ({percent} %): the frigate can take an HF bearing.",
"commander.web.uboot_radio_need_antenna": "Raise the mast at periscope depth to receive and send.",
"commander.web.uboot_radio_need_antenna": "Raise the mast at periscope depth to send; the VLF loop receives down to 25 m.",
"commander.web.uboot_radio_no_report": "none copied yet",
"commander.web.uboot_radio_report_value": "frigate {bearing}°, {range} NM (±{radius} NM), course {course}°, {speed} kn, {age} min old",
"commander.web.uboot_radio_log_broadcast": "-{age} broadcast {number}: nothing for us",
@@ -5823,5 +5823,28 @@
"helo.radar_on": "Radar searching: contacts to OPZ (RADAR-HELO)",
"helo.radar_off": "Radar off (on deck or dipping)",
"commander.web.helicopter_radar": "Radar",
"uboot.radio.antenna_vlf": "VLF loop: receiving only, slow copy (raise the mast to send)",
"uboot.panel.hq_order": "HQ ORDER",
"uboot.radio.order_none": "No open order from HQ.",
"uboot.radio.order_area": "Order {number}: proceed to {bearing}°, {range} NM (within {radius} NM), {left} left",
"uboot.radio.order_report": "Order {number}: send a situation report, {left} left",
"uboot.radio.order_silence": "Order {number}: radio silence, no transmission for {left}",
"uboot.radio.order_closed": "Orders: {done} done, {failed} failed",
"uboot.radio.log.with_order": "{entry}, order {number}",
"uboot.event.radio_order_area": "Radio room: HQ order {number}, proceed to the ordered area.",
"uboot.event.radio_order_report": "Radio room: HQ order {number}, send a situation report.",
"uboot.event.radio_order_silence": "Radio room: HQ order {number}, keep radio silence.",
"uboot.event.order_done": "Radio room: HQ order {number} carried out.",
"uboot.event.order_failed": "Radio room: HQ order {number} not carried out.",
"commander.web.uboot_radio_vlf": "VLF loop: receiving only",
"commander.web.uboot_radio_order_none": "No open order from HQ.",
"commander.web.uboot_radio_order_area": "Order {number}: proceed to {bearing}°, {range} NM (within {radius} NM), {left} left",
"commander.web.uboot_radio_order_report": "Order {number}: send a situation report, {left} left",
"commander.web.uboot_radio_order_silence": "Order {number}: radio silence, {left} left",
"uboot.radio.chart_order": "HQ order {number}",
"commander.web.uboot_radio_log_with_order": "{entry}, order {number}",
"commander.web.uboot_radio_order": "HQ order",
"commander.web.uboot_radio_orders": "Orders",
"commander.web.uboot_radio_orders_value": "{done} done, {failed} failed",
"weapons.control.asw.short": "A ASROC Z DC"
}
+2 -2
View File
@@ -115,7 +115,7 @@ Eine zweite Crew kann den Gegner spielen. Das U-Boot hat sieben Stationen: Führ
- **Besatzung:** das U-Boot hat einen eigenen Wachplan mit den Regeln der Fregatte (siehe Schadensabwehr, Besatzung und Wachen): drei Wachen, Ermüdung, Gefechtsstationen und Moral. Maschine und Führung befehlen Gefechtsstationen (`B` auf der uConsole, eine Taste in der Leckwehr-Karte im Browser) und lösen die Wache ab (`M` auf der Seite Leckwehr oder die Taste). Die Moral steigt, wenn ein Schiff sinkt, und sinkt mit je 10 % Rumpfschaden. Eine müde Besatzung hört am Sonar später, sichtet durch das Sehrohr später und ihre Leckwehrtrupps dichten und löschen langsamer (die Pumpen sind Maschinen und behalten ihre Leistung).
- **Lagebild:** ein gehörter Aktivping oder Torpedo wird mit der Peilung protokolliert, die das U-Boot selbst gemessen hat (einige Grad ungenau), und mit seinem Alter in den Alarmen angezeigt. Auf Sehrohrtiefe lässt sich der **Mast** ausfahren; sein ESM meldet dann die Radare, die das U-Boot überstreichen, mit Peilung (Log und ESM-Liste), und beim Tieferkommen fährt der Mast selbst ein. Mit ausgefahrenem Mast zeigt die Seite **Sehrohr** (Führung Seite 3, Mast & ESM Seite 2; `P` fährt an beiden den Mast aus) das Okular im Stil des Startbilds: Himmel und See im Licht der Stunde (Tag, Dämmerung, Nacht mit Sternen und Mond), Wolken, Regen, Schnee und Nebel nach dem Wetter, den mit der See bewegten Horizont, eine Skala rechtweisender Peilungen und ein Fadenkreuz; das Rohr schwenkt in 2°-Schritten (`←`/`→`, `Umschalt`: 10°). Alles, was die Optik im Kontrastmodell des Fregattenausgucks bei 2,5 m Augenhöhe ausmacht (Tag/Nacht, Mond, Sicht, Seegang, Land im Weg), erscheint als Silhouette und als reine Peilungs-**Sichtung** mit grober Klasse (Kriegsschiff, Handelsschiff, Fahrzeug, Luftfahrzeug, Torpedolaufbahn) und scheinbarer Länge; das Log meldet jede neue Sichtung. Neutrale Schiffe zeigen hier ihre Positionslichter wie im Fernglas der Brücke. `↑`/`↓` neigen den Kopf um 2° (`Umschalt`: 10°, von 10° nach unten bis 60° nach oben, für Flugzeuge), `,`/`.` wechseln zwischen kleiner (32° Feld) und großer Vergrößerung (8°), und die `Leertaste` schaltet die Stabilisierung; Neigung und Feld stehen in der Bildecke. Diese Einstellungen gehören zum Okular der uConsole oder jedes Browsers, ändern nur das Bild (nicht, was die Optik erkennt) und werden nicht gespeichert. Ein Hubschrauber in Sicht hängt in seinem wahren Höhenwinkel über der Kimm im ruhigen Himmel, hinter den Wolken. `Enter` liest das **Stadimeter** an der Sichtung unter dem Fadenkreuz ab: die Entfernung folgt aus der scheinbaren Länge und der angenommenen Rumpflänge der Klasse (130 m für ein Kriegsschiff oder ein nicht erkanntes Fahrzeug, 150 m für ein Handelsschiff), ein nicht erkanntes oder bugwärts stehendes Ziel misst sich also zu weit; die Ablesung ist ±25 % und wird für 120 s zu einem VISUAL-Fix am Sonarkontakt des U-Boots auf dieses Ziel, für einen Schuss nutzbar wie ein Ping-Fix. Luftfahrzeuge und Laufbahnen lassen sich nicht messen. Jede Ablesung ist zugleich eine **Marke** für den **Angriffsrechner**: aus zwei oder mehr Marken im Abstand von mindestens einer Minute (die letzten sechs innerhalb von 15 Minuten) legt er eine Gerade durch Kurs und Fahrt des Ziels und zeigt mit der Torpedogeschwindigkeit den Vorhaltewinkel (links oder rechts der Peilung) und die Laufzeit unter dem Sehrohr (Browser: Spalte Lösung); die Güte wächst mit der Zeit zwischen erster und letzter Marke (voll nach 5 Minuten) und mit der Zahl der Marken. `Strg+Enter` auf der Sehrohrseite (Browser: Schuss nach Lösung, nur die Führung) schießt nach der Lösung der Sichtung unter dem Fadenkreuz: der Torpedo läuft auf dem Abfangkurs zu dem Punkt, an dem Ziel und Torpedo zusammentreffen. Ein Schuss auf den Sonarkontakt eines markierten Ziels nutzt die Lösung ebenfalls. Ein Ziel, das nach der letzten Marke dreht, lässt die Lösung hinter sich; eine Anpassung schneller als 40 kn wird als schlechte Marke verworfen. Die Marken gehören zum Spielstand. Die kartierte Küste steht auf dem Horizont des Sehrohrs, so weit seine niedrige Optik Land sieht (Hügel mit 25 bis 70 m angenommen). Die Führung kann auch ohne Sonarbediener pingen und eine BT-Messung nehmen. Die Karte zeigt das Schussfeld der Rohre, wo sie nicht rundum schießen, und das vom Sonar zugewiesene Ziel ist für den Schuss vorausgewählt.
- **Mast & ESM:** mit ausgefahrenem Mast auf Sehrohrtiefe hört die ESM-Antenne des U-Boots (3 m über Wasser) einmal pro Sekunde die Radare ringsum: das der Fregatte, anderer Schiffe und von Flugzeugen innerhalb des Radarhorizonts, über Land nur, wo die Küste die Linie nicht verdeckt. Der Hubschrauber der Fregatte strahlt sein X-Band-Suchradar, solange er fliegt und nicht taucht (Antenne in 150 m), der Seefernaufklärer sein frequenzagiles Suchradar, solange die OPZ es eingeschaltet hat. Jede Erfassung trägt die gemessene Peilung (±4°), Band, Trägerfrequenz, PRF, Modulation und Empfangspegel, nie die Identität oder Position des Senders. Die Crew führt eine **Emitterliste** (`E1`, `E2` …) über mehrere Mastperioden: eine Erfassung gehört zu einem Emitter, wenn Peilung, Band und Signalform passen (ein frequenzagiles Radar nur nach Peilung und Band), und die Liste vergisst einen Emitter 30 Minuten nach seiner letzten Erfassung. Die **Einstufung** ist die Annotation der Crew aus der Bibliothek: die Emitter, deren veröffentlichte Frequenz- und PRF-Bereiche die Messung enthalten, bis zu 16, die bestpassenden zuerst: jeder Eintrag zeigt seine Passung (**passt gut**, **mittel** oder **schwach**: Frequenz und PRF nahe der Mitte der Bereiche und dieselbe Modulation passen am besten), Einträge gleicher Stufe stehen nach Katalogschlüssel, und die Liste ordnet sich nur um, wenn sich eine Stufe ändert; die Wahl legt die Leistungsklasse für die **Entfernungsschätzung** aus dem Pegel fest (ohne Einstufung die kürzeste Entfernung, die die Bibliothek zulässt). Alle 30 s behält jeder Emitter eine **Peilung** von der eigenen Position des U-Boots (20 Minuten); die Karte zeigt die letzten Peillinien, und sobald die eigene Fahrt die Peilung um mindestens 8° gedreht hat, ist die **Kreuzpeilung** ihr bester Schnittpunkt mit einer 95-%-Fehlerellipse, die einen seit jeder Linie bis zu 8 kn versetzten Sender einrechnet (eine schnelle Fregatte ergibt meist keine; eine Kreuzpeilung, deren Linien nicht zusammenpassen, wird markiert). Der **Stärketrend** zeigt steigend, gleichbleibend oder fallend über fünf Minuten. Die **Umlaufzeit** ist die Zeit zwischen den Treffern der Hauptkeule eines Emitters (den Pegelspitzen; nah dran sind dazwischen die schwächeren Nebenkeulen zu hören und zählen nicht), gemessen nur an der eigenen Signalform des Emitters, über Lücken bis 12 s ohne überspülten Durchlauf dazwischen, und angezeigt nach 8 s: **dreht** mit ihrer Dauer (etwa 2,5 s für ein Navigations- oder Seeraumradar, 5 s für ein Luftraumradar, 2 s für ein Mehrzweckradar) ist ein Suchradar, das vorbeistreicht; **dauernd** (die Keule bei jedem Durchlauf auf dem Mast) ist ein Verfolgungs- oder Feuerleitradar. Ein dauernd beleuchtender, erfasster Emitter ist immer eine Mastwarnung, und das Log meldet einmal, wenn ein Emitter auf Dauerbeleuchtung wechselt. Die **Mastwarnung** („Radar kann Mast sehen“) kommt, wenn die geschätzte Entfernung eines erfassten Suchradars innerhalb der Entfernung liegt, auf der ein Seeraumradar bei diesem Seegang und Regen einen ausgefahrenen Mast sieht (der Wert der Wetterseite); die **empfohlene Mastzeit** ist 60 s bei ruhiger See, bis zu 300 s, wenn die Seegangsechos den Mast verbergen, und 20 s unter dieser Warnung, und das Log meldet, wenn sie überschritten ist. Ab Seegang 3 überspülen Wellen die Antenne, und manche Durchläufe hören nichts. Die Karte Mast & ESM im Browser hat die Rose, die Emittertabelle und die Auswertung des gewählten Emitters; **In den Plot übernehmen** trägt die Kreuzpeilung (Markierung und Fehlerkreis) oder sonst die letzte Peillinie in den Plot des U-Boots ein. Auf der Seite Mast & ESM der uConsole wählen `↑`/`↓` einen Emitter, `←`/`→` schalten seine Einstufung aus der Bibliothek weiter und `Enter` übernimmt ihn in den Plot.
- **Funkraum:** die Flottenführung sendet alle 10 Minuten einen U-Boot-Rundspruch (Rundspruch 0 bei Missionsbeginn, dann 1, 2 …) und wiederholt ihn bis zum nächsten. Das U-Boot nimmt ihn nur mit klarer Antenne auf, das heißt mit ausgefahrenem Mast auf Sehrohrtiefe, und erst nach 20 s ununterbrochenem Empfang innerhalb der Sendezeit dieses Rundspruchs; ein U-Boot, das tief bleibt, verpasst Rundsprüche und bekommt nur den jeweils neuesten. In 60 % der Fälle enthält ein Rundspruch die **Feindlagemeldung** der Führung zur Fregatte: einen 5 bis 15 Minuten alten Standort mit 4 sm Fehlerkreis und gerundetem Kurs und Fahrt. Die Karte zeigt ihn als gelben Kreis mit seinem Alter, und die Funkseite nennt Peilung und Entfernung vom U-Boot. Eine **Lagemeldung** (`Enter` im Funkraum oder der Knopf im Browser) sind 20 s Kurzwellensendung mit klarer Antenne. Währenddessen kann der KW-Peiler der Fregatte das U-Boot peilen (Funkraum HF/DF), und Mast einfahren bricht sie ab. Die Führung bestätigt eine Meldung im nächsten Rundspruch und fügt dann immer eine schärfere Feindlagemeldung (2 sm) bei. Die Funkseite und die Karte Funkraum im Browser zeigen Antenne, Rundspruchnummer und Zeit bis zum nächsten, Fortschritt von Aufnahme und Sendung, gesendete Meldungen, die letzte Feindlage und das Funktagebuch (12 Einträge, wird gespeichert).
- **Funkraum:** die Flottenführung sendet alle 10 Minuten einen U-Boot-Rundspruch (Rundspruch 0 bei Missionsbeginn, dann 1, 2 …) und wiederholt ihn bis zum nächsten. Das U-Boot nimmt ihn nur mit klarer Antenne auf, das heißt mit ausgefahrenem Mast auf Sehrohrtiefe, und erst nach 20 s ununterbrochenem Empfang innerhalb der Sendezeit dieses Rundspruchs; ein U-Boot, das tief bleibt, verpasst Rundsprüche und bekommt nur den jeweils neuesten. In 60 % der Fälle enthält ein Rundspruch die **Feindlagemeldung** der Führung zur Fregatte: einen 5 bis 15 Minuten alten Standort mit 4 sm Fehlerkreis und gerundetem Kurs und Fahrt. Die Karte zeigt ihn als gelben Kreis mit seinem Alter, und die Funkseite nennt Peilung und Entfernung vom U-Boot. Eine **Lagemeldung** (`Enter` im Funkraum oder der Knopf im Browser) sind 20 s Kurzwellensendung mit klarer Antenne. Währenddessen kann der KW-Peiler der Fregatte das U-Boot peilen (Funkraum HF/DF), und Mast einfahren bricht sie ab. Die Führung bestätigt eine Meldung im nächsten Rundspruch und fügt dann immer eine schärfere Feindlagemeldung (2 sm) bei. Die Funkseite und die Karte Funkraum im Browser zeigen Antenne, Rundspruchnummer und Zeit bis zum nächsten, Fortschritt von Aufnahme und Sendung, gesendete Meldungen, die letzte Feindlage und das Funktagebuch (12 Einträge, wird gespeichert). Unter dem Mast nimmt die **VLF-Rahmenantenne** den Rundspruch noch bis 25 m Tiefe auf, das langsame VLF-Signal braucht aber 60 s ununterbrochenen Empfang statt 20 s; sie empfängt nur, eine Lagemeldung braucht weiter den Mast. Ab Rundspruch 2 kann ein Rundspruch einen **Befehl der Führung** enthalten (die Hälfte, solange kein Befehl offen ist, höchstens 4 je Mission; ein verpasster Rundspruch ist ein verpasster Befehl): ein Seegebiet 8 bis 15 sm entfernt in tiefem Wasser anlaufen und binnen 40 Minuten auf 3 sm erreichen (grüner Kreis auf der Karte), binnen 30 Minuten eine Lagemeldung absetzen oder 20 Minuten Funkstille halten (nicht senden). Die Funkseite und die Karte Funkraum im Browser zeigen den offenen Befehl mit Peilung, Entfernung und Restzeit sowie die Zahl der ausgeführten; das Funktagebuch vermerkt, welcher Rundspruch einen Befehl brachte. Befehle entscheiden die Mission nicht.
- **Gegenortung und Ausweichen:** der Sonarraum des U-Boots unterscheidet einen aufgefangenen Aktivping an seiner Frequenz als Rumpfsonar der Fregatte, Tauchsonar eines Hubschraubers oder Sonoboje und protokolliert ihn mit gemessener Peilung und Empfangspegel (dB re 1 µPa, aus Quellpegel, Ausbreitung und Absorption); eine pingende Boje im Umkreis von 12 sm hört nur ein bemanntes U-Boot. Eine Boje, die im Umkreis von 4 sm ins Wasser fällt, wird mit grober Peilung (±6°) gehört, ein Torpedoalarm bleibt mit seiner Peilung stehen. Die Seite **Bedrohung** (Führung Seite 4 und Navigation Seite 2; im Browser die Karte Bedrohung an Führung und Navigation) zählt die Pings der letzten 5 Minuten nach Quelle, nennt den lautesten Pegel mit Bewertung (ab 150 dB hat der Pinger wahrscheinlich ein Echo) und den Trend der letzten beiden Pings (steigend: er kommt näher), Splashes, Torpedoalarme und ESM-Emitter, die eigene Signatur (Tiefe gegen die gemessene Schicht, Eigenlärm: kavitierend, schnorchelnd, laut, mäßig oder leise, der Mast) und die Empfehlungen der Crew. Die Karte zeichnet jede Auffassung der letzten 2 Minuten als gestrichelten Peilstrahl. **Ausweichen** (`I` an Führung oder Navigation, im Browser die Schaltfläche **Ausweichen**) gibt den Ausweichbefehl der Crew zum frischesten Alarm (unter 2 Minuten): gegen einen Torpedo die kleinere Wende, die ihn 150° achteraus legt, Höchstfahrt und ein Täuschkörper; gegen Aktivsonar das Heck zum Pinger, Schleichfahrt mit 3 kn. Beide wechseln durch die gemessene Schicht (nach unten, wenn das U-Boot darüber oder darin steht, nach oben, wenn es darunter steht), ohne BT gehen sie auf Tiefe; ein aufgesetztes U-Boot hebt zuerst ab. Der Befehl durchläuft dieselben Prüfungen wie die Einzeltasten, und die Seite zeigt ihn, bevor er gegeben wird. Das Bild ist nur Anzeige und wird nicht gespeichert.
- **Navigation und Plot:** die Maschine hat Maschinentelegrafen-Knöpfe, und Führung und Navigation teilen den eigenen Fettstift-Plot des U-Boots (Markierungen, Lineale, Peillinien, Kreise, Koppellinien); die Fregatte sieht ihn nie, und der Plot des U-Boots wird nicht gespeichert. Die Navigation zeigt das Wasser unter dem Kiel und prüft die Seekarte entlang des Sollkurses bis 5 sm: Land oder ein Grund flacher als das U-Boot wird als Hindernis voraus gemeldet, im Log und als Warnung. Es zählt nur die kartierte Geografie; andere Fahrzeuge sind nicht Teil der Prüfung.
- **U-Boot-Sonar:** derselbe Sonararbeitsplatz wie auf der Fregatte (Breitband, LOFAR, DEMON, TMA, Aktivechos, Klassifizierung, Horch-Audio), aber das Rumpfsonar horcht in der eigenen Tauchtiefe, die Sprungschicht wirkt also für und gegen die Crew. Es gibt keine Schleppantenne und keine Freigabe an eine OPZ. Ein Aktivping liefert Echos und wird von der Fregatte gehört.
@@ -155,7 +155,7 @@ Wenn niemand die Fregatte fährt (die uConsole spielt das U-Boot oder ein Solo-B
### Nicht modelliert {#ref-opfor-limits}
- Der Funkraum kennt nur den Rundspruchplan der Führung und Lagemeldungen: keine Befehle oder Nachrichten der Führung, kein Empfang in der Tiefe (kein VLF/ELF), keine Kurzsignale und keine anderen Einheiten im Netz; die Feindlage der Führung ist modellierte Aufklärung, kein eigener Sensor.
- Der Funkraum kennt den Rundspruchplan der Führung, drei Befehlsarten und Lagemeldungen: keine freien Nachrichten der Führung, kein Empfang unter 25 m (kein ELF, keine Schleppantenne), keine Kurzsignale und keine anderen Einheiten im Netz; die Feindlage der Führung ist modellierte Aufklärung, kein eigener Sensor.
- Die Leckwehr kennt sechs Abteilungen und zwei Trupps: keine getrennten Schäden an Druck- und Außenhülle, keine Verletzten, keine Ausbreitung von Rauch oder Hitze, kein Brand in den Luftvorräten und kein Sauerstoffverbrauch durch Feuer; der Gesamtschaden des U-Boots (Lärm, Höchstfahrt, Untergang bei 100 %) summiert sich weiter aus Treffern, und die KI-U-Boote haben nur diesen Wert.
- Unter der Testtiefe kennt der Druckkörper keine einzelnen Armaturen, kein allmähliches Zusammendrücken und keine verstärkten Nähte aus einer Werftzeit; ein Versagen wählt Art und Abteilung zufällig, und ein zerdrücktes U-Boot ist sofort verloren.
- Die Geräusche des U-Boots sind einfache Signale: Stereo unterscheidet nur Backbord von Steuerbord (voraus und achteraus klingen gleich), eine Detonation liefert keine Entfernungsschätzung und kein Knarzen kommt aus einer bestimmten Abteilung; der Sonarraum des U-Boots hat kein Rotlicht.
+2 -2
View File
@@ -115,7 +115,7 @@ A second crew can play the enemy. The submarine has seven stations: Command, Son
- **Crew:** the submarine has its own watch bill with the frigate's rules (see Damage control, Crew and watches): three watches, fatigue, action stations and morale. The Engine room and Command order action stations (`B` on the uConsole, a button in the browser's Damage control card) and relieve the watch (`M` on the Damage page, or the button). Morale rises when a ship sinks and falls with every 10 % of hull damage. A tired crew hears later on sonar, sights later through the periscope and its damage-control teams seal and fight fire more slowly (the pumps are machinery and keep their rate).
- **Situation picture:** an intercepted active ping or torpedo is logged with the bearing the submarine's own ears measured (a few degrees off) and shown with its age in the alarms. At periscope depth the **mast** can be raised; its ESM then reports the radars sweeping the submarine with bearing (log and ESM list), and the mast lowers by itself when the submarine goes deeper. With the mast up the **periscope** page (Command page 3, Mast & ESM page 2; `P` raises the mast at both) shows the eyepiece in the start screen's look: sky and sea in the light of the hour (day, dusk, night with stars and the moon), clouds, rain, snow and fog from the weather, the horizon moving with the sea, a true-bearing scale and a crosshair; the scope trains in 2° steps (`←`/`→`, `Shift`: 10°). Everything the optics make out within the frigate lookout's contrast model at 2.5 m eye height (day/night, moon, visibility, sea state, land in the way) appears as a silhouette and as a bearing-only **sighting** with a coarse class (warship, merchant ship, vessel, aircraft, torpedo wake) and its apparent length; the log reports each new sighting. Neutral ships show their navigation lights here as on the bridge's binoculars. `↑`/`↓` tilt the head 2° (`Shift`: 10°, from 10° down to 60° up, for aircraft), `,`/`.` switch between low power (32° field) and high power (8°), and `Space` switches the stabilizer; tilt and field stand in the corner of the picture. These settings belong to the eyepiece of the uConsole or of each browser, change only the picture (not what the optics detect) and are not saved. A helicopter in sight hangs at its true elevation above the horizon in the still sky, behind the clouds. `Enter` reads the **stadimeter** on the sighting under the crosshair: the range follows from its apparent length and the assumed hull length of the class (130 m for a warship or an unrecognized vessel, 150 m for a merchant), so an unrecognized or bow-on target reads long; the reading is ±25 % and becomes a VISUAL fix on the submarine's sonar contact of that target for 120 s, usable for a shot like a ping fix. Aircraft and wakes cannot be ranged. Each reading is also a **mark** for the **attack computer**: from two or more marks at least a minute apart (the last six within 15 minutes) it fits the target's course and speed in a straight line and, with the torpedo's speed, shows the lead angle (left or right of the bearing) and the running time under the periscope (browser: the Solution column); the quality grows with the time between the first and last mark (full at 5 minutes) and the number of marks. `Ctrl+Enter` on the periscope page (browser: Fire on solution, Command only) fires on the solution of the sighting under the crosshair: the torpedo runs on the intercept course to the point where target and torpedo meet. A shot at the sonar contact of a marked target uses the solution as well. A target turning after the last mark leaves the solution behind; a faster fit than 40 kn is rejected as a bad mark. The marks are part of the saved game. The charted coast stands on the periscope's horizon as far as its low optics see land (hills assumed 25 to 70 m). Command can also ping and take a BT without a sonar operator. The chart shows the tube firing arc where the tubes cannot fire all round, and the sonar room's assigned target is preselected for the shot.
- **Mast & ESM:** with the mast up at periscope depth the submarine's own ESM antenna (3 m above the water) hears the radars around it once a second: the frigate's, other ships' and aircraft radars inside the radar horizon, over land only where the coast does not block the line. The frigate's helicopter radiates its X-band search radar while it flies and is not dipping (antenna at 150 m), the patrol aircraft its frequency-agile search radar while the OPZ has it switched on. Each intercept carries the measured bearing (±4°), band, carrier frequency, PRF, modulation and received level, never the emitter's identity or position. The crew keeps an **emitter list** (`E1`, `E2` …) across mast periods: an intercept joins an emitter when bearing, band and waveform agree (a frequency-agile radar by bearing and band only), and the list forgets an emitter 30 minutes after its last intercept. **Classification** is the crew's annotation from the library: the emitters whose published frequency and PRF ranges hold the measurement, up to 16, best fit first: each entry shows its fit (**good**, **fair** or **poor**: frequency and PRF near the middle of its ranges and the same modulation fit best), entries of one grade stand by catalogue key, and the list only reorders when a grade changes; the choice sets the power class for the **range estimate** from the level (unclassified: the shortest range the library allows). Every 30 s each emitter keeps a **bearing** from the submarine's own position (20 minutes); the chart shows the latest bearing lines, and once the submarine's own motion has swung the bearing by at least 8°, the **cross-fix** is their best crossing with a 95 % error ellipse that allows for an emitter drifting up to 8 kn since each line (a fast frigate usually gives none; a fix whose lines disagree is marked). The **level trend** reads rising, steady or falling over five minutes. The **scan period** is the time between an emitter's main-beam hits (the level peaks; close in, the weaker side lobes are heard in between and do not count), measured only on the emitter's own waveform, over gaps up to 12 s with no washed scan between them, and read after 8 s: **rotating** with its period (about 2.5 s for a navigation or surface-search radar, 5 s for an air-search radar, 2 s for a multi-function radar) is a search radar sweeping past; **steady** (the beam on the mast at every scan) is a tracking or fire-control radar. A steady, live emitter is always a mast warning, and the log reports once when an emitter turns steady. The **mast warning** ("radar can see the mast") comes when a live search radar's estimated range is inside the range at which a surface radar sees a raised mast in this sea and rain (the weather page's value); the **recommended mast time** is 60 s in a calm sea, up to 300 s when sea clutter hides the mast and 20 s under that warning, and the log reports when it is exceeded. From sea state 3 waves wash over the antenna and some scans hear nothing. The browser's Mast & ESM card has the rose, the emitter table and the selected emitter's evaluation; **Transfer to plot** puts the cross-fix (mark and error circle) or else the latest bearing line into the submarine's plot. On the uConsole's Mast & ESM page `↑`/`↓` select an emitter, `←`/`→` step through its library classification and `Enter` transfers it to the plot.
- **Radio room:** fleet headquarters sends a submarine broadcast every 10 minutes (broadcast 0 at mission start, then 1, 2 …) and repeats it until the next one. The submarine copies it only with its antenna up, which is the raised mast at periscope depth, and only after 20 s of unbroken reception inside that broadcast's time on the air; a submarine that stays deep misses broadcasts and only ever gets the latest. A broadcast carries HQ's **contact report** on the frigate in 60 % of cases: a position 5 to 15 minutes old with an error circle of 4 NM, and its course and speed rounded. On the chart it is drawn as an amber circle with its age, and the radio page gives bearing and range from the submarine. A **situation report** (`Enter` at the radio room, or the browser's button) is 20 s of HF transmission with the antenna up. During it the frigate's HF direction finder can take a bearing on the submarine (radio room HF/DF), and lowering the mast aborts it. HQ acknowledges a report in its next broadcast and then always adds a sharper contact report (2 NM). The radio page and the browser's Radio room card show the antenna, the broadcast number and time to the next one, copy and transmit progress, the reports sent, the latest contact report and the radio log (12 entries, saved).
- **Radio room:** fleet headquarters sends a submarine broadcast every 10 minutes (broadcast 0 at mission start, then 1, 2 …) and repeats it until the next one. The submarine copies it only with its antenna up, which is the raised mast at periscope depth, and only after 20 s of unbroken reception inside that broadcast's time on the air; a submarine that stays deep misses broadcasts and only ever gets the latest. A broadcast carries HQ's **contact report** on the frigate in 60 % of cases: a position 5 to 15 minutes old with an error circle of 4 NM, and its course and speed rounded. On the chart it is drawn as an amber circle with its age, and the radio page gives bearing and range from the submarine. A **situation report** (`Enter` at the radio room, or the browser's button) is 20 s of HF transmission with the antenna up. During it the frigate's HF direction finder can take a bearing on the submarine (radio room HF/DF), and lowering the mast aborts it. HQ acknowledges a report in its next broadcast and then always adds a sharper contact report (2 NM). The radio page and the browser's Radio room card show the antenna, the broadcast number and time to the next one, copy and transmit progress, the reports sent, the latest contact report and the radio log (12 entries, saved). Below the mast the **VLF loop antenna** still copies the broadcast down to 25 m, but the slow VLF signal needs 60 s of unbroken reception instead of 20 s; it only receives, a situation report still needs the mast. From broadcast 2 on, a broadcast may carry an **HQ order** (half of them, while no order is open, at most 4 per mission; a missed broadcast is a missed order): proceed to an area 8 to 15 NM away in deep water and reach it within 3 NM inside 40 minutes (a green circle on the chart), send a situation report within 30 minutes, or keep radio silence (no transmission) for 20 minutes. The radio page and the browser's Radio room card show the open order with bearing, range and time left, and how many were carried out; the log marks the order a broadcast brought. Orders do not decide the mission.
- **Counter-detection and evasion:** the submarine's sonar room tells an intercepted active ping by its frequency as the frigate's hull sonar, a helicopter's dipping sonar or a sonobuoy, and logs it with the measured bearing and the received level (dB re 1 µPa, from source level, spreading and absorption); a buoy pinging within 12 NM is heard only by a crewed submarine. A buoy splashing into the water within 4 NM is heard with a rough bearing (±6°), and a torpedo alarm is kept with its bearing. The **Threat** page (Command page 4 and Navigation page 2; the browser's Threat card at Command and Navigation) counts the pings of the last 5 minutes by source, gives the loudest level with its assessment (from 150 dB the pinger probably holds an echo) and the trend of the last two pings (rising: closing in), splashes, torpedo alarms and ESM emitters, the submarine's own signature (depth against the measured layer, own noise: cavitating, snorkelling, loud, moderate or quiet, the mast) and the crew's recommendations. The chart draws each intercept of the last 2 minutes as a dashed bearing ray. **Evade** (`I` at Command or Navigation, the browser's **Evade** button) gives the crew's evasion order for the freshest alarm (under 2 minutes): against a torpedo, the smaller turn that puts it 150° on the quarter, full speed and a decoy; against active sonar, the stern to the pinger, silent running at 3 kn. Both cross the measured layer (down when above or in it, up when below it), or go deep without a BT; the submarine lifts off the bottom first. The order goes through the same checks as the single keys, and the page shows it before it is given. The picture is display only and not saved.
- **Navigation and plot:** the engine room has telegraph buttons, and Command and Navigation share the submarine's own grease-pencil plot (marks, rulers, bearing lines, circles, DR lines); the frigate never sees it, and the submarine's plot is not saved. The navigation display shows the water under the keel and checks the chart along the ordered course up to 5 NM: land or a seabed shallower than the submarine is reported as an obstacle ahead, in the log and as a warning. Only charted geography counts; other vessels are not in the check.
- **Submarine sonar:** the same sonar workstation as on the frigate (broadband, LOFAR, DEMON, TMA, active echoes, classification, listening audio), but the hull array listens at the submarine's own depth, so the layer works for and against the crew. There is no towed array and no release to an OPZ. An active ping gives echoes and is heard by the frigate.
@@ -155,7 +155,7 @@ When nobody sails the frigate (the uConsole plays the submarine, or a solo brows
### Not modelled {#ref-opfor-limits}
- The radio room knows only HQ's broadcast schedule and situation reports: no orders or messages from HQ, no reception while deep (no VLF/ELF), no burst transmission and no other units on the net; HQ's contact report is modelled intelligence, not a sensor of its own.
- The radio room knows HQ's broadcast schedule, three kinds of order and situation reports: no free-text messages from HQ, no reception below 25 m (no ELF, no trailing wire), no burst transmission and no other units on the net; HQ's contact report is modelled intelligence, not a sensor of its own.
- Damage control is six compartments and two teams: no separate pressure-hull and outer-hull damage, no casualties, no smoke or heat spreading, no fire in the air stores and no fire consuming oxygen; the submarine's overall damage (noise, top speed, sinking at 100 %) still adds up from hits, and the AI's submarines keep only that value.
- Below test depth the hull has no individual fittings, no gradual shrinking of the hull and no stronger welds from a refit; a failure picks its kind and compartment at random, and a crushed submarine is lost at once.
- The submarine's sounds are simple cues: stereo only tells port from starboard (ahead and astern sound the same), a detonation gives no range estimate and no creak comes from a particular compartment; the submarine's sonar room has no red light.
+1 -1
View File
@@ -2,7 +2,7 @@
[English](commander-protocol.md)
Anwendung 1.3.10, API-Protokoll 2, ausschließlich Spielstandsformat v29. Diese
Anwendung 1.3.10, API-Protokoll 2, ausschließlich Spielstandsformat v30. Diese
Versionen sind voneinander unabhängig. Zugangsdaten, Netzwerksitzungen, Leases,
Befehlswarteschlangen oder Vorschläge werden nicht gespeichert. Gemeinsame
Anmerkungen und von der Besatzung angenommene Ziel-/Navigations-Sollwerte verwenden
+1 -1
View File
@@ -2,7 +2,7 @@
[Deutsch](commander-protocol.de.md)
Application 1.3.10, API protocol 2, save format v29-only. These versions are independent.
Application 1.3.10, API protocol 2, save format v30-only. These versions are independent.
No credentials, network sessions, leases, command queues or proposals are saved.
Shared annotations and crew-accepted target/navigation setpoints use normal game
persistence.
Binary file not shown.
+2 -2
View File
@@ -1143,7 +1143,7 @@ Eine zweite Crew kann den Gegner spielen. Das U-Boot hat sieben Stationen: Führ
- **Besatzung:** das U-Boot hat einen eigenen Wachplan mit den Regeln der Fregatte (siehe Schadensabwehr, Besatzung und Wachen): drei Wachen, Ermüdung, Gefechtsstationen und Moral. Maschine und Führung befehlen Gefechtsstationen (`B` auf der uConsole, eine Taste in der Leckwehr-Karte im Browser) und lösen die Wache ab (`M` auf der Seite Leckwehr oder die Taste). Die Moral steigt, wenn ein Schiff sinkt, und sinkt mit je 10 % Rumpfschaden. Eine müde Besatzung hört am Sonar später, sichtet durch das Sehrohr später und ihre Leckwehrtrupps dichten und löschen langsamer (die Pumpen sind Maschinen und behalten ihre Leistung).
- **Lagebild:** ein gehörter Aktivping oder Torpedo wird mit der Peilung protokolliert, die das U-Boot selbst gemessen hat (einige Grad ungenau), und mit seinem Alter in den Alarmen angezeigt. Auf Sehrohrtiefe lässt sich der **Mast** ausfahren; sein ESM meldet dann die Radare, die das U-Boot überstreichen, mit Peilung (Log und ESM-Liste), und beim Tieferkommen fährt der Mast selbst ein. Mit ausgefahrenem Mast zeigt die Seite **Sehrohr** (Führung Seite 3, Mast & ESM Seite 2; `P` fährt an beiden den Mast aus) das Okular im Stil des Startbilds: Himmel und See im Licht der Stunde (Tag, Dämmerung, Nacht mit Sternen und Mond), Wolken, Regen, Schnee und Nebel nach dem Wetter, den mit der See bewegten Horizont, eine Skala rechtweisender Peilungen und ein Fadenkreuz; das Rohr schwenkt in 2°-Schritten (`←`/`→`, `Umschalt`: 10°). Alles, was die Optik im Kontrastmodell des Fregattenausgucks bei 2,5 m Augenhöhe ausmacht (Tag/Nacht, Mond, Sicht, Seegang, Land im Weg), erscheint als Silhouette und als reine Peilungs-**Sichtung** mit grober Klasse (Kriegsschiff, Handelsschiff, Fahrzeug, Luftfahrzeug, Torpedolaufbahn) und scheinbarer Länge; das Log meldet jede neue Sichtung. Neutrale Schiffe zeigen hier ihre Positionslichter wie im Fernglas der Brücke. `↑`/`↓` neigen den Kopf um 2° (`Umschalt`: 10°, von 10° nach unten bis 60° nach oben, für Flugzeuge), `,`/`.` wechseln zwischen kleiner (32° Feld) und großer Vergrößerung (8°), und die `Leertaste` schaltet die Stabilisierung; Neigung und Feld stehen in der Bildecke. Diese Einstellungen gehören zum Okular der uConsole oder jedes Browsers, ändern nur das Bild (nicht, was die Optik erkennt) und werden nicht gespeichert. Ein Hubschrauber in Sicht hängt in seinem wahren Höhenwinkel über der Kimm im ruhigen Himmel, hinter den Wolken. `Enter` liest das **Stadimeter** an der Sichtung unter dem Fadenkreuz ab: die Entfernung folgt aus der scheinbaren Länge und der angenommenen Rumpflänge der Klasse (130 m für ein Kriegsschiff oder ein nicht erkanntes Fahrzeug, 150 m für ein Handelsschiff), ein nicht erkanntes oder bugwärts stehendes Ziel misst sich also zu weit; die Ablesung ist ±25 % und wird für 120 s zu einem VISUAL-Fix am Sonarkontakt des U-Boots auf dieses Ziel, für einen Schuss nutzbar wie ein Ping-Fix. Luftfahrzeuge und Laufbahnen lassen sich nicht messen. Jede Ablesung ist zugleich eine **Marke** für den **Angriffsrechner**: aus zwei oder mehr Marken im Abstand von mindestens einer Minute (die letzten sechs innerhalb von 15 Minuten) legt er eine Gerade durch Kurs und Fahrt des Ziels und zeigt mit der Torpedogeschwindigkeit den Vorhaltewinkel (links oder rechts der Peilung) und die Laufzeit unter dem Sehrohr (Browser: Spalte Lösung); die Güte wächst mit der Zeit zwischen erster und letzter Marke (voll nach 5 Minuten) und mit der Zahl der Marken. `Strg+Enter` auf der Sehrohrseite (Browser: Schuss nach Lösung, nur die Führung) schießt nach der Lösung der Sichtung unter dem Fadenkreuz: der Torpedo läuft auf dem Abfangkurs zu dem Punkt, an dem Ziel und Torpedo zusammentreffen. Ein Schuss auf den Sonarkontakt eines markierten Ziels nutzt die Lösung ebenfalls. Ein Ziel, das nach der letzten Marke dreht, lässt die Lösung hinter sich; eine Anpassung schneller als 40 kn wird als schlechte Marke verworfen. Die Marken gehören zum Spielstand. Die kartierte Küste steht auf dem Horizont des Sehrohrs, so weit seine niedrige Optik Land sieht (Hügel mit 25 bis 70 m angenommen). Die Führung kann auch ohne Sonarbediener pingen und eine BT-Messung nehmen. Die Karte zeigt das Schussfeld der Rohre, wo sie nicht rundum schießen, und das vom Sonar zugewiesene Ziel ist für den Schuss vorausgewählt.
- **Mast & ESM:** mit ausgefahrenem Mast auf Sehrohrtiefe hört die ESM-Antenne des U-Boots (3 m über Wasser) einmal pro Sekunde die Radare ringsum: das der Fregatte, anderer Schiffe und von Flugzeugen innerhalb des Radarhorizonts, über Land nur, wo die Küste die Linie nicht verdeckt. Der Hubschrauber der Fregatte strahlt sein X-Band-Suchradar, solange er fliegt und nicht taucht (Antenne in 150 m), der Seefernaufklärer sein frequenzagiles Suchradar, solange die OPZ es eingeschaltet hat. Jede Erfassung trägt die gemessene Peilung (±4°), Band, Trägerfrequenz, PRF, Modulation und Empfangspegel, nie die Identität oder Position des Senders. Die Crew führt eine **Emitterliste** (`E1`, `E2` …) über mehrere Mastperioden: eine Erfassung gehört zu einem Emitter, wenn Peilung, Band und Signalform passen (ein frequenzagiles Radar nur nach Peilung und Band), und die Liste vergisst einen Emitter 30 Minuten nach seiner letzten Erfassung. Die **Einstufung** ist die Annotation der Crew aus der Bibliothek: die Emitter, deren veröffentlichte Frequenz- und PRF-Bereiche die Messung enthalten, bis zu 16, die bestpassenden zuerst: jeder Eintrag zeigt seine Passung (**passt gut**, **mittel** oder **schwach**: Frequenz und PRF nahe der Mitte der Bereiche und dieselbe Modulation passen am besten), Einträge gleicher Stufe stehen nach Katalogschlüssel, und die Liste ordnet sich nur um, wenn sich eine Stufe ändert; die Wahl legt die Leistungsklasse für die **Entfernungsschätzung** aus dem Pegel fest (ohne Einstufung die kürzeste Entfernung, die die Bibliothek zulässt). Alle 30 s behält jeder Emitter eine **Peilung** von der eigenen Position des U-Boots (20 Minuten); die Karte zeigt die letzten Peillinien, und sobald die eigene Fahrt die Peilung um mindestens 8° gedreht hat, ist die **Kreuzpeilung** ihr bester Schnittpunkt mit einer 95-%-Fehlerellipse, die einen seit jeder Linie bis zu 8 kn versetzten Sender einrechnet (eine schnelle Fregatte ergibt meist keine; eine Kreuzpeilung, deren Linien nicht zusammenpassen, wird markiert). Der **Stärketrend** zeigt steigend, gleichbleibend oder fallend über fünf Minuten. Die **Umlaufzeit** ist die Zeit zwischen den Treffern der Hauptkeule eines Emitters (den Pegelspitzen; nah dran sind dazwischen die schwächeren Nebenkeulen zu hören und zählen nicht), gemessen nur an der eigenen Signalform des Emitters, über Lücken bis 12 s ohne überspülten Durchlauf dazwischen, und angezeigt nach 8 s: **dreht** mit ihrer Dauer (etwa 2,5 s für ein Navigations- oder Seeraumradar, 5 s für ein Luftraumradar, 2 s für ein Mehrzweckradar) ist ein Suchradar, das vorbeistreicht; **dauernd** (die Keule bei jedem Durchlauf auf dem Mast) ist ein Verfolgungs- oder Feuerleitradar. Ein dauernd beleuchtender, erfasster Emitter ist immer eine Mastwarnung, und das Log meldet einmal, wenn ein Emitter auf Dauerbeleuchtung wechselt. Die **Mastwarnung** („Radar kann Mast sehen“) kommt, wenn die geschätzte Entfernung eines erfassten Suchradars innerhalb der Entfernung liegt, auf der ein Seeraumradar bei diesem Seegang und Regen einen ausgefahrenen Mast sieht (der Wert der Wetterseite); die **empfohlene Mastzeit** ist 60 s bei ruhiger See, bis zu 300 s, wenn die Seegangsechos den Mast verbergen, und 20 s unter dieser Warnung, und das Log meldet, wenn sie überschritten ist. Ab Seegang 3 überspülen Wellen die Antenne, und manche Durchläufe hören nichts. Die Karte Mast & ESM im Browser hat die Rose, die Emittertabelle und die Auswertung des gewählten Emitters; **In den Plot übernehmen** trägt die Kreuzpeilung (Markierung und Fehlerkreis) oder sonst die letzte Peillinie in den Plot des U-Boots ein. Auf der Seite Mast & ESM der uConsole wählen `↑`/`↓` einen Emitter, `←`/`→` schalten seine Einstufung aus der Bibliothek weiter und `Enter` übernimmt ihn in den Plot.
- **Funkraum:** die Flottenführung sendet alle 10 Minuten einen U-Boot-Rundspruch (Rundspruch 0 bei Missionsbeginn, dann 1, 2 …) und wiederholt ihn bis zum nächsten. Das U-Boot nimmt ihn nur mit klarer Antenne auf, das heißt mit ausgefahrenem Mast auf Sehrohrtiefe, und erst nach 20 s ununterbrochenem Empfang innerhalb der Sendezeit dieses Rundspruchs; ein U-Boot, das tief bleibt, verpasst Rundsprüche und bekommt nur den jeweils neuesten. In 60 % der Fälle enthält ein Rundspruch die **Feindlagemeldung** der Führung zur Fregatte: einen 5 bis 15 Minuten alten Standort mit 4 sm Fehlerkreis und gerundetem Kurs und Fahrt. Die Karte zeigt ihn als gelben Kreis mit seinem Alter, und die Funkseite nennt Peilung und Entfernung vom U-Boot. Eine **Lagemeldung** (`Enter` im Funkraum oder der Knopf im Browser) sind 20 s Kurzwellensendung mit klarer Antenne. Währenddessen kann der KW-Peiler der Fregatte das U-Boot peilen (Funkraum HF/DF), und Mast einfahren bricht sie ab. Die Führung bestätigt eine Meldung im nächsten Rundspruch und fügt dann immer eine schärfere Feindlagemeldung (2 sm) bei. Die Funkseite und die Karte Funkraum im Browser zeigen Antenne, Rundspruchnummer und Zeit bis zum nächsten, Fortschritt von Aufnahme und Sendung, gesendete Meldungen, die letzte Feindlage und das Funktagebuch (12 Einträge, wird gespeichert).
- **Funkraum:** die Flottenführung sendet alle 10 Minuten einen U-Boot-Rundspruch (Rundspruch 0 bei Missionsbeginn, dann 1, 2 …) und wiederholt ihn bis zum nächsten. Das U-Boot nimmt ihn nur mit klarer Antenne auf, das heißt mit ausgefahrenem Mast auf Sehrohrtiefe, und erst nach 20 s ununterbrochenem Empfang innerhalb der Sendezeit dieses Rundspruchs; ein U-Boot, das tief bleibt, verpasst Rundsprüche und bekommt nur den jeweils neuesten. In 60 % der Fälle enthält ein Rundspruch die **Feindlagemeldung** der Führung zur Fregatte: einen 5 bis 15 Minuten alten Standort mit 4 sm Fehlerkreis und gerundetem Kurs und Fahrt. Die Karte zeigt ihn als gelben Kreis mit seinem Alter, und die Funkseite nennt Peilung und Entfernung vom U-Boot. Eine **Lagemeldung** (`Enter` im Funkraum oder der Knopf im Browser) sind 20 s Kurzwellensendung mit klarer Antenne. Währenddessen kann der KW-Peiler der Fregatte das U-Boot peilen (Funkraum HF/DF), und Mast einfahren bricht sie ab. Die Führung bestätigt eine Meldung im nächsten Rundspruch und fügt dann immer eine schärfere Feindlagemeldung (2 sm) bei. Die Funkseite und die Karte Funkraum im Browser zeigen Antenne, Rundspruchnummer und Zeit bis zum nächsten, Fortschritt von Aufnahme und Sendung, gesendete Meldungen, die letzte Feindlage und das Funktagebuch (12 Einträge, wird gespeichert). Unter dem Mast nimmt die **VLF-Rahmenantenne** den Rundspruch noch bis 25 m Tiefe auf, das langsame VLF-Signal braucht aber 60 s ununterbrochenen Empfang statt 20 s; sie empfängt nur, eine Lagemeldung braucht weiter den Mast. Ab Rundspruch 2 kann ein Rundspruch einen **Befehl der Führung** enthalten (die Hälfte, solange kein Befehl offen ist, höchstens 4 je Mission; ein verpasster Rundspruch ist ein verpasster Befehl): ein Seegebiet 8 bis 15 sm entfernt in tiefem Wasser anlaufen und binnen 40 Minuten auf 3 sm erreichen (grüner Kreis auf der Karte), binnen 30 Minuten eine Lagemeldung absetzen oder 20 Minuten Funkstille halten (nicht senden). Die Funkseite und die Karte Funkraum im Browser zeigen den offenen Befehl mit Peilung, Entfernung und Restzeit sowie die Zahl der ausgeführten; das Funktagebuch vermerkt, welcher Rundspruch einen Befehl brachte. Befehle entscheiden die Mission nicht.
- **Gegenortung und Ausweichen:** der Sonarraum des U-Boots unterscheidet einen aufgefangenen Aktivping an seiner Frequenz als Rumpfsonar der Fregatte, Tauchsonar eines Hubschraubers oder Sonoboje und protokolliert ihn mit gemessener Peilung und Empfangspegel (dB re 1 µPa, aus Quellpegel, Ausbreitung und Absorption); eine pingende Boje im Umkreis von 12 sm hört nur ein bemanntes U-Boot. Eine Boje, die im Umkreis von 4 sm ins Wasser fällt, wird mit grober Peilung (±6°) gehört, ein Torpedoalarm bleibt mit seiner Peilung stehen. Die Seite **Bedrohung** (Führung Seite 4 und Navigation Seite 2; im Browser die Karte Bedrohung an Führung und Navigation) zählt die Pings der letzten 5 Minuten nach Quelle, nennt den lautesten Pegel mit Bewertung (ab 150 dB hat der Pinger wahrscheinlich ein Echo) und den Trend der letzten beiden Pings (steigend: er kommt näher), Splashes, Torpedoalarme und ESM-Emitter, die eigene Signatur (Tiefe gegen die gemessene Schicht, Eigenlärm: kavitierend, schnorchelnd, laut, mäßig oder leise, der Mast) und die Empfehlungen der Crew. Die Karte zeichnet jede Auffassung der letzten 2 Minuten als gestrichelten Peilstrahl. **Ausweichen** (`I` an Führung oder Navigation, im Browser die Schaltfläche **Ausweichen**) gibt den Ausweichbefehl der Crew zum frischesten Alarm (unter 2 Minuten): gegen einen Torpedo die kleinere Wende, die ihn 150° achteraus legt, Höchstfahrt und ein Täuschkörper; gegen Aktivsonar das Heck zum Pinger, Schleichfahrt mit 3 kn. Beide wechseln durch die gemessene Schicht (nach unten, wenn das U-Boot darüber oder darin steht, nach oben, wenn es darunter steht), ohne BT gehen sie auf Tiefe; ein aufgesetztes U-Boot hebt zuerst ab. Der Befehl durchläuft dieselben Prüfungen wie die Einzeltasten, und die Seite zeigt ihn, bevor er gegeben wird. Das Bild ist nur Anzeige und wird nicht gespeichert.
- **Navigation und Plot:** die Maschine hat Maschinentelegrafen-Knöpfe, und Führung und Navigation teilen den eigenen Fettstift-Plot des U-Boots (Markierungen, Lineale, Peillinien, Kreise, Koppellinien); die Fregatte sieht ihn nie, und der Plot des U-Boots wird nicht gespeichert. Die Navigation zeigt das Wasser unter dem Kiel und prüft die Seekarte entlang des Sollkurses bis 5 sm: Land oder ein Grund flacher als das U-Boot wird als Hindernis voraus gemeldet, im Log und als Warnung. Es zählt nur die kartierte Geografie; andere Fahrzeuge sind nicht Teil der Prüfung.
- **U-Boot-Sonar:** derselbe Sonararbeitsplatz wie auf der Fregatte (Breitband, LOFAR, DEMON, TMA, Aktivechos, Klassifizierung, Horch-Audio), aber das Rumpfsonar horcht in der eigenen Tauchtiefe, die Sprungschicht wirkt also für und gegen die Crew. Es gibt keine Schleppantenne und keine Freigabe an eine OPZ. Ein Aktivping liefert Echos und wird von der Fregatte gehört.
@@ -1230,7 +1230,7 @@ Wenn niemand die Fregatte fährt (die uConsole spielt das U-Boot oder ein Solo-B
#### Nicht modelliert
- Der Funkraum kennt nur den Rundspruchplan der Führung und Lagemeldungen: keine Befehle oder Nachrichten der Führung, kein Empfang in der Tiefe (kein VLF/ELF), keine Kurzsignale und keine anderen Einheiten im Netz; die Feindlage der Führung ist modellierte Aufklärung, kein eigener Sensor.
- Der Funkraum kennt den Rundspruchplan der Führung, drei Befehlsarten und Lagemeldungen: keine freien Nachrichten der Führung, kein Empfang unter 25 m (kein ELF, keine Schleppantenne), keine Kurzsignale und keine anderen Einheiten im Netz; die Feindlage der Führung ist modellierte Aufklärung, kein eigener Sensor.
- Die Leckwehr kennt sechs Abteilungen und zwei Trupps: keine getrennten Schäden an Druck- und Außenhülle, keine Verletzten, keine Ausbreitung von Rauch oder Hitze, kein Brand in den Luftvorräten und kein Sauerstoffverbrauch durch Feuer; der Gesamtschaden des U-Boots (Lärm, Höchstfahrt, Untergang bei 100 %) summiert sich weiter aus Treffern, und die KI-U-Boote haben nur diesen Wert.
- Unter der Testtiefe kennt der Druckkörper keine einzelnen Armaturen, kein allmähliches Zusammendrücken und keine verstärkten Nähte aus einer Werftzeit; ein Versagen wählt Art und Abteilung zufällig, und ein zerdrücktes U-Boot ist sofort verloren.
- Die Geräusche des U-Boots sind einfache Signale: Stereo unterscheidet nur Backbord von Steuerbord (voraus und achteraus klingen gleich), eine Detonation liefert keine Entfernungsschätzung und kein Knarzen kommt aus einer bestimmten Abteilung; der Sonarraum des U-Boots hat kein Rotlicht.
+2 -2
View File
@@ -1142,7 +1142,7 @@ A second crew can play the enemy. The submarine has seven stations: Command, Son
- **Crew:** the submarine has its own watch bill with the frigate's rules (see Damage control, Crew and watches): three watches, fatigue, action stations and morale. The Engine room and Command order action stations (`B` on the uConsole, a button in the browser's Damage control card) and relieve the watch (`M` on the Damage page, or the button). Morale rises when a ship sinks and falls with every 10 % of hull damage. A tired crew hears later on sonar, sights later through the periscope and its damage-control teams seal and fight fire more slowly (the pumps are machinery and keep their rate).
- **Situation picture:** an intercepted active ping or torpedo is logged with the bearing the submarine's own ears measured (a few degrees off) and shown with its age in the alarms. At periscope depth the **mast** can be raised; its ESM then reports the radars sweeping the submarine with bearing (log and ESM list), and the mast lowers by itself when the submarine goes deeper. With the mast up the **periscope** page (Command page 3, Mast & ESM page 2; `P` raises the mast at both) shows the eyepiece in the start screen's look: sky and sea in the light of the hour (day, dusk, night with stars and the moon), clouds, rain, snow and fog from the weather, the horizon moving with the sea, a true-bearing scale and a crosshair; the scope trains in 2° steps (`←`/`→`, `Shift`: 10°). Everything the optics make out within the frigate lookout's contrast model at 2.5 m eye height (day/night, moon, visibility, sea state, land in the way) appears as a silhouette and as a bearing-only **sighting** with a coarse class (warship, merchant ship, vessel, aircraft, torpedo wake) and its apparent length; the log reports each new sighting. Neutral ships show their navigation lights here as on the bridge's binoculars. `↑`/`↓` tilt the head 2° (`Shift`: 10°, from 10° down to 60° up, for aircraft), `,`/`.` switch between low power (32° field) and high power (8°), and `Space` switches the stabilizer; tilt and field stand in the corner of the picture. These settings belong to the eyepiece of the uConsole or of each browser, change only the picture (not what the optics detect) and are not saved. A helicopter in sight hangs at its true elevation above the horizon in the still sky, behind the clouds. `Enter` reads the **stadimeter** on the sighting under the crosshair: the range follows from its apparent length and the assumed hull length of the class (130 m for a warship or an unrecognized vessel, 150 m for a merchant), so an unrecognized or bow-on target reads long; the reading is ±25 % and becomes a VISUAL fix on the submarine's sonar contact of that target for 120 s, usable for a shot like a ping fix. Aircraft and wakes cannot be ranged. Each reading is also a **mark** for the **attack computer**: from two or more marks at least a minute apart (the last six within 15 minutes) it fits the target's course and speed in a straight line and, with the torpedo's speed, shows the lead angle (left or right of the bearing) and the running time under the periscope (browser: the Solution column); the quality grows with the time between the first and last mark (full at 5 minutes) and the number of marks. `Ctrl+Enter` on the periscope page (browser: Fire on solution, Command only) fires on the solution of the sighting under the crosshair: the torpedo runs on the intercept course to the point where target and torpedo meet. A shot at the sonar contact of a marked target uses the solution as well. A target turning after the last mark leaves the solution behind; a faster fit than 40 kn is rejected as a bad mark. The marks are part of the saved game. The charted coast stands on the periscope's horizon as far as its low optics see land (hills assumed 25 to 70 m). Command can also ping and take a BT without a sonar operator. The chart shows the tube firing arc where the tubes cannot fire all round, and the sonar room's assigned target is preselected for the shot.
- **Mast & ESM:** with the mast up at periscope depth the submarine's own ESM antenna (3 m above the water) hears the radars around it once a second: the frigate's, other ships' and aircraft radars inside the radar horizon, over land only where the coast does not block the line. The frigate's helicopter radiates its X-band search radar while it flies and is not dipping (antenna at 150 m), the patrol aircraft its frequency-agile search radar while the OPZ has it switched on. Each intercept carries the measured bearing (±4°), band, carrier frequency, PRF, modulation and received level, never the emitter's identity or position. The crew keeps an **emitter list** (`E1`, `E2` …) across mast periods: an intercept joins an emitter when bearing, band and waveform agree (a frequency-agile radar by bearing and band only), and the list forgets an emitter 30 minutes after its last intercept. **Classification** is the crew's annotation from the library: the emitters whose published frequency and PRF ranges hold the measurement, up to 16, best fit first: each entry shows its fit (**good**, **fair** or **poor**: frequency and PRF near the middle of its ranges and the same modulation fit best), entries of one grade stand by catalogue key, and the list only reorders when a grade changes; the choice sets the power class for the **range estimate** from the level (unclassified: the shortest range the library allows). Every 30 s each emitter keeps a **bearing** from the submarine's own position (20 minutes); the chart shows the latest bearing lines, and once the submarine's own motion has swung the bearing by at least 8°, the **cross-fix** is their best crossing with a 95 % error ellipse that allows for an emitter drifting up to 8 kn since each line (a fast frigate usually gives none; a fix whose lines disagree is marked). The **level trend** reads rising, steady or falling over five minutes. The **scan period** is the time between an emitter's main-beam hits (the level peaks; close in, the weaker side lobes are heard in between and do not count), measured only on the emitter's own waveform, over gaps up to 12 s with no washed scan between them, and read after 8 s: **rotating** with its period (about 2.5 s for a navigation or surface-search radar, 5 s for an air-search radar, 2 s for a multi-function radar) is a search radar sweeping past; **steady** (the beam on the mast at every scan) is a tracking or fire-control radar. A steady, live emitter is always a mast warning, and the log reports once when an emitter turns steady. The **mast warning** ("radar can see the mast") comes when a live search radar's estimated range is inside the range at which a surface radar sees a raised mast in this sea and rain (the weather page's value); the **recommended mast time** is 60 s in a calm sea, up to 300 s when sea clutter hides the mast and 20 s under that warning, and the log reports when it is exceeded. From sea state 3 waves wash over the antenna and some scans hear nothing. The browser's Mast & ESM card has the rose, the emitter table and the selected emitter's evaluation; **Transfer to plot** puts the cross-fix (mark and error circle) or else the latest bearing line into the submarine's plot. On the uConsole's Mast & ESM page `↑`/`↓` select an emitter, `←`/`→` step through its library classification and `Enter` transfers it to the plot.
- **Radio room:** fleet headquarters sends a submarine broadcast every 10 minutes (broadcast 0 at mission start, then 1, 2 …) and repeats it until the next one. The submarine copies it only with its antenna up, which is the raised mast at periscope depth, and only after 20 s of unbroken reception inside that broadcast's time on the air; a submarine that stays deep misses broadcasts and only ever gets the latest. A broadcast carries HQ's **contact report** on the frigate in 60 % of cases: a position 5 to 15 minutes old with an error circle of 4 NM, and its course and speed rounded. On the chart it is drawn as an amber circle with its age, and the radio page gives bearing and range from the submarine. A **situation report** (`Enter` at the radio room, or the browser's button) is 20 s of HF transmission with the antenna up. During it the frigate's HF direction finder can take a bearing on the submarine (radio room HF/DF), and lowering the mast aborts it. HQ acknowledges a report in its next broadcast and then always adds a sharper contact report (2 NM). The radio page and the browser's Radio room card show the antenna, the broadcast number and time to the next one, copy and transmit progress, the reports sent, the latest contact report and the radio log (12 entries, saved).
- **Radio room:** fleet headquarters sends a submarine broadcast every 10 minutes (broadcast 0 at mission start, then 1, 2 …) and repeats it until the next one. The submarine copies it only with its antenna up, which is the raised mast at periscope depth, and only after 20 s of unbroken reception inside that broadcast's time on the air; a submarine that stays deep misses broadcasts and only ever gets the latest. A broadcast carries HQ's **contact report** on the frigate in 60 % of cases: a position 5 to 15 minutes old with an error circle of 4 NM, and its course and speed rounded. On the chart it is drawn as an amber circle with its age, and the radio page gives bearing and range from the submarine. A **situation report** (`Enter` at the radio room, or the browser's button) is 20 s of HF transmission with the antenna up. During it the frigate's HF direction finder can take a bearing on the submarine (radio room HF/DF), and lowering the mast aborts it. HQ acknowledges a report in its next broadcast and then always adds a sharper contact report (2 NM). The radio page and the browser's Radio room card show the antenna, the broadcast number and time to the next one, copy and transmit progress, the reports sent, the latest contact report and the radio log (12 entries, saved). Below the mast the **VLF loop antenna** still copies the broadcast down to 25 m, but the slow VLF signal needs 60 s of unbroken reception instead of 20 s; it only receives, a situation report still needs the mast. From broadcast 2 on, a broadcast may carry an **HQ order** (half of them, while no order is open, at most 4 per mission; a missed broadcast is a missed order): proceed to an area 8 to 15 NM away in deep water and reach it within 3 NM inside 40 minutes (a green circle on the chart), send a situation report within 30 minutes, or keep radio silence (no transmission) for 20 minutes. The radio page and the browser's Radio room card show the open order with bearing, range and time left, and how many were carried out; the log marks the order a broadcast brought. Orders do not decide the mission.
- **Counter-detection and evasion:** the submarine's sonar room tells an intercepted active ping by its frequency as the frigate's hull sonar, a helicopter's dipping sonar or a sonobuoy, and logs it with the measured bearing and the received level (dB re 1 µPa, from source level, spreading and absorption); a buoy pinging within 12 NM is heard only by a crewed submarine. A buoy splashing into the water within 4 NM is heard with a rough bearing (±6°), and a torpedo alarm is kept with its bearing. The **Threat** page (Command page 4 and Navigation page 2; the browser's Threat card at Command and Navigation) counts the pings of the last 5 minutes by source, gives the loudest level with its assessment (from 150 dB the pinger probably holds an echo) and the trend of the last two pings (rising: closing in), splashes, torpedo alarms and ESM emitters, the submarine's own signature (depth against the measured layer, own noise: cavitating, snorkelling, loud, moderate or quiet, the mast) and the crew's recommendations. The chart draws each intercept of the last 2 minutes as a dashed bearing ray. **Evade** (`I` at Command or Navigation, the browser's **Evade** button) gives the crew's evasion order for the freshest alarm (under 2 minutes): against a torpedo, the smaller turn that puts it 150° on the quarter, full speed and a decoy; against active sonar, the stern to the pinger, silent running at 3 kn. Both cross the measured layer (down when above or in it, up when below it), or go deep without a BT; the submarine lifts off the bottom first. The order goes through the same checks as the single keys, and the page shows it before it is given. The picture is display only and not saved.
- **Navigation and plot:** the engine room has telegraph buttons, and Command and Navigation share the submarine's own grease-pencil plot (marks, rulers, bearing lines, circles, DR lines); the frigate never sees it, and the submarine's plot is not saved. The navigation display shows the water under the keel and checks the chart along the ordered course up to 5 NM: land or a seabed shallower than the submarine is reported as an obstacle ahead, in the log and as a warning. Only charted geography counts; other vessels are not in the check.
- **Submarine sonar:** the same sonar workstation as on the frigate (broadband, LOFAR, DEMON, TMA, active echoes, classification, listening audio), but the hull array listens at the submarine's own depth, so the layer works for and against the crew. There is no towed array and no release to an OPZ. An active ping gives echoes and is heard by the frigate.
@@ -1229,7 +1229,7 @@ When nobody sails the frigate (the uConsole plays the submarine, or a solo brows
#### Not modelled
- The radio room knows only HQ's broadcast schedule and situation reports: no orders or messages from HQ, no reception while deep (no VLF/ELF), no burst transmission and no other units on the net; HQ's contact report is modelled intelligence, not a sensor of its own.
- The radio room knows HQ's broadcast schedule, three kinds of order and situation reports: no free-text messages from HQ, no reception below 25 m (no ELF, no trailing wire), no burst transmission and no other units on the net; HQ's contact report is modelled intelligence, not a sensor of its own.
- Damage control is six compartments and two teams: no separate pressure-hull and outer-hull damage, no casualties, no smoke or heat spreading, no fire in the air stores and no fire consuming oxygen; the submarine's overall damage (noise, top speed, sinking at 100 %) still adds up from hits, and the AI's submarines keep only that value.
- Below test depth the hull has no individual fittings, no gradual shrinking of the hull and no stronger welds from a refit; a failure picks its kind and compartment at random, and a crushed submarine is lost at once.
- The submarine's sounds are simple cues: stereo only tells port from starboard (ahead and astern sound the same), a detonation gives no range estimate and no creak comes from a particular compartment; the submarine's sonar room has no red light.
Binary file not shown.
+1 -1
View File
@@ -1,4 +1,4 @@
# U-Jagd 1.3.64 - Stations- und Tastenkürzel
# U-Jagd 1.3.65 - Stations- und Tastenkürzel
Druckfassung: [`station-shortcuts.de.pdf`](station-shortcuts.de.pdf).
Maßgeblich ist die implementierte lokale Bedienung. Stationsnummern und
Binary file not shown.
+1 -1
View File
@@ -121,4 +121,4 @@ im Internet. Die Proxy-Einrichtung und sein Zertifikat werden außerhalb des
Spiels verwaltet.
Die Webverwaltung liegt unter `/api/v2/web/*` und nutzt die vorhandene v2-Sitzung.
Alle `/api/v1/*`-Routen bleiben abgeschaltet. Spielstände bleiben exakt v29.
Alle `/api/v1/*`-Routen bleiben abgeschaltet. Spielstände bleiben exakt v30.
+11 -2
View File
@@ -1593,6 +1593,7 @@ def _uboot_radio(game, boat):
radio = boat.radio
progress = radio.progress(game, boat)
latest = radio.latest_report()
order = radio.active_order()
return dict(
antenna=bool(progress["antenna"]), broadcast=int(progress["broadcast"]),
copied=bool(progress["copied"]), next_s=_number(progress["next_s"]),
@@ -1602,8 +1603,16 @@ def _uboot_radio(game, boat):
report=_uboot_radio_report(game, None if latest is None else latest["report"]),
log=[dict(seq=int(row["seq"]), type=row["kind"], age_s=_age(game.sim_t, row["t"]),
number=None if row["number"] is None else int(row["number"]),
ack=bool(row["ack"]), report=_uboot_radio_report(game, row["report"]))
for row in reversed(radio.log)])
ack=bool(row["ack"]), report=_uboot_radio_report(game, row["report"]),
order=None if row["order"] is None else int(row["order"]))
for row in reversed(radio.log)],
vlf=progress["reception"] == "vlf",
order=None if order is None else dict(
id=int(order["id"]), type=order["kind"], x=_number(order["x"]),
y=_number(order["y"]), radius_nm=_number(order["radius_nm"]),
left_s=_number(max(0.0, order["deadline_t"] - game.sim_t))),
orders_done=sum(1 for row in radio.orders if row["state"] == "done"),
orders_failed=sum(1 for row in radio.orders if row["state"] == "failed"))
def _uboot(game, boat, rows, target_ref, asset_refs):
+6 -2
View File
@@ -140,8 +140,12 @@ UBOOT_EVADE_PLAN_FIELDS = ("type", "bearing", "course", "speed_kn", "depth_m", "
# The boat's radio room (``radio``, src/core/boat_radio.py): schedule,
# transmissions, HQ's latest contact report and the message log.
UBOOT_RADIO_FIELDS = ("antenna", "broadcast", "copied", "next_s", "copy", "send",
"transmitting", "sitreps", "ack_due", "report", "log")
UBOOT_RADIO_LOG_FIELDS = ("seq", "type", "age_s", "number", "ack", "report")
"transmitting", "sitreps", "ack_due", "report", "log", "vlf",
"order", "orders_done", "orders_failed")
UBOOT_RADIO_LOG_FIELDS = ("seq", "type", "age_s", "number", "ack", "report", "order")
# The open HQ order (area orders carry x/y/radius_nm, else null).
UBOOT_RADIO_ORDER_FIELDS = ("id", "type", "x", "y", "radius_nm", "left_s")
UBOOT_RADIO_ORDER_KINDS = ("area", "report", "silence")
UBOOT_RADIO_LOG_KINDS = ("broadcast", "sent", "aborted")
UBOOT_RADIO_REPORT_FIELDS = ("x", "y", "radius_nm", "course", "speed_kn", "age_s")
UBOOT_ESM_FIX_FIELDS = ("x", "y", "major_nm", "minor_nm", "axis_deg", "lines", "consistent")
+165 -14
View File
@@ -13,6 +13,16 @@ motion when it is copied), with an error circle, rounded course and speed.
This is modelled intelligence with deterministic noise keyed by seed and
broadcast number, never the frigate's live position.
Below the mast the VLF loop antenna still copies the broadcast down to
``UBOOT_RADIO_VLF_DEPTH_M``; the slow VLF signal needs
``UBOOT_RADIO_VLF_COPY_S`` of continuous reception instead.
From broadcast ``UBOOT_ORDER_FIRST`` on, a broadcast may carry a new HQ
order while none is open (deterministic per seed and broadcast number, so a
missed broadcast is a missed order): proceed to an area, send a situation
report, or keep radio silence, each with a deadline. The radio room tracks
them; they do not decide the mission.
A situation report goes out on HF: ``UBOOT_RADIO_TX_S`` of transmission with
the antenna up, during which the frigate's HF direction finder can take a
bearing on the boat (``Sub.transmitting``). Lowering the mast aborts it.
@@ -27,11 +37,17 @@ import math
from src.core import config, detrand
from src.sensors.platform import MAST_DEPTH_M
VERSION = 1
VERSION = 2
LOG_KINDS = ("broadcast", "sent", "aborted")
STATE_FIELDS = frozenset({"version", "seq", "copied", "copy_since", "tx_until",
"tx_since", "sitreps", "ack_due", "log"})
LOG_FIELDS = frozenset({"seq", "t", "kind", "number", "ack", "report"})
"tx_since", "sitreps", "ack_due", "log", "orders",
"order_seq"})
LOG_FIELDS = frozenset({"seq", "t", "kind", "number", "ack", "report", "order"})
ORDER_KINDS = ("area", "report", "silence")
ORDER_STATES = ("active", "done", "failed")
ORDER_FIELDS = frozenset({"id", "kind", "number", "issued_t", "deadline_t", "x", "y",
"radius_nm", "state", "ended_t"})
ORDERS_KEPT = 6
REPORT_FIELDS = frozenset({"x", "y", "radius_nm", "course", "speed_kn", "as_of"})
@@ -49,6 +65,21 @@ def antenna_up(boat) -> bool:
return bool(boat.orders.mast and not sub.sunk and sub.depth <= MAST_DEPTH_M + 1.0)
def reception(boat):
"""How the boat hears the broadcast now: "hf" (mast up), "vlf" (loop
antenna at shallow depth) or None."""
if antenna_up(boat):
return "hf"
sub = boat.sub
if not sub.sunk and sub.depth <= config.UBOOT_RADIO_VLF_DEPTH_M:
return "vlf"
return None
def copy_seconds(mode) -> float:
return config.UBOOT_RADIO_COPY_S if mode == "hf" else config.UBOOT_RADIO_VLF_COPY_S
class BoatRadio:
"""The radio room's schedule, transmissions and message log."""
@@ -61,6 +92,8 @@ class BoatRadio:
self.sitreps = 0
self.ack_due = False # HQ acknowledges in its next broadcast
self.log: list[dict] = []
self.orders: list[dict] = [] # HQ orders, newest last
self.order_seq = 0
# -- state ---------------------------------------------------------------
@@ -71,10 +104,14 @@ class BoatRadio:
def latest_report(self):
return next((row for row in reversed(self.log) if row["report"] is not None), None)
def _add(self, sim_t: float, kind: str, number=None, ack=False, report=None) -> dict:
def active_order(self):
return next((order for order in self.orders if order["state"] == "active"), None)
def _add(self, sim_t: float, kind: str, number=None, ack=False, report=None,
order=None) -> dict:
self.seq += 1
row = dict(seq=self.seq, t=float(sim_t), kind=kind, number=number, ack=bool(ack),
report=report)
report=report, order=order)
self.log.append(row)
del self.log[:-config.UBOOT_RADIO_LOG_MAX]
return row
@@ -92,6 +129,9 @@ class BoatRadio:
self.tx_since = float(game.sim_t)
self.tx_until = float(game.sim_t) + config.UBOOT_RADIO_TX_S
boat.orders.event("radio_sending")
order = self.active_order()
if order is not None and order["kind"] == "silence":
self._close_order(boat, order, "failed", game.sim_t)
return True
# -- the schedule (crew cadence) -------------------------------------------
@@ -110,27 +150,82 @@ class BoatRadio:
self.ack_due = True
self._add(now, "sent", number=self.sitreps)
boat.orders.event("radio_sent", number=str(self.sitreps))
order = self.active_order()
if order is not None and order["kind"] == "report":
self._close_order(boat, order, "done", now)
from src.core import boat_missions
boat_missions.report_sent(game, boat)
if not up:
self._update_orders(boat, now)
mode = reception(boat)
if mode is None:
self.copy_since = None
return
if self.copy_since is None:
self.copy_since = now
need = copy_seconds(mode)
number = broadcast_number(now)
if number <= self.copied or now - self.copy_since < config.UBOOT_RADIO_COPY_S:
if number <= self.copied or now - self.copy_since < need:
return
# The whole copy must fall inside this broadcast's time on the air.
if self.copy_since < number * config.UBOOT_RADIO_BROADCAST_S \
and now - number * config.UBOOT_RADIO_BROADCAST_S < config.UBOOT_RADIO_COPY_S:
and now - number * config.UBOOT_RADIO_BROADCAST_S < need:
return
self.copied = number
ack = self.ack_due
self.ack_due = False
report = hq_report(game, number, sharp=ack)
self._add(now, "broadcast", number=number, ack=ack, report=report)
order = self._issue_order(game, boat, number, now)
self._add(now, "broadcast", number=number, ack=ack, report=report,
order=None if order is None else order["id"])
boat.orders.event("radio_copied_report" if report is not None else "radio_copied",
number=str(number))
if order is not None:
boat.orders.event("radio_order_" + order["kind"], number=str(order["id"]))
# -- HQ orders ---------------------------------------------------------------
def _issue_order(self, game, boat, number: int, now: float):
"""The order broadcast ``number`` carries for this boat, or None."""
seed = int(game.seed)
if (number < config.UBOOT_ORDER_FIRST or self.active_order() is not None
or self.order_seq >= config.UBOOT_ORDER_MAX
or detrand.u01(seed, "hq-order", number) >= config.UBOOT_ORDER_P):
return None
kind = ORDER_KINDS[min(len(ORDER_KINDS) - 1, int(
detrand.u01(seed, "hq-order-kind", number) * len(ORDER_KINDS)))]
x = y = radius = None
duration = {"report": config.UBOOT_ORDER_REPORT_S,
"silence": config.UBOOT_ORDER_SILENCE_S}.get(kind, config.UBOOT_ORDER_AREA_S)
if kind == "area":
point = _order_area(game, boat.sub, seed, number)
if point is None:
kind, duration = "report", config.UBOOT_ORDER_REPORT_S
else:
(x, y), radius = point, config.UBOOT_ORDER_RADIUS_NM
self.order_seq += 1
order = dict(id=self.order_seq, kind=kind, number=int(number), issued_t=float(now),
deadline_t=float(now) + duration, x=x, y=y, radius_nm=radius,
state="active", ended_t=None)
self.orders.append(order)
del self.orders[:-ORDERS_KEPT]
return order
def _close_order(self, boat, order, state: str, now: float) -> None:
order["state"] = state
order["ended_t"] = float(now)
boat.orders.event("order_" + state, number=str(order["id"]))
def _update_orders(self, boat, now: float) -> None:
order = self.active_order()
if order is None:
return
sub = boat.sub
if order["kind"] == "area" and not sub.sunk and math.hypot(
sub.x - order["x"], sub.y - order["y"]) <= order["radius_nm"]:
self._close_order(boat, order, "done", now)
elif now >= order["deadline_t"]:
self._close_order(boat, order, "done" if order["kind"] == "silence"
else "failed", now)
def progress(self, game, boat) -> dict:
"""Copy and transmission progress (0..1, or None) and the schedule."""
@@ -139,11 +234,11 @@ class BoatRadio:
copy = None
if self.copy_since is not None and number > self.copied:
start = max(self.copy_since, number * config.UBOOT_RADIO_BROADCAST_S)
copy = min(1.0, max(0.0, (now - start) / config.UBOOT_RADIO_COPY_S))
copy = min(1.0, max(0.0, (now - start) / copy_seconds(reception(boat))))
send = None
if self.transmitting:
send = min(1.0, max(0.0, (now - self.tx_since) / config.UBOOT_RADIO_TX_S))
return dict(antenna=antenna_up(boat), broadcast=number,
return dict(antenna=antenna_up(boat), reception=reception(boat), broadcast=number,
copied=self.copied == number,
next_s=(number + 1) * config.UBOOT_RADIO_BROADCAST_S - now,
copy=copy, send=send, sitreps=self.sitreps, ack_due=self.ack_due)
@@ -155,7 +250,8 @@ class BoatRadio:
copy_since=self.copy_since, tx_since=self.tx_since,
tx_until=self.tx_until, sitreps=self.sitreps, ack_due=self.ack_due,
log=[dict(row, report=None if row["report"] is None
else dict(row["report"])) for row in self.log])
else dict(row["report"])) for row in self.log],
orders=[dict(order) for order in self.orders], order_seq=self.order_seq)
@staticmethod
def valid_state(data) -> bool:
@@ -163,7 +259,7 @@ class BoatRadio:
return False
if data["version"] != VERSION or type(data["version"]) is not int:
return False
for key, low in (("seq", 0), ("copied", -1), ("sitreps", 0)):
for key, low in (("seq", 0), ("copied", -1), ("sitreps", 0), ("order_seq", 0)):
if type(data[key]) is not int or not low <= data[key] <= 2**31:
return False
if type(data["ack_due"]) is not bool:
@@ -187,6 +283,10 @@ class BoatRadio:
or row["kind"] not in LOG_KINDS or type(row["ack"]) is not bool):
return False
previous = row["seq"]
if row["order"] is not None and (
type(row["order"]) is not int or row["kind"] != "broadcast"
or not 1 <= row["order"] <= data["order_seq"]):
return False
if row["number"] is not None and (type(row["number"]) is not int
or not 0 <= row["number"] <= 2**31):
return False
@@ -198,7 +298,7 @@ class BoatRadio:
or report["radius_nm"] <= 0.0 or not 0.0 <= report["course"] < 360.0
or report["speed_kn"] < 0.0):
return False
return True
return _valid_orders(data["orders"], data["order_seq"])
@classmethod
def from_save(cls, data) -> "BoatRadio":
@@ -215,9 +315,60 @@ class BoatRadio:
radio.log = [dict(row, report=None if row["report"] is None else
{key: float(value) for key, value in row["report"].items()})
for row in data["log"]]
radio.orders = [dict(order) for order in data["orders"]]
radio.order_seq = data["order_seq"]
return radio
def _valid_orders(orders, order_seq) -> bool:
if (not isinstance(orders, list) or len(orders) > ORDERS_KEPT
or order_seq > config.UBOOT_ORDER_MAX):
return False
previous, active = 0, 0
for order in orders:
if not isinstance(order, dict) or set(order) != ORDER_FIELDS:
return False
if (type(order["id"]) is not int or not previous < order["id"] <= order_seq
or order["kind"] not in ORDER_KINDS or order["state"] not in ORDER_STATES
or type(order["number"]) is not int or not 0 <= order["number"] <= 2**31
or not _finite(order["issued_t"]) or order["issued_t"] < 0.0
or not _finite(order["deadline_t"])
or order["deadline_t"] < order["issued_t"]):
return False
previous = order["id"]
area = order["kind"] == "area"
for key in ("x", "y", "radius_nm"):
if (order[key] is None) == area or (area and not _finite(order[key])):
return False
if area and order["radius_nm"] <= 0.0:
return False
if order["state"] == "active":
active += 1
if order["ended_t"] is not None:
return False
elif not _finite(order["ended_t"]) or order["ended_t"] < order["issued_t"]:
return False
return active <= 1
def _order_area(game, sub, seed: int, number: int):
"""An area in open water some miles from the boat, or None."""
low, high = config.UBOOT_ORDER_AREA_NM
distance = low + (high - low) * detrand.u01(seed, "hq-order-range", number)
start = 360.0 * detrand.u01(seed, "hq-order-bearing", number)
size = float(game.world.size_nm)
margin = config.UBOOT_ORDER_RADIUS_NM
for step in range(8):
rad = math.radians(start + 45.0 * step)
x = sub.x + distance * math.sin(rad)
y = sub.y - distance * math.cos(rad)
if not (margin <= x <= size - margin and margin <= y <= size - margin):
continue
if game.world.physical_depth_m(x, y) >= config.UBOOT_ORDER_MIN_DEPTH_M:
return round(x, 2), round(y, 2)
return None
def hq_report(game, number: int, *, sharp: bool = False):
"""HQ's contact report on the frigate for broadcast ``number``, or None.
+17
View File
@@ -300,6 +300,23 @@ UBOOT_RADIO_INTEL_P = 0.6
UBOOT_RADIO_REPORT_AGE_S = (300.0, 900.0)
UBOOT_RADIO_REPORT_RADIUS_NM = 4.0
UBOOT_RADIO_REPORT_SHARP_NM = 2.0
# VLF: the loop antenna copies the broadcast down to VLF_DEPTH_M without the
# mast, but the slow VLF signal needs VLF_COPY_S. From broadcast
# ORDER_FIRST on, a broadcast carries a new HQ order with probability
# ORDER_P while none is open, at most ORDER_MAX per mission: proceed to an
# area (AREA_NM away, RADIUS_NM wide, within AREA_S), send a situation report
# within REPORT_S, or keep radio silence for SILENCE_S.
UBOOT_RADIO_VLF_DEPTH_M = 25.0
UBOOT_RADIO_VLF_COPY_S = 60.0
UBOOT_ORDER_FIRST = 2
UBOOT_ORDER_P = 0.5
UBOOT_ORDER_MAX = 4
UBOOT_ORDER_AREA_NM = (8.0, 15.0)
UBOOT_ORDER_RADIUS_NM = 3.0
UBOOT_ORDER_AREA_S = 2400.0
UBOOT_ORDER_REPORT_S = 1800.0
UBOOT_ORDER_SILENCE_S = 1200.0
UBOOT_ORDER_MIN_DEPTH_M = 60.0 # an ordered area lies in water this deep
# Diesel fuel of conventional boats (fictional): the bunkers hold this many
# hours of full generator power; a mission starts mid-patrol at this fill.
# Displayed as litres of diesel per kWh of generator output.
+1 -1
View File
@@ -2,7 +2,7 @@
``AUTOSAVE_INTERVAL_S`` wall seconds and on a normal quit; "Continue" in the
main menu loads it. ``Game`` mixin.
The autosave is an ordinary exact-v29 save document beside the five slots and
The autosave is an ordinary exact-v30 save document beside the five slots and
goes through the same strict loader. It never touches the simulation: the
document is built and serialized on the main thread (the save dict shares
lists with live state), only the compact bytes go to a background thread that
+2
View File
@@ -91,6 +91,8 @@ class CrewOrders:
"dc_power_lost": "schaden", "dc_power_restored": "schaden",
"radio_sending": "funk", "radio_sent": "funk", "radio_aborted": "funk",
"radio_copied": "funk", "radio_copied_report": "funk",
"radio_order_area": "funk", "radio_order_report": "funk",
"radio_order_silence": "funk", "order_done": "funk", "order_failed": "funk",
"detonation_near": "sonar", "detonation_far": "sonar",
"tube_loaded": "waffen", "tube_flooded": "waffen",
"torpedo_fired": "waffen", "torpedo_fired_tubeless": "waffen",
+1 -1
View File
@@ -1,4 +1,4 @@
"""Declarative exact key sets for the ``u-jagd-save-v29`` document.
"""Declarative exact key sets for the ``u-jagd-save-v30`` document.
Every persisted block whose shape is validated exactly is declared here, so a
new saved field is added in exactly three places: this module,
+3 -3
View File
@@ -4,9 +4,9 @@ This module is deliberately dependency-free because setuptools imports the
version while building the project.
"""
APP_VERSION = "1.3.64"
SAVE_VERSION = 29
SAVE_SCHEMA = "u-jagd-save-v29"
APP_VERSION = "1.3.65"
SAVE_VERSION = 30
SAVE_SCHEMA = "u-jagd-save-v30"
SPLASH_TEXT = (
"Anti Sub Marine Warfare on uConsole by Dominik Bornhäußer "
f"Version {APP_VERSION}"
+47 -5
View File
@@ -12,7 +12,7 @@ import math
import pygame
from src.core import config
from src.core.boat_radio import antenna_up
from src.core.boat_radio import antenna_up, reception
from src.core.i18n import message
from src.ui import layout, lines
@@ -48,13 +48,38 @@ def report_lines(game, boat, report) -> list:
speed=f"{report['speed_kn']:.0f}", age=f"{age_min:.0f}")]
def order_line(game, boat):
"""The open HQ order as one line (bearing and range from the boat now),
or the tally of closed ones."""
radio = boat.radio
order = radio.active_order()
if order is None:
done = sum(1 for row in radio.orders if row["state"] == "done")
failed = sum(1 for row in radio.orders if row["state"] == "failed")
if done or failed:
return message("uboot.radio.order_closed", done=str(done), failed=str(failed))
return message("uboot.radio.order_none")
left = _clock(order["deadline_t"] - game.sim_t)
if order["kind"] == "area":
dx, dy = order["x"] - boat.sub.x, order["y"] - boat.sub.y
return message("uboot.radio.order_area", number=str(order["id"]),
bearing=f"{math.degrees(math.atan2(dx, -dy)) % 360.0:03.0f}",
range=f"{math.hypot(dx, dy):.1f}",
radius=f"{order['radius_nm']:.0f}", left=left)
return message("uboot.radio.order_" + order["kind"], number=str(order["id"]), left=left)
def log_text(game, row):
age = _clock(game.sim_t - row["t"])
if row["kind"] == "broadcast":
key = ("uboot.radio.log.broadcast_report" if row["report"] is not None
else "uboot.radio.log.broadcast")
text = message(key, age=age, number=str(row["number"]))
return message("uboot.radio.log.with_ack", entry=text) if row["ack"] else text
if row["ack"]:
text = message("uboot.radio.log.with_ack", entry=text)
if row.get("order") is not None:
text = message("uboot.radio.log.with_order", entry=text, number=str(row["order"]))
return text
if row["kind"] == "sent":
return message("uboot.radio.log.sent", age=age, number=str(row["number"]))
return message("uboot.radio.log.aborted", age=age)
@@ -64,11 +89,14 @@ def draw_radio_page(s, game, boat, x, y, w, h) -> None:
radio = boat.radio
progress = radio.progress(game, boat)
up = antenna_up(boat)
mode = reception(boat)
box = layout.box(s, (x, y, w, 132), "uboot.panel.radio",
border=config.COLOR_WARN if radio.transmitting else config.COLOR_TEXT)
bx, by, bw, _ = box
layout.blit_line(s, "uboot.radio.antenna_up" if up else "uboot.radio.antenna_down",
(bx, by, bw, 22), config.COLOR_OK if up else config.COLOR_TEXT_DIM, size=16)
layout.blit_line(s, "uboot.radio.antenna_up" if up else "uboot.radio.antenna_vlf"
if mode == "vlf" else "uboot.radio.antenna_down",
(bx, by, bw, 22), config.COLOR_OK if up else config.COLOR_TEXT
if mode == "vlf" else config.COLOR_TEXT_DIM, size=16)
number = str(progress["broadcast"])
if progress["copied"]:
state = message("uboot.radio.broadcast_copied", number=number)
@@ -102,6 +130,12 @@ def draw_radio_page(s, game, boat, x, y, w, h) -> None:
for index, text in enumerate(report_lines(game, boat, latest["report"])):
layout.blit_line(s, text, (rx, ry + index * 22, rw, 22), REPORT_COLOR, size=16)
top += 82
orders = layout.box(s, (x, top, w, 50), "uboot.panel.hq_order")
ox, oy, ow, _ = orders
layout.blit_line(s, order_line(game, boat), (ox, oy, ow, 22),
config.COLOR_WARN if radio.active_order() is not None
else config.COLOR_TEXT_DIM, size=16)
top += 58
listing = layout.box(s, (x, top, w, max(40, h - (top - y))), "uboot.panel.radio_log")
lx, ly, lw, lh = listing
if not radio.log:
@@ -114,7 +148,15 @@ def draw_radio_page(s, game, boat, x, y, w, h) -> None:
def draw_report_chart(game, boat, view) -> None:
"""HQ's latest contact report: error circle, reported course and its age."""
"""HQ's latest contact report: error circle, reported course and its age;
and the area of an open HQ order."""
order = boat.radio.active_order()
if order is not None and order["kind"] == "area":
ox, oy = view.world_to_screen(order["x"], order["y"])
radius = max(6, int(order["radius_nm"] * view.scale))
pygame.draw.circle(game.screen, config.COLOR_OK, (int(ox), int(oy)), radius, 1)
layout.blit_line(game.screen, message("uboot.radio.chart_order", number=str(order["id"])),
(int(ox) + 8, int(oy) - radius - 20, 200, 18), config.COLOR_OK, size=12)
latest = boat.radio.latest_report()
if latest is None:
return
+1 -1
View File
@@ -29,7 +29,7 @@ def test_tick_writes_after_the_interval_only():
game.wait_for_autosave()
with open(autosave_path(), encoding="utf-8") as stream:
data = json.load(stream)
assert data["save_schema"] == "u-jagd-save-v29"
assert data["save_schema"] == "u-jagd-save-v30"
assert game.autosave_available
# Nothing is left behind from the staged write.
assert os.listdir(os.path.dirname(autosave_path())) == ["autosave.json"]
+138
View File
@@ -0,0 +1,138 @@
"""VLF reception below the mast and HQ orders to the crewed submarine."""
import copy
import json
import math
import sys
from pathlib import Path
from src.commander import projections
from src.core import boat_radio, config, detrand
from src.core.boat_radio import BoatRadio
sys.path.insert(0, str(Path(__file__).parent))
from test_boat_radio import BROADCAST, _step # noqa: E402
from test_opfor_sub import _crewed, _feed_texts # noqa: E402
def _vlf(game, boat, depth=22.0):
sub = boat.sub
sub.x, sub.y = game.ship.x - 20.0, game.ship.y
sub.depth = sub.target_depth = sub.order_depth = depth
boat.orders.mast = False
def _order_seed(kind=None):
"""A seed whose broadcast 2 carries an order (of ``kind``)."""
for seed in range(1, 400):
if detrand.u01(seed, "hq-order", 2) >= config.UBOOT_ORDER_P:
continue
index = int(detrand.u01(seed, "hq-order-kind", 2) * len(boat_radio.ORDER_KINDS))
if kind is None or boat_radio.ORDER_KINDS[index] == kind:
return seed
raise AssertionError("no seed")
def _copy_broadcast(game, boat, number):
game.sim_t = number * BROADCAST + 1.0
_step(game, boat, game.sim_t + config.UBOOT_RADIO_VLF_COPY_S + 2.0)
def test_the_vlf_loop_copies_slowly_below_the_mast_but_not_deep():
game, _server, _bridge = _crewed(seed=61)
boat = game.opfor
_vlf(game, boat)
assert boat_radio.reception(boat) == "vlf" and not boat_radio.antenna_up(boat)
game.sim_t = BROADCAST + 1.0
_step(game, boat, game.sim_t + config.UBOOT_RADIO_COPY_S + 5.0)
assert boat.radio.copied == -1 # VLF is slower than HF
_step(game, boat, BROADCAST + config.UBOOT_RADIO_VLF_COPY_S + 2.0)
assert boat.radio.copied == 1
assert boat.radio.send_sitrep(game, boat) == "uboot_no_antenna"
boat.sub.depth = config.UBOOT_RADIO_VLF_DEPTH_M + 5.0
assert boat_radio.reception(boat) is None
_step(game, boat, 2 * BROADCAST + 200.0)
assert boat.radio.copied == 1
def test_an_area_order_arrives_by_vlf_and_is_done_on_arrival():
seed = _order_seed("area")
game, _server, _bridge = _crewed(seed=seed)
boat = game.opfor
_vlf(game, boat)
_copy_broadcast(game, boat, 2)
order = boat.radio.active_order()
assert order is not None and order["kind"] == "area" and order["id"] == 1
distance = math.hypot(order["x"] - boat.sub.x, order["y"] - boat.sub.y)
assert config.UBOOT_ORDER_AREA_NM[0] - 0.1 <= distance <= config.UBOOT_ORDER_AREA_NM[1] + 0.1
assert game.world.physical_depth_m(order["x"], order["y"]) >= config.UBOOT_ORDER_MIN_DEPTH_M
assert boat.radio.log[-1]["order"] == 1
assert any("order 1" in text for text in _feed_texts(game))
view = projections._uboot_radio(game, boat)
assert view["vlf"] and view["order"]["type"] == "area" and view["order"]["id"] == 1
assert json.loads(json.dumps(view)) == view
boat.sub.x, boat.sub.y = order["x"], order["y"]
_step(game, boat, game.sim_t + 2.0)
assert order["state"] == "done" and boat.radio.active_order() is None
assert projections._uboot_radio(game, boat)["orders_done"] == 1
def test_a_report_order_is_done_by_a_sitrep_and_fails_after_its_deadline():
seed = _order_seed("report")
game, _server, _bridge = _crewed(seed=seed)
boat = game.opfor
_vlf(game, boat)
_copy_broadcast(game, boat, 2)
order = boat.radio.active_order()
assert order["kind"] == "report"
_step(game, boat, order["deadline_t"] + 1.0)
assert order["state"] == "failed"
game2, _s, _b = _crewed(seed=seed)
boat2 = game2.opfor
_vlf(game2, boat2)
_copy_broadcast(game2, boat2, 2)
boat2.sub.depth = boat2.sub.target_depth = boat2.sub.order_depth = 15.0
assert boat2.sub.command_mast(True) is True
assert boat2.radio.send_sitrep(game2, boat2) is True
_step(game2, boat2, game2.sim_t + config.UBOOT_RADIO_TX_S + 2.0)
assert boat2.radio.orders[-1]["state"] == "done"
def test_radio_silence_fails_on_a_transmission_and_holds_otherwise():
seed = _order_seed("silence")
game, _server, _bridge = _crewed(seed=seed)
boat = game.opfor
_vlf(game, boat)
_copy_broadcast(game, boat, 2)
order = boat.radio.active_order()
assert order["kind"] == "silence"
_step(game, boat, order["deadline_t"] + 1.0, dt=5.0)
assert order["state"] == "done"
def test_orders_are_deterministic_bounded_and_saved():
seed = _order_seed()
runs = []
for _ in range(2):
game, _server, _bridge = _crewed(seed=seed)
boat = game.opfor
_vlf(game, boat)
for number in range(2, 20):
_copy_broadcast(game, boat, number)
runs.append(copy.deepcopy(boat.radio.orders))
assert runs[0] == runs[1]
assert boat.radio.order_seq <= config.UBOOT_ORDER_MAX
data = game.save_state()
radio = data["crew"]["radio"]
assert BoatRadio.valid_state(radio)
restored = BoatRadio.from_save(json.loads(json.dumps(radio)))
assert restored.orders == boat.radio.orders
for mutate in (lambda r: r.pop("orders"),
lambda r: r.update(order_seq=config.UBOOT_ORDER_MAX + 1),
lambda r: r["orders"][0].update(kind="attack"),
lambda r: r["orders"][0].update(state="active", ended_t=None) or
r["orders"].append(dict(r["orders"][0], id=r["order_seq"] + 1)),
lambda r: r["log"][-1].update(order=99)):
broken = copy.deepcopy(radio)
mutate(broken)
assert not BoatRadio.valid_state(broken)
+1 -1
View File
@@ -166,7 +166,7 @@ def test_radio_state_saves_and_rejects_malformed_blocks(tmp_path):
assert game.opfor.sub.transmitting # still on the air after loading
assert game.opfor.orders.radio is game.opfor.radio
before = game.save_state()
for mutate in (lambda radio: radio.update(version=2),
for mutate in (lambda radio: radio.update(version=1),
lambda radio: radio.pop("log"),
lambda radio: radio.update(tx_since=None),
lambda radio: radio.update(sitreps=-1),
+2 -2
View File
@@ -85,7 +85,7 @@ def test_source_and_wheel_contain_editor_templates(tmp_path):
(ROOT / "data/contact_analysis" / name).read_bytes()
assert any(name.endswith(".dist-info/licenses/THIRD_PARTY_NOTICES.md")
for name in wheel_names)
assert any(name.endswith("-1.3.64.dist-info/METADATA") for name in wheel_names)
assert any(name.endswith("-1.3.65.dist-info/METADATA") for name in wheel_names)
source = next(tmp_path.glob("u_jagd-*.tar.gz"))
with tarfile.open(source) as archive:
@@ -137,7 +137,7 @@ def test_source_and_wheel_contain_editor_templates(tmp_path):
[sys.executable, "-c",
"from importlib import resources; "
"assert resources.files('data.editor_templates').joinpath('mission.json').is_file(); "
"from src.core.version import APP_VERSION; assert APP_VERSION == '1.3.64'; "
"from src.core.version import APP_VERSION; assert APP_VERSION == '1.3.65'; "
"from src.commander.server import CommanderServer; "
"server=CommanderServer(); server.start('127.0.0.1',0); server.stop(); "
"from src.core import manual; page=manual.html_page('de'); assert 'station-sonar' in page; "
+8 -3
View File
@@ -19,11 +19,11 @@ def _game(seed=1201):
return Game(seed=seed, start_menu=False, audio_enabled=False)
def test_save_is_v29_and_older_documents_are_rejected():
def test_save_is_v30_and_older_documents_are_rejected():
game = _game()
state = json.loads(json.dumps(game.save_state()))
assert (state["version"], state["save_schema"]) == (29, "u-jagd-save-v29")
assert (SAVE_VERSION, SAVE_SCHEMA) == (29, "u-jagd-save-v29")
assert (state["version"], state["save_schema"]) == (30, "u-jagd-save-v30")
assert (SAVE_VERSION, SAVE_SCHEMA) == (30, "u-jagd-save-v30")
assert set(state) == SAVE_ROOT_FIELDS
before = game.save_state()
legacy = copy.deepcopy(state)
@@ -140,6 +140,11 @@ def test_save_is_v29_and_older_documents_are_rejected():
for key in ("depth_charges", "depth_charge_seq", "own_stores"):
del v28["asw"][key]
assert not game._load_save_data(v28)
# v29 differs only by the boat radio's HQ orders (crew.radio version 2).
v29 = copy.deepcopy(state)
v29["version"] = 29
v29["save_schema"] = "u-jagd-save-v29"
assert not game._load_save_data(v29)
assert game.save_state() == before
+2 -2
View File
@@ -14,9 +14,9 @@ from src.world.real_coast import sector_for_seed
def test_release_version_and_exact_splash_text():
assert APP_VERSION == "1.3.64"
assert APP_VERSION == "1.3.65"
assert SPLASH_TEXT == (
"Anti Sub Marine Warfare on uConsole by Dominik Bornhäußer Version 1.3.64"
"Anti Sub Marine Warfare on uConsole by Dominik Bornhäußer Version 1.3.65"
)
+2
View File
@@ -102,6 +102,8 @@ def render_block() -> str:
lines.append(f" radioLog: {_array(schema.UBOOT_RADIO_LOG_FIELDS)},\n")
lines.append(f" radioLogKinds: {_array(schema.UBOOT_RADIO_LOG_KINDS)},\n")
lines.append(f" radioReport: {_array(schema.UBOOT_RADIO_REPORT_FIELDS)},\n")
lines.append(f" radioOrder: {_array(schema.UBOOT_RADIO_ORDER_FIELDS)},\n")
lines.append(f" radioOrderKinds: {_array(schema.UBOOT_RADIO_ORDER_KINDS)},\n")
lines.append(" };\n")
lines.append(END)
return "".join(lines)