{
  "schemaVersion": 1,
  "slug": "tent-size-calculator",
  "category": "travel",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "e3a02ef603f9cac85204b00e26fb76c3b64ae16d0a316da15be4bd2fd25d1089",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/tent-size-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": "A = (P + g) × 18 × f",
    "vars": [
      [
        "P",
        "Number of people"
      ],
      [
        "g",
        "Gear allowance: 0/1/3"
      ],
      [
        "f",
        "Family trip factor: 1.6, else 1"
      ],
      [
        "A",
        "Recommended floor area (ft²)"
      ]
    ],
    "note": "Capacity adds 0, 1 or 3 places for none, some or lots of gear. Floor area = capacity × 18 sq ft, with a 1.6 family-style factor. Walking distance changes only the packing note."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const extra = gear === 'lots' ? 3 : gear === 'some' ? 1 : 0; const capacity = people+extra; const floorArea = capacity*18*(tripType === 'family' ? 1.6 : 1); const style = tripType === 'backpack' ? 'Lightweight 3-season dome or trekking pole tent' : tripType === 'family' ? 'Cabin or tunnel tent with a sewn-in groundsheet' : tripType === 'winter' ? '4-season geodesic tent with a strong pole structure' : tripType === 'festival' ? 'Simple pop-up or tunnel tent' : '3-season dome tent'; const features = tripType === 'family' ? 'Look for blackout bedrooms, a porch and a tall enough design to stand up in' : 'Look for a full-coverage fly, taped seams and an aluminium pole set'; const note = packedSize === 'long' ? 'Split the load between people — poles in one pack, inner and fly in another' : 'Weight matters less if you are only walking from the car'; return { recommendedCapacity: capacity, floorArea, style, features, note };",
    "inputs": [
      {
        "name": "people",
        "type": "number",
        "default": 2,
        "min": 1,
        "max": 20,
        "step": 1,
        "slider": true
      },
      {
        "name": "gear",
        "type": "select",
        "default": "some",
        "options": [
          {
            "value": "none"
          },
          {
            "value": "some"
          },
          {
            "value": "lots"
          }
        ]
      },
      {
        "name": "tripType",
        "type": "select",
        "default": "weekend",
        "options": [
          {
            "value": "backpack"
          },
          {
            "value": "weekend"
          },
          {
            "value": "festival"
          },
          {
            "value": "family"
          },
          {
            "value": "winter"
          }
        ]
      },
      {
        "name": "packedSize",
        "type": "select",
        "default": "short",
        "options": [
          {
            "value": "short"
          },
          {
            "value": "long"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "recommendedCapacity",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "floorArea",
        "precision": 0,
        "unit": "sq ft"
      },
      {
        "name": "style",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "features",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "note",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
