From efc9b0eed96d60fedbf8f73eeb2654c001f4ec39 Mon Sep 17 00:00:00 2001 From: fraxle Date: Wed, 3 Jun 2026 20:46:49 +0100 Subject: [PATCH] 2.5.2 Fix sunburn factors --- assets/js/utils.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/assets/js/utils.js b/assets/js/utils.js index c02176f..808b600 100644 --- a/assets/js/utils.js +++ b/assets/js/utils.js @@ -131,16 +131,19 @@ export function uvSplit(uv, elevDeg) { // SUNBURN TIME - minutes to MED for the chosen Fitzpatrick skin type. // ------------------------------------------------------------------- // Standard erythemal model: time_min - base_minutes[type] / UV_index. -// Numbers are the well-known "unprotected, midday, no sunscreen" -// reference times at UV = 1. Returns Infinity when UV is 0 (night). +// base = minutes to 1 MED at UV = 1, unprotected, no sunscreen. +// Calibrated to the erythemal-dose science (UVI = 40 x E_er W/m-, +// MED_II ~ 250 J/m-), giving ~150/UV min for fair skin rather than +// the more alarmist consumer "10 min at UV 10" rule of thumb. +// Returns Infinity when UV is 0 (night). // ------------------------------------------------------------------- export const SKIN_TYPES = { - I: { name: 'I · Very fair', base: 67 }, - II: { name: 'II · Fair', base: 100 }, - III: { name: 'III · Light', base: 200 }, - IV: { name: 'IV · Mid', base: 300 }, - V: { name: 'V · Dark', base: 400 }, - VI: { name: 'VI · Very dark', base: 500 }, + I: { name: 'I · Very fair', base: 100 }, + II: { name: 'II · Fair', base: 150 }, + III: { name: 'III · Light', base: 300 }, + IV: { name: 'IV · Mid', base: 450 }, + V: { name: 'V · Dark', base: 600 }, + VI: { name: 'VI · Very dark', base: 750 }, }; export function sunburnMinutes(uv, skinType = 'II') { if (!uv || uv <= 0) return Infinity;