{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/electrical.voltage_drop.input.json",
  "title": "Voltage drop — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "dc",
        "three"
      ],
      "description": "dc = DC / resistive 1φ go-and-return (×2); three = balanced 3φ resistive estimate (×√3). REST/UI default dc if omitted; Agent schema requires mode."
    },
    "I": {
      "type": "number",
      "minimum": 0,
      "description": "Load current (A)"
    },
    "length_m": {
      "type": "number",
      "minimum": 0,
      "description": "One-way conductor length (m)"
    },
    "R_ohm_per_km": {
      "type": "number",
      "minimum": 0,
      "description": "Conductor resistance (Ω/km)"
    },
    "V_system": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Optional source voltage (V). For 3φ this is line-to-line. Adds percent_drop and V_load."
    },
    "u_I": {
      "type": "number",
      "minimum": 0,
      "description": "Optional standard uncertainty of I (A)"
    },
    "u_length_m": {
      "type": "number",
      "minimum": 0,
      "description": "Optional standard uncertainty of length_m (m)"
    },
    "u_R_ohm_per_km": {
      "type": "number",
      "minimum": 0,
      "description": "Optional standard uncertainty of R_ohm_per_km (Ω/km)"
    },
    "uncertainty_k": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Coverage factor for expanded U on V_drop; default 2 when any u_* is set. Mutually exclusive with confidence."
    },
    "confidence": {
      "type": "number",
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 1,
      "description": "Optional coverage probability instead of uncertainty_k. Mutually exclusive with uncertainty_k."
    }
  },
  "required": [
    "mode",
    "I",
    "length_m",
    "R_ohm_per_km"
  ],
  "allOf": [
    {
      "not": {
        "required": [
          "uncertainty_k",
          "confidence"
        ]
      }
    },
    {
      "if": {
        "anyOf": [
          {
            "required": [
              "uncertainty_k"
            ]
          },
          {
            "required": [
              "confidence"
            ]
          }
        ]
      },
      "then": {
        "anyOf": [
          {
            "required": [
              "u_I"
            ]
          },
          {
            "required": [
              "u_length_m"
            ]
          },
          {
            "required": [
              "u_R_ohm_per_km"
            ]
          }
        ]
      }
    }
  ],
  "description": "Estimate conductor voltage drop from current, one-way length, and Ω/km for DC / resistive 1φ or balanced 3φ (resistance-only, PF≈1). Always returns conductor I²R loss P_loss. Optional V_system adds percent drop and estimated load voltage; optional u_* compose expanded uncertainty on V_drop via Uncertainty Engine. (calculation_version 1.5.2)"
}
