feat(co-messung): the ppm bands are pegged to the German AGW and the floor labels to EG/OG/UG
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Read CoSeverityClassifier.cs, CoSeverity.cs, CoMeasurementLabels.cs, IncidentSettings, and CoMeasurementTests.cs to trace how thresholds, floor labels, and incident settings are connected. First review how incident settings are serialized into incident files and consumed by CoMessprotokollView; done means configurable threshold sets and floor-numbering schemes are used consistently, the selected threshold set is recorded, and tests assert the selected set's boundaries.
由索引模型根据 Issue 内容生成。
描述
From a portability review of main (ecb341b).
Two hardcoded local conventions in Domain/CoMeasurement
The ppm bands are a German regulatory limit, stated as such in the code.
// src/LageBuch.Domain/CoMeasurement/CoSeverityClassifier.cs
public const int ElevatedThresholdPpm = 30;
public const int DangerousThresholdPpm = 200;
public const int LethalThresholdPpm = 800;
and CoSeverity.cs says why: "Bands anchor on the German AGW (Arbeitsplatzgrenzwert, 30 ppm 8h-TWA) at the low end and the commonly-cited CO lethality range … at the high end."
The AGW is federal, so this is correct everywhere in Germany and fine for Austria. It is wrong elsewhere: the UK WEL is 20 ppm 8h-TWA, US OSHA PEL is 50 and NIOSH 35. A reading of 25 ppm shows as Normal here and would be over the limit in the UK — and the colour band in CoMessprotokollView is what an Einsatzleiter actually looks at.
Floor labels are continental.
// src/LageBuch.Domain/CoMeasurement/CoMeasurementLabels.cs
0 => "EG",
> 0 => $"{ordinal}. OG",
< 0 => $"{-ordinal}. UG",
EG-as-zero does not map onto UK/US numbering, where the ground floor is the first floor. This is not a translation — "EG" → "Ground" leaves 1. OG meaning something different from 1st floor. It is a numbering scheme, and it is baked into a switch.
Proposal
Both become settings rather than constants:
- a named CO threshold set (
AGW/WEL/NIOSH, defaulting to AGW) inIncidentSettings, withCoSeverityClassifiertaking the set rather than reading its own constants. Worth storing the chosen set's name in the incident file, so a report read years later says which limits its colours meant. - a floor-numbering scheme (
EG-OG-UG/ground-first/first-second), consumed byCoMeasurementLabels.FloorLabel.
Caveat
CoMeasurementTests.cs pins 29/30/199/200/799/800/2000/2001 exactly. Those assertions encode the AGW and must be rewritten as assertions about the selected set, not loosened.
Low priority — nobody is running this outside the German-speaking area today. Filed so the constants are not mistaken for universal ones later.
- 主要语言
- C#
- 星标
- 1
- 派生
- 3
- 平均合并
- 4 小时 34 分钟
- 30 天内合并 PR
- 182
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeForFire/lagebuch 的其他 Issue
-
bug ux
难度 2/5 1-3 小时 新手友好度 78/100
CodeForFire/lagebuch#714 ·
维护者通常 1 天内回复
-
bug ux
难度 2/5 1-3 小时 新手友好度 75/100
CodeForFire/lagebuch#713 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
CodeForFire/lagebuch#405 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
CodeForFire/lagebuch#349 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
CodeForFire/lagebuch#348 ·
维护者通常 1 天内回复
查看 CodeForFire/lagebuch 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
KnifeLemon/Filee#363 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
-
area-Native untriaged
难度 2/5 1-3 小时 新手友好度 76/100
dotnet/machinelearning#7837 ·
维护者通常 2 天内回复
-
[CI] .trgen-ignore required for several grammars.可能已有人在做 @kaby76 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
antlr/grammars-v4#5073 ·
维护者通常 1 天内回复
-
[Enhancement]: Add a search box to the Time Zone dropdown可能已有人在做 @idumlupinar 今天认领。 未关闭Status: New
难度 2/5 1-3 小时 新手友好度 85/100
dnnsoftware/Dnn.Platform#7579 ·
维护者通常 2 天内回复