{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://azaion.dev/schemas/autopilot/mission-schema.json", "title": "Mission", "description": "Wire contract for missions returned by the external `missions` API and pulled by autopilot at mission start. Owner: external `missions` repo (extraction location TBD per architecture.md §8 Q5). This file is the bundled copy used by `mission_client::pull_mission`.", "type": "object", "required": ["mission_id", "schema_version", "items", "geofences", "return_point"], "additionalProperties": false, "properties": { "mission_id": { "type": "string", "description": "UUID v4 string identifying the mission.", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "schema_version": { "type": "string", "description": "Semver of the mission-schema; `mission_client` rejects mismatching majors.", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" }, "items": { "type": "array", "description": "Business-level mission items, per data_model.md §MissionItem. Translated to MAVLink waypoints by `mission_executor`.", "minItems": 1, "items": { "$ref": "#/definitions/MissionItem" } }, "geofences": { "type": "array", "items": { "$ref": "#/definitions/Geofence" } }, "return_point": { "$ref": "#/definitions/Coordinate" } }, "definitions": { "Coordinate": { "type": "object", "required": ["latitude", "longitude", "altitude_m"], "additionalProperties": false, "properties": { "latitude": { "type": "number", "minimum": -90.0, "maximum": 90.0 }, "longitude": { "type": "number", "minimum": -180.0, "maximum": 180.0 }, "altitude_m": { "type": "number" } } }, "Geofence": { "type": "object", "required": ["kind", "vertices"], "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["INCLUSION", "EXCLUSION"] }, "vertices": { "type": "array", "minItems": 3, "items": { "$ref": "#/definitions/Coordinate" } } } }, "MissionItem": { "type": "object", "required": ["id", "kind"], "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "kind": { "type": "string", "enum": ["waypoint", "search", "region_search", "return", "target_follow_breakpoint"] }, "at": { "$ref": "#/definitions/Coordinate" }, "region": { "type": "array", "items": { "$ref": "#/definitions/Coordinate" } }, "cruise_speed_mps": { "type": "number", "minimum": 0.0 }, "target_classes": { "type": "array", "items": { "type": "string" } } } } } }