baseball-engine / docs /load-timing-evidence.schema.json
github-actions[bot]
Automated Deploy: d224e5e7e286809d46aa129b6ddaf8b604039efe
e21e264
Raw History Blame Contribute Delete
9.32 kB
{
"$defs": {
"EventEvidence": {
"additionalProperties": false,
"properties": {
"event": {
"title": "Event",
"type": "string"
},
"method": {
"title": "Method",
"type": "string"
},
"frame_interval": {
"anyOf": [
{
"items": {
"type": "integer"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Frame Interval"
},
"capture_interval_s": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Capture Interval S"
},
"uncertainty_kind": {
"enum": [
"frame_sensitivity",
"visual_contact_interval",
"supplied_geometry_bound"
],
"title": "Uncertainty Kind",
"type": "string"
},
"accuracy_validated": {
"const": false,
"default": false,
"title": "Accuracy Validated",
"type": "boolean"
}
},
"required": [
"event",
"method",
"frame_interval",
"capture_interval_s",
"uncertainty_kind"
],
"title": "EventEvidence",
"type": "object"
},
"EvidenceMetric": {
"additionalProperties": false,
"properties": {
"key": {
"enum": [
"load_to_swing_ms",
"foot_down_to_swing_ms",
"swing_duration_ms",
"early_late_shift_ms"
],
"title": "Key",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Value"
},
"unit": {
"const": "ms",
"title": "Unit",
"type": "string"
},
"status": {
"enum": [
"estimated",
"unclear",
"not_applicable"
],
"title": "Status",
"type": "string"
},
"confidence": {
"const": "est",
"title": "Confidence",
"type": "string"
},
"note": {
"title": "Note",
"type": "string"
},
"end_event": {
"anyOf": [
{
"enum": [
"contact",
"closest_approach"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Event"
},
"reason_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reason Code"
},
"uncertainty": {
"$ref": "#/$defs/TimingUncertainty"
},
"feasible_shift_intervals_ms": {
"anyOf": [
{
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Feasible Shift Intervals Ms"
}
},
"required": [
"key",
"value",
"unit",
"status",
"confidence",
"note",
"reason_code",
"uncertainty"
],
"title": "EvidenceMetric",
"type": "object"
},
"EvidenceRep": {
"additionalProperties": false,
"properties": {
"rep": {
"minimum": 1,
"title": "Rep",
"type": "integer"
},
"outcome": {
"enum": [
"hit",
"miss",
"unknown"
],
"title": "Outcome",
"type": "string"
},
"stepped": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Stepped"
},
"metrics": {
"items": {
"$ref": "#/$defs/EvidenceMetric"
},
"maxItems": 4,
"minItems": 4,
"title": "Metrics",
"type": "array"
},
"events": {
"items": {
"$ref": "#/$defs/EventEvidence"
},
"title": "Events",
"type": "array"
},
"outcome_method": {
"title": "Outcome Method",
"type": "string"
}
},
"required": [
"rep",
"outcome",
"stepped",
"metrics",
"events",
"outcome_method"
],
"title": "EvidenceRep",
"type": "object"
},
"PracticeContext": {
"additionalProperties": false,
"properties": {
"practice_type": {
"enum": [
"tee",
"soft_toss",
"front_toss",
"live",
"machine",
"unknown"
],
"title": "Practice Type",
"type": "string"
},
"pitch_speed_mps": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Pitch Speed Mps"
},
"pitch_location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Pitch Location"
},
"source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source"
},
"provenance": {
"const": "supplied_by_uploader",
"title": "Provenance",
"type": "string"
}
},
"required": [
"practice_type",
"pitch_speed_mps",
"pitch_location",
"source",
"provenance"
],
"title": "PracticeContext",
"type": "object"
},
"TimingCapture": {
"additionalProperties": false,
"properties": {
"ok": {
"title": "Ok",
"type": "boolean"
},
"reasons": {
"items": {
"enum": [
"a_bit_blurry",
"a_bit_dark",
"low_fps",
"low_pose_confidence",
"multiple_people",
"no_person",
"partly_out_of_frame",
"person_too_small",
"player_switched",
"pose_confidence_fair",
"too_blurry",
"too_dark",
"very_low_fps",
"view_uncertain",
"wrong_view"
],
"type": "string"
},
"title": "Reasons",
"type": "array"
}
},
"required": [
"ok",
"reasons"
],
"title": "TimingCapture",
"type": "object"
},
"TimingUncertainty": {
"additionalProperties": false,
"properties": {
"interval_ms": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Interval Ms"
},
"kind": {
"enum": [
"frame_sensitivity",
"supplied_geometry_bound",
"unknown"
],
"title": "Kind",
"type": "string"
},
"accuracy_validated": {
"const": false,
"default": false,
"title": "Accuracy Validated",
"type": "boolean"
},
"note": {
"title": "Note",
"type": "string"
}
},
"required": [
"interval_ms",
"kind",
"note"
],
"title": "TimingUncertainty",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"schema_version": {
"const": "3.1",
"title": "Schema Version",
"type": "string"
},
"discipline": {
"const": "hitting",
"title": "Discipline",
"type": "string"
},
"time_basis": {
"const": "capture",
"title": "Time Basis",
"type": "string"
},
"capture": {
"$ref": "#/$defs/TimingCapture"
},
"context": {
"$ref": "#/$defs/PracticeContext"
},
"reps": {
"items": {
"$ref": "#/$defs/EvidenceRep"
},
"maxItems": 100,
"title": "Reps",
"type": "array"
}
},
"required": [
"schema_version",
"discipline",
"time_basis",
"capture",
"context",
"reps"
],
"title": "TimingEvidencePayload",
"type": "object"
}