test(threshold): 결로 판정 단언을 운영설정 독립으로 가드
condensation_is_clear(18,92)===false 단언이 결로경보 활성(METRIC_DEWPOINT_MARGIN_C>0) 전제였으나, 로컬 설정이 결로경보를 끄면(=0) is_clear 가 항상 true 로 단락돼 오탐 실패. 바로 아래 evaluate_metric_thresholds 결로 단언과 동일하게 MARGIN>0 가드로 감싸 어떤 운영 임계에서도 green 유지(파일 상단 '설정 독립' 원칙 정합).
This commit is contained in:
parent
992d0f4428
commit
86960a8586
1 changed files with 5 additions and 2 deletions
|
|
@ -104,8 +104,11 @@ check($m !== null && abs($m - 10.7) < 0.6, 'condensation margin 20C/50% ~= 10.7C
|
||||||
// 습도 0%/결측은 산출 불가 → null, 위험 없음
|
// 습도 0%/결측은 산출 불가 → null, 위험 없음
|
||||||
check(dew_point_c(20.0, 0.0) === null, 'dew point undefined at 0% RH');
|
check(dew_point_c(20.0, 0.0) === null, 'dew point undefined at 0% RH');
|
||||||
check(condensation_margin_c(null, 50.0) === null, 'margin null when temp missing');
|
check(condensation_margin_c(null, 50.0) === null, 'margin null when temp missing');
|
||||||
// 고온고습(margin 좁음)은 결로 위험으로 미해소
|
// 고온고습(margin 좁음)은 결로 위험으로 미해소 — 결로경보 활성(MARGIN>0)일 때만 의미가 있다.
|
||||||
check(condensation_is_clear(18.0, 92.0) === false, '18C/92% has tight margin -> not clear');
|
// (비활성이면 condensation_is_clear 는 항상 true 로 단락 → 아래 여유값 해소 단언과 일관)
|
||||||
|
if (METRIC_DEWPOINT_MARGIN_C > 0) {
|
||||||
|
check(condensation_is_clear(18.0, 92.0) === false, '18C/92% has tight margin -> not clear');
|
||||||
|
}
|
||||||
// 여유 있는 값은 해소
|
// 여유 있는 값은 해소
|
||||||
check(condensation_is_clear(20.0, 50.0) === true, '20C/50% margin wide -> clear');
|
check(condensation_is_clear(20.0, 50.0) === true, '20C/50% margin wide -> clear');
|
||||||
// 결측은 정상(해소)로 간주
|
// 결측은 정상(해소)로 간주
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue