feat: 노을 점수 맑은 하늘 55점으로 올리고 공기 보정은 아주 뿌옇거나 습한 날만 깎도록 완화

This commit is contained in:
skkim committed 2026-10-08 11:37:09 +09:00
1 parent 3e376ae4b8
commit cd6769ccef
4 files changed
+12 -12

No files matched your search

+4 -4
View File
@@ -5,8 +5,8 @@ from datetime import datetime, timedelta
from common.enums import Confidence, SkyGrade, SkySituation, SkyType
DISTANCES_KM = (20, 100)
# 물들 구름이 하나도 없을 때의 canvas 값. 50% 까지 곧게 올라가 맑은 날도 구름 몇 % 차이로 점수가 갈린다 (맑은 하늘 40점 = 은은함).
_CLEAR_CANVAS = 0.2
# 물들 구름이 하나도 없을 때의 canvas 값. 50% 까지 곧게 올라가 맑은 날도 구름 몇 % 차이로 점수가 갈린다 (맑은 하늘 55점 = 은은함).
_CLEAR_CANVAS = 0.4
# 해 지기(뜨기) 이만큼 전 사이에 비가 왔다가 그 시각엔 개면 공기가 맑고 구름이 남아 더 붉다.
RAIN_BEFORE_HOURS = (2, 6)
@@ -46,9 +46,9 @@ def air_factor(air: Air) -> float:
"""공기로 구름 점수를 보정하는 배수. 뿌연 공기·높은 습도는 색을 흐리게 하고, 비 갠 뒤는 더 붉다."""
f = 1.0
if air.visibility_km is not None:
f *= _ramp(air.visibility_km, 5, 40, 0.6)
f *= _ramp(air.visibility_km, 5, 20, 0.8)
if air.humidity is not None:
f *= _ramp(air.humidity, 90, 50, 0.75)
f *= _ramp(air.humidity, 90, 70, 0.85)
if air.rain_before is not None and air.rain_before >= 60 and (air.rain_now or 0) < 40:
f *= 1.15
return f