mirror of
https://github.com/db9979/uconsole_asw_game.git
synced 2026-12-05 12:24:25 +01:00
Save v13: operator catalog assignment; manual TAS side; DEMON band, heterodyne, crew overview
- Save format v13 (u-jagd-save-v13): sonar contacts carry the operator's catalog assignment (player_profile) and the chosen towed-array side; v12 and older documents are rejected without migration. - F8 contact analyser: Enter assigns the browsed profile to the selected sonar contact, Shift+Enter clears it; shown in the contact list and on the web (Contacts tab assign button, sonar row field). - Towed-array left/right is the operator's decision: X shows the other side, Shift+X confirms (broadband/fusion pages); an own turn no longer resolves it silently, a wrong confirmation stays mirrored. - Shift+F selects the DEMON carrier band, Ctrl+F the heterodyne shift (uConsole and web). - Web: crew automation overview for all stations (as uConsole F3). - AGENTS.md/READMEs, manual EN/DE, help keys updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89bf5be59c
commit
8bbd60aa7b
32 files changed
+508
-66
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
## Authority and scope
|
||||
|
||||
- This is U-Jagd 1.1.0 (`src/core/version.py`); current saves are v12-only. Treat these as compatibility contracts, not changelog entries.
|
||||
- This is U-Jagd 1.1.0 (`src/core/version.py`); current saves are v13-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-0.1.8.md` and `docs/resume.md`.
|
||||
@@ -62,8 +62,8 @@
|
||||
## Persistence and user content
|
||||
|
||||
- Runtime root is `~/.u-jagd/`: `settings.json`; `slot1.json` through `slot5.json`; 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`; v12 saves also retain the mission's tooltip state. CLI `--windowed` and `--no-audio` override saved values for one launch; no inverse fullscreen or CLI-language switch exists.
|
||||
- Write and load save v12 only. Require the exact `u-jagd-save-v12` schema (exact key sets live in `src/core/save_schema.py`) and the complete current catalog, platform, ESM, ASW, AIS, and RNG state. Reject malformed, non-integer, older, newer, incomplete, or unknown schemas without migration.
|
||||
- Preferences persist language/fullscreen/audio/large text/tooltips in `settings.json`; v13 saves also retain the mission's tooltip state. CLI `--windowed` and `--no-audio` override saved values for one launch; no inverse fullscreen or CLI-language switch exists.
|
||||
- Write and load save v13 only. Require the exact `u-jagd-save-v13` schema (exact key sets live in `src/core/save_schema.py`) and the complete current catalog, platform, ESM, ASW, AIS, and RNG state. 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.
|
||||
@@ -71,13 +71,13 @@
|
||||
## 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 v12; 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 v13; 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).
|
||||
- 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.
|
||||
- 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 v12, 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 v13, 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.
|
||||
- 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.
|
||||
- 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.
|
||||
- New multiplayer prose uses exact EN/DE catalog parity and safe DOM insertion. Browser controls require keyboard and touch access, bounded responsive layouts, explicit stale/revoked states, and tests at desktop, mobile, large zoom, and pseudolocale where applicable.
|
||||
|
||||
+6
-6
@@ -27,8 +27,8 @@ Antenne, ESM-Pegel, KW-Ausbreitung und ein Ausguck mit Mondlicht; sowie
|
||||
Flugkörper-Flugphysik mit Düppelwolken, CIWS-Ballistik, Pop-up-Angriffen,
|
||||
Helikopter-Schwebeflug/Decklimits und treibenden Bojen. Feindliche U-Boote
|
||||
brauchen jetzt eine eigene TMA, bevor sie Ihre Entfernung kennen.
|
||||
**Spielstände haben jetzt das Format v12; Spielstände von 1.0.0 (v11) werden
|
||||
abgelehnt.** Das Remote-Crew-v2-Protokoll bleibt bis auf neue ELOKA-Felder
|
||||
**Spielstände haben jetzt das Format v13 (manuelle Katalogzuordnung von Kontakten);
|
||||
ältere Spielstände werden abgelehnt.** Das Remote-Crew-v2-Protokoll bleibt bis auf neue ELOKA-Felder
|
||||
unverändert. Die vollständige Übersicht steht in
|
||||
[docs/simulation-gaps.md](docs/simulation-gaps.md).
|
||||
|
||||
@@ -320,7 +320,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
|
||||
v12 gespeichert.
|
||||
v13 gespeichert.
|
||||
|
||||
## Commander-LAN-Koop
|
||||
|
||||
@@ -395,7 +395,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 **1.0.0**, API-Protokoll **v2** und Speicherformat **v12** sind
|
||||
Anwendungsversion **1.0.0**, API-Protokoll **v2** und Speicherformat **v13** 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.
|
||||
@@ -447,8 +447,8 @@ Validiert bedeutet nicht, dass ein Wert zur Laufzeit wirksam ist. In Version
|
||||
|
||||
## Spielstände und Benutzerdaten
|
||||
|
||||
Dieser Stand schreibt und lädt ausschließlich das Speicherformat **v12**. V12
|
||||
verlangt das exakte Schema `u-jagd-save-v12` einschließlich des aktuellen
|
||||
Dieser Stand schreibt und lädt ausschließlich das Speicherformat **v13**. V13
|
||||
verlangt das exakte Schema `u-jagd-save-v13` einschließlich des aktuellen
|
||||
Schnappschusses des Laufzeitkatalogs und des gesamten Zustands für die
|
||||
deterministische Fortsetzung. Ältere (auch alle v11-Spielstände von 1.0.0),
|
||||
neuere, fehlerhafte oder unvollständige Spielstände werden ohne Migration
|
||||
|
||||
@@ -23,7 +23,7 @@ logistics; the radar equation with a rotating antenna, ESM amplitude, HF
|
||||
propagation and a moonlit lookout; and missile flight physics with chaff
|
||||
clouds, CIWS ballistics, pop-up raiders, helicopter hover/deck limits and
|
||||
drifting buoys. Hostile submarines now need their own TMA before they know
|
||||
your range. **Saves are now format v12; 1.0.0 (v11) saves are rejected.** The
|
||||
your range. **Saves are now format v13 (manual catalog assignment of contacts); older saves are rejected.** The
|
||||
Remote Crew v2 protocol is unchanged apart from new ELOKA intercept fields.
|
||||
See [docs/simulation-gaps.md](docs/simulation-gaps.md) for the full record.
|
||||
|
||||
@@ -301,7 +301,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 v12 game saves for deterministic restoration of existing sessions.
|
||||
in v13 game saves for deterministic restoration of existing sessions.
|
||||
|
||||
## Commander LAN Co-op
|
||||
|
||||
@@ -405,8 +405,8 @@ Validated does not mean runtime-effective. In release 1.0.0:
|
||||
|
||||
## Saves and User Data
|
||||
|
||||
This build writes and loads save format **v12** only. V12 requires the exact
|
||||
`u-jagd-save-v12` schema, including the current runtime catalog snapshot and all
|
||||
This build writes and loads save format **v13** only. V13 requires the exact
|
||||
`u-jagd-save-v13` schema, including the current runtime catalog snapshot and all
|
||||
deterministic continuation state. Older (including every 1.0.0 v11 save),
|
||||
newer, malformed, or incomplete saves are rejected without replacing the
|
||||
running game; there is no migration.
|
||||
|
||||
+31
-4
@@ -683,7 +683,8 @@
|
||||
|
||||
function sonarEntries(row) {
|
||||
return [["reference", row.label], ["source", row.source],
|
||||
["classification", classificationText(row.classification)], ["bearing", unit(row.bearing, "\u00b0", 0)],
|
||||
["classification", classificationText(row.classification)], ["catalog_profile", row.profile || t("station_none")],
|
||||
["bearing", unit(row.bearing, "\u00b0", 0)],
|
||||
["range", unit(row.range_nm, "NM")], ["position", position(row)], ["depth", unit(row.depth_m, "m", 0)],
|
||||
["course", unit(row.course, "\u00b0", 0)], ["speed", unit(row.speed_kn, "kn")],
|
||||
["quality", number(row.quality, 2)], ["age", unit(row.age_s, "s", 0)],
|
||||
@@ -827,6 +828,8 @@
|
||||
rpm: finite(settings.tools.shaft_hz) ? number(settings.tools.shaft_hz * 60, 0) : "--"})],
|
||||
["sonar_assist", yesNo(settings.tools.assist)]]);
|
||||
if (!stationDrafts.has("sonar-integration")) $("sonar-integration").value = String(settings.tools.integration_s);
|
||||
if (!stationDrafts.has("sonar-demon-band")) $("sonar-demon-band").value = settings.tools.demon_band_hz.map((value) => number(value, 0).replace(/\D/g, "")).join("-");
|
||||
if (!stationDrafts.has("sonar-heterodyne")) $("sonar-heterodyne").value = String(Math.round(settings.tools.heterodyne_hz));
|
||||
$("sonar-vernier").checked = settings.tools.vernier;
|
||||
const live = !settings.station_down;
|
||||
if (!stationDrafts.has("sonar-array-mode")) $("sonar-array-mode").value = settings.mode;
|
||||
@@ -2824,6 +2827,10 @@
|
||||
$("analysis-key").textContent = profile.key;
|
||||
$("analysis-name").textContent = profile.name;
|
||||
$("analysis-resource").textContent = t(`analyzer_${profile.resource.slice(0, -5)}`);
|
||||
// Sonar operators assign the compared profile to their selected contact.
|
||||
const canAssign = session?.station === "sonar" && Boolean(selected) && stationActionAvailable();
|
||||
$("analysis-assign").hidden = $("analysis-assign-clear").hidden = !canAssign;
|
||||
$("analysis-assign-status").value = canAssign ? t("analyzer_assign_target", {contact: selectedTrack()?.label || selected}) : "";
|
||||
const reference = profile.reference;
|
||||
const machine = profile.machine;
|
||||
const joined = (items) => Array.isArray(items) && items.length ? items.join(", ") : t("unavailable");
|
||||
@@ -3190,7 +3197,7 @@
|
||||
if (!exactKeys(state, status)) throw new Error("protocol");
|
||||
return;
|
||||
}
|
||||
const common = [...status, "clock", "environment", "mission", "autocrew", "audio", "weather_station"];
|
||||
const common = [...status, "clock", "environment", "mission", "autocrew", "autocrew_overview", "audio", "weather_station"];
|
||||
if (!stationNames.includes(state.role) || state.role !== session?.station ||
|
||||
!exactKeys(state, [...common, state.role]) || !exactKeys(state.clock, ["sim", "mission", "world"]) ||
|
||||
!exactKeys(state.environment, ["sea_state", "effective_sea_state", "is_night", "weather", "wind_from_deg", "wind_speed_kn", "rain_intensity", "visibility_nm"]) ||
|
||||
@@ -3203,6 +3210,9 @@
|
||||
!finite(state.environment.visibility_nm) || state.environment.visibility_nm < .1 || state.environment.visibility_nm > 30 ||
|
||||
!exactKeys(state.autocrew, ["enabled", "status"]) || typeof state.autocrew.enabled !== "boolean" ||
|
||||
!["off", "active", "suspended_remote", "blocked_damage"].includes(state.autocrew.status) ||
|
||||
!boundedArray(state.autocrew_overview, 9) || state.autocrew_overview.some((row) => !exactKeys(row, ["station", "enabled", "status"]) ||
|
||||
!stationNames.includes(row.station) || typeof row.enabled !== "boolean" ||
|
||||
!["off", "active", "suspended_remote", "blocked_damage"].includes(row.status)) ||
|
||||
!exactKeys(state.mission, ["name", "objective", "remaining_s"]) ||
|
||||
!exactKeys(state.audio, ["events"]) ||
|
||||
!boundedArray(state.audio.events, 16) ||
|
||||
@@ -3235,7 +3245,7 @@
|
||||
if (row.altitude_m !== null && (!finite(row.altitude_m) || row.altitude_m < 0 || row.altitude_m > 30000)) throw new Error("protocol");
|
||||
});
|
||||
};
|
||||
const sonarFields = ["ref", "label", "source", "classification", "bearing", "range_nm", "x", "y", "depth_m", "course", "speed_kn", "quality", "age_s", "fix_age_s", "bearing_uncertainty_deg", "range_uncertainty_nm", "observer_x", "observer_y", "released_to_opz", "fixes"];
|
||||
const sonarFields = ["ref", "label", "source", "classification", "profile", "bearing", "range_nm", "x", "y", "depth_m", "course", "speed_kn", "quality", "age_s", "fix_age_s", "bearing_uncertainty_deg", "range_uncertainty_nm", "observer_x", "observer_y", "released_to_opz", "fixes"];
|
||||
if (state.role === "bridge") {
|
||||
if (!exactKeys(payload.navigation, ["x", "y", "course", "speed", "target_course", "target_speed", "rudder_angle", "yaw_rate", "turn_radius_nm"])) throw new Error("protocol");
|
||||
if (!exactKeys(payload.orders, ["station_down", "speed_max_kn", "telegraph", "noise", "cavitating"]) ||
|
||||
@@ -3257,7 +3267,8 @@
|
||||
const settings = payload.settings;
|
||||
if (!exactKeys(settings, ["mode", "page", "listen_bearing", "focus_ref", "target_ref", "station_down", "tow", "bt", "ping", "tma_enabled", "gain_db", "band_preset", "band_hz", "notch", "peak_hold", "harmonic_hz", "harmonic_candidates_hz", "audio_enabled", "volume", "quiet_mode", "tools"]) ||
|
||||
!["BOW", "TOWED"].includes(settings.mode) || typeof settings.station_down !== "boolean" ||
|
||||
!exactKeys(settings.tools, ["assist", "lofar_cursor_hz", "demon_cursor_hz", "integration_s", "vernier", "shaft_hz", "blade_hz", "operator_notch_hz"]) ||
|
||||
!exactKeys(settings.tools, ["assist", "lofar_cursor_hz", "demon_cursor_hz", "integration_s", "vernier", "shaft_hz", "blade_hz", "operator_notch_hz", "demon_band_hz", "heterodyne_hz"]) ||
|
||||
!boundedArray(settings.tools.demon_band_hz, 2) || settings.tools.demon_band_hz.some((value) => !finite(value)) || !finite(settings.tools.heterodyne_hz) ||
|
||||
typeof settings.tools.assist !== "boolean" || typeof settings.tools.vernier !== "boolean" ||
|
||||
![2, 8, 16, 64].includes(settings.tools.integration_s) ||
|
||||
[settings.tools.lofar_cursor_hz, settings.tools.demon_cursor_hz].some((value) => !finite(value) || value < 0 || value > 300) ||
|
||||
@@ -4375,6 +4386,10 @@
|
||||
$("autocrew-status").textContent = v2State?.autocrew ? t("autocrew_status", {
|
||||
status: t(`autocrew_${v2State.autocrew.status}`),
|
||||
}) : "";
|
||||
$("autocrew-overview").textContent = v2State?.autocrew_overview?.some((row) => row.enabled)
|
||||
? t("autocrew_overview", {stations: v2State.autocrew_overview.filter((row) => row.enabled)
|
||||
.map((row) => `${t(`station_${row.station}`)}: ${t(`autocrew_${row.status}`)}`).join(", ")})
|
||||
: t("autocrew_overview_none");
|
||||
metrics($("mission-metrics"), [
|
||||
["remaining", unit(snapshot.mission.remaining_s, "s", 0)],
|
||||
["mission_clock", unit(snapshot.clock.mission, "s", 0)],
|
||||
@@ -5720,10 +5735,22 @@
|
||||
if (selected && [course, speed, range].every(finite) && course >= 0 && course < 360 && speed >= 0 && speed <= 45 && range >= .2 && range <= 60)
|
||||
sendStationAction("sonar_tma_set", {ref: selected, course, speed_kn: speed, range_nm: range});
|
||||
});
|
||||
$("analysis-assign").addEventListener("click", () => {
|
||||
const profile = analysisProfile();
|
||||
if (profile && selected) sendStationAction("sonar_assign_profile", {ref: selected, profile_key: profile.key});
|
||||
});
|
||||
$("analysis-assign-clear").addEventListener("click", () => { if (selected) sendStationAction("sonar_assign_profile", {ref: selected, profile_key: null}); });
|
||||
$("sonar-tma-accept").addEventListener("click", () => { if (selected) sendStationAction("sonar_tma_accept", {ref: selected}); });
|
||||
$("sonar-tma-copy").addEventListener("click", () => { if (selected) sendStationAction("sonar_tma_copy_proposal", {ref: selected}); });
|
||||
$("sonar-demon-band").addEventListener("change", () => {
|
||||
const [low, high] = $("sonar-demon-band").value.split("-").map(Number);
|
||||
sendStationAction("sonar_set_demon_band", {low_hz: low, high_hz: high});
|
||||
});
|
||||
$("sonar-heterodyne").addEventListener("change", () => sendStationAction("sonar_set_heterodyne", {frequency_hz: Number($("sonar-heterodyne").value)}));
|
||||
$("sonar-integration").addEventListener("change", () => sendStationAction("sonar_set_integration", {seconds: Number($("sonar-integration").value)}));
|
||||
$("sonar-vernier").addEventListener("change", () => sendStationAction("sonar_set_vernier", {enabled: $("sonar-vernier").checked}));
|
||||
$("sonar-tas-flip").addEventListener("click", () => { if (selected) sendStationAction("sonar_tas_side", {ref: selected, action: "flip"}); });
|
||||
$("sonar-tas-confirm").addEventListener("click", () => { if (selected) sendStationAction("sonar_tas_side", {ref: selected, action: "confirm"}); });
|
||||
$("sonar-demon-mark").addEventListener("click", () => sendStationAction("sonar_mark_line", {page: "demon"}));
|
||||
$("sonar-band-edges-form").addEventListener("submit", (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -65,12 +65,12 @@
|
||||
<section class="mission-strip" data-i18n-aria="mission">
|
||||
<div class="mission-name"><p class="eyebrow" data-i18n="mission"></p><h1 id="mission-name"></h1><p id="objective"></p></div>
|
||||
<dl id="mission-metrics" class="metrics"></dl>
|
||||
<div class="session"><span id="phase" class="badge"></span><p id="command-permission"></p><p id="autocrew-status"></p></div>
|
||||
<div class="session"><span id="phase" class="badge"></span><p id="command-permission"></p><p id="autocrew-status"></p><p id="autocrew-overview"></p></div>
|
||||
<div id="host-bar" class="host-bar" role="group" data-i18n-aria="host_bar" hidden><a id="web-admin-link" href="/admin" data-i18n="admin_room" hidden></a><button id="host-save" type="button" data-i18n="host_save"></button><button id="host-load" type="button" data-i18n="host_load"></button><button id="host-new" type="button" data-i18n="host_new"></button><button id="host-instructor" type="button" data-i18n="instructor_open"></button><span id="host-status" class="host-status" role="status" aria-live="polite"></span></div>
|
||||
</section>
|
||||
<section id="station-view" class="station-view" aria-label="" data-i18n-aria="station_view" hidden>
|
||||
<section id="station-bridge" class="station-section" data-station-role="bridge" aria-labelledby="station-bridge-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-bridge-title" data-i18n="station_bridge"></h2></div><div class="station-grid"><article class="station-card-view"><h3 data-i18n="bridge_navigation_title"></h3><dl id="bridge-navigation" class="detail-metrics"></dl></article><article class="station-card-view"><h3 data-i18n="station_orders"></h3><dl id="bridge-orders-summary" class="detail-metrics"></dl></article><article class="station-card-view bridge-weather"><h3 data-i18n="weather_picture"></h3><canvas id="bridge-weather-canvas" width="360" height="120" data-i18n-aria="weather_picture"></canvas><p id="bridge-weather-text" class="fine"></p></article><article class="station-card-view"><h3 data-i18n="station_tactical_summary"></h3><div id="bridge-tactical" class="station-list"></div></article><article class="station-card-view"><h3 id="bridge-sightings-title" data-i18n="sightings_title"></h3><ol id="bridge-sightings" class="sighting-log" aria-labelledby="bridge-sightings-title" aria-live="polite"></ol></article></div></section>
|
||||
<section id="station-sonar" class="station-section" data-station-role="sonar" aria-labelledby="station-sonar-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-sonar-title" data-i18n="station_sonar"></h2></div><div class="station-grid"><article class="station-card-view"><h3 data-i18n="station_settings"></h3><dl id="sonar-settings" class="detail-metrics"></dl></article><article class="station-card-view station-controls station-wide"><h3 data-i18n="sonar_controls"></h3><label for="sonar-control-page" data-i18n="sonar_control_page"></label><select id="sonar-control-page"><option value="listen" data-i18n="sonar_page_listen"></option><option value="array" data-i18n="sonar_page_array"></option><option value="analysis" data-i18n="sonar_page_analysis"></option></select><div class="control-page" data-sonar-page="listen"><form id="sonar-bearing-form" class="control-form"><label for="sonar-bearing" data-i18n="sonar_listen_bearing"></label><input id="sonar-bearing" type="number" min="0" max="359.99999999999994" step="any" inputmode="decimal" autocomplete="off" required><button id="sonar-bearing-submit" type="submit" data-i18n="sonar_set_bearing"></button></form><button id="sonar-clear-focus" type="button" data-i18n="sonar_clear_focus"></button><button id="sonar-ping" type="button" data-i18n="sonar_ping"></button></div><div class="control-page" data-sonar-page="array" hidden><label for="sonar-array-mode" data-i18n="sonar_array_mode"></label><select id="sonar-array-mode"><option value="BOW" data-i18n="sonar_bow"></option><option value="TOWED" data-i18n="sonar_towed"></option></select><button id="sonar-array-apply" type="button" data-i18n="apply"></button><button id="sonar-tas" type="button"></button><form id="sonar-depth-form" class="control-form"><label for="sonar-depth" data-i18n="sonar_tow_depth"></label><input id="sonar-depth" type="number" min="20" max="260" step="any" inputmode="decimal" autocomplete="off" required><button id="sonar-depth-submit" type="submit" data-i18n="sonar_set_depth"></button></form><button id="sonar-bt" type="button" data-i18n="sonar_bt"></button></div><div class="control-page" data-sonar-page="analysis" hidden><label class="toggle"><input id="sonar-tma" type="checkbox"><span data-i18n="sonar_tma"></span></label><label class="toggle"><input id="sonar-notch" type="checkbox"><span data-i18n="sonar_notch"></span></label><label class="toggle"><input id="sonar-peak" type="checkbox"><span data-i18n="sonar_peak_hold"></span></label><form id="sonar-gain-form" class="control-form"><label for="sonar-gain" data-i18n="sonar_gain"></label><input id="sonar-gain" type="number" min="-12" max="24" step="any" inputmode="decimal" autocomplete="off" required><button id="sonar-gain-submit" type="submit" data-i18n="apply"></button></form><label for="sonar-band" data-i18n="sonar_band"></label><select id="sonar-band"><option value="FULL">FULL</option><option value="LOW">LOW</option><option value="SHAFT">SHAFT</option><option value="MID">MID</option></select><button id="sonar-band-apply" type="button" data-i18n="apply"></button><form id="sonar-harmonic-form" class="control-form"><label for="sonar-harmonic-input" data-i18n="sonar_harmonic_frequency"></label><input id="sonar-harmonic-input" type="number" min="0.000001" max="300" step="any" inputmode="decimal" autocomplete="off" list="sonar-harmonic-candidates"><datalist id="sonar-harmonic-candidates"></datalist><button id="sonar-harmonic-submit" type="submit" data-i18n="sonar_set_harmonic"></button><button id="sonar-harmonic-clear" type="button" data-i18n="sonar_clear_harmonic"></button></form><label for="sonar-integration" data-i18n="sonar_integration"></label><select id="sonar-integration"><option value="2">2 s (FFT)</option><option value="8">8 s</option><option value="16">16 s</option><option value="64">64 s</option></select><form id="sonar-band-edges-form" class="control-form"><label for="sonar-band-low-hz" data-i18n="sonar_band_low_hz"></label><input id="sonar-band-low-hz" type="number" min="0" max="299.5" step="0.5" inputmode="decimal" autocomplete="off" required><label for="sonar-band-high-hz" data-i18n="sonar_band_high_hz"></label><input id="sonar-band-high-hz" type="number" min="0.5" max="300" step="0.5" inputmode="decimal" autocomplete="off" required><button id="sonar-band-edges-submit" type="submit" data-i18n="apply"></button></form><form id="sonar-operator-notch-form" class="control-form"><label for="sonar-operator-notch" data-i18n="sonar_operator_notch"></label><input id="sonar-operator-notch" type="number" min="0.5" max="300" step="0.5" inputmode="decimal" autocomplete="off" required><button id="sonar-operator-notch-submit" type="submit" data-i18n="apply"></button><button id="sonar-operator-notch-clear" type="button" data-i18n="sonar_clear_notch"></button></form><label class="toggle"><input id="sonar-vernier" type="checkbox"><span data-i18n="sonar_vernier"></span></label><button id="sonaLine truncated
|
||||
<section id="station-sonar" class="station-section" data-station-role="sonar" aria-labelledby="station-sonar-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-sonar-title" data-i18n="station_sonar"></h2></div><div class="station-grid"><article class="station-card-view"><h3 data-i18n="station_settings"></h3><dl id="sonar-settings" class="detail-metrics"></dl></article><article class="station-card-view station-controls station-wide"><h3 data-i18n="sonar_controls"></h3><label for="sonar-control-page" data-i18n="sonar_control_page"></label><select id="sonar-control-page"><option value="listen" data-i18n="sonar_page_listen"></option><option value="array" data-i18n="sonar_page_array"></option><option value="analysis" data-i18n="sonar_page_analysis"></option></select><div class="control-page" data-sonar-page="listen"><form id="sonar-bearing-form" class="control-form"><label for="sonar-bearing" data-i18n="sonar_listen_bearing"></label><input id="sonar-bearing" type="number" min="0" max="359.99999999999994" step="any" inputmode="decimal" autocomplete="off" required><button id="sonar-bearing-submit" type="submit" data-i18n="sonar_set_bearing"></button></form><button id="sonar-clear-focus" type="button" data-i18n="sonar_clear_focus"></button><button id="sonar-ping" type="button" data-i18n="sonar_ping"></button></div><div class="control-page" data-sonar-page="array" hidden><label for="sonar-array-mode" data-i18n="sonar_array_mode"></label><select id="sonar-array-mode"><option value="BOW" data-i18n="sonar_bow"></option><option value="TOWED" data-i18n="sonar_towed"></option></select><button id="sonar-array-apply" type="button" data-i18n="apply"></button><button id="sonar-tas" type="button"></button><form id="sonar-depth-form" class="control-form"><label for="sonar-depth" data-i18n="sonar_tow_depth"></label><input id="sonar-depth" type="number" min="20" max="260" step="any" inputmode="decimal" autocomplete="off" required><button id="sonar-depth-submit" type="submit" data-i18n="sonar_set_depth"></button></form><button id="sonar-bt" type="button" data-i18n="sonar_bt"></button></div><div class="control-page" data-sonar-page="analysis" hidden><label class="toggle"><input id="sonar-tma" type="checkbox"><span data-i18n="sonar_tma"></span></label><label class="toggle"><input id="sonar-notch" type="checkbox"><span data-i18n="sonar_notch"></span></label><label class="toggle"><input id="sonar-peak" type="checkbox"><span data-i18n="sonar_peak_hold"></span></label><form id="sonar-gain-form" class="control-form"><label for="sonar-gain" data-i18n="sonar_gain"></label><input id="sonar-gain" type="number" min="-12" max="24" step="any" inputmode="decimal" autocomplete="off" required><button id="sonar-gain-submit" type="submit" data-i18n="apply"></button></form><label for="sonar-band" data-i18n="sonar_band"></label><select id="sonar-band"><option value="FULL">FULL</option><option value="LOW">LOW</option><option value="SHAFT">SHAFT</option><option value="MID">MID</option></select><button id="sonar-band-apply" type="button" data-i18n="apply"></button><form id="sonar-harmonic-form" class="control-form"><label for="sonar-harmonic-input" data-i18n="sonar_harmonic_frequency"></label><input id="sonar-harmonic-input" type="number" min="0.000001" max="300" step="any" inputmode="decimal" autocomplete="off" list="sonar-harmonic-candidates"><datalist id="sonar-harmonic-candidates"></datalist><button id="sonar-harmonic-submit" type="submit" data-i18n="sonar_set_harmonic"></button><button id="sonar-harmonic-clear" type="button" data-i18n="sonar_clear_harmonic"></button></form><label for="sonar-integration" data-i18n="sonar_integration"></label><select id="sonar-integration"><option value="2">2 s (FFT)</option><option value="8">8 s</option><option value="16">16 s</option><option value="64">64 s</option></select><form id="sonar-band-edges-form" class="control-form"><label for="sonar-band-low-hz" data-i18n="sonar_band_low_hz"></label><input id="sonar-band-low-hz" type="number" min="0" max="299.5" step="0.5" inputmode="decimal" autocomplete="off" required><label for="sonar-band-high-hz" data-i18n="sonar_band_high_hz"></label><input id="sonar-band-high-hz" type="number" min="0.5" max="300" step="0.5" inputmode="decimal" autocomplete="off" required><button id="sonar-band-edges-submit" type="submit" data-i18n="apply"></button></form><form id="sonar-operator-notch-form" class="control-form"><label for="sonar-operator-notch" data-i18n="sonar_operator_notch"></label><input id="sonar-operator-notch" type="number" min="0.5" max="300" step="0.5" inputmode="decimal" autocomplete="off" required><button id="sonar-operator-notch-submit" type="submit" data-i18n="apply"></button><button id="sonar-operator-notch-clear" type="button" data-i18n="sonar_clear_notch"></button></form><label for="sonar-demon-band" data-i18n="sonar_demon_band"></label><select id="sonar-demon-band"><option value="200-800">200-80Line truncated
|
||||
<section id="station-weapons" class="station-section" data-station-role="weapons" aria-labelledby="station-weapons-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-weapons-title" data-i18n="station_weapons"></h2></div><div class="station-grid"><article class="station-card-view card-readout"><h3 data-i18n="inventory"></h3><dl id="weapons-inventory" class="detail-metrics"></dl></article><article class="station-card-view card-readout"><h3 data-i18n="station_readiness"></h3><dl id="weapons-readiness" class="detail-metrics"></dl></article><article class="station-card-view card-readout"><h3 data-i18n="weapons_tubes"></h3><div id="weapons-tubes" class="station-list compact-list"></div></article><article class="station-card-view card-readout"><h3 data-i18n="station_designated_target"></h3><div id="weapons-target" class="station-list"></div></article><article class="station-card-view station-wide direct-fire-controls" aria-labelledby="weapons-fire-title"><h3 id="weapons-fire-title" data-i18n="weapons_fire_control"></h3><div class="fire-grid"><label for="weapons-fire-target" data-i18n="fire_target"></label><select id="weapons-fire-target"></select><label for="weapons-fire-depth" data-i18n="fire_depth"></label><input id="weapons-fire-depth" type="number" min="10" max="300" step="any" inputmode="decimal" autocomplete="off"><button id="weapons-fire-torpedo" type="button" data-fire-action="weapons_launch_torpedo" data-i18n="weapons_launch_torpedo"></button><button id="weapons-fire-helicopter" type="button" data-fire-action="helicopter_launch_torpedo" data-i18n="helicopter_launch_torpedo"></button><button id="weapons-fire-nixie" type="button" data-fire-action="weapons_deploy_nixie" data-i18n="weapons_deploy_nixie"></button></div><p id="weapons-fire-status" class="fire-status" role="status" aria-live="polite"></p></article><article class="station-card-view station-wide card-readout"><h3 data-i18n="station_own_weapons"></h3><div id="weapons-own" class="station-list"></div></article></div></section>
|
||||
<section id="station-damage" class="station-section" data-station-role="damage" aria-labelledby="station-damage-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-damage-title" data-i18n="station_damage"></h2></div><div class="station-grid"><article class="station-card-view"><h3 data-i18n="station_damage_summary"></h3><dl id="damage-summary" class="detail-metrics"></dl></article><article class="station-card-view"><h3 data-i18n="station_damage_teams"></h3><div id="damage-teams" class="station-list"></div></article><article class="station-card-view station-wide"><h3 data-i18n="station_compartments"></h3><div id="damage-compartments" class="station-list"></div></article></div></section>
|
||||
<section id="station-opz" class="station-section" data-station-role="opz" aria-labelledby="station-opz-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-opz-title" data-i18n="station_opz"></h2></div><div class="station-grid"><article class="station-card-view card-readout"><h3 data-i18n="station_radar"></h3><dl id="opz-radar-summary" class="detail-metrics"></dl></article><article class="station-card-view card-readout"><h3 data-i18n="opz_asm_defense"></h3><dl id="opz-defense" class="detail-metrics"></dl></article><article class="station-card-view station-wide direct-fire-controls" aria-labelledby="opz-fire-title"><h3 id="opz-fire-title" data-i18n="opz_asm_engagement"></h3><div class="fire-grid"><label for="opz-fire-target" data-i18n="fire_target"></label><select id="opz-fire-target"></select><button id="opz-fire-essm" type="button" data-fire-action="opz_launch_essm" data-i18n="opz_launch_essm"></button><button id="opz-fire-chaff" type="button" data-fire-action="opz_launch_chaff" data-i18n="opz_launch_chaff"></button></div><p id="opz-fire-status" class="fire-status" role="status" aria-live="polite"></p></article><article class="station-card-view card-readout"><h3 data-i18n="station_own_assets"></h3><div id="opz-assets" class="station-list"></div></article><article class="station-card-view card-readout"><h3 data-i18n="station_source_classifications"></h3><div id="opz-classifications" class="station-list"></div></article><article class="station-card-view card-readout"><h3 data-i18n="station_fusions"></h3><div id="opz-fusions" class="station-list"></div></article><article class="station-card-view station-wide card-readout"><h3 data-i18n="station_observations"></h3><div id="opz-observations" class="station-list"></div></article></div></section>
|
||||
@@ -236,7 +236,7 @@
|
||||
<header class="analyzer-header"><div><p class="eyebrow" data-i18n="analyzer_eyebrow"></p><h1 data-i18n="analyzer_title"></h1><p class="panel-help" data-i18n="analyzer_note"></p></div><span id="analysis-count" class="counter"></span></header>
|
||||
<div class="analyzer-workspace">
|
||||
<section class="panel analyzer-browser"><div class="analyzer-filters"><label for="analysis-filter" data-i18n="analyzer_filter"></label><input id="analysis-filter" type="search" maxlength="96" autocomplete="off"><label for="analysis-category" data-i18n="analyzer_category"></label><select id="analysis-category"><option value="" data-i18n="analyzer_all"></option><option value="subs.json" data-i18n="analyzer_submarines"></option><option value="warships.json" data-i18n="analyzer_warships"></option><option value="civilians.json" data-i18n="analyzer_civilians"></option><option value="aircraft.json" data-i18n="analyzer_aircraft"></option><option value="animals.json" data-i18n="analyzer_animals"></option><option value="torpedoes.json" data-i18n="analyzer_torpedoes"></option><option value="decoys.json" data-i18n="analyzer_decoys"></option></select></div><div id="analysis-list" class="analysis-list" data-i18n-aria="analyzer_results"></div></section>
|
||||
<section class="panel analyzer-detail"><p id="analysis-status" class="empty" role="status" aria-live="polite"></p><article id="analysis-profile" hidden><div class="panel-heading"><div><p id="analysis-key" class="eyebrow"></p><h2 id="analysis-name"></h2></div><span id="analysis-resource" class="local-tag"></span></div><div class="analysis-legend"><p data-i18n="analyzer_spectrum_legend"></p><p data-i18n="analyzer_hypothesis_legend"></p><p data-i18n="analyzer_radar_spectrum_legend"></p><p data-i18n="analyzer_radar_prf_legend"></p></div><div id="analysis-images" class="analysis-images"></div><dl id="analysis-metrics" class="detail-metrics analyzer-metrics"></dl><section class="analysis-components"><h3 data-i18n="analyzer_systems"></h3><dl id="analysis-systems" class="detail-metrics"></dl><div class="analysis-component-groups"><section><h3 data-i18n="analyzer_sensors"></h3><div id="analysis-sensors" class="analysis-component-list"></div></section><section><h3 data-i18n="analyzer_emitters"></h3><div id="analysis-emitters" class="analysis-component-list"></div></section></div></section></article></section>
|
||||
<section class="panel analyzer-detail"><p id="analysis-status" class="empty" role="status" aria-live="polite"></p><article id="analysis-profile" hidden><div class="panel-heading"><div><p id="analysis-key" class="eyebrow"></p><h2 id="analysis-name"></h2></div><span id="analysis-resource" class="local-tag"></span></div><div class="analysis-assign"><button id="analysis-assign" type="button" data-i18n="analyzer_assign"></button><button id="analysis-assign-clear" type="button" data-i18n="analyzer_assign_clear"></button><output id="analysis-assign-status" aria-live="polite"></output></div><div class="analysis-legend"><p data-i18n="analyzer_spectrum_legend"></p><p data-i18n="analyzer_hypothesis_legend"></p><p data-i18n="analyzer_radar_spectrum_legend"></p><p data-i18n="analyzer_radar_prf_legend"></p></div><div id="analysis-images" class="analysis-images"></div><dl id="analysis-metrics" class="detail-metrics analyzer-metrics"></dl><section class="analysis-components"><h3 data-i18n="analyzer_systems"></h3><dl id="analysis-systems" class="detail-metrics"></dl><div class="analysis-component-groups"><section><h3 data-i18n="analyzer_sensors"></h3><div id="analysis-sensors" class="analysis-component-list"></div></section><section><h3 data-i18n="analyzer_emitters"></h3><div id="analysis-emitters" class="analysis-component-list"></div></section></div></section></article></section>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -519,6 +519,10 @@
|
||||
"commander.web.analyzer_error": "Der taktische Einheitenkatalog ist nicht verfuegbar oder ungueltig.",
|
||||
"commander.web.analyzer_no_results": "Keine Katalogprofile entsprechen diesem Filter.",
|
||||
"commander.web.analyzer_select": "Ein Katalogprofil auswaehlen, um seine Referenzdaten zu pruefen. Diese Auswahl bleibt von Operationen getrennt.",
|
||||
"commander.web.analyzer_assign": "Gew\u00e4hltem Sonarkontakt zuordnen",
|
||||
"commander.web.analyzer_assign_clear": "Zuordnung l\u00f6schen",
|
||||
"commander.web.analyzer_assign_target": "Zielkontakt: {contact}",
|
||||
"commander.web.catalog_profile": "Katalogprofil (Bediener)",
|
||||
"commander.web.analyzer_count": "{count} / {total} Profile",
|
||||
"commander.web.analyzer_hull": "Rumpftyp",
|
||||
"commander.web.analyzer_length": "Laenge",
|
||||
@@ -697,6 +701,10 @@
|
||||
"commander.web.sonar_page": "Seite",
|
||||
"commander.web.sonar_harmonic": "Harmonische",
|
||||
"commander.web.sonar_integration": "Integrationszeit",
|
||||
"commander.web.sonar_demon_band": "DEMON-Tr\u00e4gerband",
|
||||
"commander.web.sonar_heterodyne": "\u00dcberlagerungsversatz",
|
||||
"commander.web.sonar_tas_flip": "TAS: andere Seite zeigen",
|
||||
"commander.web.sonar_tas_confirm": "TAS: Seite best\u00e4tigen",
|
||||
"commander.web.sonar_band_low_hz": "Band untere Kante (Hz)",
|
||||
"commander.web.sonar_band_high_hz": "Band obere Kante (Hz)",
|
||||
"commander.web.sonar_operator_notch": "Bediener-Notch (Hz)",
|
||||
@@ -847,6 +855,8 @@
|
||||
"commander.web.engine_flood_trend": "Flutungstrend",
|
||||
"commander.web.engine_fire_trend": "Brandtrend",
|
||||
"commander.web.autocrew_status": "Autocrew: {status}",
|
||||
"commander.web.autocrew_overview": "Crew-Automatik: {stations}",
|
||||
"commander.web.autocrew_overview_none": "Crew-Automatik: an allen Stationen aus",
|
||||
"commander.web.autocrew_off": "aus",
|
||||
"commander.web.autocrew_active": "aktiv",
|
||||
"commander.web.autocrew_suspended_remote": "durch Remote Crew pausiert",
|
||||
@@ -1215,6 +1225,11 @@
|
||||
"analyzer.prf_band": "PRF-Band (Hz)",
|
||||
"analyzer.modulation": "Modulation",
|
||||
"analyzer.exit_hint": "Esc: schliessen",
|
||||
"analyzer.assign.hint": "Enter: {contact} zuordnen | Umschalt+Enter: l\u00f6schen | aktuell: {current}",
|
||||
"analyzer.assign.hint.short": "Enter {contact} | Umschalt+Enter l\u00f6schen | {current}",
|
||||
"analyzer.assign.done": "Zugeordnet.",
|
||||
"analyzer.assign.cleared": "Zuordnung gel\u00f6scht.",
|
||||
"analyzer.assign.failed": "Kontakt nicht mehr gehalten.",
|
||||
"analyzer.filter": "Zum Filtern tippen...",
|
||||
"analyzer.filter_hint": "Tippen/Backspace: Filter",
|
||||
"analyzer.high_lines": "Tonlinien Schnellfahrt",
|
||||
@@ -1864,6 +1879,9 @@
|
||||
"help.control.sonar_integration": "Integrationszeit 2 (FFT)/8/16/64 s",
|
||||
"help.control.sonar_vernier": "LOFAR-Nonius: 20 Hz in nativen 0,5 Hz",
|
||||
"help.control.sonar_operator_notch": "Notch auf der Cursorfrequenz",
|
||||
"help.control.sonar_demon_band": "DEMON-Tr\u00e4gerband 200-800 / 400-1400 / 1000-2000 Hz",
|
||||
"help.control.sonar_heterodyne": "\u00dcberlagerungsversatz 400/700/1000/1200 Hz",
|
||||
"help.control.tas_side": "Breitband/Fusion: TAS-Seite des gew\u00e4hlten Kontakts wechseln / Umschalt: best\u00e4tigen",
|
||||
"help.control.tma_course": "TMA-Seite: Hypothesenkurs -/+ 5 Grad (Umschalt 1 Grad)",
|
||||
"help.control.tma_speed": "TMA-Seite: Hypothesenfahrt -/+ 1 kn",
|
||||
"help.control.tma_range": "TMA-Seite: Hypothesenentfernung -/+ 1 sm (Strg 0,2 sm)",
|
||||
@@ -2932,6 +2950,11 @@
|
||||
"runtime.vernier.on": "LOFAR-Nonius an (20 Hz in 0,5 Hz)",
|
||||
"runtime.vernier.off": "LOFAR-Nonius aus",
|
||||
"runtime.integration": "Integrationszeit {seconds} s",
|
||||
"runtime.demon_band": "DEMON-Tr\u00e4gerband {low}-{high} Hz",
|
||||
"runtime.heterodyne": "\u00dcberlagerungsversatz {frequency} Hz",
|
||||
"runtime.tas_side.flipped": "{contact}: TAS-Seite {side} angezeigt",
|
||||
"runtime.tas_side.confirmed": "{contact}: TAS-Seite {side} best\u00e4tigt",
|
||||
"runtime.tas_side.not_ambiguous": "Gew\u00e4hlter Kontakt ist nicht TAS-mehrdeutig",
|
||||
"runtime.operator_notch.on": "Bediener-Notch bei {frequency} Hz",
|
||||
"runtime.operator_notch.off": "Bediener-Notch aus",
|
||||
"runtime.tma.no_contact": "TMA: zuerst einen Kontakt w\u00e4hlen",
|
||||
@@ -2941,6 +2964,8 @@
|
||||
"runtime.tma.poor_fit": "TMA: Residuen zeigen einen Trend - Kurs, Fahrt oder Entfernung anpassen",
|
||||
"runtime.tma.unobservable": "TMA: kein Eigenschiff-Man\u00f6ver im Track - Entfernung nicht beobachtbar",
|
||||
"runtime.tma.not_ready": "TMA: zu wenige Peilungen",
|
||||
"runtime.profile.assigned": "{contact} dem Katalogprofil {profile} zugeordnet",
|
||||
"runtime.profile.cleared": "{contact}: Katalogzuordnung gel\u00f6scht",
|
||||
"runtime.listen.volume": "Kopfhoerer: {volume}",
|
||||
"runtime.listen.manual": "Hoerpeilung: MANUELL",
|
||||
"runtime.telegraph": "Telegraph: {order}",
|
||||
@@ -3430,6 +3455,8 @@
|
||||
"sonar.pulse.lfm": "LFM (100-Hz-Sweep, feine Entfernung)",
|
||||
"help.control.pulse": "Aktivpuls CW / LFM",
|
||||
"enum.fusion.ambiguous": "TAS links/rechts mehrdeutig",
|
||||
"enum.fusion.ambiguous_turned": "TAS L/R? Wende gefahren - Spuren vergleichen",
|
||||
"enum.fusion.ambiguous_turned.short": "TAS L/R? nach Wende",
|
||||
"sonar.line.tas_mirror": "TAS-Spiegelpeilung {mirror} - 20 Grad drehen zum Auflösen",
|
||||
"sonar.line.tonal": "Tonal (Doppler) {frequency} Hz",
|
||||
"sonar.line.tma_ellipse": "TMA 1-Sigma {major} x {minor} sm, Achse {orientation}",
|
||||
|
||||
@@ -519,6 +519,10 @@
|
||||
"commander.web.analyzer_error": "The tactical unit catalog is unavailable or invalid.",
|
||||
"commander.web.analyzer_no_results": "No catalog profiles match this filter.",
|
||||
"commander.web.analyzer_select": "Select a catalog profile to inspect its reference data. This selection remains separate from Operations.",
|
||||
"commander.web.analyzer_assign": "Assign to selected sonar contact",
|
||||
"commander.web.analyzer_assign_clear": "Clear assignment",
|
||||
"commander.web.analyzer_assign_target": "Target contact: {contact}",
|
||||
"commander.web.catalog_profile": "Catalog profile (operator)",
|
||||
"commander.web.analyzer_count": "{count} / {total} profiles",
|
||||
"commander.web.analyzer_hull": "Hull type",
|
||||
"commander.web.analyzer_length": "Length",
|
||||
@@ -697,6 +701,10 @@
|
||||
"commander.web.sonar_page": "Page",
|
||||
"commander.web.sonar_harmonic": "Harmonic",
|
||||
"commander.web.sonar_integration": "Integration time",
|
||||
"commander.web.sonar_demon_band": "DEMON carrier band",
|
||||
"commander.web.sonar_heterodyne": "Heterodyne shift",
|
||||
"commander.web.sonar_tas_flip": "TAS: show other side",
|
||||
"commander.web.sonar_tas_confirm": "TAS: confirm side",
|
||||
"commander.web.sonar_band_low_hz": "Band low edge (Hz)",
|
||||
"commander.web.sonar_band_high_hz": "Band high edge (Hz)",
|
||||
"commander.web.sonar_operator_notch": "Operator notch (Hz)",
|
||||
@@ -847,6 +855,8 @@
|
||||
"commander.web.engine_flood_trend": "Flood trend",
|
||||
"commander.web.engine_fire_trend": "Fire trend",
|
||||
"commander.web.autocrew_status": "Autocrew: {status}",
|
||||
"commander.web.autocrew_overview": "Crew automation: {stations}",
|
||||
"commander.web.autocrew_overview_none": "Crew automation: off at every station",
|
||||
"commander.web.autocrew_off": "off",
|
||||
"commander.web.autocrew_active": "active",
|
||||
"commander.web.autocrew_suspended_remote": "suspended by remote crew",
|
||||
@@ -1215,6 +1225,11 @@
|
||||
"analyzer.prf_band": "PRF band (Hz)",
|
||||
"analyzer.modulation": "Modulation",
|
||||
"analyzer.exit_hint": "Esc: close",
|
||||
"analyzer.assign.hint": "Enter: assign to {contact} | Shift+Enter: clear | current: {current}",
|
||||
"analyzer.assign.hint.short": "Enter {contact} | Shift+Enter clear | {current}",
|
||||
"analyzer.assign.done": "Assigned.",
|
||||
"analyzer.assign.cleared": "Assignment cleared.",
|
||||
"analyzer.assign.failed": "Contact no longer held.",
|
||||
"analyzer.filter": "Type to filter...",
|
||||
"analyzer.filter_hint": "Type/Backspace: filter",
|
||||
"analyzer.high_lines": "High-speed tonal lines",
|
||||
@@ -1864,6 +1879,9 @@
|
||||
"help.control.sonar_integration": "Integration time 2 (FFT)/8/16/64 s",
|
||||
"help.control.sonar_vernier": "LOFAR vernier: 20 Hz at native 0.5 Hz",
|
||||
"help.control.sonar_operator_notch": "Notch at the cursor frequency",
|
||||
"help.control.sonar_demon_band": "DEMON carrier band 200-800 / 400-1400 / 1000-2000 Hz",
|
||||
"help.control.sonar_heterodyne": "Heterodyne shift 400/700/1000/1200 Hz",
|
||||
"help.control.tas_side": "Broadband/fusion: TAS side of the selected contact flip / Shift: confirm",
|
||||
"help.control.tma_course": "TMA page: hypothesis course -/+ 5 deg (Shift 1 deg)",
|
||||
"help.control.tma_speed": "TMA page: hypothesis speed -/+ 1 kn",
|
||||
"help.control.tma_range": "TMA page: hypothesis range -/+ 1 NM (Ctrl 0.2 NM)",
|
||||
@@ -2932,6 +2950,11 @@
|
||||
"runtime.vernier.on": "LOFAR vernier on (20 Hz at 0.5 Hz)",
|
||||
"runtime.vernier.off": "LOFAR vernier off",
|
||||
"runtime.integration": "Integration time {seconds} s",
|
||||
"runtime.demon_band": "DEMON carrier band {low}-{high} Hz",
|
||||
"runtime.heterodyne": "Heterodyne shift {frequency} Hz",
|
||||
"runtime.tas_side.flipped": "{contact}: TAS side {side} shown",
|
||||
"runtime.tas_side.confirmed": "{contact}: TAS side {side} confirmed",
|
||||
"runtime.tas_side.not_ambiguous": "Selected contact has no TAS side ambiguity",
|
||||
"runtime.operator_notch.on": "Operator notch at {frequency} Hz",
|
||||
"runtime.operator_notch.off": "Operator notch off",
|
||||
"runtime.tma.no_contact": "TMA: select a contact first",
|
||||
@@ -2941,6 +2964,8 @@
|
||||
"runtime.tma.poor_fit": "TMA: residuals show a trend - adjust course, speed or range",
|
||||
"runtime.tma.unobservable": "TMA: no own-ship manoeuvre in the track - range is unobservable",
|
||||
"runtime.tma.not_ready": "TMA: too few bearings",
|
||||
"runtime.profile.assigned": "{contact} assigned to catalog profile {profile}",
|
||||
"runtime.profile.cleared": "{contact}: catalog assignment cleared",
|
||||
"runtime.listen.volume": "Headphones: {volume}",
|
||||
"runtime.listen.manual": "Listening bearing: MANUAL",
|
||||
"runtime.telegraph": "Telegraph: {order}",
|
||||
@@ -3430,6 +3455,8 @@
|
||||
"sonar.pulse.lfm": "LFM (100 Hz sweep, fine range)",
|
||||
"help.control.pulse": "Active pulse CW / LFM",
|
||||
"enum.fusion.ambiguous": "TAS left/right ambiguous",
|
||||
"enum.fusion.ambiguous_turned": "TAS L/R? turn made - compare traces",
|
||||
"enum.fusion.ambiguous_turned.short": "TAS L/R? after turn",
|
||||
"sonar.line.tas_mirror": "TAS mirror bearing {mirror} - turn 20 deg to resolve",
|
||||
"sonar.line.tonal": "Tonal (Doppler) {frequency} Hz",
|
||||
"sonar.line.tma_ellipse": "TMA 1-sigma {major} x {minor} NM, axis {orientation}",
|
||||
|
||||
@@ -114,7 +114,9 @@ Gefechtslage:
|
||||
- TAS unter die gemessene Schicht legen, um tiefe Ziele zu hören; das HMS für flache Ziele nutzen. Beide Arrays arbeiten parallel.
|
||||
- Die TMA-Seite zeigt die aus der übernommenen Lösung abgeleitete Annäherungsrate: positiv heißt, das Ziel kommt näher.
|
||||
- Weichen TAS und HMS um 9 Grad oder mehr ab, den Kontakt als möglichen Geist behandeln (die Anzeige markiert ihn) und durch eine Wende klären.
|
||||
- Die Schleppantenne ist eine Linie: sie kann eine Peilung nicht von ihrem Spiegelbild zum Kabel unterscheiden. Ein nur auf der TAS gehörter Kontakt wird als "TAS links/rechts mehrdeutig" mit Spiegelpeilung markiert und speist keine TMA; die angezeigte Seite stimmt nur in der Hälfte der Fälle. 20 Grad drehen (oder den Kontakt auf die HMS bekommen), dann fällt die falsche Seite weg. Peilungen zu den Kabelenden (Endfire) sind zudem ungenauer als querab.
|
||||
- Die Schleppantenne ist eine Linie: sie kann eine Peilung nicht von ihrem Spiegelbild zum Kabel unterscheiden. Ein nur auf der TAS gehörter Kontakt wird als "TAS links/rechts mehrdeutig" mit Spiegelpeilung markiert und speist keine TMA; die Anzeige zeigt die von Ihnen gewählte Seite (Standard Steuerbord). 20 Grad drehen und beide Spuren beobachten: die echte bleibt stetig, die Geisterspur springt (der Status lautet dann "Wende gefahren - Spuren vergleichen"). Auf der Breitband- oder Fusionsseite zeigt `X` die andere Seite, `Umschalt+X` bestätigt die angezeigte; nichts wird für Sie entschieden. Eine falsch bestätigte Seite bleibt gespiegelt (die TMA-Residuen zeigen es; `X` öffnet die Wahl wieder). Eine Peilung des Rumpfsonars löst die Seite durch Messung auf. Peilungen zu den Kabelenden (Endfire) sind zudem ungenauer als querab.
|
||||
- `Umschalt+F` wählt das DEMON-Trägerband (200-800, 400-1400 oder 1000-2000 Hz): das Band suchen, in dem das Kavitationsrauschen am stärksten ist. `Strg+F` stellt den Überlagerungsversatz (400/700/1000/1200 Hz) zum Abhören tiefer Töne ein.
|
||||
- Im Kontaktanalysator (`F8`) ordnet `Enter` bei gewähltem Kontakt das angezeigte Katalogprofil diesem Kontakt zu, `Umschalt+Enter` löscht die Zuordnung. Die Zuordnung ist Ihr Vermerk: sie erscheint in der Kontaktliste, wird gespeichert und ändert nie die Klassifizierung oder die Waffensperren des Kontakts.
|
||||
- Ein Kontakt geht 120 s nach der letzten Ortung verloren. Schwache Kontakte weiter verfolgen oder per Ping wieder erfassen.
|
||||
- Wracks liefern echte Echos ohne Doppler. Ein U-Boot, das still neben einem kartierten Wrack auf Grund liegt, versteckt sich vor einem CW-Ping in dessen Echo (750 m Entfernungszelle); ein LFM-Ping löst etwa 8 m auf und kann Boot und Wrack trennen. Jedes Wrack, das der Gegner erreichen konnte, ist verdächtig.
|
||||
- Der Bathythermograph (`E`) misst bis zum Grund, höchstens 1500 m. Erst nach einer Messung zeigt die Wetter- & Sonar-Analyse (`0`) die Schicht, die Schattenzone darunter und einen SOFAR-Kanal.
|
||||
|
||||
@@ -113,7 +113,9 @@ Combat situation:
|
||||
- Put the TAS below the measured layer to hear deep targets; keep the HMS for shallow ones. Both arrays run in parallel.
|
||||
- The TMA page shows the closing rate derived from the accepted solution: positive means the target is closing.
|
||||
- If the TAS and HMS disagree by 9 degrees or more, treat the contact as a possible ghost (the display flags it) and turn to resolve it.
|
||||
- The towed array is a line: it cannot tell a bearing from its mirror about the cable. A contact heard only on the TAS is marked "TAS left/right ambiguous" with its mirror bearing and does not feed TMA; the shown side is right only half the time. Turn 20 degrees (or get the contact on the HMS) and the wrong side drops out. Bearings toward the cable ends (endfire) are also less accurate than broadside.
|
||||
- The towed array is a line: it cannot tell a bearing from its mirror about the cable. A contact heard only on the TAS is marked "TAS left/right ambiguous" with its mirror bearing and does not feed TMA; the display shows the side you choose (starboard by default). Turn 20 degrees and watch both traces: the true one stays continuous, the ghost jumps (the status then reads "turn made - compare traces"). On the broadband or fusion page `X` shows the other side and `Shift+X` confirms the shown side; nothing is resolved for you. A wrongly confirmed side stays mirrored (the TMA residuals will show it; `X` reopens the choice). A hull-sonar bearing resolves the side by measurement. Bearings toward the cable ends (endfire) are also less accurate than broadside.
|
||||
- `Shift+F` selects the DEMON carrier band (200-800, 400-1400 or 1000-2000 Hz): search the band where the cavitation noise is strongest. `Ctrl+F` sets the heterodyne shift (400/700/1000/1200 Hz) for listening to low tonals.
|
||||
- In the contact analyser (`F8`) with a contact selected, `Enter` assigns the browsed catalog profile to that contact and `Shift+Enter` clears it. The assignment is your annotation: it is shown in the contact list and saved, and it never changes the contact's classification or weapon interlocks.
|
||||
- A contact is lost 120 s after its last detection. Keep tracking weak contacts, or reacquire with a ping.
|
||||
- Wrecks return real echoes without Doppler. A submarine lying still beside a charted wreck hides in that echo from a CW ping (750 m range cell); an LFM ping resolves about 8 m and can separate the boat from the wreck. Suspect every wreck the enemy could have reached.
|
||||
- The bathythermograph (`E`) measures to the seabed, at most 1500 m. Only after a measurement does the weather & sonar analysis (`0`) show the layer, the shadow zone below it and a SOFAR channel.
|
||||
|
||||
@@ -336,6 +336,9 @@ Die Anzeige zeigt gemessene Modulation, keine Identität. Nach einer Peilungsän
|
||||
| `Q` | Integrationszeit 2 (FFT)/8/16/64 s |
|
||||
| `Shift+Q` | LOFAR-Nonius: 20 Hz in nativen 0,5 Hz |
|
||||
| `Shift+N` | Notch auf der Cursorfrequenz |
|
||||
| `Shift+F` | DEMON-Trägerband 200-800 / 400-1400 / 1000-2000 Hz |
|
||||
| `Ctrl+F` | Überlagerungsversatz 400/700/1000/1200 Hz |
|
||||
| `X / Shift+X (BB)` | Breitband/Fusion: TAS-Seite des gewählten Kontakts wechseln / Umschalt: bestätigen |
|
||||
| `Z / X (TMA)` | TMA-Seite: Hypothesenkurs -/+ 5 Grad (Umschalt 1 Grad) |
|
||||
| `Ctrl+Z / Ctrl+X (TMA)` | TMA-Seite: Hypothesenfahrt -/+ 1 kn |
|
||||
| `Q / Shift+Q (TMA)` | TMA-Seite: Hypothesenentfernung -/+ 1 sm (Strg 0,2 sm) |
|
||||
@@ -368,7 +371,9 @@ Gefechtslage:
|
||||
- TAS unter die gemessene Schicht legen, um tiefe Ziele zu hören; das HMS für flache Ziele nutzen. Beide Arrays arbeiten parallel.
|
||||
- Die TMA-Seite zeigt die aus der übernommenen Lösung abgeleitete Annäherungsrate: positiv heißt, das Ziel kommt näher.
|
||||
- Weichen TAS und HMS um 9 Grad oder mehr ab, den Kontakt als möglichen Geist behandeln (die Anzeige markiert ihn) und durch eine Wende klären.
|
||||
- Die Schleppantenne ist eine Linie: sie kann eine Peilung nicht von ihrem Spiegelbild zum Kabel unterscheiden. Ein nur auf der TAS gehörter Kontakt wird als "TAS links/rechts mehrdeutig" mit Spiegelpeilung markiert und speist keine TMA; die angezeigte Seite stimmt nur in der Hälfte der Fälle. 20 Grad drehen (oder den Kontakt auf die HMS bekommen), dann fällt die falsche Seite weg. Peilungen zu den Kabelenden (Endfire) sind zudem ungenauer als querab.
|
||||
- Die Schleppantenne ist eine Linie: sie kann eine Peilung nicht von ihrem Spiegelbild zum Kabel unterscheiden. Ein nur auf der TAS gehörter Kontakt wird als "TAS links/rechts mehrdeutig" mit Spiegelpeilung markiert und speist keine TMA; die Anzeige zeigt die von Ihnen gewählte Seite (Standard Steuerbord). 20 Grad drehen und beide Spuren beobachten: die echte bleibt stetig, die Geisterspur springt (der Status lautet dann "Wende gefahren - Spuren vergleichen"). Auf der Breitband- oder Fusionsseite zeigt `X` die andere Seite, `Umschalt+X` bestätigt die angezeigte; nichts wird für Sie entschieden. Eine falsch bestätigte Seite bleibt gespiegelt (die TMA-Residuen zeigen es; `X` öffnet die Wahl wieder). Eine Peilung des Rumpfsonars löst die Seite durch Messung auf. Peilungen zu den Kabelenden (Endfire) sind zudem ungenauer als querab.
|
||||
- `Umschalt+F` wählt das DEMON-Trägerband (200-800, 400-1400 oder 1000-2000 Hz): das Band suchen, in dem das Kavitationsrauschen am stärksten ist. `Strg+F` stellt den Überlagerungsversatz (400/700/1000/1200 Hz) zum Abhören tiefer Töne ein.
|
||||
- Im Kontaktanalysator (`F8`) ordnet `Enter` bei gewähltem Kontakt das angezeigte Katalogprofil diesem Kontakt zu, `Umschalt+Enter` löscht die Zuordnung. Die Zuordnung ist Ihr Vermerk: sie erscheint in der Kontaktliste, wird gespeichert und ändert nie die Klassifizierung oder die Waffensperren des Kontakts.
|
||||
- Ein Kontakt geht 120 s nach der letzten Ortung verloren. Schwache Kontakte weiter verfolgen oder per Ping wieder erfassen.
|
||||
- Wracks liefern echte Echos ohne Doppler. Ein U-Boot, das still neben einem kartierten Wrack auf Grund liegt, versteckt sich vor einem CW-Ping in dessen Echo (750 m Entfernungszelle); ein LFM-Ping löst etwa 8 m auf und kann Boot und Wrack trennen. Jedes Wrack, das der Gegner erreichen konnte, ist verdächtig.
|
||||
- Der Bathythermograph (`E`) misst bis zum Grund, höchstens 1500 m. Erst nach einer Messung zeigt die Wetter- & Sonar-Analyse (`0`) die Schicht, die Schattenzone darunter und einen SOFAR-Kanal.
|
||||
|
||||
@@ -335,6 +335,9 @@ The display shows measured modulation, not identity. After changing the bearing
|
||||
| `Q` | Integration time 2 (FFT)/8/16/64 s |
|
||||
| `Shift+Q` | LOFAR vernier: 20 Hz at native 0.5 Hz |
|
||||
| `Shift+N` | Notch at the cursor frequency |
|
||||
| `Shift+F` | DEMON carrier band 200-800 / 400-1400 / 1000-2000 Hz |
|
||||
| `Ctrl+F` | Heterodyne shift 400/700/1000/1200 Hz |
|
||||
| `X / Shift+X (BB)` | Broadband/fusion: TAS side of the selected contact flip / Shift: confirm |
|
||||
| `Z / X (TMA)` | TMA page: hypothesis course -/+ 5 deg (Shift 1 deg) |
|
||||
| `Ctrl+Z / Ctrl+X (TMA)` | TMA page: hypothesis speed -/+ 1 kn |
|
||||
| `Q / Shift+Q (TMA)` | TMA page: hypothesis range -/+ 1 NM (Ctrl 0.2 NM) |
|
||||
@@ -367,7 +370,9 @@ Combat situation:
|
||||
- Put the TAS below the measured layer to hear deep targets; keep the HMS for shallow ones. Both arrays run in parallel.
|
||||
- The TMA page shows the closing rate derived from the accepted solution: positive means the target is closing.
|
||||
- If the TAS and HMS disagree by 9 degrees or more, treat the contact as a possible ghost (the display flags it) and turn to resolve it.
|
||||
- The towed array is a line: it cannot tell a bearing from its mirror about the cable. A contact heard only on the TAS is marked "TAS left/right ambiguous" with its mirror bearing and does not feed TMA; the shown side is right only half the time. Turn 20 degrees (or get the contact on the HMS) and the wrong side drops out. Bearings toward the cable ends (endfire) are also less accurate than broadside.
|
||||
- The towed array is a line: it cannot tell a bearing from its mirror about the cable. A contact heard only on the TAS is marked "TAS left/right ambiguous" with its mirror bearing and does not feed TMA; the display shows the side you choose (starboard by default). Turn 20 degrees and watch both traces: the true one stays continuous, the ghost jumps (the status then reads "turn made - compare traces"). On the broadband or fusion page `X` shows the other side and `Shift+X` confirms the shown side; nothing is resolved for you. A wrongly confirmed side stays mirrored (the TMA residuals will show it; `X` reopens the choice). A hull-sonar bearing resolves the side by measurement. Bearings toward the cable ends (endfire) are also less accurate than broadside.
|
||||
- `Shift+F` selects the DEMON carrier band (200-800, 400-1400 or 1000-2000 Hz): search the band where the cavitation noise is strongest. `Ctrl+F` sets the heterodyne shift (400/700/1000/1200 Hz) for listening to low tonals.
|
||||
- In the contact analyser (`F8`) with a contact selected, `Enter` assigns the browsed catalog profile to that contact and `Shift+Enter` clears it. The assignment is your annotation: it is shown in the contact list and saved, and it never changes the contact's classification or weapon interlocks.
|
||||
- A contact is lost 120 s after its last detection. Keep tracking weak contacts, or reacquire with a ping.
|
||||
- Wrecks return real echoes without Doppler. A submarine lying still beside a charted wreck hides in that echo from a CW ping (750 m range cell); an LFM ping resolves about 8 m and can separate the boat from the wreck. Suspect every wreck the enemy could have reached.
|
||||
- The bathythermograph (`E`) measures to the seabed, at most 1500 m. Only after a measurement does the weather & sonar analysis (`0`) show the layer, the shadow zone below it and a SOFAR channel.
|
||||
|
||||
@@ -124,6 +124,8 @@ class AcousticReceiver:
|
||||
self.seed = int(_finite(seed, 42)) % (2**64)
|
||||
self.sequence = -1
|
||||
self._history = np.zeros(2 * self.sample_rate, dtype=np.float32)
|
||||
# Carrier band the DEMON envelope is taken from (operator choice).
|
||||
self.demon_band_hz = (400.0, 1400.0)
|
||||
self._time = np.arange(1024) / self.sample_rate
|
||||
self._angles = np.arange(180) * 2.0
|
||||
self._frequencies = np.fft.rfftfreq(self._history.size, 1 / self.sample_rate)
|
||||
@@ -534,7 +536,7 @@ class AcousticReceiver:
|
||||
break
|
||||
|
||||
# A low-frequency tone alone must not be mistaken for modulation.
|
||||
envelope = analytic_envelope(data, self.sample_rate, 400.0, 1400.0)
|
||||
envelope = analytic_envelope(data, self.sample_rate, *self.demon_band_hz)
|
||||
carrier_rms = float(np.sqrt(np.mean(envelope**2) / 2))
|
||||
envelope_mean = float(envelope.mean())
|
||||
modulation = np.abs(np.fft.rfft((envelope - envelope_mean) * window,
|
||||
|
||||
@@ -342,6 +342,26 @@ def _sonar_set_operator_notch(game, params, _bindings):
|
||||
return game.set_sonar_operator_notch(params["frequency_hz"])
|
||||
|
||||
|
||||
def _sonar_tas_side(game, params, bindings):
|
||||
contact = _sonar_contact(bindings, params["ref"])
|
||||
return ("unknown_ref" if contact is None
|
||||
else game.set_tas_side(contact, params["action"]))
|
||||
|
||||
|
||||
def _sonar_set_demon_band(game, params, _bindings):
|
||||
return game.set_sonar_demon_band(float(params["low_hz"]), float(params["high_hz"]))
|
||||
|
||||
|
||||
def _sonar_set_heterodyne(game, params, _bindings):
|
||||
return game.set_sonar_heterodyne(float(params["frequency_hz"]))
|
||||
|
||||
|
||||
def _sonar_assign_profile(game, params, bindings):
|
||||
contact = _sonar_contact(bindings, params["ref"])
|
||||
return ("unknown_ref" if contact is None else
|
||||
game.assign_contact_profile(contact, params["profile_key"]))
|
||||
|
||||
|
||||
def _sonar_tma_set(game, params, bindings):
|
||||
contact = _sonar_contact(bindings, params["ref"])
|
||||
return ("unknown_ref" if contact is None else game.set_tma_hypothesis(
|
||||
@@ -513,6 +533,10 @@ _V2_ACTION_HANDLERS = {
|
||||
"sonar_set_harmonic": _sonar_set_harmonic,
|
||||
"sonar_set_cursor": _sonar_set_cursor,
|
||||
"sonar_tma_set": _sonar_tma_set,
|
||||
"sonar_assign_profile": _sonar_assign_profile,
|
||||
"sonar_set_demon_band": _sonar_set_demon_band,
|
||||
"sonar_tas_side": _sonar_tas_side,
|
||||
"sonar_set_heterodyne": _sonar_set_heterodyne,
|
||||
"sonar_tma_accept": _sonar_tma_accept,
|
||||
"sonar_tma_copy_proposal": _sonar_tma_copy_proposal,
|
||||
"sonar_mark_line": _sonar_mark_line,
|
||||
@@ -856,6 +880,10 @@ class CommanderBridge:
|
||||
"FLG": "AIR", "ASM": "AIR"}.get(track.kind, "UNKNOWN"),
|
||||
source=str(source)[:64], affiliation=game.opz_affiliation(key),
|
||||
classification=getattr(track, "classification", None),
|
||||
profile=(game.profile_name(associated.player_profile)[:128]
|
||||
if associated is not None
|
||||
and getattr(associated, "player_profile", None)
|
||||
else None),
|
||||
bearing=_number(track.bearing),
|
||||
range_nm=None,
|
||||
x=_number(track.x) if positioned else None,
|
||||
|
||||
@@ -9,6 +9,7 @@ from copy import deepcopy
|
||||
import math
|
||||
|
||||
from src.core import config
|
||||
from src.core.autocrew import AUTOCREW_STATIONS
|
||||
from src.sonar import analysis_tools
|
||||
from src.core.i18n import localize
|
||||
from src.core.version import APP_VERSION
|
||||
@@ -71,7 +72,7 @@ _TACTICAL_FIELDS = ("ref", "label", "domain", "source", "affiliation",
|
||||
"altitude_m", "observer_x", "observer_y", "quality",
|
||||
"age_s", "bearing_uncertainty_deg", "range_uncertainty_nm",
|
||||
"visual_class", "visual_type")
|
||||
_SONAR_FIELDS = ("ref", "label", "source", "classification", "bearing",
|
||||
_SONAR_FIELDS = ("ref", "label", "source", "classification", "profile", "bearing",
|
||||
"range_nm", "x", "y", "depth_m", "course", "speed_kn",
|
||||
"quality", "age_s", "fix_age_s", "bearing_uncertainty_deg",
|
||||
"range_uncertainty_nm", "observer_x", "observer_y",
|
||||
@@ -473,7 +474,10 @@ def _sonar(game, rows, focus_ref, target_ref, sonar_refs):
|
||||
shaft_hz=_number(game.sonar_tools.shaft_hz),
|
||||
blade_hz=_number(game.sonar_tools.blade_hz),
|
||||
operator_notch_hz=_number(
|
||||
getattr(game.sonar, "operator_notch_hz", None))),
|
||||
getattr(game.sonar, "operator_notch_hz", None)),
|
||||
demon_band_hz=[_number(value) for value in
|
||||
game.sonar.receiver.demon_band_hz],
|
||||
heterodyne_hz=_number(game.sonar.heterodyne_hz)),
|
||||
audio_enabled=bool(game.sonar_audio_enabled),
|
||||
volume=_number(game.sonar_volume),
|
||||
quiet_mode=bool(game.ship.quiet_mode)),
|
||||
@@ -1006,6 +1010,9 @@ def build_role_states(game, status, rows, target_ref, focus_ref, ref_by_track,
|
||||
for role in ROLE_NAMES:
|
||||
state = deepcopy(common)
|
||||
state["role"] = role
|
||||
overview = [dict(station=key, enabled=bool(game.autocrew.enabled[key]),
|
||||
status=game.autocrew.status(game, key))
|
||||
for key in AUTOCREW_STATIONS]
|
||||
if role != "eloka":
|
||||
state["audio"]["events"] = [
|
||||
event for event in state["audio"]["events"]
|
||||
@@ -1013,6 +1020,9 @@ def build_role_states(game, status, rows, target_ref, focus_ref, ref_by_track,
|
||||
]
|
||||
state["autocrew"] = dict(enabled=bool(game.autocrew.enabled[role]),
|
||||
status=game.autocrew.status(game, role))
|
||||
# The whole crew's automation state (as the uConsole F3 overview):
|
||||
# own-crew configuration only, identical for every role.
|
||||
state["autocrew_overview"] = overview
|
||||
state[role] = operational[role]
|
||||
result[role] = state
|
||||
return result
|
||||
+26
-1
@@ -294,6 +294,25 @@ def _sonar_band_params(params):
|
||||
and 0.0 <= params["low_hz"] < params["high_hz"] <= 300.0)
|
||||
|
||||
|
||||
def _tas_side_params(params):
|
||||
return (type(params) is dict and set(params) == {"ref", "action"}
|
||||
and type(params["ref"]) is str and 0 < len(params["ref"]) <= 64
|
||||
and params["action"] in ("flip", "confirm"))
|
||||
|
||||
|
||||
def _demon_band_params(params):
|
||||
return (type(params) is dict and set(params) == {"low_hz", "high_hz"}
|
||||
and (params["low_hz"], params["high_hz"]) in ((200, 800), (400, 1400),
|
||||
(1000, 2000)))
|
||||
|
||||
|
||||
def _assign_profile_params(params):
|
||||
key = params.get("profile_key") if type(params) is dict else None
|
||||
return (type(params) is dict and set(params) == {"ref", "profile_key"}
|
||||
and type(params["ref"]) is str and 0 < len(params["ref"]) <= 64
|
||||
and (key is None or (type(key) is str and 0 < len(key) <= 64)))
|
||||
|
||||
|
||||
def _tma_hypothesis_params(params):
|
||||
return (type(params) is dict
|
||||
and set(params) == {"ref", "course", "speed_kn", "range_nm"}
|
||||
@@ -497,6 +516,11 @@ V2_ACTION_REGISTRY = {
|
||||
_bounded_number_params("frequency_hz", 0.000001, 300, nullable=True)),
|
||||
"sonar_designate_target": V2Action(frozenset({"sonar"}), _single_ref_params),
|
||||
"sonar_tma_set": V2Action(frozenset({"sonar"}), _tma_hypothesis_params),
|
||||
"sonar_assign_profile": V2Action(frozenset({"sonar"}), _assign_profile_params),
|
||||
"sonar_tas_side": V2Action(frozenset({"sonar"}), _tas_side_params),
|
||||
"sonar_set_demon_band": V2Action(frozenset({"sonar"}), _demon_band_params),
|
||||
"sonar_set_heterodyne": V2Action(frozenset({"sonar"}),
|
||||
_bounded_number_params("frequency_hz", 400, 1200)),
|
||||
"sonar_tma_accept": V2Action(frozenset({"sonar"}), _single_ref_params),
|
||||
"sonar_tma_copy_proposal": V2Action(frozenset({"sonar"}), _single_ref_params),
|
||||
"helicopter_launch": V2Action(frozenset({"helicopter"}), _no_params),
|
||||
@@ -1656,7 +1680,8 @@ class CommanderServer:
|
||||
status_fields = {"protocol", "version", "session", "epoch", "revision",
|
||||
"seq", "phase", "role", "chart_revision"}
|
||||
assigned_fields = status_fields | {"clock", "environment", "mission",
|
||||
"autocrew", "audio", "weather_station"}
|
||||
"autocrew", "autocrew_overview", "audio",
|
||||
"weather_station"}
|
||||
if (not isinstance(states, dict) or not isinstance(charts, dict)
|
||||
or set(states) != expected or set(charts) != expected):
|
||||
raise ValueError("invalid v2 publication")
|
||||
|
||||
+132
-4
@@ -2490,6 +2490,9 @@ class Game:
|
||||
if e.key == pygame.K_k:
|
||||
self._cycle_sonar_harmonic()
|
||||
return
|
||||
if e.key == pygame.K_x and self.sonar_page in (0, 4):
|
||||
self._tas_side_key(e)
|
||||
return
|
||||
if e.key in (pygame.K_z, pygame.K_x) and self.sonar_page in (1, 2):
|
||||
self._sonar_cursor_key(e)
|
||||
return
|
||||
@@ -2862,7 +2865,22 @@ class Game:
|
||||
self.flash(message("helo.source.buoy" if self.helo_sensor_source == "BUOY"
|
||||
else "helo.source.dip"))
|
||||
elif e.key == pygame.K_f:
|
||||
if self.station is Station.SONAR:
|
||||
if self.station is Station.SONAR and getattr(e, "mod", 0) & pygame.KMOD_SHIFT:
|
||||
bands = analysis_tools.DEMON_BANDS_HZ
|
||||
current = tuple(self.sonar.receiver.demon_band_hz)
|
||||
index = bands.index(current) if current in bands else -1
|
||||
low, high = bands[(index + 1) % len(bands)]
|
||||
self.set_sonar_demon_band(low, high)
|
||||
self.flash(message("runtime.demon_band", low=f"{low:.0f}",
|
||||
high=f"{high:.0f}"), 1.5)
|
||||
elif self.station is Station.SONAR and getattr(e, "mod", 0) & pygame.KMOD_CTRL:
|
||||
offsets = analysis_tools.HETERODYNE_OFFSETS_HZ
|
||||
current = self.sonar.heterodyne_hz
|
||||
index = offsets.index(current) if current in offsets else -1
|
||||
self.set_sonar_heterodyne(offsets[(index + 1) % len(offsets)])
|
||||
self.flash(message("runtime.heterodyne",
|
||||
frequency=f"{self.sonar.heterodyne_hz:.0f}"), 1.5)
|
||||
elif self.station is Station.SONAR:
|
||||
self._cycle_sonar_band()
|
||||
elif self.station is Station.ELOKA:
|
||||
self._cycle_eloka_filter(
|
||||
@@ -3386,6 +3404,60 @@ class Game:
|
||||
self.sonar.band_low_hz, self.sonar.band_high_hz = float(low_hz), float(high_hz)
|
||||
return True
|
||||
|
||||
def set_tas_side(self, contact, action: str):
|
||||
"""Operator decision on a towed-only contact's array side.
|
||||
|
||||
``flip`` shows the other side (and reopens a confirmed choice);
|
||||
``confirm`` commits the shown side. Nothing is decided automatically.
|
||||
"""
|
||||
if contact is None or contact.target_id not in self.sonar.contacts:
|
||||
return "stale_ref"
|
||||
if action not in ("flip", "confirm"):
|
||||
return "invalid_value"
|
||||
if self.damage.station_down("sonar"):
|
||||
return "sonar_down"
|
||||
if action == "flip":
|
||||
if not contact.towed_ambiguous:
|
||||
if not contact.towed_resolved:
|
||||
return "not_ambiguous"
|
||||
contact.towed_ambiguous, contact.towed_resolved = True, False
|
||||
contact.ambiguity_axis = self.sonar.tow_heading_deg
|
||||
contact.towed_side = "PORT" if contact.towed_side == "STBD" else "STBD"
|
||||
return True
|
||||
if not contact.towed_ambiguous:
|
||||
return "not_ambiguous"
|
||||
contact.towed_ambiguous, contact.towed_resolved = False, True
|
||||
contact.mirror_bearing = contact.ambiguity_axis = None
|
||||
return True
|
||||
|
||||
def _tas_side_key(self, e) -> None:
|
||||
contact = self.selected_contact
|
||||
action = "confirm" if getattr(e, "mod", 0) & pygame.KMOD_SHIFT else "flip"
|
||||
result = self.set_tas_side(contact, action)
|
||||
if result is True:
|
||||
self.flash(message("runtime.tas_side.confirmed" if action == "confirm"
|
||||
else "runtime.tas_side.flipped",
|
||||
contact=self.contact_display_id(contact),
|
||||
side=contact.towed_side), 1.5)
|
||||
else:
|
||||
self.flash(message("runtime.tas_side.not_ambiguous"), 1.5)
|
||||
|
||||
def set_sonar_demon_band(self, low_hz, high_hz):
|
||||
if (low_hz, high_hz) not in analysis_tools.DEMON_BANDS_HZ:
|
||||
return "invalid_value"
|
||||
if self.damage.station_down("sonar"):
|
||||
return "sonar_down"
|
||||
self.sonar.receiver.demon_band_hz = (float(low_hz), float(high_hz))
|
||||
return True
|
||||
|
||||
def set_sonar_heterodyne(self, frequency_hz):
|
||||
if frequency_hz not in analysis_tools.HETERODYNE_OFFSETS_HZ:
|
||||
return "invalid_value"
|
||||
if self.damage.station_down("sonar"):
|
||||
return "sonar_down"
|
||||
self.sonar.heterodyne_hz = float(frequency_hz)
|
||||
return True
|
||||
|
||||
def set_sonar_operator_notch(self, frequency_hz):
|
||||
if frequency_hz is not None and (
|
||||
type(frequency_hz) not in (int, float) or not math.isfinite(frequency_hz)
|
||||
@@ -6562,9 +6634,52 @@ class Game:
|
||||
preview_active=self.audio.preview_playing)
|
||||
|
||||
def _open_analyzer_in_game(self) -> None:
|
||||
"""TUA im laufenden Spiel: Simulation laeuft weiter, Esc kehrt ins Spiel zurueck."""
|
||||
"""TUA im laufenden Spiel: Simulation laeuft weiter, Esc kehrt ins Spiel zurueck.
|
||||
|
||||
With a sonar contact selected, Enter assigns the browsed profile to
|
||||
it (the operator's catalog comparison result)."""
|
||||
self._clear_controls()
|
||||
self.editor = self._make_analyzer()
|
||||
contact = self.selected_contact
|
||||
if contact is None or contact.target_id not in self.sonar.contacts:
|
||||
self.editor = self._make_analyzer()
|
||||
return
|
||||
analyzer = self._make_analyzer()
|
||||
analyzer.on_assign = lambda key: self.assign_contact_profile(contact, key)
|
||||
analyzer.assign_label = self.contact_display_id(contact)
|
||||
analyzer.current_assignment = lambda: self.profile_name(contact.player_profile)
|
||||
self.editor = analyzer
|
||||
|
||||
def profile_name(self, key):
|
||||
"""Display name of a catalog profile (as listed in the analyser)."""
|
||||
if key is None:
|
||||
return None
|
||||
names = self.__dict__.get("_profile_names")
|
||||
if names is None:
|
||||
from src.data.contact_analysis import project_contact_catalog
|
||||
names = {row["key"]: str(row["name"])
|
||||
for row in project_contact_catalog()["profiles"]}
|
||||
self._profile_names = names
|
||||
return names.get(key, key)
|
||||
|
||||
def assign_contact_profile(self, contact, profile_key):
|
||||
"""Operator annotation: this contact matches that catalog profile."""
|
||||
if contact is None or contact.target_id not in self.sonar.contacts:
|
||||
return "stale_ref"
|
||||
if profile_key is not None and (
|
||||
type(profile_key) is not str
|
||||
or profile_key not in self.runtime_catalog.profile_systems):
|
||||
return "invalid_value"
|
||||
contact.player_profile = profile_key
|
||||
if profile_key is None:
|
||||
notice = message("runtime.profile.cleared",
|
||||
contact=self.contact_display_id(contact))
|
||||
else:
|
||||
notice = message("runtime.profile.assigned",
|
||||
contact=self.contact_display_id(contact),
|
||||
profile=raw_text(self.profile_name(profile_key)))
|
||||
self.flash(notice, 2.0)
|
||||
self.feed.add(self.world.format_time(), "sonar", notice)
|
||||
return True
|
||||
|
||||
def _open_simlog_view(self) -> None:
|
||||
"""F4: Live-Protokoll-Ansicht; nur bei aktiver simlog-Option."""
|
||||
@@ -7894,6 +8009,7 @@ class Game:
|
||||
quality=c.quality, last_seen=c.last_seen,
|
||||
depth_est=c.depth_est, depth_sigma_m=c.depth_sigma_m,
|
||||
player_class=c.player_class,
|
||||
player_profile=c.player_profile,
|
||||
released_to_opz=c.released_to_opz,
|
||||
dip_released_to_opz=c.dip_released_to_opz,
|
||||
ship_observer_x=c.ship_observer_x,
|
||||
@@ -7923,6 +8039,7 @@ class Game:
|
||||
if c.tma_ellipse is not None else None),
|
||||
towed_ambiguous=c.towed_ambiguous,
|
||||
towed_resolved=c.towed_resolved,
|
||||
towed_side=c.towed_side,
|
||||
ambiguity_axis=c.ambiguity_axis,
|
||||
mirror_bearing=c.mirror_bearing,
|
||||
tonal_hz=c.tonal_hz,
|
||||
@@ -8676,6 +8793,7 @@ class Game:
|
||||
c.depth_est = cd.get("depth_est")
|
||||
c.depth_sigma_m = cd.get("depth_sigma_m")
|
||||
c.player_class = cd.get("player_class")
|
||||
c.player_profile = cd["player_profile"]
|
||||
c.released_to_opz = cd["released_to_opz"]
|
||||
c.dip_released_to_opz = cd.get("dip_released_to_opz", False)
|
||||
c.ship_observer_x = cd.get("ship_observer_x")
|
||||
@@ -8712,6 +8830,7 @@ class Game:
|
||||
if cd["tma_ellipse"] is not None else None)
|
||||
c.towed_ambiguous = cd["towed_ambiguous"]
|
||||
c.towed_resolved = cd["towed_resolved"]
|
||||
c.towed_side = cd["towed_side"]
|
||||
c.ambiguity_axis = cd["ambiguity_axis"]
|
||||
c.mirror_bearing = cd["mirror_bearing"]
|
||||
c.tonal_hz = cd["tonal_hz"]
|
||||
@@ -10295,6 +10414,14 @@ class Game:
|
||||
and (not finite_number(uncertainty)
|
||||
or not 0.0 <= uncertainty <= 180.0)):
|
||||
return False
|
||||
# v13: the operator's catalog assignment is required (None = none).
|
||||
if "player_profile" not in contact:
|
||||
return False
|
||||
profile = contact["player_profile"]
|
||||
if profile is not None and (
|
||||
type(profile) is not str or profile not in (
|
||||
runtime_catalog or CATALOG).profile_systems):
|
||||
return False
|
||||
passive_bearing = contact.get("passive_bearing")
|
||||
if (passive_bearing is not None
|
||||
and (not finite_number(passive_bearing)
|
||||
@@ -10353,7 +10480,8 @@ class Game:
|
||||
or not bounded(ellipse[1], 0.0, ellipse[0] + 1e-9)
|
||||
or not bounded(ellipse[2], 0.0, 180.0)):
|
||||
return False
|
||||
if (type(contact.get("towed_ambiguous")) is not bool
|
||||
if (contact.get("towed_side") not in ("STBD", "PORT")
|
||||
or type(contact.get("towed_ambiguous")) is not bool
|
||||
or type(contact.get("towed_resolved")) is not bool
|
||||
or (contact["towed_ambiguous"] and contact["towed_resolved"])
|
||||
or (contact["towed_ambiguous"] and (
|
||||
|
||||
@@ -68,6 +68,9 @@ STATION_HELP = {
|
||||
("Q", "help.control.sonar_integration"),
|
||||
("Shift+Q", "help.control.sonar_vernier"),
|
||||
("Shift+N", "help.control.sonar_operator_notch"),
|
||||
("Shift+F", "help.control.sonar_demon_band"),
|
||||
("Ctrl+F", "help.control.sonar_heterodyne"),
|
||||
("X / Shift+X (BB)", "help.control.tas_side"),
|
||||
("Z / X (TMA)", "help.control.tma_course"),
|
||||
("Ctrl+Z / Ctrl+X (TMA)", "help.control.tma_speed"),
|
||||
("Q / Shift+Q (TMA)", "help.control.tma_range"),
|
||||
|
||||
@@ -72,6 +72,7 @@ DISPLAY_KEYS = {
|
||||
"BESTAETIGT": "enum.fusion.confirmed", "DIVERGENT": "enum.fusion.divergent",
|
||||
"MOEGLICHER GEISTERKONTAKT": "enum.fusion.ghost",
|
||||
"TAS L/R?": "enum.fusion.ambiguous",
|
||||
"TAS L/R? WENDE": "enum.fusion.ambiguous_turned",
|
||||
},
|
||||
"weapon_mode": {"DRAHT": "enum.weapon.wire", "SUCHER": "enum.weapon.seeker"},
|
||||
"profile_kind": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Declarative exact key sets for the ``u-jagd-save-v12`` document.
|
||||
"""Declarative exact key sets for the ``u-jagd-save-v13`` 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,
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ version while building the project.
|
||||
"""
|
||||
|
||||
APP_VERSION = "1.1.0"
|
||||
SAVE_VERSION = 12
|
||||
SAVE_SCHEMA = "u-jagd-save-v12"
|
||||
SAVE_VERSION = 13
|
||||
SAVE_SCHEMA = "u-jagd-save-v13"
|
||||
SPLASH_TEXT = (
|
||||
"Anti Sub Marine Warfare on uConsole by Dominik Bornhäußer "
|
||||
f"Version {APP_VERSION}"
|
||||
|
||||
@@ -23,6 +23,10 @@ MAX_INTEGRATION_COLUMNS = int(max(INTEGRATION_CHOICES_S) / COLUMN_S)
|
||||
LOFAR_CURSOR_RANGE_HZ = (0.5, 300.0)
|
||||
DEMON_CURSOR_RANGE_HZ = (0.5, 50.0)
|
||||
VERNIER_SPAN_HZ = 20.0
|
||||
# Operator-selectable DEMON carrier bands (cavitation noise band to search)
|
||||
# and heterodyne shift frequencies for audition.
|
||||
DEMON_BANDS_HZ = ((200.0, 800.0), (400.0, 1400.0), (1000.0, 2000.0))
|
||||
HETERODYNE_OFFSETS_HZ = (400.0, 700.0, 1000.0, 1200.0)
|
||||
HARMONIC_COUNT = 12
|
||||
|
||||
|
||||
|
||||
+36
-14
@@ -213,6 +213,9 @@ class Contact:
|
||||
self.depth_est = None
|
||||
self.depth_sigma_m = None # 1-sigma Unsicherheit der Tiefe
|
||||
self.player_class = None # None|U_BOOT|KAMPFSCHIFF|BIOLOGISCH|FAHRZEUG|FLUGZEUG
|
||||
# Operator's catalog assignment (profile key from the contact
|
||||
# analyser); an annotation like player_class, never inferred.
|
||||
self.player_profile = None
|
||||
self.released_to_opz = False
|
||||
self.passive_source = "SONAR-BRG"
|
||||
self.observer_x = 0.0
|
||||
@@ -232,6 +235,9 @@ class Contact:
|
||||
self.mirror_bearing = None
|
||||
self.tonal_hz = None # measured (Doppler-shifted) tonal
|
||||
self.towed_resolved = False
|
||||
# Operator's choice of array side for a towed-only contact
|
||||
# ("STBD" or "PORT"); the display follows it until resolved.
|
||||
self.towed_side = "STBD"
|
||||
self.tma_seen = None
|
||||
self.buoy_fixes = [] # raw (t, x, y, quality), not ownship passive bearings
|
||||
self.buoy_reports = {} # buoy sequence -> detached measured report
|
||||
@@ -456,7 +462,9 @@ class Contact:
|
||||
key: value for key, value in self.array_observations.items()
|
||||
if t - value["last_seen"] <= 4.0}
|
||||
if len(self.array_observations) < 2:
|
||||
self.fusion_status = ("TAS L/R?" if self.towed_ambiguous
|
||||
ambiguous_status = (self.fusion_status if str(self.fusion_status)
|
||||
.startswith("TAS L/R?") else "TAS L/R?")
|
||||
self.fusion_status = (ambiguous_status if self.towed_ambiguous
|
||||
and set(self.array_observations) == {"TOWED"}
|
||||
else "NUR " + next(iter(self.array_observations))
|
||||
if self.array_observations else "KEINE DATEN")
|
||||
@@ -644,6 +652,8 @@ class SonarSystem:
|
||||
self.notch_enabled = False
|
||||
# Operator notch at a chosen frequency (display and audio, transient).
|
||||
self.operator_notch_hz = None
|
||||
# Heterodyne shift for audition (operator choice, transient).
|
||||
self.heterodyne_hz = 700.0
|
||||
# Automatic TMA proposals per target (transient training aid).
|
||||
self.tma_proposals = {}
|
||||
self.peak_hold = False
|
||||
@@ -824,6 +834,7 @@ class SonarSystem:
|
||||
def _audition_process(self, samples, controls):
|
||||
mode, low_hz, high_hz, notch, own_line_hz, gain_db = controls[:6]
|
||||
operator_notch = controls[6] if len(controls) > 6 else None
|
||||
heterodyne_hz = controls[7] if len(controls) > 7 else 700.0
|
||||
out = np.array(samples, copy=True)
|
||||
if mode != "BROADBAND":
|
||||
n = out.size
|
||||
@@ -852,8 +863,9 @@ class SonarSystem:
|
||||
out = np.fft.irfft(np.fft.rfft(out) * mask, n=n)
|
||||
self._audition_ola_state = None
|
||||
if mode == "HETERODYNE":
|
||||
# Translate the selected low-frequency beam band around 700 Hz.
|
||||
phase = np.arange(out.size) * (2.0 * np.pi * 700.0
|
||||
# Translate the selected low-frequency beam band up by the
|
||||
# operator's heterodyne shift (default 700 Hz).
|
||||
phase = np.arange(out.size) * (2.0 * np.pi * heterodyne_hz
|
||||
/ self.receiver.sample_rate)
|
||||
out = 2.0 * out * np.cos(phase)
|
||||
return out * (10 ** (gain_db / 20))
|
||||
@@ -880,7 +892,8 @@ class SonarSystem:
|
||||
raise ValueError("audition requires one complete mixed receiver block")
|
||||
controls = (self.audition_mode, self.band_low_hz, self.band_high_hz,
|
||||
self.notch_enabled, self._own_line_hz, self.gain_db,
|
||||
getattr(self, "operator_notch_hz", None))
|
||||
getattr(self, "operator_notch_hz", None),
|
||||
getattr(self, "heterodyne_hz", 700.0))
|
||||
# A rejected playback block must retry byte-for-byte even if ship speed
|
||||
# changes the own-line notch before the next frame. New controls take
|
||||
# effect on the next receiver sequence.
|
||||
@@ -1302,6 +1315,9 @@ class SonarSystem:
|
||||
ambiguous = False
|
||||
if bow is not None and "BOW" in observations:
|
||||
# The hull array is unambiguous: it resolves the towed side.
|
||||
if c.towed_ambiguous or c.towed_resolved:
|
||||
c.towed_side = ("STBD" if config.angle_diff_deg(
|
||||
bearing, self.tow_heading_deg) >= 0.0 else "PORT")
|
||||
if c.towed_ambiguous:
|
||||
c.towed_ambiguous, c.towed_resolved = False, True
|
||||
c.mirror_bearing = c.ambiguity_axis = None
|
||||
@@ -1309,20 +1325,26 @@ class SonarSystem:
|
||||
axis = self.tow_heading_deg
|
||||
if not c.towed_ambiguous and not c.towed_resolved:
|
||||
c.towed_ambiguous, c.ambiguity_axis = True, axis
|
||||
if c.towed_ambiguous and abs(config.angle_diff_deg(
|
||||
axis, c.ambiguity_axis)) >= config.TAS_AMBIGUITY_RESOLVE_DEG:
|
||||
# After an own turn only one side stays consistent.
|
||||
c.towed_ambiguous, c.towed_resolved = False, True
|
||||
c.mirror_bearing = c.ambiguity_axis = None
|
||||
mirror = (2.0 * axis - bearing) % 360.0
|
||||
true_side = ("STBD" if config.angle_diff_deg(bearing, axis) >= 0.0
|
||||
else "PORT")
|
||||
if c.towed_ambiguous:
|
||||
mirror = (2.0 * axis - bearing) % 360.0
|
||||
# Without other evidence the display takes the starboard
|
||||
# candidate; it is the true one only half of the time.
|
||||
if config.angle_diff_deg(bearing, axis) < 0.0:
|
||||
# The line array cannot tell the sides apart: the display
|
||||
# shows the operator's chosen side (starboard by default).
|
||||
# After an own turn the ghost bearing jumps; the operator
|
||||
# compares the traces and confirms a side - no automatic
|
||||
# resolution.
|
||||
if c.towed_side != true_side:
|
||||
bearing, mirror = mirror, bearing
|
||||
c.mirror_bearing = mirror
|
||||
c.fusion_status = "TAS L/R?"
|
||||
turned = abs(config.angle_diff_deg(
|
||||
axis, c.ambiguity_axis)) >= config.TAS_AMBIGUITY_RESOLVE_DEG
|
||||
c.fusion_status = "TAS L/R? WENDE" if turned else "TAS L/R?"
|
||||
ambiguous = True
|
||||
elif c.towed_resolved and c.towed_side != true_side:
|
||||
# The operator confirmed the ghost side: the published
|
||||
# bearing stays mirrored (TMA residuals will show it).
|
||||
bearing = mirror
|
||||
sig = ""
|
||||
if c.confidence + config.SONAR_CONF_PASSIVE_PER_S * dt \
|
||||
>= config.CONTACT_SIG_CONF:
|
||||
|
||||
@@ -9,7 +9,7 @@ from typing import Mapping
|
||||
|
||||
import pygame
|
||||
|
||||
from src.core.i18n import raw_text, translation_scope
|
||||
from src.core.i18n import message, raw_text, translation_scope
|
||||
from src.data.catalog import CATALOG
|
||||
from src.data.contact_analysis import (ASSET_ROUTE_PREFIX,
|
||||
load_contact_analysis_assets,
|
||||
@@ -41,8 +41,15 @@ class ContactAnalyzer:
|
||||
|
||||
def __init__(self, tr=widgets.IDENTITY_TR, *, projection=None,
|
||||
packaged_assets: Mapping[str, tuple[str, bytes]] | None = None,
|
||||
on_play_sample=None, on_stop_sample=None, preview_active=None):
|
||||
on_play_sample=None, on_stop_sample=None, preview_active=None,
|
||||
on_assign=None, assign_label=None, current_assignment=None):
|
||||
self.tr = tr
|
||||
# In-game only: assign the selected profile to the operator's sonar
|
||||
# contact (an annotation, like a manual classification).
|
||||
self.on_assign = on_assign
|
||||
self.assign_label = assign_label
|
||||
self.current_assignment = current_assignment
|
||||
self.assign_notice = None
|
||||
self.on_play_sample = on_play_sample
|
||||
self.on_stop_sample = on_stop_sample
|
||||
self.preview_active = preview_active
|
||||
@@ -256,6 +263,16 @@ class ContactAnalyzer:
|
||||
list_rect = self._rects.get("list", pygame.Rect(28, 140, 370, 500))
|
||||
detail_rect = self._rects.get("detail", pygame.Rect(756, 130, 476, 490))
|
||||
if event.type == pygame.KEYDOWN:
|
||||
if (event.key in (pygame.K_RETURN, pygame.K_KP_ENTER)
|
||||
and self.on_assign is not None):
|
||||
clear = bool(getattr(event, "mod", 0) & pygame.KMOD_SHIFT)
|
||||
profile = self.selected_profile
|
||||
if clear or profile is not None:
|
||||
result = self.on_assign(None if clear else profile["key"])
|
||||
self.assign_notice = ("analyzer.assign.cleared" if clear and result is True
|
||||
else "analyzer.assign.done" if result is True
|
||||
else "analyzer.assign.failed")
|
||||
return True
|
||||
if event.key == pygame.K_TAB:
|
||||
self.focus = "detail" if self.focus == "list" else "list"
|
||||
return True
|
||||
@@ -381,7 +398,9 @@ class ContactAnalyzer:
|
||||
(bounds.width - 430, 18, 410, 34), color=widgets.PALETTE.focus,
|
||||
size=13, bold=True, align="right")
|
||||
footer = pygame.Rect(0, bounds.height - 42, bounds.width, 42)
|
||||
content = pygame.Rect(20, 66, bounds.width - 40, footer.y - 76)
|
||||
# In-game assignment adds one hint line above the footer.
|
||||
assign_h = 28 if self.on_assign is not None else 0
|
||||
content = pygame.Rect(20, 66, bounds.width - 40, footer.y - 76 - assign_h)
|
||||
left = pygame.Rect(content.x, content.y, 390, content.height)
|
||||
left_inner = widgets.panel(surface, left, "analyzer.contacts", tr=self.tr)
|
||||
filter_rect = pygame.Rect(left_inner.x, left_inner.y, left_inner.width, 34)
|
||||
@@ -470,6 +489,15 @@ class ContactAnalyzer:
|
||||
widgets.draw_text(surface, raw_text(line),
|
||||
(detail_rect.x + 7, detail_rect.y + 3 + row * line_height,
|
||||
detail_rect.width - 14, line_height), size=13)
|
||||
if self.on_assign is not None:
|
||||
current = self.current_assignment() if self.current_assignment else None
|
||||
line = message("analyzer.assign.hint", contact=raw_text(self.assign_label or "--"),
|
||||
current=raw_text(current) if current else message("common.unknown"))
|
||||
widgets.draw_text(surface, line, (20, footer.y - 26, bounds.width - 40, 22),
|
||||
size=14)
|
||||
if self.assign_notice:
|
||||
widgets.draw_text(surface, self.assign_notice,
|
||||
(bounds.width - 420, footer.y - 26, 400, 22), size=14)
|
||||
widgets.draw_footer(surface, footer,
|
||||
("analyzer.filter_hint", "analyzer.select_hint",
|
||||
"analyzer.image_hint", "analyzer.audio_hint",
|
||||
|
||||
@@ -1718,6 +1718,10 @@ def _draw_contacts(game, rect):
|
||||
pygame.draw.rect(screen, CYAN, (row_rect.x, y, 3, row_rect.h))
|
||||
label = display_value("classification",
|
||||
getattr(contact, "player_class", None))
|
||||
profile = getattr(contact, "player_profile", None)
|
||||
if profile is not None and hasattr(game, "profile_name"):
|
||||
# The operator's catalog assignment from the F8 analyser.
|
||||
label = f"{label} / {game.profile_name(profile)}"
|
||||
release = localize("sonar.release.short_released"
|
||||
if getattr(contact, "released_to_opz", False)
|
||||
else "sonar.release.short_private")
|
||||
|
||||
@@ -164,3 +164,19 @@ def test_lofar_and_demon_pages_draw_without_truncation_in_both_modes(sonar_game)
|
||||
with layout.capture_truncations() as cut:
|
||||
game.draw()
|
||||
assert not cut, (assist, page, cut)
|
||||
|
||||
|
||||
def test_tas_side_is_the_operators_decision(sonar_game):
|
||||
from src.sonar.sonar import Contact
|
||||
game = sonar_game
|
||||
contact = Contact(9, 8080, "passiv", "sub")
|
||||
contact.towed_ambiguous, contact.ambiguity_axis = True, 0.0
|
||||
game.sonar.contacts[8080] = contact
|
||||
game.selected_contact = contact
|
||||
game.sonar_page = 0
|
||||
key(game, pygame.K_x)
|
||||
assert contact.towed_side == "PORT" and contact.towed_ambiguous
|
||||
key(game, pygame.K_x, pygame.KMOD_SHIFT)
|
||||
assert contact.towed_resolved and not contact.towed_ambiguous
|
||||
assert game.set_tas_side(contact, "flip") is True # reopen
|
||||
assert contact.towed_ambiguous and contact.towed_side == "STBD"
|
||||
@@ -87,7 +87,7 @@ def test_towed_endfire_broadens_bearing_error():
|
||||
assert sonar._endfire_factor(5.0) > 1.8
|
||||
|
||||
|
||||
def test_towed_only_contact_is_side_ambiguous_until_own_turn():
|
||||
def test_towed_only_contact_is_side_ambiguous_until_the_operator_confirms():
|
||||
world = World(seed=5)
|
||||
frigate = Ship(250.0, 250.0, course_deg=0.0, speed_kn=6.0)
|
||||
sub = Sub(253.0, 250.0, 60.0, 90.0, "diesel_alt", random.Random(5))
|
||||
@@ -112,6 +112,14 @@ def test_towed_only_contact_is_side_ambiguous_until_own_turn():
|
||||
sonar.tow_heading_deg = 30.0
|
||||
sonar.update(1.0, 12.0, frigate, [sub], world, mode="TOWED",
|
||||
advance_mechanics=False)
|
||||
# An own turn only makes the ghost jump; the operator decides the side.
|
||||
assert contact.towed_ambiguous and contact.fusion_status == "TAS L/R? WENDE"
|
||||
# The boat bears 090 from the frigate, starboard of the 030 array axis.
|
||||
contact.towed_side = "STBD"
|
||||
contact.towed_ambiguous, contact.towed_resolved = False, True
|
||||
contact.mirror_bearing = contact.ambiguity_axis = None
|
||||
sonar.update(1.0, 13.0, frigate, [sub], world, mode="TOWED",
|
||||
advance_mechanics=False)
|
||||
assert not contact.towed_ambiguous and contact.towed_resolved
|
||||
assert contact.mirror_bearing is None
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
"""Operator catalog assignment of sonar contacts (save v13)."""
|
||||
|
||||
import copy
|
||||
import json
|
||||
|
||||
import pygame
|
||||
|
||||
from src.core.game import Game
|
||||
from src.core.station import Station
|
||||
from src.sonar.sonar import Contact
|
||||
|
||||
|
||||
def _game_with_contact():
|
||||
game = Game(seed=5151, start_menu=False, audio_enabled=False)
|
||||
contact = Contact(3, 4242, "passiv", "sub")
|
||||
contact.update_passive(100.0, .8, .8, "", game.sim_t)
|
||||
game.sonar.contacts[4242] = contact
|
||||
game.selected_contact = contact
|
||||
return game, contact
|
||||
|
||||
|
||||
def test_assignment_is_an_operator_annotation_and_survives_save_load():
|
||||
game, contact = _game_with_contact()
|
||||
key = next(iter(game.runtime_catalog.profile_systems))
|
||||
assert game.assign_contact_profile(contact, "no_such_profile") == "invalid_value"
|
||||
assert game.assign_contact_profile(contact, key) is True
|
||||
assert contact.player_profile == key
|
||||
state = json.loads(json.dumps(game.save_state()))
|
||||
assert state["sonar"]["contacts"]["4242"]["player_profile"] == key
|
||||
restored = Game(seed=1, start_menu=False, audio_enabled=False)
|
||||
assert restored._load_save_data(copy.deepcopy(state))
|
||||
assert restored.sonar.contacts[4242].player_profile == key
|
||||
broken = copy.deepcopy(state)
|
||||
broken["sonar"]["contacts"]["4242"]["player_profile"] = "no_such_profile"
|
||||
assert not restored._load_save_data(broken)
|
||||
missing = copy.deepcopy(state)
|
||||
del missing["sonar"]["contacts"]["4242"]["player_profile"]
|
||||
assert not restored._load_save_data(missing)
|
||||
|
||||
|
||||
def test_f8_analyser_assigns_the_browsed_profile_to_the_selected_contact():
|
||||
game, contact = _game_with_contact()
|
||||
game.station = Station.SONAR
|
||||
game._open_analyzer_in_game()
|
||||
analyzer = game.editor
|
||||
assert analyzer.assign_label
|
||||
expected = analyzer.selected_profile["key"]
|
||||
analyzer.handle_event(pygame.event.Event(pygame.KEYDOWN, key=pygame.K_RETURN, mod=0))
|
||||
assert contact.player_profile == expected
|
||||
analyzer.handle_event(pygame.event.Event(pygame.KEYDOWN, key=pygame.K_RETURN,
|
||||
mod=pygame.KMOD_SHIFT))
|
||||
assert contact.player_profile is None
|
||||
analyzer.draw(game.screen)
|
||||
@@ -916,7 +916,7 @@ def _direct_fire_browser_states():
|
||||
wind_from_deg=245.0, wind_speed_kn=12.0,
|
||||
rain_intensity=.1, visibility_nm=24.0),
|
||||
mission=dict(name="Fire test", objective="Observe", remaining_s=500.0),
|
||||
autocrew=dict(enabled=False, status="off"),
|
||||
autocrew=dict(enabled=False, status="off"), autocrew_overview=[],
|
||||
audio=dict(events=[]), weather_station=WEATHER_STATION)
|
||||
navigation = dict(x=250.0, y=250.0, course=0.0, speed=10.0,
|
||||
target_course=0.0, target_speed=10.0, rudder_angle=0.0,
|
||||
@@ -1108,7 +1108,8 @@ def test_v2_lobby_requests_grants_release_reload_and_role_loss_in_real_chromium(
|
||||
"fix_age_s", "bearing_uncertainty_deg", "range_uncertainty_nm",
|
||||
"fixes")}
|
||||
result.update(observer_x=legacy["ownship"]["x"],
|
||||
observer_y=legacy["ownship"]["y"], released_to_opz=False)
|
||||
observer_y=legacy["ownship"]["y"], released_to_opz=False,
|
||||
profile=None)
|
||||
return result
|
||||
|
||||
def state_for(role):
|
||||
@@ -1123,6 +1124,7 @@ def test_v2_lobby_requests_grants_release_reload_and_role_loss_in_real_chromium(
|
||||
wind_from_deg=220.0, wind_speed_kn=10.0,
|
||||
rain_intensity=0.0, visibility_nm=30.0)
|
||||
common["autocrew"] = {"enabled": False, "status": "off"}
|
||||
common["autocrew_overview"] = []
|
||||
common["audio"] = {"events": list(legacy["sound_events"])}
|
||||
common["weather_station"] = WEATHER_STATION
|
||||
if role == "bridge":
|
||||
@@ -1163,7 +1165,9 @@ def test_v2_lobby_requests_grants_release_reload_and_role_loss_in_real_chromium(
|
||||
"tools": {"assist": False, "lofar_cursor_hz": 50.0,
|
||||
"demon_cursor_hz": 10.0, "integration_s": 2,
|
||||
"vernier": False, "shaft_hz": None,
|
||||
"blade_hz": None, "operator_notch_hz": None}},
|
||||
"blade_hz": None, "operator_notch_hz": None,
|
||||
"demon_band_hz": [400.0, 1400.0],
|
||||
"heterodyne_hz": 700.0}},
|
||||
"visualization": {
|
||||
"broadband": {"bearing_start_deg": 0.0,
|
||||
"bearing_step_deg": 4.0, "history": []},
|
||||
|
||||
@@ -38,7 +38,7 @@ def test_exact_role_envelopes_and_status_only_unassigned(published):
|
||||
game, bridge, server = published
|
||||
common = {"protocol", "version", "session", "epoch", "revision", "seq",
|
||||
"phase", "role", "chart_revision", "clock", "environment", "mission",
|
||||
"autocrew", "audio", "weather_station"}
|
||||
"autocrew", "autocrew_overview", "audio", "weather_station"}
|
||||
assert set(server.v2_states) == {None, *ROLE_NAMES}
|
||||
assert server.v2_states[None] == dict(
|
||||
protocol=2, version=server.state["version"], session=bridge.status["session"],
|
||||
@@ -171,6 +171,11 @@ def test_autocrew_projection_is_role_local_and_reports_damage_block(published):
|
||||
assert server.v2_states["bridge"]["autocrew"] == {
|
||||
"enabled": False, "status": "off"}
|
||||
assert "stations" not in server.v2_states["engine"]["autocrew"]
|
||||
# The crew overview (uConsole F3) lists every station's automation.
|
||||
overview = {row["station"]: row for row in server.v2_states["bridge"]["autocrew_overview"]}
|
||||
assert overview["engine"] == {"station": "engine", "enabled": True,
|
||||
"status": "blocked_damage"}
|
||||
assert overview["bridge"]["enabled"] is False
|
||||
|
||||
|
||||
def test_sonar_visualization_exact_schema_bounds_finite_and_detached(published):
|
||||
|
||||
@@ -83,10 +83,11 @@ def projection_states(revision="chart"):
|
||||
common = dict(protocol=2, version="test", session=revision, epoch=0,
|
||||
revision=0, seq=1, phase="live", chart_revision=revision,
|
||||
clock={}, environment={}, mission={},
|
||||
autocrew={"enabled": False, "status": "off"},
|
||||
autocrew={"enabled": False, "status": "off"}, autocrew_overview=[],
|
||||
audio={"events": []}, weather_station=WEATHER_STATION)
|
||||
return {None: {key: value for key, value in common.items()
|
||||
if key not in ("clock", "environment", "mission", "autocrew", "audio",
|
||||
if key not in ("clock", "environment", "mission", "autocrew",
|
||||
"autocrew_overview", "audio",
|
||||
"weather_station")} | {"role": None},
|
||||
**{role: dict(common, role=role, **{role: {}})
|
||||
for role in transport.STATIONS}}
|
||||
|
||||
@@ -249,7 +249,7 @@ def test_one_solo_session_can_hold_target_and_navigation_proposals_at_once(serve
|
||||
def _publication():
|
||||
common = dict(protocol=2, version="t", session="s", epoch=0, revision=0, seq=1,
|
||||
phase="live", chart_revision="s", clock={}, environment={},
|
||||
mission={}, autocrew={"enabled": False, "status": "off"},
|
||||
mission={}, autocrew={"enabled": False, "status": "off"}, autocrew_overview=[],
|
||||
audio={"events": []}, weather_station=WEATHER_STATION)
|
||||
chart = dict(protocol=2, revision="s", size_nm=500, landmasses=[], disclaimer="")
|
||||
redacted = {key: common[key] for key in (
|
||||
|
||||
@@ -19,20 +19,25 @@ def _game(seed=1201):
|
||||
return Game(seed=seed, start_menu=False, audio_enabled=False)
|
||||
|
||||
|
||||
def test_save_is_v12_and_exact_v11_document_is_rejected():
|
||||
def test_save_is_v13_and_older_documents_are_rejected():
|
||||
game = _game()
|
||||
state = json.loads(json.dumps(game.save_state()))
|
||||
assert (state["version"], state["save_schema"]) == (12, "u-jagd-save-v12")
|
||||
assert (SAVE_VERSION, SAVE_SCHEMA) == (12, "u-jagd-save-v12")
|
||||
assert (state["version"], state["save_schema"]) == (13, "u-jagd-save-v13")
|
||||
assert (SAVE_VERSION, SAVE_SCHEMA) == (13, "u-jagd-save-v13")
|
||||
assert set(state) == SAVE_ROOT_FIELDS
|
||||
before = game.save_state()
|
||||
legacy = copy.deepcopy(state)
|
||||
legacy["version"] = 11
|
||||
legacy["save_schema"] = "u-jagd-save-v11"
|
||||
del legacy["ais"]
|
||||
for row in legacy["subs"]:
|
||||
del row["active_ping_cd"]
|
||||
before = game.save_state()
|
||||
assert not game._load_save_data(legacy)
|
||||
# v12 differs only by the operator catalog assignment on sonar contacts.
|
||||
v12 = copy.deepcopy(state)
|
||||
v12["version"] = 12
|
||||
v12["save_schema"] = "u-jagd-save-v12"
|
||||
assert not game._load_save_data(v12)
|
||||
assert game.save_state() == before
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user