{
  "schemaVersion": 1,
  "slug": "camp-meal-planner-calculator",
  "category": "travel",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "913387b33eea6681587945cce84c0a4804059ef3e695657eb86eef0860e180cb",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/camp-meal-planner-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "M = N·d·m;  W = M·w_s;  Water = N·d·q",
    "vars": [
      [
        "M",
        "Total meals"
      ],
      [
        "N",
        "Number of people"
      ],
      [
        "d",
        "Trip days"
      ],
      [
        "m",
        "Meals per person per day"
      ],
      [
        "w_s",
        "Food weight per meal by style, kg"
      ],
      [
        "q",
        "Water per person per day, L"
      ],
      [
        "W",
        "Total food weight, kg"
      ],
      [
        "Water",
        "Total water needed, L"
      ]
    ],
    "note": "Food weight per meal (kg) by style: car camp 0.45, backpack 0.16, one-pot 0.35, cold 0.4. Food cost per meal (USD): 4.5, 12, 5.5, 5. Total water uses the user-entered litres per person per day."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const W = { carCamp:0.45, backpack:0.16, onePot:0.35, cold:0.4 }; const C = { carCamp:4.5, backpack:12, onePot:5.5, cold:5 }; const totalMeals = people*days*mealsPerDay; const totalCalories = totalMeals*caloriesPerMeal; const foodWeightKg = totalMeals*(W[style] || 0.45); const waterLitres = people*days*waterPerPersonDay; const packing = style === 'backpack' ? 'Dehydrated meals save weight but need extra water — count it in your carry weight' : style === 'cold' ? 'Use a hard cooler with block ice; block ice lasts far longer than cubes' : 'Pre-portion dry ingredients at home to cut preparation time at camp'; return { totalMeals, totalCalories, foodWeightKg, waterLitres, cost: totalMeals*(C[style] || 4.5), packing };",
    "inputs": [
      {
        "name": "people",
        "type": "number",
        "default": 4,
        "min": 1,
        "max": 40,
        "step": 1,
        "slider": true
      },
      {
        "name": "days",
        "type": "number",
        "default": 3,
        "min": 1,
        "max": 60,
        "step": 1,
        "slider": true
      },
      {
        "name": "mealsPerDay",
        "type": "number",
        "default": 3,
        "min": 1,
        "max": 6,
        "step": 1
      },
      {
        "name": "style",
        "type": "select",
        "default": "carCamp",
        "options": [
          {
            "value": "carCamp"
          },
          {
            "value": "backpack"
          },
          {
            "value": "onePot"
          },
          {
            "value": "cold"
          }
        ]
      },
      {
        "name": "caloriesPerMeal",
        "type": "number",
        "default": 600,
        "min": 100,
        "max": 1500,
        "step": 50,
        "slider": true
      },
      {
        "name": "waterPerPersonDay",
        "type": "number",
        "default": 3,
        "min": 0.5,
        "max": 15,
        "step": 0.5,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "totalMeals",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "totalCalories",
        "precision": 0,
        "unit": "kcal"
      },
      {
        "name": "foodWeightKg",
        "precision": 1,
        "unit": "kg"
      },
      {
        "name": "waterLitres",
        "precision": 1,
        "unit": "L"
      },
      {
        "name": "cost",
        "precision": 0,
        "unit": "$"
      },
      {
        "name": "packing",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
