debugWBGTDummy.ts
Fires a hardcoded WBGT inference call for manual model verification
Purpose
This module provides a one-shot debug helper for verifying that the WBGT ONNX models load, run, and produce results for a known set of hardcoded meteorological inputs. It is intended to be called from the Debug screen or a test harness and has no effect on application state.
Its responsibilities include:
- Constructing a fixed input vector from hardcoded meteorological values
- Logging the ordered input vector before inference for comparison against expected model inputs
- Invoking
runInferencewith the fixed values - Returning the raw inference result for inspection
Invariants
Hardcoded Inputs Only
All inputs are compile-time constants in the fixed WBGT model order [Ta, Wind, Solar, RH]:
| Index | Field | Value |
|---|---|---|
| 0 | Air temp (°C) | 22 |
| 1 | Wind (m/s) | 3 |
| 2 | Solar (W/m²) | 300 |
| 3 | RH (%) | 45 |
Exports
debugWBGTDummy()
async function debugWBGTDummy(): Promise<InferenceResult>
Runs a single WBGT inference with fixed meteorological inputs. Returns the raw InferenceResult including predictedNWB, predictedGT, wbgtSun, and wbgtShade.