Skip to content

feat: plan mode for wasserförderung #150

Open

Description

@DeepDiver1975

Problem / use case

As an operator I want to plan the water pipeline on a map.

Give start and endpoint - program chooses path and calculates total length as well as the location of pumps

Proposed solution

see above

Alternatives considered

No response

Context

  • I am using (or intend to use) Lagebuch operationally in a fire brigade

Activity

  1. DeepDiver1975 commented on Oct 15, 2026

    @DeepDiver1975
    ContributorAuthor

    Wasserförderung: review of feat/wasserfoerderung-plan-a and the way forward

    This reviews our own branch against FI 5.008 (Staatliche Feuerwehrschulen Bayern), the Wasserförderung guidance a Lehrgang teaches. The branch is #152 plus #164, which was merged into the branch and never reached main; a build of it caused #396. Below: what is wrong with the branch, what it gets right, what the feature is missing, and how to get it shipped.

    Slices are tracked as:

    The FI 5.008 figures quoted here (Tab. 3 friction, the Abb. 22/23 worked examples) still need checking against the document itself before #584 builds golden tests on them.

    1. What is wrong with our approach

    1. It never shipped. One PR grew into a calculator, a hand-written map control, a custom elevation format ("FWDM"), a region-pack download pipeline, sync and PDF.

      The scope is what stopped it.

    2. Our friction table looks optimistic. We use 1,0 bar/100 m at 800 l/min. FI 5.008 Tab. 3 gives 0,24 bar per 20 m, which is 1,2 bar/100 m:

      l/min ours (bar/100 m) FI 5.008 (bar/100 m)
      600 0,6 0,7
      800 1,0 1,2
      1000 1,5 1,7
      1200 2,25 2,4

      At 8 bar out and 1,5 bar in, FI 5.008 gives a 540 m flat stretch (Abb. 22) where we plan 620 m. Our pumps end up about 15 % too far apart, which is the unsafe direction. The doc comment calls our table "verified" but cites no source.

    3. Downhill has no limit. On a descent Cost() goes negative, so a stretch keeps getting longer. Nothing checks the resulting pressure against the hose or the pump; a B hose is rated for 16 bar.

    4. The output is a count, not a plan. A Leitung stores PumpCount, ReservePumpCount and pump positions in metres. It stores no Eingangsdruck or Ausgangsdruck per pump, no rise per section, no chart and no vehicle. The Kommandant learns "3 Verstärkerpumpen" but has nothing to hand to anyone.

    5. The map doesn't show the pumps. MapDrawing draws the route but not the pump positions we compute along it.

    6. Plan A is one length plus one rise. That assumes an even gradient and hides every crest. The only crest-aware path needs a downloaded region pack.

    7. The PDF footer is wrong. It hardcodes "B-800, 8 bar Speisedruck … 3 % Reserveschlauch", although every Leitung stores its own FlowLMin and FeedPressureBar. The 3 % is also not spare hose: it is a pressure margin. Reserve hoses are ceil(L/100).

    8. "3 % of the budget" is a unitless setting that nobody learns on a Lehrgang. FI 5.008 expresses the safety reserve in bar.

    What the branch gets right:

    • It works offline, with region packs and a local elevation model.
    • The plan is stored and never recomputed, so the PDF and sync can't drift. That matches the "values, not references" rule.
    • An incident can hold several Leitungen.
    • The crest check uses the worst point inside a stretch, not just its ends.
    • The plan is part of the Bericht.

    2. What the feature is missing

    Addition Why
    Druckverlauf chart: terrain, pressure sawtooth, min. Eingangsdruck line, numbered pumps Explains the plan at a glance; in the UI and the PDF
    Result per pump: role (Wasserentnahmestelle / Verstärkerpumpe / Einsatzstellenpumpe), station, Höhe, Eingang, Ausgang, section length, rise and B-20 count Turns a count into an order
    Einsatzauftrag per pump position: Funkrufname, UTMREF and WGS84, pressures, hoses to the next pump, neighbours up- and downstream, Rückmeldung Bridges to #87 execution mode
    Profile entry as Stützpunkte (Strecke/Höhe lines), replacing Plan A's single rise Catches crests without a region pack; the points can be read off any topo map
    Pump type 8 or 10 bar, Förderstrom 600–1200, Sicherheitsreserve in bar Matches today's FPN 10-1000 pumps and the Lehrgang vocabulary
    Warnings: overpressure downhill, >1000 l/min (Doppelleitung), a segment that cannot be pumped, Restdruck at the target Safety, and cheap to build
    Cite FI 5.008 in the code, the UI footer and the PDF, with "Planungshilfe — keine Einsatzentscheidung" Credibility with a Kommandant
    GeoJSON/GPX export of route and pumps Feeds #87 and other tools

    Deliberately not planned:

    • Online routing, geocoding or elevation. They send the Einsatz location to third parties and fail without LTE.
    • what3words.
    • Plus Codes as the primary location.
    • Base maps for Bavaria only.
    • A DBV setting value, until it has a source.

    3. The way forward

    Stop rebasing #152. Keep the branch as a source to copy from, and land the work on main in small slices. Each slice renumbers its own migration at merge time.

    1. feat(wasserfoerderung): FI 5.008 planner engine with per-pump pressures #584: planner engine (Domain only, no UI). Rework FörderstreckePlanner to FI 5.008:

      • Tab. 3 friction.
      • A reserve in bar and a pump type.
      • A result record per pump.
      • Downhill overpressure and an impossible segment reported as typed results.
      • Stützpunkt profile input.
      • A partial last segment charged pro rata.

      Golden tests reproduce FI 5.008 Abb. 22 and 23. Reuse ElevationProfileSample, GeoPoint and the branch's crest logic.

    2. feat(wasserfoerderung): tab, persistence, sync and PDF with Druckverlauf chart #585: tab, persistence, sync and PDF.

      • The Leitung stores the per-pump values, copied once and never recomputed.
      • The UI gets profile entry, a pump table, the Druckverlauf chart and the warnings.
      • The PDF gets the table and the chart, with a footer built from the stored values.
      • A new sync command means raising MinimumProtocolVersion, plus a SchemaGuard entry.
    3. feat(wasserfoerderung): Einsatzauftrag per pump position with Funkrufname and UTMREF #586: Einsatzauftrag.

      • The Funkrufname per pump is picked from the Stammdaten vehicles and copied as a value.
      • UTMREF comes from a small BCL-only converter with tests.
      • One PDF page per pump position.
    4. feat(wasserfoerderung): map mode salvage from #164 with pump markers and GeoJSON/GPX export #587: map salvage from feat(wasserfoerderung): draw Förderstrecken on a map with real elevation profiles (#150, Plan B) #164.

      • Bring over the map control, DEM and region packs.
      • Fix the five parked review findings.
      • Draw pump markers on the map.
      • Add GeoJSON/GPX export.
    5. feat: wasserförderung und langewegstrecken - execution mode #87 execution mode builds on feat(wasserfoerderung): Einsatzauftrag per pump position with Funkrufname and UTMREF #586 and feat(wasserfoerderung): map mode salvage from #164 with pump markers and GeoJSON/GPX export #587.

    Open before #584 starts:

    • Which friction table is authoritative: FI 5.008 Tab. 3 or our current values?
    • What is the source for the reserve pump and reserve hose rules, and for the DBV setting?

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions