Verified Commit a00c80f2 authored by Dan Jones's avatar Dan Jones
Browse files

refactor: load geojson defs from published schemas

parent a0d9c041
Pipeline #227529 failed with stages
in 18 seconds
...@@ -184,20 +184,11 @@ platform_schema = { ...@@ -184,20 +184,11 @@ platform_schema = {
region_schema = { region_schema = {
"type": "object", "type": "object",
"properties": { "properties": {
"geometry_coordinates": { "geometry": {
"type": "array", "$ref": "https://geojson.org/schema/Polygon.json",
"example": [
[
[-4.1777839187560915, 50.34173405662855],
[-4.1777839187560915, 50.33820949229701],
[-4.143667777943875, 50.33820949229701],
[-4.143667777943875, 50.34173405662855],
[-4.1777839187560915, 50.34173405662855],
]
],
}, },
}, },
"description": "Using GEOJSON, exact 4-point region (rectangle shaped - 5 points)", "description": "GeoJSON Polygon",
} }
squad_metadata_schema = { squad_metadata_schema = {
......
...@@ -14,9 +14,11 @@ from formats.alert import alert_schema ...@@ -14,9 +14,11 @@ from formats.alert import alert_schema
from flasgger import Swagger from flasgger import Swagger
from flask import Flask from flask import Flask
import json
import os import os
import re
import requests
app = Flask(__name__)
url_prefix = os.getenv("URL_PREFIX", "") url_prefix = os.getenv("URL_PREFIX", "")
...@@ -103,7 +105,98 @@ swagger_config = { ...@@ -103,7 +105,98 @@ swagger_config = {
}, },
} }
swag = Swagger(app, config=swagger_config, merge=True)
def resolve_ref(ref):
"""
Get schema URL, parse JSON
Return None if either fails
"""
try:
res = requests.get(ref)
if res.status_code == 200:
return res.json()
else:
return None
except (json.JSONDecodeError, ValueError):
return None
def rename_ref(ref):
"""
Convert remote ref URL into a name that can
be used for a local ref in the schema
Remote the URL scheme and replace / with .
"""
# remove url scheme
deschemed = re.sub(r"^[htps]*\:*[/]{2}", "", ref)
# replace / with . since the name will be in a path
return re.sub(r"[/]", ".", deschemed)
def nested_replace(source, key, value, replace_with):
"""
Find all instances of a key value pair in a nested
dictionary and replace the value with replace_with
"""
for k,v in source.items():
if k == key and v == value:
source[k] = replace_with
elif type(v) is list:
for item in v:
if type(item) is dict:
nested_replace(item, key, value, replace_with)
if type(v) is dict:
nested_replace(v, key, value, replace_with)
def inject_schema(schema, remote_ref):
"""
Given a parent schema and a remote ref
1. get the remote ref schema
2. create a local reference name (without path separators)
3. insert into components.schemas
4. replace remote references with local references
returns True if resolved and injected
"""
local_name = rename_ref(remote_ref)
local_ref = f"#/components/schemas/{local_name}"
ref_schema = resolve_ref(remote_ref)
if (ref_schema is not None):
nested_replace(schema, "$ref", remote_ref, local_ref)
schema["components"]["schemas"][local_name] = ref_schema
return True
else:
return False
def import_remote_refs():
"""
inject the following remote refs into the schema
and replace the remote refs with local refs
returns True if all schemas resolved and injected
"""
ref_imports = [
"https://geojson.org/schema/Feature.json",
"https://geojson.org/schema/FeatureCollection.json",
"https://geojson.org/schema/LineString.json",
"https://geojson.org/schema/Point.json",
"https://geojson.org/schema/Polygon.json",
]
return all([
inject_schema(swagger_config, ref)
for ref in ref_imports
])
import_remote_refs()
app = Flask(__name__)
Swagger(app, config=swagger_config, merge=True)
flask_host = os.getenv( flask_host = os.getenv(
"FLASK_HOST", "localhost" "FLASK_HOST", "localhost"
......
{ {
"openapi": "3.0.2",
"swagger_ui": true,
"specs_route": "/",
"info": {
"title": "SoAR Backbone Message Formats",
"version": "1.0",
"description": "SoAR message protocol in schemas"
},
"specs": [
{
"endpoint": "swagger",
"route": "/soar_protocol.json"
}
],
"url_prefix": "",
"paths": {},
"components": { "components": {
"schemas": { "schemas": {
"MESSAGE": { "MESSAGE": {
"type": "object",
"description": "Full message definition with message-metadata in `header` and different message type schemas under `payload`", "description": "Full message definition with message-metadata in `header` and different message type schemas under `payload`",
"properties": { "properties": {
"header": { "header": {
...@@ -14,178 +31,145 @@ ...@@ -14,178 +31,145 @@
"required": [ "required": [
"header", "header",
"payload" "payload"
], ]
"type": "object"
},
"acknowledgement": {
"properties": {
"approved": {
"description": "Human-in-the-loop approval.1 - Plan approved; 0 - Plan Rejected",
"type": "boolean"
}, },
"autonomy_engine_plan_ID": { "payload": {
"description": "Mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", "discriminator": {
"example": 1, "propertyName": "message_type",
"type": "integer" "mapping": {
"alert": "#/components/schemas/alert",
"mission_plan": "#/components/schemas/mission_plan",
"mission_plan_encoded": "#/components/schemas/mission_plan_encoded",
"observation": "#/components/schemas/observation",
"observation_encoded": "#/components/schemas/observation_encoded",
"planning_configuration": "#/components/schemas/planning_configuration",
"platform_status": "#/components/schemas/platform_status",
"platform_status_encoded": "#/components/schemas/platform_status_encoded",
"acknowledgement": "#/components/schemas/acknowledgement",
"survey": "#/components/schemas/survey",
"survey_encoded": "#/components/schemas/survey_encoded"
}
}, },
"message_type": { "oneOf": [
"description": "Type of message", {
"enum": [ "$ref": "#/components/schemas/alert"
"acknowledgement"
],
"example": "acknowledgement",
"type": "string"
}, },
"platform_ID": { {
"description": "Unique identifier for this platform", "$ref": "#/components/schemas/acknowledgement"
"example": "reav-x-1",
"type": "string"
}
}, },
"required": [ {
"message_type", "$ref": "#/components/schemas/mission_plan"
"autonomy_engine_plan_ID",
"platform_ID",
"approved"
],
"type": "object"
}, },
"alert": { {
"properties": { "$ref": "#/components/schemas/mission_plan_encoded"
"code": {
"description": "Alert code",
"example": 345,
"type": "integer"
}, },
"details": { {
"description": "Detailed reason for the alert ", "$ref": "#/components/schemas/observation"
"example": "Discrepancy between rudder and actuator positions : Rudder Pos=10.31\u00b0, Steering Actuator Pos=28.65\u00b0, Discrepancy=18.33\u00b0",
"type": "string"
}, },
"message_type": { {
"description": "Type of message", "$ref": "#/components/schemas/observation_encoded"
"enum": [
"alert"
],
"example": "alert",
"type": "string"
}, },
"platform_ID": { {
"description": "Unique identifier for this platform", "$ref": "#/components/schemas/planning_configuration"
"example": "usvdecibel",
"type": "string"
}, },
"platform_timestamp": { {
"description": "Timestamp for onboard platform status message", "$ref": "#/components/schemas/platform_status"
"example": "2022-12-21T00:00:00Z",
"format": "date-time",
"type": "string"
}, },
"severity": { {
"description": "Severity level of alert", "$ref": "#/components/schemas/platform_status_encoded"
"enum": [
"Emergency",
"Alarm",
"Warning",
"Caution"
],
"example": "Alarm",
"type": "string"
}, },
"subsystem": { {
"description": "System that generated the alert", "$ref": "#/components/schemas/survey"
"example": "Onboard Fault Monitor",
"type": "string"
}, },
"summary": { {
"description": "High level description of the alert", "$ref": "#/components/schemas/survey_encoded"
"example": "Steering Damage - Port Side",
"type": "string"
} }
}, ]
"required": [
"message_type",
"platform_ID",
"code",
"severity"
],
"type": "object"
}, },
"header": { "header": {
"type": "object",
"discriminator": { "discriminator": {
"propertyName": "message_type" "propertyName": "message_type"
}, },
"properties": { "properties": {
"delivery_type": {
"default": "publish",
"description": "To publish or broadcast this message.",
"enum": [
"broadcast",
"publish"
],
"example": "publish",
"type": "string"
},
"destination": {
"description": "Publisher topic; What is the destination of this message",
"example": "ah1",
"type": "string"
},
"encoded": {
"description": "Indicate that message raw (encoded) or decoded. Options: encoded=true, decoded=false",
"example": false,
"type": "boolean"
},
"message_ID": { "message_ID": {
"type": "string",
"description": "An identifier for the type of message received.", "description": "An identifier for the type of message received.",
"example": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", "example": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd"
"type": "string"
},
"source": {
"description": "The sender; Where is this message from",
"example": "autonomy_engine",
"type": "string"
}, },
"timestamp": { "timestamp": {
"description": "Timestamp of message", "type": "string",
"example": "2022-11-16T00:00:00Z",
"format": "date-time", "format": "date-time",
"type": "string" "description": "Timestamp of message",
"example": "2022-11-16T00:00:00Z"
}, },
"version": { "version": {
"description": "Version of comms backbone message format protocol", "type": "number",
"example": 2.0,
"format": "float", "format": "float",
"type": "number" "description": "Version of comms backbone message format protocol",
} "example": 2.0
}, },
"type": "object" "source": {
"type": "string",
"description": "The sender; Where is this message from",
"example": "autonomy_engine"
},
"destination": {
"type": "string",
"description": "Publisher topic; What is the destination of this message",
"example": "ah1"
},
"encoded": {
"type": "boolean",
"description": "Indicate that message raw (encoded) or decoded. Options: encoded=true, decoded=false",
"example": false
},
"delivery_type": {
"type": "string",
"description": "To publish or broadcast this message.",
"enum": [
"broadcast",
"publish"
],
"example": "publish",
"default": "publish"
}
}
}, },
"mission_plan": { "mission_plan": {
"type": "object",
"properties": { "properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "mission_plan",
"enum": [
"mission_plan"
]
},
"autonomy_engine_plan_ID": { "autonomy_engine_plan_ID": {
"type": "integer",
"description": "Unique identifier for this plangenerated by the Autonomy Engine", "description": "Unique identifier for this plangenerated by the Autonomy Engine",
"example": 3, "example": 3
"type": "integer" },
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "reav-x-1"
}, },
"emergency": { "emergency": {
"default": false, "type": "boolean",
"description": "To indicate if this is an emergency. true = emergency and false = no emergency", "description": "To indicate if this is an emergency. true = emergency and false = no emergency",
"example": false, "default": false,
"type": "boolean" "example": false
},
"message_type": {
"description": "Type of message",
"enum": [
"mission_plan"
],
"example": "mission_plan",
"type": "string"
}, },
"plan": { "plan": {
"type": "array",
"items": { "items": {
"type": "object",
"properties": { "properties": {
"action": { "action": {
"type": "string",
"description": "Autonomy Engine's action from `move`, `payload`, `dive`, `send_hits`, `scanline`, `scanpoint`.", "description": "Autonomy Engine's action from `move`, `payload`, `dive`, `send_hits`, `scanline`, `scanpoint`.",
"enum": [ "enum": [
"move", "move",
...@@ -199,69 +183,61 @@ ...@@ -199,69 +183,61 @@
"stop_mission", "stop_mission",
"abort_now" "abort_now"
], ],
"example": "move", "example": "move"
"type": "string"
},
"activate_payload": {
"description": "To activate/deactivate sensor for Autosub Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`",
"example": true,
"type": "boolean"
},
"altitude": {
"description": "Altitude of next action",
"example": 15.0,
"format": "float",
"type": "number"
},
"depth": {
"description": "Depth of next action",
"example": 15.0,
"format": "float",
"type": "number"
}, },
"start_point_latitude": { "start_point_latitude": {
"description": "Start point, y-coordinate", "type": "number",
"example": 50.37072283932642,
"format": "float", "format": "float",
"type": "number" "description": "Start point, y-coordinate",
"example": 50.37072283932642
}, },
"start_point_longitude": { "start_point_longitude": {
"description": "Start point, x-coordinate", "type": "number",
"example": -4.187143188645706,
"format": "float", "format": "float",
"type": "number" "description": "Start point, x-coordinate",
"example": -4.187143188645706
}, },
"target_waypoint_latitude": { "target_waypoint_latitude": {
"description": "Target waypoint, y-coordinate", "type": "number",
"example": 50.37072283932642,
"format": "float", "format": "float",
"type": "number" "description": "Target waypoint, y-coordinate",
"example": 50.37072283932642
}, },
"target_waypoint_longitude": { "target_waypoint_longitude": {
"type": "number",
"format": "float",
"description": "Target waypoint, x-coordinate", "description": "Target waypoint, x-coordinate",
"example": -4.187143188645706, "example": -4.187143188645706
},
"altitude": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Altitude of next action",
"example": 15.0
},
"depth": {
"type": "number",
"format": "float",
"description": "Depth of next action",
"example": 15.0
},
"activate_payload": {
"type": "boolean",
"description": "To activate/deactivate sensor for Autosub Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`",
"example": true
}, },
"timeout": { "timeout": {
"description": "Timeout set to perform action", "type": "number",
"example": 1800.0,
"format": "float", "format": "float",
"type": "number" "description": "Timeout set to perform action",
"example": 1800.0
} }
}, },
"required": [ "required": [
"target_waypoint_latitude", "target_waypoint_latitude",
"target_waypoint_longitude" "target_waypoint_longitude"
], ]
"type": "object" }
},
"type": "array"
},
"platform_ID": {
"description": "Unique identifier for this platform",
"example": "reav-x-1",
"type": "string"
} }
}, },
"required": [ "required": [
...@@ -269,462 +245,369 @@ ...@@ -269,462 +245,369 @@
"autonomy_engine_plan_ID", "autonomy_engine_plan_ID",
"platform_ID", "platform_ID",
"plan" "plan"
], ]
"type": "object"
}, },
"mission_plan_encoded": { "mission_plan_encoded": {
"type": "object",
"properties": { "properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"enum": [
"mission_plan_encoded"
],
"example": "mission_plan_encoded"
},
"data": { "data": {
"type": "string",
"description": "encoded string. E.g. Base64 encoded", "description": "encoded string. E.g. Base64 encoded",
"example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg==", "example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
"type": "string"
}, },
"file_name": { "file_name": {
"type": "string",
"description": "Name of file", "description": "Name of file",
"example": "ah1-0238126349247372.bin", "example": "ah1-0238126349247372.bin"
"type": "string" },
"mime_type": {
"type": "string",
"description": "MIME type",
"example": "application/gzip"
}, },
"is_binary": { "is_binary": {
"type": "boolean",
"description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.", "description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.",
"example": true, "example": true
"type": "boolean" }
}, },
"message_type": { "required": [
"description": "Type of message", "data",
"enum": [ "is_binary"
"mission_plan_encoded" ]
],
"example": "mission_plan_encoded",
"type": "string"
},
"mime_type": {
"description": "MIME type",
"example": "application/gzip",
"type": "string"
}
},
"required": [
"data",
"is_binary"
],
"type": "object"
},
"observation": {
"properties": {
"additional_data": {
"description": "Placeholder field for any additional data",
"example": {
"sensor_payload": false
}
}, },
"observation": {
"type": "object",
"properties": {
"message_type": { "message_type": {
"type": "string",
"description": "Type of message", "description": "Type of message",
"example": "observation",
"enum": [ "enum": [
"observation" "observation"
], ]
"example": "observation",
"type": "string"
}, },
"platform_ID": { "platform_ID": {
"type": "string",
"description": "Unique identifier for this platform", "description": "Unique identifier for this platform",
"example": "reav-x-1", "example": "reav-x-1"
"type": "string"
}, },
"points_of_interest": { "points_of_interest": {
"description": "Points from features of interest identified by platform if any found.", "type": "array",
"items": { "items": {
"type": "object",
"properties": { "properties": {
"latitude": { "latitude": {
"description": "Identified y-coordinate of point of interest", "type": "number",
"example": 178.2,
"format": "float", "format": "float",
"type": "number" "description": "Identified y-coordinate of point of interest",
"example": 178.2
}, },
"longitude": { "longitude": {
"description": "Identified x-coordinate of point of interest", "type": "number",
"example": -10.122,
"format": "float", "format": "float",
"type": "number" "description": "Identified x-coordinate of point of interest",
"example": -10.122
}, },
"quality_of_point": { "quality_of_point": {
"description": "Quality/strength of points from features of interest identified by platform.", "type": "number",
"example": 0.98,
"format": "float", "format": "float",
"type": "number" "description": "Quality/strength of points from features of interest identified by platform.",
"example": 0.98
} }
}, },
"required": [ "required": [
"latitude", "latitude",
"longitude" "longitude"
], ]
"type": "object"
}, },
"type": "array" "description": "Points from features of interest identified by platform if any found."
}, },
"region_surveyed": { "region_surveyed": {
"nullable": true,
"description": "Region surveyed by given platform. GEOJSON", "description": "Region surveyed by given platform. GEOJSON",
"example": "", "example": ""
"nullable": true },
"additional_data": {
"description": "Placeholder field for any additional data",
"example": {
"sensor_payload": false
}
} }
}, },
"required": [ "required": [
"message_type", "message_type",
"platform_ID" "platform_ID"
], ]
"type": "object"
}, },
"observation_encoded": { "observation_encoded": {
"type": "object",
"properties": { "properties": {
"data": {
"description": "encoded string. E.g. Base64 encoded",
"example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg==",
"type": "string"
},
"file_name": {
"description": "Name of file",
"example": "ah1-0238126349247372.bin",
"type": "string"
},
"is_binary": {
"description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.",
"example": true,
"type": "boolean"
},
"message_type": { "message_type": {
"type": "string",
"description": "Type of message", "description": "Type of message",
"enum": [ "enum": [
"observation_encoded" "observation_encoded"
], ],
"example": "observation_encoded", "example": "observation_encoded"
"type": "string" },
"data": {
"type": "string",
"description": "encoded string. E.g. Base64 encoded",
"example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
},
"file_name": {
"type": "string",
"description": "Name of file",
"example": "ah1-0238126349247372.bin"
}, },
"mime_type": { "mime_type": {
"type": "string",
"description": "MIME type", "description": "MIME type",
"example": "application/gzip", "example": "application/gzip"
"type": "string" },
"is_binary": {
"type": "boolean",
"description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.",
"example": true
} }
}, },
"required": [ "required": [
"data", "data",
"is_binary" "is_binary"
],
"type": "object"
},
"payload": {
"discriminator": {
"mapping": {
"acknowledgement": "#/components/schemas/acknowledgement",
"alert": "#/components/schemas/alert",
"mission_plan": "#/components/schemas/mission_plan",
"mission_plan_encoded": "#/components/schemas/mission_plan_encoded",
"observation": "#/components/schemas/observation",
"observation_encoded": "#/components/schemas/observation_encoded",
"planning_configuration": "#/components/schemas/planning_configuration",
"platform_status": "#/components/schemas/platform_status",
"platform_status_encoded": "#/components/schemas/platform_status_encoded",
"survey": "#/components/schemas/survey",
"survey_encoded": "#/components/schemas/survey_encoded"
},
"propertyName": "message_type"
},
"oneOf": [
{
"$ref": "#/components/schemas/alert"
},
{
"$ref": "#/components/schemas/acknowledgement"
},
{
"$ref": "#/components/schemas/mission_plan"
},
{
"$ref": "#/components/schemas/mission_plan_encoded"
},
{
"$ref": "#/components/schemas/observation"
},
{
"$ref": "#/components/schemas/observation_encoded"
},
{
"$ref": "#/components/schemas/planning_configuration"
},
{
"$ref": "#/components/schemas/platform_status"
},
{
"$ref": "#/components/schemas/platform_status_encoded"
},
{
"$ref": "#/components/schemas/survey"
},
{
"$ref": "#/components/schemas/survey_encoded"
}
] ]
}, },
"planning_configuration": { "planning_configuration": {
"type": "object",
"properties": { "properties": {
"exclusion_zones": {
"description": "Exclusion zones for all platforms",
"items": {
"description": "Using GEOJSON, exact 4-point region (rectangle shaped - 5 points)",
"properties": {
"geometry_coordinates": {
"example": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
],
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"message_type": { "message_type": {
"type": "string",
"description": "Type of message", "description": "Type of message",
"example": "planning_configuration",
"enum": [ "enum": [
"planning_configuration" "planning_configuration"
], ]
"example": "planning_configuration",
"type": "string"
}, },
"planning_config_ID": { "planning_config_ID": {
"type": "integer",
"description": "Unique identifier tagged to version of this configuration plan", "description": "Unique identifier tagged to version of this configuration plan",
"example": 3, "example": 3
"type": "integer"
}, },
"region_of_interest": { "region_of_interest": {
"description": "Region of interest for the entire operation", "type": "array",
"items": { "items": {
"description": "Using GEOJSON, exact 4-point region (rectangle shaped - 5 points)", "type": "object",
"properties": { "properties": {
"geometry_coordinates": { "geometry": {
"example": [ "$ref": "#/components/schemas/geojson.org.schema.Polygon.json"
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
],
"type": "array"
} }
}, },
"type": "object" "description": "GeoJSON Polygon"
},
"description": "Region of interest for the entire operation"
},
"exclusion_zones": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometry": {
"$ref": "#/components/schemas/geojson.org.schema.Polygon.json"
}
},
"description": "GeoJSON Polygon"
}, },
"type": "array" "description": "Exclusion zones for all platforms"
}, },
"squads": { "squads": {
"type": "array",
"items": { "items": {
"type": "object",
"properties": { "properties": {
"squad_ID": {
"type": "integer",
"description": "Identifier of given squad",
"example": 23
},
"no_of_platforms": { "no_of_platforms": {
"type": "integer",
"description": "Number of platforms", "description": "Number of platforms",
"example": 3, "example": 3
"type": "integer"
}, },
"platforms": { "platforms": {
"description": "Squad consists of these platforms", "type": "array",
"items": { "items": {
"type": "object",
"properties": { "properties": {
"active": { "operator": {
"description": "If platform is active = True, and inactive = False", "type": "string",
"example": true, "description": "Operator of platform",
"type": "boolean" "example": "noc"
}, },
"additional_data": { "platform_ID": {
"description": "Any addition fields/data to be added here", "type": "string",
"example": { "description": "Unique identifier for this platform",
"new_sensor_a": "test_sensor", "example": "reav-x-1"
"range": 10.0
}, },
"type": "object" "model": {
"type": "string",
"example": "reav"
}, },
"beacon_ID": { "beacon_ID": {
"type": "number",
"description": "Unique identifier (number) for the beacon associated to this platform", "description": "Unique identifier (number) for the beacon associated to this platform",
"example": 2407, "example": 2407
"type": "number" },
"active": {
"type": "boolean",
"description": "If platform is active = True, and inactive = False",
"example": true
}, },
"emergency": { "emergency": {
"type": "object",
"properties": { "properties": {
"safe_command": { "safe_command": {
"description": "Command/Action that is native to respective partner's platform/C2", "type": "string",
"enum": [ "enum": [
"go_home", "go_home",
"abort_now", "abort_now",
"stop_now", "stop_now",
"surface_now" "surface_now"
], ],
"example": "go_home", "description": "Command/Action that is native to respective partner's platform/C2",
"type": "string" "example": "go_home"
},
"target_depth": {
"description": "Z-coordinate safe place for respective platform . If platform to NOT stay at depth, key in `0.0`",
"example": 10.0,
"format": "float",
"type": "number"
}, },
"target_waypoint_latitude": { "target_waypoint_latitude": {
"description": "Y-coordinate safe place for respective platform", "type": "number",
"example": 50.365,
"format": "float", "format": "float",
"type": "number" "description": "Y-coordinate safe place for respective platform",
"example": 50.365
}, },
"target_waypoint_longitude": { "target_waypoint_longitude": {
"type": "number",
"format": "float",
"description": "X-coordinate safe place for respective platform", "description": "X-coordinate safe place for respective platform",
"example": -7.432, "example": -7.432
},
"target_depth": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Z-coordinate safe place for respective platform . If platform to NOT stay at depth, key in `0.0`",
"example": 10.0
} }
}, },
"required": [ "required": [
"target_waypoint_latitude", "target_waypoint_latitude",
"target_waypoint_longitude", "target_waypoint_longitude",
"target_depth" "target_depth"
], ]
"type": "object"
},
"endurance_relative_to_water_speed": {
"properties": {
"avg_battery_rating": {
"description": "Battery endurance rating during standard operational speed usage (m/s)",
"example": 1.9,
"format": "float",
"type": "number"
}, },
"max_battery_rating": { "min_altitude": {
"description": "Battery endurance rating during maximum speed usage (m/s)", "type": "number",
"example": 1.23,
"format": "float", "format": "float",
"type": "number" "description": "Minimum altitude set for platform",
"example": 15.2
}, },
"min_battery_rating": { "min_velocity": {
"description": "Battery endurance rating during maximum speed usage (m/s)", "type": "number",
"example": 3.32,
"format": "float", "format": "float",
"type": "number" "description": "Minimum velocity set for platform",
} "example": 0.1
},
"type": "object"
}, },
"max_velocity": { "max_velocity": {
"description": "Maximum velocity set for platform", "type": "number",
"example": 0.9,
"format": "float", "format": "float",
"type": "number" "description": "Maximum velocity set for platform",
"example": 0.9
}, },
"min_altitude": { "target_altitude": {
"description": "Minimum altitude set for platform", "type": "number",
"example": 15.2,
"format": "float", "format": "float",
"type": "number" "description": "Target altitude set for platform. This affects swath width",
"example": 15.0
}, },
"min_velocity": { "turning_radius": {
"description": "Minimum velocity set for platform", "type": "number",
"example": 0.1,
"format": "float", "format": "float",
"type": "number" "description": "Turning radius of platform (in metres)",
"example": 1.0
}, },
"model": { "endurance_relative_to_water_speed": {
"example": "reav", "type": "object",
"type": "string" "properties": {
"min_battery_rating": {
"type": "number",
"format": "float",
"description": "Battery endurance rating during maximum speed usage (m/s)",
"example": 3.32
}, },
"operator": { "max_battery_rating": {
"description": "Operator of platform", "type": "number",
"example": "noc", "format": "float",
"type": "string" "description": "Battery endurance rating during maximum speed usage (m/s)",
"example": 1.23
}, },
"platform_ID": { "avg_battery_rating": {
"description": "Unique identifier for this platform", "type": "number",
"example": "reav-x-1", "format": "float",
"type": "string" "description": "Battery endurance rating during standard operational speed usage (m/s)",
"example": 1.9
}
}
}, },
"scan_sensor": { "scan_sensor": {
"type": "object",
"properties": { "properties": {
"angle": {
"description": "Angle of range of swath width (in degrees)",
"example": 140.0,
"format": "float",
"type": "number"
},
"frequency": {
"description": "Frequency of scanning sensor (in kHz)",
"example": 700.0,
"format": "float",
"type": "number"
},
"sensor_type": { "sensor_type": {
"type": "string",
"description": "Unique identifier for this platform", "description": "Unique identifier for this platform",
"example": "MBES",
"enum": [ "enum": [
"SIDESCAN", "SIDESCAN",
"MBES" "MBES"
], ]
"example": "MBES", },
"type": "string" "warmup_time": {
"type": "number",
"format": "float",
"description": "Warmup time (seconds) for sensor to start up.",
"example": 180.0
}, },
"swath_width": { "swath_width": {
"type": "number",
"format": "float",
"description": "Function of `target_altitude` for the platform's swath width (in metres)", "description": "Function of `target_altitude` for the platform's swath width (in metres)",
"example": 38.0, "example": 38.0
},
"frequency": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Frequency of scanning sensor (in kHz)",
"example": 700.0
}, },
"warmup_time": { "angle": {
"description": "Warmup time (seconds) for sensor to start up.", "type": "number",
"example": 180.0,
"format": "float", "format": "float",
"type": "number" "description": "Angle of range of swath width (in degrees)",
"example": 140.0
}
} }
}, },
"type": "object" "additional_data": {
}, "description": "Any addition fields/data to be added here",
"target_altitude": { "example": {
"description": "Target altitude set for platform. This affects swath width", "new_sensor_a": "test_sensor",
"example": 15.0, "range": 10.0
"format": "float",
"type": "number"
}, },
"turning_radius": { "type": "object"
"description": "Turning radius of platform (in metres)",
"example": 1.0,
"format": "float",
"type": "number"
} }
}, },
"required": [ "required": [
...@@ -732,25 +615,19 @@ ...@@ -732,25 +615,19 @@
"platform_ID", "platform_ID",
"active", "active",
"model" "model"
], ]
"type": "object"
},
"type": "array"
}, },
"squad_ID": { "description": "Squad consists of these platforms"
"description": "Identifier of given squad",
"example": 23,
"type": "integer"
}, },
"squad_mission_type": { "squad_mission_type": {
"description": "Mission of given squad: `tracking`, `survey`, `inspection`", "type": "string",
"enum": [ "enum": [
"tracking", "tracking",
"survey", "survey",
"inspection" "inspection"
], ],
"example": "survey", "description": "Mission of given squad: `tracking`, `survey`, `inspection`",
"type": "string" "example": "survey"
} }
}, },
"required": [ "required": [
...@@ -758,10 +635,8 @@ ...@@ -758,10 +635,8 @@
"no_of_platforms", "no_of_platforms",
"platforms", "platforms",
"squad_mission_type" "squad_mission_type"
], ]
"type": "object" }
},
"type": "array"
} }
}, },
"required": [ "required": [
...@@ -770,202 +645,202 @@ ...@@ -770,202 +645,202 @@
"squads", "squads",
"exclusion_zones", "exclusion_zones",
"region_of_interest" "region_of_interest"
], ]
"type": "object"
}, },
"platform_status": { "platform_status": {
"type": "object",
"properties": { "properties": {
"altitude": { "message_type": {
"description": "Target altitude in metres", "type": "string",
"example": 20.0, "description": "Type of message",
"format": "float", "example": "platform_status",
"type": "number" "enum": [
"platform_status"
]
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "reav-x-1"
},
"status_source": {
"type": "string",
"enum": [
"usbl",
"onboard_platform"
],
"description": "Indicate if this status message is from the platform or USBL",
"example": "usbl"
},
"transmission_mode": {
"type": "string",
"enum": [
"acoustics",
"iridium",
"wifi",
"starlink"
],
"description": "Mode in which status message was transmitted when on the surface (e.g. iridium/wifi) or underwater (e.g. acoustics)",
"example": "wifi"
},
"platform_timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp for onboard platform status message",
"example": "2022-12-21T00:00:00Z"
},
"platform_state": {
"type": "string",
"description": "Current state executed by platform. E.g. STOP, IDLE, ABORT.",
"example": "ABORT"
}, },
"autonomy_engine_plan_ID": { "autonomy_engine_plan_ID": {
"type": "integer",
"description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", "description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform",
"example": 1, "example": 1
"type": "integer"
}, },
"battery_output": { "latitude": {
"description": "Battery output in kW", "type": "number",
"example": 80.2,
"format": "float", "format": "float",
"type": "number" "description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2
}, },
"battery_remaining_capacity": { "longitude": {
"description": "Battery remaining % provided by respective C2", "type": "number",
"example": 80.2,
"format": "float", "format": "float",
"type": "number" "description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122
}, },
"depth": { "depth": {
"default": 0.0, "type": "number",
"format": "float",
"description": "Target depth in metres", "description": "Target depth in metres",
"example": 50.0, "example": 50.0,
"default": 0.0
},
"altitude": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Target altitude in metres",
"example": 20.0
}, },
"endurance": { "mission_track_ID": {
"description": "Estimate of hours of operation remaining based on present output or performance", "type": "integer",
"example": 7.4, "description": "Track number - stage in mission (e.g. 4 --> Waypoint 3 to Waypoint 4)",
"example": 4
},
"mission_plan_ID": {
"type": "integer",
"description": "Mission plan ID according to platform-C2 system",
"example": 1
},
"range_to_go": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Estimated distance to reach next waypoint",
"example": 124.3
}, },
"fuel_remaining_capacity": { "speed_over_ground": {
"description": "Percentage remaining capacity", "type": "number",
"example": 80.2,
"format": "float", "format": "float",
"type": "number" "description": "Speed over ground",
"example": 124.3
}, },
"fuel_volume": { "water_current_velocity": {
"description": "Litres of liquid fuel", "type": "string",
"example": 12.5, "description": "Water current magnitude and direction",
"example": "124.3NE"
},
"thrust_applied": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Thrust applied",
"example": 124.3
}, },
"heading": { "heading": {
"description": "Angular distance relative to north, usually 000\u00b0 at north, clockwise through 359\u00b0, in degrees", "type": "number",
"example": 124.3,
"format": "float", "format": "float",
"type": "number" "description": "Angular distance relative to north, usually 000\u00b0 at north, clockwise through 359\u00b0, in degrees",
"example": 124.3
}, },
"health_status": { "health_status": {
"type": "boolean",
"description": "Health status where 0 is OK, 1 is platform has an ERROR", "description": "Health status where 0 is OK, 1 is platform has an ERROR",
"example": false, "example": false
"type": "boolean"
}, },
"latitude": { "localisation_north_error": {
"description": "Latitude (Y-coordinate) in decimal degrees.", "type": "number",
"example": 178.2,
"format": "float", "format": "float",
"type": "number" "description": "Difference in NORTH between deadreckoning and USBL update.",
"example": 0.000129
}, },
"localisation_east_error": { "localisation_east_error": {
"description": "Difference in EAST between deadreckoningand USBL update.", "type": "number",
"example": 0.000129,
"format": "float", "format": "float",
"type": "number" "description": "Difference in EAST between deadreckoningand USBL update.",
"example": 0.000129
}, },
"localisation_north_error": { "usbl_fix_seconds_ago": {
"description": "Difference in NORTH between deadreckoning and USBL update.", "type": "number",
"example": 0.000129,
"format": "float", "format": "float",
"type": "number" "description": "USBL Fix received x second ago.",
"example": 10.0
}, },
"longitude": { "battery_remaining_capacity": {
"description": "Longitude (X-coordinate) in decimal degrees.", "type": "number",
"example": -10.122,
"format": "float", "format": "float",
"type": "number" "description": "Battery remaining % provided by respective C2",
}, "example": 80.2
"message_type": {
"description": "Type of message",
"enum": [
"platform_status"
],
"example": "platform_status",
"type": "string"
},
"mission_plan_ID": {
"description": "Mission plan ID according to platform-C2 system",
"example": 1,
"type": "integer"
},
"mission_track_ID": {
"description": "Track number - stage in mission (e.g. 4 --> Waypoint 3 to Waypoint 4)",
"example": 4,
"type": "integer"
}, },
"platform_ID": { "battery_output": {
"description": "Unique identifier for this platform", "type": "number",
"example": "reav-x-1", "format": "float",
"type": "string" "description": "Battery output in kW",
"example": 80.2
}, },
"platform_state": { "fuel_remaining_capacity": {
"description": "Current state executed by platform. E.g. STOP, IDLE, ABORT.", "type": "number",
"example": "ABORT", "format": "float",
"type": "string" "description": "Percentage remaining capacity",
"example": 80.2
}, },
"platform_timestamp": { "fuel_volume": {
"description": "Timestamp for onboard platform status message", "type": "number",
"example": "2022-12-21T00:00:00Z", "format": "float",
"format": "date-time", "description": "Litres of liquid fuel",
"type": "string" "example": 12.5
}, },
"range_to_go": { "endurance": {
"description": "Estimated distance to reach next waypoint", "type": "number",
"example": 124.3,
"format": "float", "format": "float",
"type": "number" "description": "Estimate of hours of operation remaining based on present output or performance",
"example": 7.4
}, },
"sensor_config": { "sensor_config": {
"type": "object",
"description": "Scanning sensor on platform available to be controlled by the Autonomy Engine", "description": "Scanning sensor on platform available to be controlled by the Autonomy Engine",
"properties": { "properties": {
"sensor_serial": {
"type": "string",
"description": "serial number of sensor",
"example": "mbes-002a"
},
"sensor_on": {
"type": "boolean",
"description": "Sensor switched on (true) or off (false)",
"example": true
},
"additional_data": { "additional_data": {
"type": "object",
"description": "Any addition fields/data to be added here", "description": "Any addition fields/data to be added here",
"example": { "example": {
"payload": [ "payload": [
1.2, 1.2,
434 434
] ]
},
"type": "object"
},
"sensor_on": {
"description": "Sensor switched on (true) or off (false)",
"example": true,
"type": "boolean"
},
"sensor_serial": {
"description": "serial number of sensor",
"example": "mbes-002a",
"type": "string"
} }
}, }
"type": "object" }
},
"speed_over_ground": {
"description": "Speed over ground",
"example": 124.3,
"format": "float",
"type": "number"
},
"status_source": {
"description": "Indicate if this status message is from the platform or USBL",
"enum": [
"usbl",
"onboard_platform"
],
"example": "usbl",
"type": "string"
},
"thrust_applied": {
"description": "Thrust applied",
"example": 124.3,
"format": "float",
"type": "number"
},
"transmission_mode": {
"description": "Mode in which status message was transmitted when on the surface (e.g. iridium/wifi) or underwater (e.g. acoustics)",
"enum": [
"acoustics",
"iridium",
"wifi",
"starlink"
],
"example": "wifi",
"type": "string"
},
"usbl_fix_seconds_ago": {
"description": "USBL Fix received x second ago.",
"example": 10.0,
"format": "float",
"type": "number"
},
"water_current_velocity": {
"description": "Water current magnitude and direction",
"example": "124.3NE",
"type": "string"
} }
}, },
"required": [ "required": [
...@@ -975,131 +850,131 @@ ...@@ -975,131 +850,131 @@
"platform_timestamp", "platform_timestamp",
"latitude", "latitude",
"longitude" "longitude"
], ]
"type": "object"
}, },
"platform_status_encoded": { "platform_status_encoded": {
"type": "object",
"properties": { "properties": {
"data": {
"description": "encoded string. E.g. Base64 encoded",
"example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg==",
"type": "string"
},
"file_name": {
"description": "Name of file",
"example": "ah1-0238126349247372.bin",
"type": "string"
},
"is_binary": {
"description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.",
"example": true,
"type": "boolean"
},
"message_type": { "message_type": {
"type": "string",
"description": "Type of message", "description": "Type of message",
"enum": [ "enum": [
"platform_status_encoded" "platform_status_encoded"
], ],
"example": "platform_status_encoded", "example": "platform_status_encoded"
"type": "string" },
"data": {
"type": "string",
"description": "encoded string. E.g. Base64 encoded",
"example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
},
"file_name": {
"type": "string",
"description": "Name of file",
"example": "ah1-0238126349247372.bin"
}, },
"mime_type": { "mime_type": {
"type": "string",
"description": "MIME type", "description": "MIME type",
"example": "application/gzip", "example": "application/gzip"
"type": "string" },
"is_binary": {
"type": "boolean",
"description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.",
"example": true
} }
}, },
"required": [ "required": [
"data", "data",
"is_binary" "is_binary"
], ]
"type": "object"
}, },
"survey": { "survey": {
"type": "object",
"properties": { "properties": {
"latitude_A": { "message_type": {
"description": "Latitude of point A(intersection of normal)from waypoint A to survey line", "type": "string",
"example": 178.2, "description": "Type of message",
"format": "float", "example": "survey",
"type": "number" "enum": [
}, "survey"
"latitude_B": { ]
"description": "Latitude of point B(intersection of normal)from waypoint B to survey line",
"example": 178.2,
"format": "float",
"type": "number"
},
"latitude_C": {
"description": "Latitude of point C(intersection of normal)from waypoint C to survey line",
"example": 178.2,
"format": "float",
"type": "number"
}, },
"latitude_D": { "timestamp": {
"description": "Latitude of point D(intersection of normal)from waypoint D to survey line", "type": "string",
"example": 178.2, "format": "date-time",
"format": "float", "description": "Timestamp for onboard message",
"type": "number" "example": "2022-12-21T00:00:00Z"
}, },
"latitude_E": { "latitude_A": {
"description": "Latitude of point E(intersection of normal)from waypoint E to survey line", "type": "number",
"example": 178.2,
"format": "float", "format": "float",
"type": "number" "description": "Latitude of point A(intersection of normal)from waypoint A to survey line",
"example": 178.2
}, },
"longitude_A": { "longitude_A": {
"type": "number",
"format": "float",
"description": "Longitude of point A(intersection of normal)from waypoint A to survey line", "description": "Longitude of point A(intersection of normal)from waypoint A to survey line",
"example": -10.122, "example": -10.122
},
"latitude_B": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Latitude of point B(intersection of normal)from waypoint B to survey line",
"example": 178.2
}, },
"longitude_B": { "longitude_B": {
"type": "number",
"format": "float",
"description": "Longitude of point B(intersection of normal)from waypoint B to survey line", "description": "Longitude of point B(intersection of normal)from waypoint B to survey line",
"example": -10.122, "example": -10.122
},
"latitude_C": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Latitude of point C(intersection of normal)from waypoint C to survey line",
"example": 178.2
}, },
"longitude_C": { "longitude_C": {
"type": "number",
"format": "float",
"description": "Longitude of point C(intersection of normal)from waypoint C to survey line", "description": "Longitude of point C(intersection of normal)from waypoint C to survey line",
"example": -10.122, "example": -10.122
},
"latitude_D": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Latitude of point D(intersection of normal)from waypoint D to survey line",
"example": 178.2
}, },
"longitude_D": { "longitude_D": {
"type": "number",
"format": "float",
"description": "Longitude of point D(intersection of normal)from waypoint D to survey line", "description": "Longitude of point D(intersection of normal)from waypoint D to survey line",
"example": -10.122, "example": -10.122
},
"latitude_E": {
"type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Latitude of point E(intersection of normal)from waypoint E to survey line",
"example": 178.2
}, },
"longitude_E": { "longitude_E": {
"description": "Longitude of point E(intersection of normal)from waypoint E to survey line", "type": "number",
"example": -10.122,
"format": "float", "format": "float",
"type": "number" "description": "Longitude of point E(intersection of normal)from waypoint E to survey line",
}, "example": -10.122
"message_type": {
"description": "Type of message",
"enum": [
"survey"
],
"example": "survey",
"type": "string"
}, },
"platform_ID": { "platform_ID": {
"type": "string",
"description": "Unique identifier for this platform", "description": "Unique identifier for this platform",
"example": "ecosub-2", "example": "ecosub-2"
"type": "string"
},
"timestamp": {
"description": "Timestamp for onboard message",
"example": "2022-12-21T00:00:00Z",
"format": "date-time",
"type": "string"
}, },
"track_ID": { "track_ID": {
"type": "integer",
"description": "Track number of action(s) currently executed by platform", "description": "Track number of action(s) currently executed by platform",
"example": 1, "example": 1
"type": "integer"
} }
}, },
"required": [ "required": [
...@@ -1108,53 +983,1282 @@ ...@@ -1108,53 +983,1282 @@
"latitude_B", "latitude_B",
"longitude_B", "longitude_B",
"platform_ID" "platform_ID"
], ]
"type": "object"
}, },
"survey_encoded": { "survey_encoded": {
"type": "object",
"properties": { "properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"enum": [
"survey_encoded"
],
"example": "survey_encoded"
},
"data": { "data": {
"type": "string",
"description": "encoded string. E.g. Base64 encoded", "description": "encoded string. E.g. Base64 encoded",
"example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg==", "example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
"type": "string"
}, },
"file_name": { "file_name": {
"type": "string",
"description": "Name of file", "description": "Name of file",
"example": "ah1-0238126349247372.bin", "example": "ah1-0238126349247372.bin"
"type": "string" },
"mime_type": {
"type": "string",
"description": "MIME type",
"example": "application/gzip"
}, },
"is_binary": { "is_binary": {
"type": "boolean",
"description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.", "description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.",
"example": true, "example": true
"type": "boolean" }
},
"required": [
"data",
"is_binary"
]
}, },
"acknowledgement": {
"type": "object",
"properties": {
"message_type": { "message_type": {
"type": "string",
"description": "Type of message", "description": "Type of message",
"example": "acknowledgement",
"enum": [ "enum": [
"survey_encoded" "acknowledgement"
]
},
"autonomy_engine_plan_ID": {
"type": "integer",
"description": "Mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform",
"example": 1
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "reav-x-1"
},
"approved": {
"type": "boolean",
"description": "Human-in-the-loop approval.1 - Plan approved; 0 - Plan Rejected"
}
},
"required": [
"message_type",
"autonomy_engine_plan_ID",
"platform_ID",
"approved"
]
},
"alert": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "alert",
"enum": [
"alert"
]
},
"code": {
"type": "integer",
"description": "Alert code",
"example": 345
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "usvdecibel"
},
"platform_timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp for onboard platform status message",
"example": "2022-12-21T00:00:00Z"
},
"subsystem": {
"type": "string",
"description": "System that generated the alert",
"example": "Onboard Fault Monitor"
},
"summary": {
"type": "string",
"description": "High level description of the alert",
"example": "Steering Damage - Port Side"
},
"details": {
"type": "string",
"description": "Detailed reason for the alert ",
"example": "Discrepancy between rudder and actuator positions : Rudder Pos=10.31\u00b0, Steering Actuator Pos=28.65\u00b0, Discrepancy=18.33\u00b0"
},
"severity": {
"type": "string",
"description": "Severity level of alert",
"example": "Alarm",
"enum": [
"Emergency",
"Alarm",
"Warning",
"Caution"
]
}
},
"required": [
"message_type",
"platform_ID",
"code",
"severity"
]
},
"geojson.org.schema.Feature.json": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://geojson.org/schema/Feature.json",
"title": "GeoJSON Feature",
"type": "object",
"required": [
"type",
"properties",
"geometry"
], ],
"example": "survey_encoded", "properties": {
"type": "string" "type": {
"type": "string",
"enum": [
"Feature"
]
}, },
"mime_type": { "id": {
"description": "MIME type", "oneOf": [
"example": "application/gzip", {
"type": "number"
},
{
"type": "string" "type": "string"
} }
]
},
"properties": {
"oneOf": [
{
"type": "null"
},
{
"type": "object"
}
]
},
"geometry": {
"oneOf": [
{
"type": "null"
}, },
{
"title": "GeoJSON Point",
"type": "object",
"required": [ "required": [
"data", "type",
"is_binary" "coordinates"
], ],
"type": "object" "properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
} }
} }
}, },
"info": { {
"description": "SoAR message protocol in schemas", "title": "GeoJSON LineString",
"title": "SoAR Backbone Message Formats", "type": "object",
"version": "1.0" "required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
}, },
"openapi": "3.0.2", "coordinates": {
"paths": {} "type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON GeometryCollection",
"type": "object",
"required": [
"type",
"geometries"
],
"properties": {
"type": {
"type": "string",
"enum": [
"GeometryCollection"
]
},
"geometries": {
"type": "array",
"items": {
"oneOf": [
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
}
]
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
}
]
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
"geojson.org.schema.FeatureCollection.json": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://geojson.org/schema/FeatureCollection.json",
"title": "GeoJSON FeatureCollection",
"type": "object",
"required": [
"type",
"features"
],
"properties": {
"type": {
"type": "string",
"enum": [
"FeatureCollection"
]
},
"features": {
"type": "array",
"items": {
"title": "GeoJSON Feature",
"type": "object",
"required": [
"type",
"properties",
"geometry"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Feature"
]
},
"id": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"properties": {
"oneOf": [
{
"type": "null"
},
{
"type": "object"
}
]
},
"geometry": {
"oneOf": [
{
"type": "null"
},
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON GeometryCollection",
"type": "object",
"required": [
"type",
"geometries"
],
"properties": {
"type": {
"type": "string",
"enum": [
"GeometryCollection"
]
},
"geometries": {
"type": "array",
"items": {
"oneOf": [
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
}
]
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
}
]
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
"geojson.org.schema.LineString.json": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://geojson.org/schema/LineString.json",
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
"geojson.org.schema.Point.json": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://geojson.org/schema/Point.json",
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
},
"geojson.org.schema.Polygon.json": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://geojson.org/schema/Polygon.json",
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"bbox": {
"type": "array",
"minItems": 4,
"items": {
"type": "number"
}
}
}
}
}
}
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment