src/physics/geo.py holds the nautical bearing (bearing_deg) and the
distance_nm/bearing_from_frigate pair the entity classes repeated
(FrigateRelativeMixin, no slots or state); the module-level _bearing
copies become aliases of bearing_deg, and the identical strict _number
checks one limits.finite_number. Every expression is unchanged, so
results stay bit-identical. No behaviour change.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CW6FkwLLc6KvPHvCs5KTRo
- C16: stateless draws keyed on the entity's saved sensor_seed instead of the
process-global entity id (MPA MAD/radar, helicopter radar, sub radar alert,
frigate HF/DF noise, raid, scope phase, sub contact report, boat ESM level),
so a second game with the same seed in one process runs identically.
- C18: save slots, autosave and the crash recovery autosave check the JSON
text with the loader's size limit and strict validator before writing; a
rejected document keeps the previous file, is recorded in the crash log and
flashes a save error.
- C20: the crewed boat's objective lines (custom reach, breakthrough, strait,
swimmers, homecoming, pickup, datum) use the dead-reckoned position.
- C22: drop thresholds that never trigger (HEARD_S, SUB_REPORT_CONTACT_S);
manual states the effective 4 minutes for AI contact reports.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CW6FkwLLc6KvPHvCs5KTRo
- Remote Crew: observer admin action allowed, direct fire for U-boat weapons,
U-boat station help texts and manual links, select controls not rebuilt
- Keys: Shift+A / Ctrl+R at Weapons never fire, Shift+A on the U-boat never
toggles silent running
- Simulation: lurking submarine steers into the current, decoy speed units
in the sonar Doppler term
- Remove dead functions, constants and imports found by the audit
- Help and catalog wording (Submarine/U-Boot, German grammar), shortcut sheets
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CW6FkwLLc6KvPHvCs5KTRo
Free AI submarines and the AI hunter choose from the experimental opponent's
plan lists by rules over their own picture and commander character, so the
offline game gets varied tactics. The logbook now files coarse habits of
each mission; from the last five missions of a side the enemy knows a habit
and adapts its plans a little. The decision is saved (save v50, root field
habits, migration from v49 with a frozen v49 sample); off in the daily
mission, lessons and two-crew play, switchable with L on the logbook page,
named in the debrief.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBWAva5Bhs5KJy75vSJDRT
Saves stay v49 (the language model's block); v38 to v48 saves still load.
The submarine's seeker controls in the browser now hold a sent setting
until the host has applied it, so a state push in between no longer
reverts the select.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS3so1jLSc2A8usgnDEEeY
- Shift+H (browser: Surface) takes the crewed boat up; surfaced, the
low-pressure blower empties the main ballast, the diesels run in the open
air (12 kn, x1.3 generator) and a bridge watch looks out from 6 m and
calls aircraft (helicopter and patrol aircraft) as an alarm.
- H from the surface is the crash dive: alarm klaxon, masts down, vents
open, full ahead to 40 m; blown tanks hold the boat until flooded.
- Frigate surface radar, aircraft radars and lookouts see a surfaced boat.
- Versions 1.3.146-1.3.153: changelog, README, manual chapters, F1 help,
station shortcut sheet and manual PDFs. Save format stays v48.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HQwtegBu8afg7BWtsCx7tt
- Noise discipline: crew mishaps (rarer under silent running, more with a
tired crew), slower work under quiet orders, and the players' voices from
the uConsole microphone (option) or the browser's (opt-in /noise-mic.js,
level only, POST /api/v2/mic) with a meter and thresholds; loud crews add
noise the enemy can hear and both sides report what they hear.
- Enemy commanders get one of four characters (daring, fox, cautious,
hunter) from the seed; HQ sometimes hints at it, the debrief names it.
- Daily mission: one fixed mission per side and day in the day's real sea
area, best score kept in the logbook for 30 days.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HQwtegBu8afg7BWtsCx7tt
The hunters' ELOKA logs ESM bearings on a mast radar one per nautical mile
run (saved as hunter_esm) and crosses them into a position datum. An AI
submarine at periscope depth holding the frigate makes a stateless 20 s HF
contact report once per 30 minutes, heard by the frigate's HF/DF.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mw8VFBVXLPPiwM3WU2r78D
Hits, fire, flooding and gas wound people at the sonar, weapons and
damage-control stations of the frigate and every submarine; empty posts
slow recognition, reloading and repairs. Both sides send the medical
team and re-man the worst station from the resting watches; AI ships
re-man on their own.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ezHkjXB8fqbp1sWev2J9D
The frigate's hull array and every submarine's hull sonar no longer hear
within 30 degrees of their own stern; the towed array and the VDS still
do. Bridge and crewed boat clear their baffles with Ctrl+B (or the web
button): 60 degrees to starboard for two minutes, then back. An AI boat
close in the frigate's baffles after a ping trails her instead of
running. Tests that fired an AI boat at once now start with flooded tubes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ezHkjXB8fqbp1sWev2J9D
A submarine flooding a tube and opening its outer door makes a short
transient: the frigate's sonar reports it as a warning on a measured bearing
(loud flooding out to 8 NM, slow quiet flooding within 1.5 NM, shrunk by own
noise, sea state and sonar damage). The crewed boat can flood slowly and
quietly (Ctrl+M, browser: Flood quietly). AI boats now flood too: quietly
and early on a fix within 15 NM, loudly just before a shot on dry tubes.
The automatic crews treat the warning as no torpedo.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ezHkjXB8fqbp1sWev2J9D
AI submarines with a raised mast go deep on an aircraft radar and put off
snorkeling; patrol submarines of the frigate scenarios torpedo merchants
far from the frigate, and a lost merchant costs score.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PDZS4V7aAXG4LYmchPZgbQ
- Torpedo proximity fuze fires at the predicted closest approach instead of
on entering its radius (was 12-18 % damage at 250-370 m).
- Hostile torpedo 40 kn / 20 NM (was 28 kn / 30 NM, slower than the frigate).
- AI submarine attacks a located frigate within 10 NM even when quiet.
- Breakthrough goal 5 NM beyond the frigate, recon 3 h, convoy 8 kn with the
submarine starting about 14 NM ahead of it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194kecE5NRxPM7veWbU8eiR
The crew loads each empty tube from the racks (M / browser Load) and
floods a loaded tube before it fires (Shift+M / browser Flood, 20 s,
audible for 4 s). Submarines now carry as many reloads again as tubes
with 2-4 min reloads; AI submarines keep reloading by themselves.
Save format v26 adds crew.orders.tubes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019eZphdvoJiBgWqq2zSH4aJ
Below test depth bolts shear, seals fail and the pressure hull cracks,
more often and worse the deeper the boat goes; crush depth collapses it.
Depth ladders mark the crush depth and a red alarm shows the overdepth.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019eZphdvoJiBgWqq2zSH4aJ
- New seventh boat station uboot_radio (uConsole key 7, browser role):
HQ broadcast every 10 min with a contact report on the frigate, copied
with the mast up at periscope depth; situation reports go out on HF for
20 s and can be borne by the frigate's HF/DF; radio log saved.
- Catalog emitters for the helicopter and patrol-aircraft search radars;
the boat's ESM hears them (helicopter airborne and not dipping, MPA with
its radar on).
- Save format v22 (crew.radio), app version 1.3.1; help, manual EN/DE,
web schema and plan updated.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019eZphdvoJiBgWqq2zSH4aJ
- Counter-detection picture from the boat's own measurements: hull,
dipping and buoy pings with received level, buoy splashes, torpedo
alarms; Threat page (Command 4, Navigation 2), browser card, chart rays.
- Evasion order (key I, uboot_evade action): stern to the pinger or
torpedo on the quarter, layer crossing, silent running or decoy.
- Boat debrief (own track, frigate truth, pings taken, spans the frigate
held the boat), boat outcomes (won, escaped, survived, trained, lost).
- Spoken crew reports from the boat's log when the uConsole plays it.
- Two boat training lessons with a scripted pinging frigate.
- Fix stale browser session fixtures (callouts, mpa, crew).
Save stays exact v21; all new boat state is transient.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019eZphdvoJiBgWqq2zSH4aJ
Six compartments with depth-dependent leaks, spill through open
bulkheads, fire, chlorine gas from a flooded battery and power loss; two
damage-control teams seal, pump and fight fire; shut bulkheads contain
water, fire and gas. Floodwater feeds the trim model; flooded, burning or
gassed compartments take out the tubes, masts, diesels or half the speed.
Damage page on the uConsole engine room, damage-control card in the web
station. Save format v20.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdXs5tkJ6kzdeubNWqPHtG
Main ballast, regulating and trim tanks with fill levels; an HP air store
for several blows, refilled while snorkelling; torpedo launches and flooding
shift weight and trim, pumps are audible. Tanks page on the uConsole engine
room, cross-section card in the web station. Save format v19.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdXs5tkJ6kzdeubNWqPHtG
Stage A of the boat-station plan. Conventional boats now carry diesel
(300 h of generator output, 65 % at start, burned only while the diesels
run), a crew-ordered snorkel charge rate (full / half / air only, with
matching noise and diesel lines) and a modelled atmosphere (O2 down, CO2 up
dived; absorber sets, oxygen candles, airing while snorkelling). Stale or
foul air slows the crew (reload); AI boats manage their air and come up
when it turns foul.
The web engine room gets an Energy & stores card (bars, energy balance,
endurance table by telegraph step, air, orders). The uConsole engine room
gets a second page Stores with R / A / O. Remote Crew actions
uboot_charge_rate, uboot_absorber and uboot_o2_candle (engine room only).
Battery phase and engine telegraph now display translated.
Save format v17 (endurance state version 2); v16 saves are rejected.
Calibration 77/77 unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdXs5tkJ6kzdeubNWqPHtG
The frigate reported a submarine's active ping with its exact bearing to
0.1 degree while the crewed boat's ears are ~2 degrees off. It now uses the
same deterministic error (PING_INTERCEPT_SIGMA_DEG, keyed by the saved
arrival time) and whole degrees. The browser periscope drew only when a
state arrived (2-4 Hz), so horizon and bearing stepped; it now eases
bearing and horizon toward the latest state every animation frame
(display only).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdXs5tkJ6kzdeubNWqPHtG
Phase 9 of plan 1.3. Third Command page and second Mast & ESM page show
the periscope (uboot_scope.py): eyepiece with day/night light, haze,
horizon motion from the wave slope, true-bearing scale and crosshair;
arrows train the scope, Enter reads the stadimeter. Sightings come from
the frigate lookout's contrast model at periscope eye height and live in
the crew block (save v15 crew.orders: scope_rel_deg, sightings,
sightings_seen). The stadimeter range becomes a VISUAL fix on the boat's
sonar contact, usable like a ping fix. Snorkelling diesels raise the
radiated level, lower the quiet factor and add 50/100 Hz lines. Web:
scope projection, canvas view, uboot_scope_bearing/uboot_scope_mark
commands and a Chromium contract. Manual, help and catalogs updated.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A hostile boat fires on its own bearing-only solution only once the
solution's range sigma over range is at or below the new difficulty field
enemy_solution_threshold (0.25 patrol, 0.15 SSN, 0.20 custom default) and
the last bearing is younger than 90 s. A measured bearing the dead-reckoned
solution cannot explain restarts the plot and needs three new bearings.
Active and datalink fixes keep their old rules; sigma, time and reopen state
are part of the sub row's memory in save v15.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Ping and torpedo alarms carry the boat's own measured (noisy,
deterministic) bearing. At periscope depth the crew can raise a mast
whose ESM reports sweeping radars; it lowers itself when diving. The
commander can ping and take a BT without a sonar operator. The tube
arc is drawn on the web and uConsole charts, the sonar's designated
target is preselected and fire readiness shows boat reasons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Crew shots take a run depth (5-300 m) and one torpedo or a +/-4 degree
spread, each with its own datum.
- Every crew torpedo runs on a wire (transient, cut by a load): the crew
moves its datum and the wire turns it on until the seeker acquires; the
frigate's spool/tension rules apply with the boat's limits (10 kn,
1.5 deg/s); broken wires are logged; the crew can cut a wire.
- Remote Crew: uboot_fire gains depth_m/salvo, new uboot_wire_steer and
uboot_wire_cut; own_weapons publish wire state and datum; web fire
controls and wire panel. Local: T depth, Y spread, F bearing then
range, W steer, Shift+W cut. Help, manual (EN/DE) and tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A crewed boat never ascends, snorkels or radios by itself: the endurance
model runs in crew mode (AIP still takes the load), and the crew snorkels
at snorkel depth to charge (max 6 kn; diving deeper stops the diesels).
- Silent running (max 5 kn) and lying on the bottom (3 m keel clearance,
no drift, lifts off with any way/depth order) give the lurker's quiet.
- Crewed boats stop before land instead of veering; telegraph steps; boat
log warnings for low/empty battery, shallow water and obstacles.
- Transient CrewOrders (never saved); AI behaviour unchanged (calibration
77/77). Own rejection reasons for the submarine instead of frigate words;
local BT notices go to the boat log, not the frigate feed.
- Remote Crew actions uboot_snorkel/silent/bottom, projection and browser
validator fields, web mode buttons and battery warning; local keys
G, Shift+G, N, +/-; help, manual (EN/DE) and tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Remote Crew roles "uboot" (command) and "uboot_sonar" bind the living
hostile submarine with the smallest id; the binding is transient (never
saved) and hands the boat back to the AI on release, load or reset.
- Manual Sub mode: course/speed/depth orders within the physics limits,
checked fire (arc, tubes, stores), decoy, active ping, emergency blow.
- SonarStation extracts the operator state; the boat gets its own full
sonar workstation (observer adapter, frigate acoustic source), audio
stream and projections with the frigate's shape, without towed array.
- Options page 2 chooses the uConsole side (frigate default, never saved;
only outside a mission); --play-sub for one launch.
- uConsole U-boat command station in the Bridge layout: shared chart
geography with the boat, its contacts and own torpedoes, threat bar,
Navigation (water column) and Weapons & contacts pages, boat log and
telemetry in the configured bottom band; chart zoom/follow/drag.
- Web: the boat's own torpedoes on the U-boat chart (own_weapons).
- Sonar view reads the active workstation's observer, never the frigate
truth, while the boat's sonar is shown.
- Tests: determinism with equal entity-id starts, truth guard while
drawing, chart/page controls, schema with own_weapons, web-host rooms
hold the nine frigate stations only. Manual EN/DE and help updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Wrecks and underwater rocks are drawn on every chart (native map view,
OPZ basemap, web role map) as chart symbols with the depth of their top
when zoomed in and a chart tooltip; they are published as public chart
geography to Remote Crew.
- Wrecks now raise the seabed within half their length, like rocks, so
they are obstacles for grounding, submarines and weapons.
- An evading submarine near the frigate may creep to a charted wreck
within 8 NM and lie still on the bottom beside it (new WRACK state,
silent, no current drift, derived from saved fields so save v12 is
unchanged). A zero-Doppler echo in the same range cell and beam merges
with the wreck echo: hidden from CW (750 m cell), separable with LFM
(about 8 m).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compartments get volume, centroid, floor height, fuel and electrical load.
Flooding follows the orifice law against the outside waterline (dynamic
draft plus heel), so it slows as levels equalize and high rooms stay dry.
Floodwater mass, free-surface GM loss and transverse moment give draft and
list; the ship sinks beyond reserve buoyancy and capsizes when GM is lost
or the heel passes 35 degrees (replaces the 540-point rule).
Torpedo impact point selects the compartment and the hole area scales with
warhead stand-off; missiles hit above the waterline and mainly start fires.
Fire grows with fuel load and oxygen, is smothered by flooding, spreads
through hot bulkheads, starts from shorted switchboards and can cook off
the magazine. Repair teams walk the compartment graph (20 s per hop) and
patch holes with a limited stock of 8 kits before pumping. Station
capability degrades continuously (sonar/radar range). Hostile hulls flood
progressively and lose radar/missile launch with damage.
Save v12 carries team positions/ETAs, patch kits, holes, heat timers,
shorts, cook-off and capsize state with strict validation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add src/physics/torpedo_dyn.py and apply it to both torpedo classes:
- Energy store in cruise seconds with power ~ v^3 (range emerges, longer
when throttled); an empty battery stops the motor, the weapon coasts
against quadratic drag and is lost below 30 % speed.
- Constant turning radius (turn rate ~ speed); fin-limited depth control
with a saved vertical rate (hostile torpedoes gain depth control and rise
to keel depth when homing).
- Wire: torpedo and ship spools, tension breaks from ship overspeed or hard
turns held for 5 s; the old timers stay as datalink latency.
- Proximity fuze with shock-factor damage for submarines and ships.
- Speed-dependent propulsor lines and 60 log v source level; boats hear a
running torpedo through the passive sonar equation (re-anchored at its
6 NM reference range).
- Shallow hostile torpedoes leave a lookout-visible wake by day; hostile
torpedoes can home on the own-ship wake; ASROC payloads fly a helix
search at the splash point.
Manual EN/DE and simulation-gaps updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Submarines no longer use the legacy snapshot gate: every boat senses
through its PlatformSensorSuite. Bearing-only sonar contacts feed an own
passive TMA (saved track, 30 s re-solve) and the boat opens TMA legs when
range is unobservable; a range comes only from its own solution.
- ESM works only with the mast up (<= 18 m); the hostile datalink is
exchanged only by boats at mast depth or snorkelling/transmitting.
- Torpedo alarms take a per-boat crew recognition time (lognormal 2-15 s,
saved countdown) unless the boat is already evading.
Manual EN/DE and simulation-gaps updated; tests adjusted to the delayed
alarm.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add src/physics/submarine.py and apply it to hostile platforms:
- Ordered versus actual speed: the AI orders, the hull follows at its
acceleration limit (saved speed_order); external speed overrides still
set both.
- Hydroplane authority ~ v^2 (slow depth changes below ~4 kn).
- Emergency blow from a bounded HP-air store for a flooded boat; pressure
hull fatigue beyond 0.9 x test depth and crush at 1.5 x test depth.
- Cavitation onset rising with depth; radiated source level ~40 log v
(auxiliary-machinery floor), cavitation jump and launch/blow transients,
used by every passive sonar path.
- Lurking boats hold station against the current.
- Surface ships: Nomoto-linear turning and speed loss in heavy seas by hull
length; their radiated level follows speed.
Manual EN/DE and simulation-gaps updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>