v1.02 - Location Saving

This commit is contained in:
fraxle
2026-05-16 12:20:13 +01:00
parent 5d371008e5
commit 6dab145e90
2 changed files with 39 additions and 8 deletions
+24
View File
@@ -308,6 +308,30 @@ export function calcVehicleInteriorTemp(Ta, globalRad, solElev, vehicleType = 'c
return Math.max(Ta, Math.min(Ti, 90));
}
// ── FUTURE FEATURE: Vehicle-at-speed thermal model ────────────────────────────
// Idea: extend calcVehicleInteriorTemp (or add a companion function) to model
// cabin temperature for a vehicle travelling at speed, not just parked.
//
// Key physics differences from the static model:
// • Forced convection over the shell scales with vehicle speed (v²), so
// hOut rises significantly — shell cools much faster than when parked.
// • Above ~30 mph the vehicle's own forward motion dominates airflow, so
// ambient wind direction becomes largely irrelevant (simplifies the model).
// • Speed classes to model: urban (~20 mph), dual carriageway (~50 mph),
// motorway (~70 mph) — each with a derived hOut multiplier.
// • Windows-open behaviour changes completely at speed: at 70 mph open
// windows create high-velocity through-flow, dramatically cutting cabin
// temp vs. the sealed-car case (but much less pleasant than AC!).
// • Roof and bonnet solar gain stays the same; side-glass gain is unchanged.
// • AC-off vs AC-on would be the primary user toggle alongside speed class.
//
// Suggested signature:
// calcVehicleInteriorTempAtSpeed(Ta, globalRad, solElev, vehicleType, speedMph, windowsOpen)
//
// This would be a useful companion output column (e.g. "Vehicle (moving)")
// for road-trip planning, dog-in-car safety at a rest stop vs. motorway, etc.
// ─────────────────────────────────────────────────────────────────────────────
// Vapour pressure (Magnus → hPa)
export function vaporPressureHpa(Ta, RH) {
const es = 6.105 * Math.exp((17.27 * Ta) / (237.7 + Ta));