mirror of
https://github.com/lynchaos/ashvale-station.git
synced 2026-09-12 12:47:49 +00:00
Outlook to Live, humidity calibration, Models tab rebuilt without scrollers
Seven day outlook moves from History to Live, which now runs four rows. Conditions ahead tightened so the Live column no longer needs a scroller. Adds HumidityCompensator: an additive RH offset estimated by one-step RLS from a trusted hygrometer, clamped to +/-35%, persisted, exposed at POST /api/calibrate/humidity and on the renamed Models and calibration tab. It also implements the psychrometric term (RH moved from element temperature onto air temperature via conserved vapour pressure) but leaves it OFF by default. The thermal argument predicts a hot element reads low; measured against a reference hygrometer this board read 75.4% where the truth was 50.4%, so it reads HIGH and that correction would push it the wrong way. When the flag is enabled, simulate.py applies the exact inverse, per the simulator/compensator trap in DESIGN.md section 2. Models pane rebuilt: the scorecard is one column per target so all 18 heads are visible, and no panel on the tab uses an internal scroller. Verified in Chromium at 1600x900: Live, History and Models all report zero scrollbars, zero clipping, no page scroll, zero console errors. Backtest is numerically identical to the previous commit, confirming the humidity work is a no-op while the flag is off.
This commit is contained in:
@@ -55,6 +55,21 @@ class SensorConfig:
|
||||
cpu_heat_k: float = 0.55
|
||||
cpu_heat_k_min: float = 0.15
|
||||
cpu_heat_k_max: float = 1.20
|
||||
# Additive RH bias of the element. The datasheet claims about +/-3.5%, but
|
||||
# measured against a reference hygrometer this board read 75.4% where the
|
||||
# truth was 50.4%, so the clamp has to allow far more than spec. Kept finite
|
||||
# so one mistyped reference still cannot run away.
|
||||
# Move RH from the element's temperature onto the compensated air temperature
|
||||
# via conserved vapour pressure. Physically correct IF the humidity element
|
||||
# really sits at temp_raw. Measured on this board it does not: against a
|
||||
# reference hygrometer reading 50.4%, the HTS221 reported 75.4%, so it reads
|
||||
# HIGH and this correction would push it higher still. The error is an
|
||||
# additive element bias, not a thermal gradient. Leave off unless your own
|
||||
# reference says otherwise.
|
||||
hum_psychrometric: bool = False
|
||||
hum_offset: float = 0.0
|
||||
hum_offset_min: float = -35.0
|
||||
hum_offset_max: float = 35.0
|
||||
# Kalman process/measurement noise (per-signal)
|
||||
kalman_q_temp: float = 2.0e-6
|
||||
kalman_r_temp: float = 0.02
|
||||
|
||||
Reference in New Issue
Block a user