1.9
New SunSoak multiselect UTCI modifiers pulldown Linked new SunSoak to profiles Updated content to match new changes
This commit is contained in:
+10
-3
@@ -16,8 +16,10 @@ import {
|
||||
calcIndoorTempPass, calcManagedIndoorTempPass,
|
||||
} from './physics.js';
|
||||
import { windCompass8, uvSplit, cloudCategory, precipPenalty } from './utils.js';
|
||||
import { UTCI_ENVIRONMENTS } from './config.js';
|
||||
|
||||
export function buildHourlyRows({ forecast, airQuality, location, vehicleType, vehicleVent, buildingType }) {
|
||||
export function buildHourlyRows({ forecast, airQuality, location, vehicleType, vehicleVent, buildingType, utciEnv }) {
|
||||
const env = UTCI_ENVIRONMENTS[utciEnv] ?? UTCI_ENVIRONMENTS.open;
|
||||
const utcOffsetMs = (forecast?.utc_offset_seconds ?? 0) * 1000;
|
||||
|
||||
// Build a fast lookup map from the air quality hourly data: ISO string - index.
|
||||
@@ -75,8 +77,13 @@ export function buildHourlyRows({ forecast, airQuality, location, vehicleType, v
|
||||
// concreteT is now stamped in the two-pass section below (thermal lag).
|
||||
const vehicleT = calcVehicleInteriorTemp(Ta, glob, elev, vehicleType, vehicleVent);
|
||||
const eh = vaporPressureHpa(Ta, RH);
|
||||
const Tmrt = calcTmrt(Ta, dir, dif, glob, elev);
|
||||
const utci = utciApprox(Ta, Tmrt, va, eh);
|
||||
// Apply environment modifier - adjust solar inputs and air temp for shaded environments.
|
||||
const TaEnv = Ta + env.taOffset;
|
||||
const dirEnv = dir * env.dirFactor;
|
||||
const difEnv = dif * env.difFactor;
|
||||
const globEnv = glob * env.globFactor;
|
||||
const Tmrt = calcTmrt(TaEnv, dirEnv, difEnv, globEnv, elev);
|
||||
const utci = utciApprox(TaEnv, Tmrt, va, eh);
|
||||
const utciAdj = utci + precipPenalty(precip, snow, va);
|
||||
// Derived
|
||||
const compass = windCompass8(wd);
|
||||
|
||||
Reference in New Issue
Block a user