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

refactor: load geojson defs from published schemas

parent a0d9c041
No related merge requests found
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"
......
{ {
"components": { "openapi": "3.0.2",
"schemas": { "swagger_ui": true,
"MESSAGE": { "specs_route": "/",
"description": "Full message definition with message-metadata in `header` and different message type schemas under `payload`", "info": {
"properties": { "title": "SoAR Backbone Message Formats",
"header": { "version": "1.0",
"$ref": "#/components/schemas/header" "description": "SoAR message protocol in schemas"
}, },
"payload": { "specs": [
"$ref": "#/components/schemas/payload" {
} "endpoint": "swagger",
}, "route": "/soar_protocol.json"
"required": [ }
"header", ],
"payload" "url_prefix": "",
"paths": {},
"components": {
"schemas": {
"MESSAGE": {
"type": "object",
"description": "Full message definition with message-metadata in `header` and different message type schemas under `payload`",
"properties": {
"header": {
"$ref": "#/components/schemas/header"
},
"payload": {
"$ref": "#/components/schemas/payload"
}
},
"required": [
"header",
"payload"
]
},
"payload": {
"discriminator": {
"propertyName": "message_type",
"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"
}
},
"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"
}
]
},
"header": {
"type": "object",
"discriminator": {
"propertyName": "message_type"
},
"properties": {
"message_ID": {
"type": "string",
"description": "An identifier for the type of message received.",
"example": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp of message",
"example": "2022-11-16T00:00:00Z"
},
"version": {
"type": "number",
"format": "float",
"description": "Version of comms backbone message format protocol",
"example": 2.0
},
"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"
], ],
"type": "object" "example": "publish",
}, "default": "publish"
"acknowledgement": { }
"properties": { }
"approved": { },
"description": "Human-in-the-loop approval.1 - Plan approved; 0 - Plan Rejected", "mission_plan": {
"type": "boolean" "type": "object",
}, "properties": {
"autonomy_engine_plan_ID": { "message_type": {
"description": "Mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", "type": "string",
"example": 1, "description": "Type of message",
"type": "integer" "example": "mission_plan",
}, "enum": [
"message_type": { "mission_plan"
"description": "Type of message", ]
},
"autonomy_engine_plan_ID": {
"type": "integer",
"description": "Unique identifier for this plangenerated by the Autonomy Engine",
"example": 3
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "reav-x-1"
},
"emergency": {
"type": "boolean",
"description": "To indicate if this is an emergency. true = emergency and false = no emergency",
"default": false,
"example": false
},
"plan": {
"type": "array",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "Autonomy Engine's action from `move`, `payload`, `dive`, `send_hits`, `scanline`, `scanpoint`.",
"enum": [ "enum": [
"acknowledgement" "move",
"payload",
"dive",
"send_hits",
"scanline",
"scanpoint",
"go_home",
"surface_now",
"stop_mission",
"abort_now"
], ],
"example": "acknowledgement", "example": "move"
"type": "string" },
}, "start_point_latitude": {
"platform_ID": { "type": "number",
"description": "Unique identifier for this platform", "format": "float",
"example": "reav-x-1", "description": "Start point, y-coordinate",
"type": "string" "example": 50.37072283932642
} },
}, "start_point_longitude": {
"required": [ "type": "number",
"message_type", "format": "float",
"autonomy_engine_plan_ID", "description": "Start point, x-coordinate",
"platform_ID", "example": -4.187143188645706
"approved" },
"target_waypoint_latitude": {
"type": "number",
"format": "float",
"description": "Target waypoint, y-coordinate",
"example": 50.37072283932642
},
"target_waypoint_longitude": {
"type": "number",
"format": "float",
"description": "Target waypoint, x-coordinate",
"example": -4.187143188645706
},
"altitude": {
"type": "number",
"format": "float",
"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": {
"type": "number",
"format": "float",
"description": "Timeout set to perform action",
"example": 1800.0
}
},
"required": [
"target_waypoint_latitude",
"target_waypoint_longitude"
]
}
}
},
"required": [
"message_type",
"autonomy_engine_plan_ID",
"platform_ID",
"plan"
]
},
"mission_plan_encoded": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"enum": [
"mission_plan_encoded"
], ],
"type": "object" "example": "mission_plan_encoded"
}, },
"alert": { "data": {
"properties": { "type": "string",
"code": { "description": "encoded string. E.g. Base64 encoded",
"description": "Alert code", "example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
"example": 345, },
"type": "integer" "file_name": {
}, "type": "string",
"details": { "description": "Name of file",
"description": "Detailed reason for the alert ", "example": "ah1-0238126349247372.bin"
"example": "Discrepancy between rudder and actuator positions : Rudder Pos=10.31\u00b0, Steering Actuator Pos=28.65\u00b0, Discrepancy=18.33\u00b0", },
"type": "string" "mime_type": {
}, "type": "string",
"message_type": { "description": "MIME type",
"description": "Type of message", "example": "application/gzip"
"enum": [ },
"alert" "is_binary": {
], "type": "boolean",
"example": "alert", "description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.",
"type": "string" "example": true
}, }
"platform_ID": { },
"description": "Unique identifier for this platform", "required": [
"example": "usvdecibel", "data",
"type": "string" "is_binary"
}, ]
"platform_timestamp": { },
"description": "Timestamp for onboard platform status message", "observation": {
"example": "2022-12-21T00:00:00Z", "type": "object",
"format": "date-time", "properties": {
"type": "string" "message_type": {
}, "type": "string",
"severity": { "description": "Type of message",
"description": "Severity level of alert", "example": "observation",
"enum": [ "enum": [
"Emergency", "observation"
"Alarm", ]
"Warning", },
"Caution" "platform_ID": {
], "type": "string",
"example": "Alarm", "description": "Unique identifier for this platform",
"type": "string" "example": "reav-x-1"
}, },
"subsystem": { "points_of_interest": {
"description": "System that generated the alert", "type": "array",
"example": "Onboard Fault Monitor", "items": {
"type": "string" "type": "object",
}, "properties": {
"summary": { "latitude": {
"description": "High level description of the alert", "type": "number",
"example": "Steering Damage - Port Side", "format": "float",
"type": "string" "description": "Identified y-coordinate of point of interest",
} "example": 178.2
},
"longitude": {
"type": "number",
"format": "float",
"description": "Identified x-coordinate of point of interest",
"example": -10.122
},
"quality_of_point": {
"type": "number",
"format": "float",
"description": "Quality/strength of points from features of interest identified by platform.",
"example": 0.98
}
},
"required": [
"latitude",
"longitude"
]
}, },
"required": [ "description": "Points from features of interest identified by platform if any found."
"message_type", },
"platform_ID", "region_surveyed": {
"code", "nullable": true,
"severity" "description": "Region surveyed by given platform. GEOJSON",
"example": ""
},
"additional_data": {
"description": "Placeholder field for any additional data",
"example": {
"sensor_payload": false
}
}
},
"required": [
"message_type",
"platform_ID"
]
},
"observation_encoded": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"enum": [
"observation_encoded"
], ],
"type": "object" "example": "observation_encoded"
}, },
"header": { "data": {
"discriminator": { "type": "string",
"propertyName": "message_type" "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": {
"type": "string",
"description": "MIME type",
"example": "application/gzip"
},
"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": [
"data",
"is_binary"
]
},
"planning_configuration": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "planning_configuration",
"enum": [
"planning_configuration"
]
},
"planning_config_ID": {
"type": "integer",
"description": "Unique identifier tagged to version of this configuration plan",
"example": 3
},
"region_of_interest": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geometry": {
"$ref": "#/components/schemas/geojson.org.schema.Polygon.json"
}
},
"description": "GeoJSON Polygon"
}, },
"properties": { "description": "Region of interest for the entire operation"
"delivery_type": { },
"default": "publish", "exclusion_zones": {
"description": "To publish or broadcast this message.", "type": "array",
"enum": [ "items": {
"broadcast", "type": "object",
"publish" "properties": {
], "geometry": {
"example": "publish", "$ref": "#/components/schemas/geojson.org.schema.Polygon.json"
"type": "string" }
}, },
"destination": { "description": "GeoJSON Polygon"
"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": {
"description": "An identifier for the type of message received.",
"example": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"type": "string"
},
"source": {
"description": "The sender; Where is this message from",
"example": "autonomy_engine",
"type": "string"
},
"timestamp": {
"description": "Timestamp of message",
"example": "2022-11-16T00:00:00Z",
"format": "date-time",
"type": "string"
},
"version": {
"description": "Version of comms backbone message format protocol",
"example": 2.0,
"format": "float",
"type": "number"
}
}, },
"type": "object" "description": "Exclusion zones for all platforms"
}, },
"mission_plan": { "squads": {
"properties": { "type": "array",
"autonomy_engine_plan_ID": { "items": {
"description": "Unique identifier for this plangenerated by the Autonomy Engine", "type": "object",
"example": 3, "properties": {
"type": "integer" "squad_ID": {
}, "type": "integer",
"emergency": { "description": "Identifier of given squad",
"default": false, "example": 23
"description": "To indicate if this is an emergency. true = emergency and false = no emergency", },
"example": false, "no_of_platforms": {
"type": "boolean" "type": "integer",
}, "description": "Number of platforms",
"message_type": { "example": 3
"description": "Type of message", },
"enum": [ "platforms": {
"mission_plan" "type": "array",
],
"example": "mission_plan",
"type": "string"
},
"plan": {
"items": { "items": {
"properties": { "type": "object",
"action": { "properties": {
"description": "Autonomy Engine's action from `move`, `payload`, `dive`, `send_hits`, `scanline`, `scanpoint`.", "operator": {
"enum": [ "type": "string",
"move", "description": "Operator of platform",
"payload", "example": "noc"
"dive", },
"send_hits", "platform_ID": {
"scanline", "type": "string",
"scanpoint", "description": "Unique identifier for this platform",
"example": "reav-x-1"
},
"model": {
"type": "string",
"example": "reav"
},
"beacon_ID": {
"type": "number",
"description": "Unique identifier (number) for the beacon associated to this platform",
"example": 2407
},
"active": {
"type": "boolean",
"description": "If platform is active = True, and inactive = False",
"example": true
},
"emergency": {
"type": "object",
"properties": {
"safe_command": {
"type": "string",
"enum": [
"go_home", "go_home",
"surface_now", "abort_now",
"stop_mission", "stop_now",
"abort_now" "surface_now"
], ],
"example": "move", "description": "Command/Action that is native to respective partner's platform/C2",
"type": "string" "example": "go_home"
},
"target_waypoint_latitude": {
"type": "number",
"format": "float",
"description": "Y-coordinate safe place for respective platform",
"example": 50.365
},
"target_waypoint_longitude": {
"type": "number",
"format": "float",
"description": "X-coordinate safe place for respective platform",
"example": -7.432
},
"target_depth": {
"type": "number",
"format": "float",
"description": "Z-coordinate safe place for respective platform . If platform to NOT stay at depth, key in `0.0`",
"example": 10.0
}
}, },
"activate_payload": { "required": [
"description": "To activate/deactivate sensor for Autosub Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`", "target_waypoint_latitude",
"example": true, "target_waypoint_longitude",
"type": "boolean" "target_depth"
}, ]
"altitude": { },
"description": "Altitude of next action", "min_altitude": {
"example": 15.0, "type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Minimum altitude set for platform",
}, "example": 15.2
"depth": { },
"description": "Depth of next action", "min_velocity": {
"example": 15.0, "type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Minimum velocity set for platform",
}, "example": 0.1
"start_point_latitude": { },
"description": "Start point, y-coordinate", "max_velocity": {
"example": 50.37072283932642, "type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Maximum velocity set for platform",
}, "example": 0.9
"start_point_longitude": { },
"description": "Start point, x-coordinate", "target_altitude": {
"example": -4.187143188645706, "type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Target altitude set for platform. This affects swath width",
}, "example": 15.0
"target_waypoint_latitude": { },
"description": "Target waypoint, y-coordinate", "turning_radius": {
"example": 50.37072283932642, "type": "number",
"format": "float", "format": "float",
"type": "number" "description": "Turning radius of platform (in metres)",
}, "example": 1.0
"target_waypoint_longitude": { },
"description": "Target waypoint, x-coordinate", "endurance_relative_to_water_speed": {
"example": -4.187143188645706, "type": "object",
"format": "float", "properties": {
"type": "number" "min_battery_rating": {
}, "type": "number",
"timeout": { "format": "float",
"description": "Timeout set to perform action", "description": "Battery endurance rating during maximum speed usage (m/s)",
"example": 1800.0, "example": 3.32
"format": "float", },
"type": "number" "max_battery_rating": {
"type": "number",
"format": "float",
"description": "Battery endurance rating during maximum speed usage (m/s)",
"example": 1.23
},
"avg_battery_rating": {
"type": "number",
"format": "float",
"description": "Battery endurance rating during standard operational speed usage (m/s)",
"example": 1.9
}
}
},
"scan_sensor": {
"type": "object",
"properties": {
"sensor_type": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "MBES",
"enum": [
"SIDESCAN",
"MBES"
]
},
"warmup_time": {
"type": "number",
"format": "float",
"description": "Warmup time (seconds) for sensor to start up.",
"example": 180.0
},
"swath_width": {
"type": "number",
"format": "float",
"description": "Function of `target_altitude` for the platform's swath width (in metres)",
"example": 38.0
},
"frequency": {
"type": "number",
"format": "float",
"description": "Frequency of scanning sensor (in kHz)",
"example": 700.0
},
"angle": {
"type": "number",
"format": "float",
"description": "Angle of range of swath width (in degrees)",
"example": 140.0
}
} }
}, },
"required": [ "additional_data": {
"target_waypoint_latitude", "description": "Any addition fields/data to be added here",
"target_waypoint_longitude" "example": {
], "new_sensor_a": "test_sensor",
"type": "object" "range": 10.0
},
"type": "object"
}
},
"required": [
"operator",
"platform_ID",
"active",
"model"
]
}, },
"type": "array" "description": "Squad consists of these platforms"
}, },
"platform_ID": { "squad_mission_type": {
"description": "Unique identifier for this platform", "type": "string",
"example": "reav-x-1",
"type": "string"
}
},
"required": [
"message_type",
"autonomy_engine_plan_ID",
"platform_ID",
"plan"
],
"type": "object"
},
"mission_plan_encoded": {
"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": {
"description": "Type of message",
"enum": [ "enum": [
"mission_plan_encoded" "tracking",
"survey",
"inspection"
], ],
"example": "mission_plan_encoded", "description": "Mission of given squad: `tracking`, `survey`, `inspection`",
"type": "string" "example": "survey"
}, }
"mime_type": { },
"description": "MIME type", "required": [
"example": "application/gzip", "squad_ID",
"type": "string" "no_of_platforms",
} "platforms",
}, "squad_mission_type"
"required": [ ]
"data", }
"is_binary" }
},
"required": [
"message_type",
"planning_config_ID",
"squads",
"exclusion_zones",
"region_of_interest"
]
},
"platform_status": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "platform_status",
"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"
], ],
"type": "object" "description": "Indicate if this status message is from the platform or USBL",
}, "example": "usbl"
"observation": { },
"properties": { "transmission_mode": {
"additional_data": { "type": "string",
"description": "Placeholder field for any additional data", "enum": [
"example": { "acoustics",
"sensor_payload": false "iridium",
} "wifi",
}, "starlink"
"message_type": {
"description": "Type of message",
"enum": [
"observation"
],
"example": "observation",
"type": "string"
},
"platform_ID": {
"description": "Unique identifier for this platform",
"example": "reav-x-1",
"type": "string"
},
"points_of_interest": {
"description": "Points from features of interest identified by platform if any found.",
"items": {
"properties": {
"latitude": {
"description": "Identified y-coordinate of point of interest",
"example": 178.2,
"format": "float",
"type": "number"
},
"longitude": {
"description": "Identified x-coordinate of point of interest",
"example": -10.122,
"format": "float",
"type": "number"
},
"quality_of_point": {
"description": "Quality/strength of points from features of interest identified by platform.",
"example": 0.98,
"format": "float",
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"type": "object"
},
"type": "array"
},
"region_surveyed": {
"description": "Region surveyed by given platform. GEOJSON",
"example": "",
"nullable": true
}
},
"required": [
"message_type",
"platform_ID"
], ],
"type": "object" "description": "Mode in which status message was transmitted when on the surface (e.g. iridium/wifi) or underwater (e.g. acoustics)",
}, "example": "wifi"
"observation_encoded": { },
"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": {
"type": "integer",
"description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform",
"example": 1
},
"latitude": {
"type": "number",
"format": "float",
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2
},
"longitude": {
"type": "number",
"format": "float",
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122
},
"depth": {
"type": "number",
"format": "float",
"description": "Target depth in metres",
"example": 50.0,
"default": 0.0
},
"altitude": {
"type": "number",
"format": "float",
"description": "Target altitude in metres",
"example": 20.0
},
"mission_track_ID": {
"type": "integer",
"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",
"description": "Estimated distance to reach next waypoint",
"example": 124.3
},
"speed_over_ground": {
"type": "number",
"format": "float",
"description": "Speed over ground",
"example": 124.3
},
"water_current_velocity": {
"type": "string",
"description": "Water current magnitude and direction",
"example": "124.3NE"
},
"thrust_applied": {
"type": "number",
"format": "float",
"description": "Thrust applied",
"example": 124.3
},
"heading": {
"type": "number",
"format": "float",
"description": "Angular distance relative to north, usually 000\u00b0 at north, clockwise through 359\u00b0, in degrees",
"example": 124.3
},
"health_status": {
"type": "boolean",
"description": "Health status where 0 is OK, 1 is platform has an ERROR",
"example": false
},
"localisation_north_error": {
"type": "number",
"format": "float",
"description": "Difference in NORTH between deadreckoning and USBL update.",
"example": 0.000129
},
"localisation_east_error": {
"type": "number",
"format": "float",
"description": "Difference in EAST between deadreckoningand USBL update.",
"example": 0.000129
},
"usbl_fix_seconds_ago": {
"type": "number",
"format": "float",
"description": "USBL Fix received x second ago.",
"example": 10.0
},
"battery_remaining_capacity": {
"type": "number",
"format": "float",
"description": "Battery remaining % provided by respective C2",
"example": 80.2
},
"battery_output": {
"type": "number",
"format": "float",
"description": "Battery output in kW",
"example": 80.2
},
"fuel_remaining_capacity": {
"type": "number",
"format": "float",
"description": "Percentage remaining capacity",
"example": 80.2
},
"fuel_volume": {
"type": "number",
"format": "float",
"description": "Litres of liquid fuel",
"example": 12.5
},
"endurance": {
"type": "number",
"format": "float",
"description": "Estimate of hours of operation remaining based on present output or performance",
"example": 7.4
},
"sensor_config": {
"type": "object",
"description": "Scanning sensor on platform available to be controlled by the Autonomy Engine",
"properties": { "properties": {
"data": { "sensor_serial": {
"description": "encoded string. E.g. Base64 encoded", "type": "string",
"example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg==", "description": "serial number of sensor",
"type": "string" "example": "mbes-002a"
}, },
"file_name": { "sensor_on": {
"description": "Name of file", "type": "boolean",
"example": "ah1-0238126349247372.bin", "description": "Sensor switched on (true) or off (false)",
"type": "string" "example": true
}, },
"is_binary": { "additional_data": {
"description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.", "type": "object",
"example": true, "description": "Any addition fields/data to be added here",
"type": "boolean" "example": {
}, "payload": [
"message_type": { 1.2,
"description": "Type of message", 434
"enum": [ ]
"observation_encoded" }
], }
"example": "observation_encoded", }
"type": "string" }
}, },
"mime_type": { "required": [
"description": "MIME type", "message_type",
"example": "application/gzip", "platform_ID",
"type": "string" "status_source",
} "platform_timestamp",
}, "latitude",
"required": [ "longitude"
"data", ]
"is_binary" },
"platform_status_encoded": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"enum": [
"platform_status_encoded"
], ],
"type": "object" "example": "platform_status_encoded"
}, },
"payload": { "data": {
"discriminator": { "type": "string",
"mapping": { "description": "encoded string. E.g. Base64 encoded",
"acknowledgement": "#/components/schemas/acknowledgement", "example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
"alert": "#/components/schemas/alert", },
"mission_plan": "#/components/schemas/mission_plan", "file_name": {
"mission_plan_encoded": "#/components/schemas/mission_plan_encoded", "type": "string",
"observation": "#/components/schemas/observation", "description": "Name of file",
"observation_encoded": "#/components/schemas/observation_encoded", "example": "ah1-0238126349247372.bin"
"planning_configuration": "#/components/schemas/planning_configuration", },
"platform_status": "#/components/schemas/platform_status", "mime_type": {
"platform_status_encoded": "#/components/schemas/platform_status_encoded", "type": "string",
"survey": "#/components/schemas/survey", "description": "MIME type",
"survey_encoded": "#/components/schemas/survey_encoded" "example": "application/gzip"
}, },
"propertyName": "message_type" "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": [
"data",
"is_binary"
]
},
"survey": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "survey",
"enum": [
"survey"
]
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp for onboard message",
"example": "2022-12-21T00:00:00Z"
},
"latitude_A": {
"type": "number",
"format": "float",
"description": "Latitude of point A(intersection of normal)from waypoint A to survey line",
"example": 178.2
},
"longitude_A": {
"type": "number",
"format": "float",
"description": "Longitude of point A(intersection of normal)from waypoint A to survey line",
"example": -10.122
},
"latitude_B": {
"type": "number",
"format": "float",
"description": "Latitude of point B(intersection of normal)from waypoint B to survey line",
"example": 178.2
},
"longitude_B": {
"type": "number",
"format": "float",
"description": "Longitude of point B(intersection of normal)from waypoint B to survey line",
"example": -10.122
},
"latitude_C": {
"type": "number",
"format": "float",
"description": "Latitude of point C(intersection of normal)from waypoint C to survey line",
"example": 178.2
},
"longitude_C": {
"type": "number",
"format": "float",
"description": "Longitude of point C(intersection of normal)from waypoint C to survey line",
"example": -10.122
},
"latitude_D": {
"type": "number",
"format": "float",
"description": "Latitude of point D(intersection of normal)from waypoint D to survey line",
"example": 178.2
},
"longitude_D": {
"type": "number",
"format": "float",
"description": "Longitude of point D(intersection of normal)from waypoint D to survey line",
"example": -10.122
},
"latitude_E": {
"type": "number",
"format": "float",
"description": "Latitude of point E(intersection of normal)from waypoint E to survey line",
"example": 178.2
},
"longitude_E": {
"type": "number",
"format": "float",
"description": "Longitude of point E(intersection of normal)from waypoint E to survey line",
"example": -10.122
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
"example": "ecosub-2"
},
"track_ID": {
"type": "integer",
"description": "Track number of action(s) currently executed by platform",
"example": 1
}
},
"required": [
"latitude_A",
"longitude_A",
"latitude_B",
"longitude_B",
"platform_ID"
]
},
"survey_encoded": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"enum": [
"survey_encoded"
],
"example": "survey_encoded"
},
"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": {
"type": "string",
"description": "MIME type",
"example": "application/gzip"
},
"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": [
"data",
"is_binary"
]
},
"acknowledgement": {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "acknowledgement",
"enum": [
"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"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Feature"
]
},
"id": {
"oneOf": [ "oneOf": [
{ {
"$ref": "#/components/schemas/alert" "type": "number"
}, },
{ {
"$ref": "#/components/schemas/acknowledgement" "type": "string"
}, }
{
"$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": { "properties": {
"properties": { "oneOf": [
"exclusion_zones": { {
"description": "Exclusion zones for all platforms", "type": "null"
"items": { },
"description": "Using GEOJSON, exact 4-point region (rectangle shaped - 5 points)", {
"properties": { "type": "object"
"geometry_coordinates": { }
"example": [ ]
[ },
[ "geometry": {
-4.1777839187560915, "oneOf": [
50.34173405662855 {
], "type": "null"
[ },
-4.1777839187560915, {
50.33820949229701 "title": "GeoJSON Point",
], "type": "object",
[ "required": [
-4.143667777943875, "type",
50.33820949229701 "coordinates"
], ],
[ "properties": {
-4.143667777943875, "type": {
50.34173405662855 "type": "string",
], "enum": [
[ "Point"
-4.1777839187560915, ]
50.34173405662855 },
] "coordinates": {
] "type": "array",
], "minItems": 2,
"type": "array" "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"
} }
}, }
"type": "object" }
}, },
"type": "array" "bbox": {
}, "type": "array",
"message_type": { "minItems": 4,
"description": "Type of message", "items": {
"enum": [ "type": "number"
"planning_configuration" }
], }
"example": "planning_configuration", }
"type": "string" },
}, {
"planning_config_ID": { "title": "GeoJSON MultiPoint",
"description": "Unique identifier tagged to version of this configuration plan", "type": "object",
"example": 3, "required": [
"type": "integer" "type",
}, "coordinates"
"region_of_interest": { ],
"description": "Region of interest for the entire operation", "properties": {
"items": { "type": {
"description": "Using GEOJSON, exact 4-point region (rectangle shaped - 5 points)", "type": "string",
"properties": { "enum": [
"geometry_coordinates": { "MultiPoint"
"example": [ ]
[ },
[ "coordinates": {
-4.1777839187560915, "type": "array",
50.34173405662855 "items": {
], "type": "array",
[ "minItems": 2,
-4.1777839187560915, "items": {
50.33820949229701 "type": "number"
], }
[ }
-4.143667777943875, },
50.33820949229701 "bbox": {
], "type": "array",
[ "minItems": 4,
-4.143667777943875, "items": {
50.34173405662855 "type": "number"
], }
[ }
-4.1777839187560915, }
50.34173405662855 },
] {
] "title": "GeoJSON MultiLineString",
], "type": "object",
"type": "array" "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"
} }
}, }
"type": "object" }
}, },
"type": "array" "bbox": {
}, "type": "array",
"squads": { "minItems": 4,
"items": { "items": {
"properties": { "type": "number"
"no_of_platforms": { }
"description": "Number of platforms", }
"example": 3, }
"type": "integer" },
{
"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"
}
}
}
}, },
"platforms": { {
"description": "Squad consists of these platforms", "title": "GeoJSON LineString",
"items": { "type": "object",
"properties": { "required": [
"active": { "type",
"description": "If platform is active = True, and inactive = False", "coordinates"
"example": true, ],
"type": "boolean" "properties": {
}, "type": {
"additional_data": { "type": "string",
"description": "Any addition fields/data to be added here", "enum": [
"example": { "LineString"
"new_sensor_a": "test_sensor", ]
"range": 10.0 },
}, "coordinates": {
"type": "object" "type": "array",
}, "minItems": 2,
"beacon_ID": { "items": {
"description": "Unique identifier (number) for the beacon associated to this platform", "type": "array",
"example": 2407, "minItems": 2,
"type": "number" "items": {
}, "type": "number"
"emergency": { }
"properties": { }
"safe_command": { },
"description": "Command/Action that is native to respective partner's platform/C2", "bbox": {
"enum": [ "type": "array",
"go_home", "minItems": 4,
"abort_now", "items": {
"stop_now", "type": "number"
"surface_now" }
], }
"example": "go_home", }
"type": "string" },
}, {
"target_depth": { "title": "GeoJSON Polygon",
"description": "Z-coordinate safe place for respective platform . If platform to NOT stay at depth, key in `0.0`", "type": "object",
"example": 10.0, "required": [
"format": "float", "type",
"type": "number" "coordinates"
}, ],
"target_waypoint_latitude": { "properties": {
"description": "Y-coordinate safe place for respective platform", "type": {
"example": 50.365, "type": "string",
"format": "float", "enum": [
"type": "number" "Polygon"
}, ]
"target_waypoint_longitude": { },
"description": "X-coordinate safe place for respective platform", "coordinates": {
"example": -7.432, "type": "array",
"format": "float", "items": {
"type": "number" "type": "array",
} "minItems": 4,
}, "items": {
"required": [ "type": "array",
"target_waypoint_latitude", "minItems": 2,
"target_waypoint_longitude", "items": {
"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": {
"description": "Battery endurance rating during maximum speed usage (m/s)",
"example": 1.23,
"format": "float",
"type": "number"
},
"min_battery_rating": {
"description": "Battery endurance rating during maximum speed usage (m/s)",
"example": 3.32,
"format": "float",
"type": "number"
}
},
"type": "object"
},
"max_velocity": {
"description": "Maximum velocity set for platform",
"example": 0.9,
"format": "float",
"type": "number"
},
"min_altitude": {
"description": "Minimum altitude set for platform",
"example": 15.2,
"format": "float",
"type": "number"
},
"min_velocity": {
"description": "Minimum velocity set for platform",
"example": 0.1,
"format": "float",
"type": "number"
},
"model": {
"example": "reav",
"type": "string"
},
"operator": {
"description": "Operator of platform",
"example": "noc",
"type": "string"
},
"platform_ID": {
"description": "Unique identifier for this platform",
"example": "reav-x-1",
"type": "string"
},
"scan_sensor": {
"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": {
"description": "Unique identifier for this platform",
"enum": [
"SIDESCAN",
"MBES"
],
"example": "MBES",
"type": "string"
},
"swath_width": {
"description": "Function of `target_altitude` for the platform's swath width (in metres)",
"example": 38.0,
"format": "float",
"type": "number"
},
"warmup_time": {
"description": "Warmup time (seconds) for sensor to start up.",
"example": 180.0,
"format": "float",
"type": "number"
}
},
"type": "object"
},
"target_altitude": {
"description": "Target altitude set for platform. This affects swath width",
"example": 15.0,
"format": "float",
"type": "number"
},
"turning_radius": {
"description": "Turning radius of platform (in metres)",
"example": 1.0,
"format": "float",
"type": "number" "type": "number"
} }
}, }
"required": [ }
"operator", },
"platform_ID", "bbox": {
"active", "type": "array",
"model" "minItems": 4,
], "items": {
"type": "object" "type": "number"
}, }
"type": "array" }
}
},
{
"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"
}
}
}
}, },
"squad_ID": { {
"description": "Identifier of given squad", "title": "GeoJSON MultiLineString",
"example": 23, "type": "object",
"type": "integer" "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"
}
}
}
}, },
"squad_mission_type": { {
"description": "Mission of given squad: `tracking`, `survey`, `inspection`", "title": "GeoJSON MultiPolygon",
"enum": [ "type": "object",
"tracking", "required": [
"survey", "type",
"inspection" "coordinates"
], ],
"example": "survey", "properties": {
"type": "string" "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"
}
}
}
} }
}, ]
"required": [ }
"squad_ID",
"no_of_platforms",
"platforms",
"squad_mission_type"
],
"type": "object"
}, },
"type": "array" "bbox": {
} "type": "array",
}, "minItems": 4,
"required": [ "items": {
"message_type", "type": "number"
"planning_config_ID", }
"squads", }
"exclusion_zones", }
"region_of_interest" }
], ]
"type": "object" },
}, "bbox": {
"platform_status": { "type": "array",
"properties": { "minItems": 4,
"altitude": { "items": {
"description": "Target altitude in metres", "type": "number"
"example": 20.0, }
"format": "float", }
"type": "number" }
}, },
"autonomy_engine_plan_ID": { "geojson.org.schema.FeatureCollection.json": {
"description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", "$schema": "http://json-schema.org/draft-07/schema#",
"example": 1, "$id": "https://geojson.org/schema/FeatureCollection.json",
"type": "integer" "title": "GeoJSON FeatureCollection",
}, "type": "object",
"battery_output": { "required": [
"description": "Battery output in kW", "type",
"example": 80.2, "features"
"format": "float", ],
"type": "number" "properties": {
}, "type": {
"battery_remaining_capacity": { "type": "string",
"description": "Battery remaining % provided by respective C2", "enum": [
"example": 80.2, "FeatureCollection"
"format": "float", ]
"type": "number" },
}, "features": {
"depth": { "type": "array",
"default": 0.0, "items": {
"description": "Target depth in metres", "title": "GeoJSON Feature",
"example": 50.0, "type": "object",
"format": "float", "required": [
"type": "number" "type",
}, "properties",
"endurance": { "geometry"
"description": "Estimate of hours of operation remaining based on present output or performance", ],
"example": 7.4, "properties": {
"format": "float", "type": {
"type": "number" "type": "string",
},
"fuel_remaining_capacity": {
"description": "Percentage remaining capacity",
"example": 80.2,
"format": "float",
"type": "number"
},
"fuel_volume": {
"description": "Litres of liquid fuel",
"example": 12.5,
"format": "float",
"type": "number"
},
"heading": {
"description": "Angular distance relative to north, usually 000\u00b0 at north, clockwise through 359\u00b0, in degrees",
"example": 124.3,
"format": "float",
"type": "number"
},
"health_status": {
"description": "Health status where 0 is OK, 1 is platform has an ERROR",
"example": false,
"type": "boolean"
},
"latitude": {
"description": "Latitude (Y-coordinate) in decimal degrees.",
"example": 178.2,
"format": "float",
"type": "number"
},
"localisation_east_error": {
"description": "Difference in EAST between deadreckoningand USBL update.",
"example": 0.000129,
"format": "float",
"type": "number"
},
"localisation_north_error": {
"description": "Difference in NORTH between deadreckoning and USBL update.",
"example": 0.000129,
"format": "float",
"type": "number"
},
"longitude": {
"description": "Longitude (X-coordinate) in decimal degrees.",
"example": -10.122,
"format": "float",
"type": "number"
},
"message_type": {
"description": "Type of message",
"enum": [ "enum": [
"platform_status" "Feature"
], ]
"example": "platform_status", },
"type": "string" "id": {
}, "oneOf": [
"mission_plan_ID": { {
"description": "Mission plan ID according to platform-C2 system", "type": "number"
"example": 1, },
"type": "integer" {
}, "type": "string"
"mission_track_ID": { }
"description": "Track number - stage in mission (e.g. 4 --> Waypoint 3 to Waypoint 4)", ]
"example": 4, },
"type": "integer" "properties": {
}, "oneOf": [
"platform_ID": { {
"description": "Unique identifier for this platform", "type": "null"
"example": "reav-x-1", },
"type": "string" {
}, "type": "object"
"platform_state": { }
"description": "Current state executed by platform. E.g. STOP, IDLE, ABORT.", ]
"example": "ABORT", },
"type": "string" "geometry": {
}, "oneOf": [
"platform_timestamp": { {
"description": "Timestamp for onboard platform status message", "type": "null"
"example": "2022-12-21T00:00:00Z", },
"format": "date-time", {
"type": "string" "title": "GeoJSON Point",
}, "type": "object",
"range_to_go": { "required": [
"description": "Estimated distance to reach next waypoint", "type",
"example": 124.3, "coordinates"
"format": "float", ],
"type": "number" "properties": {
}, "type": {
"sensor_config": { "type": "string",
"description": "Scanning sensor on platform available to be controlled by the Autonomy Engine", "enum": [
"properties": { "Point"
"additional_data": { ]
"description": "Any addition fields/data to be added here",
"example": {
"payload": [
1.2,
434
]
}, },
"type": "object" "coordinates": {
}, "type": "array",
"sensor_on": { "minItems": 2,
"description": "Sensor switched on (true) or off (false)", "items": {
"example": true, "type": "number"
"type": "boolean" }
}, },
"sensor_serial": { "bbox": {
"description": "serial number of sensor", "type": "array",
"example": "mbes-002a", "minItems": 4,
"type": "string" "items": {
} "type": "number"
}, }
"type": "object" }
}, }
"speed_over_ground": { },
"description": "Speed over ground", {
"example": 124.3, "title": "GeoJSON LineString",
"format": "float", "type": "object",
"type": "number" "required": [
}, "type",
"status_source": { "coordinates"
"description": "Indicate if this status message is from the platform or USBL", ],
"enum": [ "properties": {
"usbl", "type": {
"onboard_platform" "type": "string",
], "enum": [
"example": "usbl", "LineString"
"type": "string" ]
}, },
"thrust_applied": { "coordinates": {
"description": "Thrust applied", "type": "array",
"example": 124.3, "minItems": 2,
"format": "float", "items": {
"type": "number" "type": "array",
}, "minItems": 2,
"transmission_mode": { "items": {
"description": "Mode in which status message was transmitted when on the surface (e.g. iridium/wifi) or underwater (e.g. acoustics)", "type": "number"
"enum": [ }
"acoustics", }
"iridium", },
"wifi", "bbox": {
"starlink" "type": "array",
], "minItems": 4,
"example": "wifi", "items": {
"type": "string" "type": "number"
}, }
"usbl_fix_seconds_ago": { }
"description": "USBL Fix received x second ago.", }
"example": 10.0, },
"format": "float", {
"type": "number" "title": "GeoJSON Polygon",
}, "type": "object",
"water_current_velocity": { "required": [
"description": "Water current magnitude and direction", "type",
"example": "124.3NE", "coordinates"
"type": "string" ],
} "properties": {
}, "type": {
"required": [ "type": "string",
"message_type", "enum": [
"platform_ID", "Polygon"
"status_source", ]
"platform_timestamp", },
"latitude", "coordinates": {
"longitude" "type": "array",
], "items": {
"type": "object" "type": "array",
}, "minItems": 4,
"platform_status_encoded": { "items": {
"properties": { "type": "array",
"data": { "minItems": 2,
"description": "encoded string. E.g. Base64 encoded", "items": {
"example": "SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg==", "type": "number"
"type": "string" }
}, }
"file_name": { }
"description": "Name of file", },
"example": "ah1-0238126349247372.bin", "bbox": {
"type": "string" "type": "array",
}, "minItems": 4,
"is_binary": { "items": {
"description": "true if the data field contains binary format data encoded as base64. false if the data field contains ascii content such as NMEA.", "type": "number"
"example": true, }
"type": "boolean" }
}, }
"message_type": { },
"description": "Type of message", {
"enum": [ "title": "GeoJSON MultiPoint",
"platform_status_encoded" "type": "object",
], "required": [
"example": "platform_status_encoded", "type",
"type": "string" "coordinates"
}, ],
"mime_type": { "properties": {
"description": "MIME type", "type": {
"example": "application/gzip", "type": "string",
"type": "string" "enum": [
} "MultiPoint"
}, ]
"required": [ },
"data", "coordinates": {
"is_binary" "type": "array",
], "items": {
"type": "object" "type": "array",
}, "minItems": 2,
"survey": { "items": {
"properties": { "type": "number"
"latitude_A": { }
"description": "Latitude of point A(intersection of normal)from waypoint A to survey line", }
"example": 178.2, },
"format": "float", "bbox": {
"type": "number" "type": "array",
}, "minItems": 4,
"latitude_B": { "items": {
"description": "Latitude of point B(intersection of normal)from waypoint B to survey line", "type": "number"
"example": 178.2, }
"format": "float", }
"type": "number" }
}, },
"latitude_C": { {
"description": "Latitude of point C(intersection of normal)from waypoint C to survey line", "title": "GeoJSON MultiLineString",
"example": 178.2, "type": "object",
"format": "float", "required": [
"type": "number" "type",
}, "coordinates"
"latitude_D": { ],
"description": "Latitude of point D(intersection of normal)from waypoint D to survey line", "properties": {
"example": 178.2, "type": {
"format": "float", "type": "string",
"type": "number" "enum": [
}, "MultiLineString"
"latitude_E": { ]
"description": "Latitude of point E(intersection of normal)from waypoint E to survey line", },
"example": 178.2, "coordinates": {
"format": "float", "type": "array",
"type": "number" "items": {
}, "type": "array",
"longitude_A": { "minItems": 2,
"description": "Longitude of point A(intersection of normal)from waypoint A to survey line", "items": {
"example": -10.122, "type": "array",
"format": "float", "minItems": 2,
"type": "number" "items": {
}, "type": "number"
"longitude_B": { }
"description": "Longitude of point B(intersection of normal)from waypoint B to survey line", }
"example": -10.122, }
"format": "float", },
"type": "number" "bbox": {
}, "type": "array",
"longitude_C": { "minItems": 4,
"description": "Longitude of point C(intersection of normal)from waypoint C to survey line", "items": {
"example": -10.122, "type": "number"
"format": "float", }
"type": "number" }
}, }
"longitude_D": { },
"description": "Longitude of point D(intersection of normal)from waypoint D to survey line", {
"example": -10.122, "title": "GeoJSON MultiPolygon",
"format": "float", "type": "object",
"type": "number" "required": [
}, "type",
"longitude_E": { "coordinates"
"description": "Longitude of point E(intersection of normal)from waypoint E to survey line", ],
"example": -10.122, "properties": {
"format": "float", "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" "type": "number"
}, }
"message_type": { }
"description": "Type of message", }
"enum": [ },
"survey" "bbox": {
], "type": "array",
"example": "survey", "minItems": 4,
"type": "string" "items": {
}, "type": "number"
"platform_ID": { }
"description": "Unique identifier for this platform", }
"example": "ecosub-2", }
"type": "string"
},
"timestamp": {
"description": "Timestamp for onboard message",
"example": "2022-12-21T00:00:00Z",
"format": "date-time",
"type": "string"
},
"track_ID": {
"description": "Track number of action(s) currently executed by platform",
"example": 1,
"type": "integer"
}
},
"required": [
"latitude_A",
"longitude_A",
"latitude_B",
"longitude_B",
"platform_ID"
],
"type": "object"
},
"survey_encoded": {
"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": {
"description": "Type of message",
"enum": [
"survey_encoded"
],
"example": "survey_encoded",
"type": "string"
},
"mime_type": {
"description": "MIME type",
"example": "application/gzip",
"type": "string"
}
},
"required": [
"data",
"is_binary"
],
"type": "object"
}
} }
}, }
"info": { }
"description": "SoAR message protocol in schemas",
"title": "SoAR Backbone Message Formats",
"version": "1.0"
},
"openapi": "3.0.2",
"paths": {}
} }
\ 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