{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Detached authored planar geometry observations",
  "type": "object",
  "properties": {
    "schema": {
      "const": "bts.detached-planar-quarter-turn.v1"
    },
    "deviceId": {
      "const": "07-02"
    },
    "archiveId": {
      "const": "dry-rectangle-pqrs-072"
    },
    "archiveVersion": {
      "const": "authored-drawing-v1"
    },
    "id": {
      "enum": [
        "draft-a",
        "draft-b"
      ]
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "parentObservationRevision": {
      "type": "integer",
      "minimum": 0
    },
    "angleDegrees": {
      "enum": [
        0,
        90
      ]
    },
    "pointIds": {
      "const": [
        "P",
        "Q",
        "R",
        "S"
      ]
    },
    "verticesMm": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        },
        "minItems": 2,
        "maxItems": 2
      },
      "minItems": 4,
      "maxItems": 4
    },
    "edgesMm": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "minItems": 4,
      "maxItems": 4
    },
    "signedAreaMm2": {
      "type": "number"
    },
    "axisSpansMm": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "minItems": 2,
      "maxItems": 2
    },
    "diagonalsMm": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "minItems": 2,
      "maxItems": 2
    },
    "perimeterMm": {
      "type": "number"
    },
    "pose": {
      "type": "object",
      "properties": {
        "fixedOriginMm": {
          "const": [
            0,
            0
          ]
        },
        "coordinateFrame": {
          "type": "string"
        },
        "rotationDegrees": {
          "enum": [
            0,
            90
          ]
        }
      },
      "required": [
        "fixedOriginMm",
        "coordinateFrame",
        "rotationDegrees"
      ],
      "additionalProperties": false
    },
    "actualInstrumentUse": {
      "const": false
    },
    "mutableGeometry": {
      "const": false
    },
    "provenance": {
      "type": "string"
    }
  },
  "required": [
    "schema",
    "deviceId",
    "archiveId",
    "archiveVersion",
    "id",
    "revision",
    "parentObservationRevision",
    "angleDegrees",
    "pointIds",
    "verticesMm",
    "edgesMm",
    "signedAreaMm2",
    "axisSpansMm",
    "diagonalsMm",
    "perimeterMm",
    "pose",
    "actualInstrumentUse",
    "mutableGeometry",
    "provenance"
  ],
  "additionalProperties": false
}
