feat(atemschutz): the retreat rule is a flat 50 bar — the Einstiegsdruck never enters it, and bar is a literal not a unit
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading src/LageBuch.Domain/Atemschutz/AtemschutzTrupp.cs, ScbaViewModel.cs, and the PressureReading and RecordScbaPressureCommand definitions; then inspect the schema, PDF output, and AtemschutzTests noted in the issue. The issue frames this as a milestone requiring domain decisions and cross-cutting changes, not a newcomer-sized task. Done would require an agreed pressure-unit and alarm-rule design, with tests deliberately covering the new semantics and preserving the default behavior.
Written by the indexing model from the issue text.
Description
From a portability review of main (ecb341b). The largest single item that review turned up; filing it for the record rather than proposing it be done soon.
What the rule is today
// src/LageBuch.Domain/Atemschutz/AtemschutzTrupp.cs
public const int DefaultReturnPressureBar = 50; // :31
public bool IsPressureAlarm => (IsActive || IsWithdrawing) // :328
&& LatestPressure is { } p && p <= ReturnPressureBar;
A flat absolute comparison against a per-Trupp scalar seeded from IncidentSettings.ReturnPressureBar. There is no computed retreat pressure anywhere in the repo — no two-thirds rule, no reserve calculation, no cylinder-volume or consumption model. Greps for 2/3, Zweidrittel, Reserve, Flasche find nothing.
Two consequences
Entry pressure is captured but never used. Register demands an Einstiegsdruck and validates it (:117-162), and then it plays no part in any alarm. A Trupp starting at 200 bar and one starting at 300 bar alarm at the same 50 bar, having consumed very different fractions of their air. The Einstiegsdruck is documentation only.
Whether that is wrong for German practice is a question for someone who teaches Atemschutz, not for me — a fixed Rückzugsdruck is a defensible and widely taught rule, and it is configurable per install. Flagging it because the captured-but-unused input looks like an unfinished thought rather than a decision.
bar is not a unit, it is a literal. PressureReading is (DateTimeOffset Time, int Bar); the sync command is RecordScbaPressureCommand(Guid TruppId, int Bar); the column is return_pressure_bar; the master-data key is return_pressure_bar; and " bar" is concatenated as a string suffix in nine places across the UI, the PDF and the domain exception message (:349). There is no conversion path.
Also hardcoded rather than configured: the 300-bar entry default is a UI literal (ScbaViewModel.cs:228,524), so a brigade on 200-bar sets retypes it on every registration; MaxPressureBar = 400 (:33); and the pressure-check interval defaults to a third of the Einsatzzeit (ScbaViewModel.cs:376-382) rather than to the domain's own DefaultPressureControlIntervalMinutes.
Why this blocks any use outside the German doctrine
A fixed bar threshold cannot express either of the two rules used in the English-speaking fire services: UK BA entry control computes a time-of-whistle from cylinder pressure and consumption rate, and NFPA 1404's rule of air management is a fraction (leave by one third remaining). Neither is a constant.
Shape of a fix, if it is ever wanted
- a pressure unit on
IncidentSettings(bar/psi) with display and validation derived from it, rather than a literal suffix; - entry pressure as a first-class input to the alarm rule;
- the rule itself selected from
{ absolute threshold, fraction of entry pressure, time-based }, defaulting to the current absolute behaviour so no existing install changes.
This touches PressureReading, the sync command, the schema, the PDF and AtemschutzTests (:211-226 pins the current semantics and would be rewritten deliberately, not adjusted). It is a milestone, not a PR.
- Dominant language
- C#
- Stars
- 1
- Forks
- 3
- Avg merge
- 4h 34m
- Merged PRs (30d)
- 182
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CodeForFire/lagebuch
-
bug ux
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CodeForFire/lagebuch#714 ·
Maintainers usually reply within 1 day
-
bug ux
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CodeForFire/lagebuch#713 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CodeForFire/lagebuch#405 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
CodeForFire/lagebuch#349 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
CodeForFire/lagebuch#348 ·
Maintainers usually reply within 1 day
All issues in CodeForFire/lagebuch
Similar issues
-
/api/oauth/introspect emits clientId and tokenType instead of RFC 7662's client_id and token_typeOpenbug P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#2317 ·
Maintainers usually reply within 1 day
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO orderPossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
joinrpg/joinrpg-net#5752 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
dimitar-radenkov/Pointframe#294 ·
Maintainers usually reply within 1 day
-
kind/feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Altinn/altinn-correspondence#2154 ·
Maintainers usually reply within 1 day