2.5.2
Fix sunburn factors
This commit is contained in:
+11
-8
@@ -131,16 +131,19 @@ export function uvSplit(uv, elevDeg) {
|
|||||||
// SUNBURN TIME - minutes to MED for the chosen Fitzpatrick skin type.
|
// SUNBURN TIME - minutes to MED for the chosen Fitzpatrick skin type.
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Standard erythemal model: time_min - base_minutes[type] / UV_index.
|
// Standard erythemal model: time_min - base_minutes[type] / UV_index.
|
||||||
// Numbers are the well-known "unprotected, midday, no sunscreen"
|
// base = minutes to 1 MED at UV = 1, unprotected, no sunscreen.
|
||||||
// reference times at UV = 1. Returns Infinity when UV is 0 (night).
|
// 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 = {
|
export const SKIN_TYPES = {
|
||||||
I: { name: 'I · Very fair', base: 67 },
|
I: { name: 'I · Very fair', base: 100 },
|
||||||
II: { name: 'II · Fair', base: 100 },
|
II: { name: 'II · Fair', base: 150 },
|
||||||
III: { name: 'III · Light', base: 200 },
|
III: { name: 'III · Light', base: 300 },
|
||||||
IV: { name: 'IV · Mid', base: 300 },
|
IV: { name: 'IV · Mid', base: 450 },
|
||||||
V: { name: 'V · Dark', base: 400 },
|
V: { name: 'V · Dark', base: 600 },
|
||||||
VI: { name: 'VI · Very dark', base: 500 },
|
VI: { name: 'VI · Very dark', base: 750 },
|
||||||
};
|
};
|
||||||
export function sunburnMinutes(uv, skinType = 'II') {
|
export function sunburnMinutes(uv, skinType = 'II') {
|
||||||
if (!uv || uv <= 0) return Infinity;
|
if (!uv || uv <= 0) return Infinity;
|
||||||
|
|||||||
Reference in New Issue
Block a user