Add Water Storage calculator (people → duration → containers)

New offline prepper calculator under Calculators:
- Men/women/children/pregnant-nursing counts with editable per-person
  daily rates (drinking + hygiene/dish use).
- Minimum/Comfortable presets grounded in CDC/FEMA (1 gal/person/day
  floor, store 2 weeks) and National Academies adequate-intake figures;
  Pregnant/Nursing adds the CDC/Ready.gov +0.5/+1 gal. Sources cited in
  the Daily Use info popup.
- Duration slider on a clean ladder (days → weeks → months → years) so it
  never lands on awkward values like "68 days".
- Containers Needed table listing every container (IBC tote → 500 mL
  bottle) with capacity and count + spare for the total volume.
- Total water and total weight (8.345 lb/gal, 1 kg/L).
- Imperial/metric, preset, and people counts persist via local storage.

Pure functions (dailyDemand, totalWater, containersNeeded, waterWeight,
formatDuration) covered by 21 unit tests. Registered in the calculator
list and global app search.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Roland 2026-05-28 17:43:48 -06:00 • committed by lrnselfreliance
parent 2e950b85ad
commit c63fece967
4 changed files with 474 additions and 0 deletions

View file

@ -56,6 +56,11 @@ const SUGGESTED_APPS = [
title: 'Drive Ratio Calculator',
description: 'Calculate pulley, gear, and sprocket ratios, RPM, torque, belt and chain length.'
},
{
location: '/more/calculators?calc=water',
title: 'Water Storage Calculator',
description: 'Calculate water storage for your household: drinking and hygiene needs, how much to store, and how many drums, buckets, or bottles you need.'
},
];
export const useSearch = (defaultLimit = 48, totalPages = 0, emptySearch = false, model) => {