{
  "schemaVersion": 1,
  "slug": "dog-walking-calories-calculator",
  "category": "pets",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "bb339ab6df6ffc0ef4fe3077acb58e66cc6297624b40f373f0a9e957d9061136",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/dog-walking-calories-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": "Kd = Wd × 0.8 × d × T × P; Ky = Wy × 0.53 × d × T; t = d ÷ (3P) × 60",
    "vars": [
      [
        "Wd",
        "dog weight, lb"
      ],
      [
        "Wy",
        "your weight, lb"
      ],
      [
        "d",
        "distance, miles"
      ],
      [
        "T",
        "terrain factor"
      ],
      [
        "P",
        "pace factor"
      ],
      [
        "t",
        "duration, min"
      ]
    ],
    "note": "T = 1, 1.2, 1.5, 1.7 (flat, grass, hilly, snow); P = 0.8, 1, 1.3, 2 (slow, normal, brisk, run). Walking speed = 3P mph."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const T = { flat:1, grass:1.2, hilly:1.5, snow:1.7 }; const P = { slow:0.8, normal:1, brisk:1.3, run:2 }; const mph = 3*(P[pace] || 1); const tf = T[terrain] || 1; const dogCalories = dogWeight*0.8*distance*tf*(P[pace] || 1); const yourCalories = personWeight*0.53*distance*tf; const duration = mph > 0 ? distance/mph*60 : 0; return { dogCalories, yourCalories, duration };",
    "inputs": [
      {
        "name": "dogWeight",
        "type": "number",
        "default": 45,
        "min": 1,
        "max": 300,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "personWeight",
        "type": "number",
        "default": 160,
        "min": 50,
        "max": 600,
        "step": 1,
        "slider": true
      },
      {
        "name": "distance",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 50,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "terrain",
        "type": "select",
        "default": "flat",
        "options": [
          {
            "value": "flat"
          },
          {
            "value": "grass"
          },
          {
            "value": "hilly"
          },
          {
            "value": "snow"
          }
        ]
      },
      {
        "name": "pace",
        "type": "select",
        "default": "normal",
        "options": [
          {
            "value": "slow"
          },
          {
            "value": "normal"
          },
          {
            "value": "brisk"
          },
          {
            "value": "run"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "dogCalories",
        "precision": 0,
        "unit": "kcal"
      },
      {
        "name": "yourCalories",
        "precision": 0,
        "unit": "kcal"
      },
      {
        "name": "duration",
        "precision": 0,
        "unit": "min"
      }
    ],
    "interpret": null
  }
}
