Verified Commit 4bb7e51d authored by Dan Jones's avatar Dan Jones
Browse files

refactor: update action schema to use geojson

parent eec6dc80
{
"header": {
"message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "autonomy_engine",
"destination": "soar.noc.autosub.alr-52.to_platform.mission_plan",
"delivery_type": "publish",
"encoded": false
},
"payload":{
"message_type": "mission_plan",
"platform_ID": "alr-52",
"autonomy_engine_plan_ID": "a427003c-0000-11aa-a1eb-bvcdfghjgfcc",
"plan": [
{
"action": "move",
"start": {
"type": "Point",
"coordinates": [
-3.0071,
50.3707
]
},
"target": {
"type": "Point",
"coordinates": [
-3.2371,
52.3707,
0.0
]
}
}
]
}
}
\ No newline at end of file
......@@ -25,6 +25,37 @@ action_schema = {
],
"example": "move",
},
"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,
},
},
"oneOf": [
{
"type": "object",
"properties": {
"start": {
"$ref": "https://geojson.org/schema/Point.json",
},
"target": {
"$ref": "https://geojson.org/schema/Point.json",
},
},
"required": [
"target",
],
},
{
"type": "object",
"properties": {
"start_point_latitude": {
"type": "number",
"format": "float",
......@@ -61,23 +92,13 @@ action_schema = {
"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",
],
},
],
}
mission_plan_schema = {
......@@ -90,11 +111,21 @@ mission_plan_schema = {
"enum": ["mission_plan"],
},
"autonomy_engine_plan_ID": {
"oneOf": [
{
"type": "string",
"format": "uuid",
"description": "Unique identifier for this plan"
+ "generated by the Autonomy Engine",
},
{
"type": "integer",
"description": "Unique identifier for this plan"
+ "generated by the Autonomy Engine",
"example": 3,
},
]
},
"platform_ID": {
"type": "string",
"description": "Unique identifier for this platform",
......
......@@ -1449,9 +1449,18 @@
"mission_plan": {
"properties": {
"autonomy_engine_plan_ID": {
"oneOf": [
{
"description": "Unique identifier for this plangenerated by the Autonomy Engine",
"format": "uuid",
"type": "string"
},
{
"description": "Unique identifier for this plangenerated by the Autonomy Engine",
"example": 3,
"type": "integer"
}
]
},
"emergency": {
"default": false,
......@@ -1469,29 +1478,23 @@
},
"plan": {
"items": {
"oneOf": [
{
"properties": {
"action": {
"description": "Autonomy Engine's action from `move`, `payload`, `dive`, `send_hits`, `scanline`, `scanpoint`.",
"enum": [
"move",
"payload",
"dive",
"send_hits",
"scanline",
"scanpoint",
"go_home",
"surface_now",
"stop_mission",
"abort_now"
],
"example": "move",
"type": "string"
"start": {
"$ref": "#/components/schemas/geojson.org.schema.Point.json"
},
"activate_payload": {
"description": "To activate/deactivate sensor for Autosub Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`",
"example": true,
"type": "boolean"
"target": {
"$ref": "#/components/schemas/geojson.org.schema.Point.json"
}
},
"required": [
"target"
],
"type": "object"
},
{
"properties": {
"altitude": {
"description": "Altitude of next action",
"example": 15.0,
......@@ -1527,6 +1530,37 @@
"example": -4.187143188645706,
"format": "float",
"type": "number"
}
},
"required": [
"target_waypoint_latitude",
"target_waypoint_longitude"
],
"type": "object"
}
],
"properties": {
"action": {
"description": "Autonomy Engine's action from `move`, `payload`, `dive`, `send_hits`, `scanline`, `scanpoint`.",
"enum": [
"move",
"payload",
"dive",
"send_hits",
"scanline",
"scanpoint",
"go_home",
"surface_now",
"stop_mission",
"abort_now"
],
"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"
},
"timeout": {
"description": "Timeout set to perform action",
......@@ -1535,10 +1569,6 @@
"type": "number"
}
},
"required": [
"target_waypoint_latitude",
"target_waypoint_longitude"
],
"type": "object"
},
"type": "array"
......
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