diff --git a/examples/autonomy_engine_adapter/emergency_mission_command.json b/examples/autonomy_engine_adapter/emergency_mission_command.json index 8e62e822cc93e5cbaf8cd6438b3ac319feabfb26..91f255e6409c5deb2bb1cc01392bdfa3b9e9a0cd 100644 --- a/examples/autonomy_engine_adapter/emergency_mission_command.json +++ b/examples/autonomy_engine_adapter/emergency_mission_command.json @@ -15,7 +15,7 @@ "emergency": true, "plan": [ { - "action": "safety_abort", + "action": "abort_now", "target_waypoint_latitude": 52.37072283932642, "target_waypoint_longitude": -3.237143188645706 } diff --git a/examples/autonomy_engine_adapter/emergency_mission_plan.json b/examples/autonomy_engine_adapter/emergency_mission_plan.json index a121dc42f55107905713fc42b04f08deed7a83b1..d96b125d3c928f1f6a574feb0bfdb16c0e3b81f7 100644 --- a/examples/autonomy_engine_adapter/emergency_mission_plan.json +++ b/examples/autonomy_engine_adapter/emergency_mission_plan.json @@ -21,7 +21,7 @@ "depth": 5.0 }, { - "action": "safety_abort", + "action": "abort_now", "target_waypoint_latitude": 52.37072283932642, "target_waypoint_longitude": -3.237143188645706 } diff --git a/examples/autonomy_engine_adapter/mission_plan_AH1.json b/examples/autonomy_engine_adapter/mission_plan_AH1.json index 195c88477e7faf067268e1c57b68815aca159169..063332e1fe0f91a9beb3727240c833d8c0d01620 100644 --- a/examples/autonomy_engine_adapter/mission_plan_AH1.json +++ b/examples/autonomy_engine_adapter/mission_plan_AH1.json @@ -44,7 +44,7 @@ "timeout": 200 }, { - "action": "climb", + "action": "dive", "start_point_latitude": 60.00000000000000, "start_point_longitude": -0.237143188645706, "target_waypoint_latitude": 52.37072283932642, diff --git a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json index 96218fba642700748d25439d6c5d69c71d18c997..ad8bcba98cafe25e5ec15b86a275a21188409fd8 100644 --- a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json +++ b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json @@ -44,7 +44,7 @@ "timeout": 300 }, { - "action": "climb", + "action": "dive", "start_point_latitude": 60.00000000000000, "start_point_longitude": -0.237143188645706, "target_waypoint_latitude": 52.37072283932642, diff --git a/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json b/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json index ec17a5e0e25ecd0bad0540e2700e03610ea782dd..774a9b996079ddc6ff2a1f68d1ae08f06b3cb3ff 100644 --- a/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json +++ b/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json @@ -4,13 +4,13 @@ "timestamp": "2022-11-16T00:00:00Z", "version": 2, "source": "autonomy_engine", - "destination": "soar.hydrosurv.reav-60.reav-60-1.to_platform.mission_plan", + "destination": "soar.hydrosurv.reav60.usvdecibel.to_platform.mission_plan", "delivery_type": "publish", "encoded": false }, "payload":{ "message_type": "mission_plan", - "platform_ID": "reav-60-1", + "platform_ID": "usvdecibel", "autonomy_engine_plan_ID": 1, "plan": [ { diff --git a/examples/autonomy_engine_adapter/planning_configuration.json b/examples/autonomy_engine_adapter/planning_configuration.json index 30db669bdf9ca4acfae612868ce8ecf238905945..005fca7bee95eac72a3769a5292d72c6c21e766a 100644 --- a/examples/autonomy_engine_adapter/planning_configuration.json +++ b/examples/autonomy_engine_adapter/planning_configuration.json @@ -5,12 +5,12 @@ "version": 2, "source": "gui", "destination": "soar.all.all.all.from_platform.planning_configuration", - "delivery_type": "publish", + "delivery_type": "broadcast", "encoded": false }, "payload":{ "message_type": "planning_configuration", - "planning_config_ID": 3, + "planning_config_ID": 1, "exclusion_zones": [ { "geometry_coordinates": [ @@ -76,18 +76,8 @@ { "operator": "hydrosurv", "model": "reav", - "platform_ID": "reav-60-1", - "emergency": { - "target_waypoint_latitude": 50.33611100020795, - "target_waypoint_longitude": -4.189772466767039, - "safe_command": "go_home", - "target_depth": 10.0 - }, - "min_altitude": 0.0, - "max_velocity": 0.9, - "min_velocity": 0.1, - "target_altitude": 0.0, - "additional_data": {} + "platform_ID": "usvdecibel", + "active": true } ] }, @@ -100,6 +90,7 @@ "operator": "planet-ocean", "platform_ID": "ecosub-1", "model": "ecosub", + "active": true, "beacon_ID": 10021, "emergency": { "target_waypoint_latitude": 50.32933594228737, @@ -112,8 +103,14 @@ "min_velocity": 0.1, "target_altitude": 15.0, "turning_radius": 1.5, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "scan_sensor": { "sensor_type": "SIDESCAN", + "warmup_time": 60.0, "swath_width": 38.0, "frequency": 700.0, "angle": 110.0 @@ -127,6 +124,7 @@ "operator": "planet-ocean", "platform_ID": "ecosub-2", "model": "ecosub", + "active": true, "beacon_ID": 10021, "emergency": { "target_waypoint_latitude": 50.32775207068519, @@ -139,8 +137,14 @@ "min_velocity": 0.1, "target_altitude": 15.0, "turning_radius": 1.5, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "scan_sensor": { "sensor_type": "SIDESCAN", + "warmup_time": 60.0, "swath_width": 38.0, "frequency": 700.0, "angle": 110.0 @@ -154,6 +158,7 @@ "operator": "planet-ocean", "platform_ID": "ecosub-3", "model": "ecosub", + "active": true, "beacon_ID": 10021, "emergency": { "target_waypoint_latitude": 50.326744124905844, @@ -166,8 +171,14 @@ "min_velocity": 0.1, "target_altitude": 15.0, "turning_radius": 1.5, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "scan_sensor": { "sensor_type": "SIDESCAN", + "warmup_time": 60.0, "swath_width": 38.0, "frequency": 700.0, "angle": 110.0 @@ -181,6 +192,7 @@ "operator": "planet-ocean", "platform_ID": "ecosub-4", "model": "ecosub", + "active": true, "beacon_ID": 10021, "emergency": { "target_waypoint_latitude": 50.32616814629094, @@ -195,6 +207,7 @@ "turning_radius": 1.5, "scan_sensor": { "sensor_type": "SIDESCAN", + "warmup_time": 60.0, "swath_width": 38.0, "frequency": 700.0, "angle": 110.0 @@ -215,7 +228,8 @@ "operator": "noc", "platform_ID": "ah-1", "model": "autosub", - "beacon_ID":2407, + "active": true, + "beacon_ID": 2407, "emergency": { "target_waypoint_latitude": 50.3342284629413, "target_waypoint_longitude": -4.19759350502369, @@ -227,8 +241,14 @@ "min_velocity": 0.1, "target_altitude": 15.0, "turning_radius": 1.5, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "scan_sensor": { "sensor_type": "SIDESCAN", + "warmup_time": 60.0, "swath_width": 38.0, "frequency": 700.0, "angle": 110.0 diff --git a/examples/ecosub_adapter/mission_plan.json b/examples/ecosub_adapter/mission_plan.json index 96218fba642700748d25439d6c5d69c71d18c997..ad8bcba98cafe25e5ec15b86a275a21188409fd8 100644 --- a/examples/ecosub_adapter/mission_plan.json +++ b/examples/ecosub_adapter/mission_plan.json @@ -44,7 +44,7 @@ "timeout": 300 }, { - "action": "climb", + "action": "dive", "start_point_latitude": 60.00000000000000, "start_point_longitude": -0.237143188645706, "target_waypoint_latitude": 52.37072283932642, diff --git a/examples/gui_adapter/emergency_mission_command.json b/examples/gui_adapter/emergency_mission_command.json index 8e62e822cc93e5cbaf8cd6438b3ac319feabfb26..91f255e6409c5deb2bb1cc01392bdfa3b9e9a0cd 100644 --- a/examples/gui_adapter/emergency_mission_command.json +++ b/examples/gui_adapter/emergency_mission_command.json @@ -15,7 +15,7 @@ "emergency": true, "plan": [ { - "action": "safety_abort", + "action": "abort_now", "target_waypoint_latitude": 52.37072283932642, "target_waypoint_longitude": -3.237143188645706 } diff --git a/examples/gui_adapter/emergency_mission_plan.json b/examples/gui_adapter/emergency_mission_plan.json index a121dc42f55107905713fc42b04f08deed7a83b1..d96b125d3c928f1f6a574feb0bfdb16c0e3b81f7 100644 --- a/examples/gui_adapter/emergency_mission_plan.json +++ b/examples/gui_adapter/emergency_mission_plan.json @@ -21,7 +21,7 @@ "depth": 5.0 }, { - "action": "safety_abort", + "action": "abort_now", "target_waypoint_latitude": 52.37072283932642, "target_waypoint_longitude": -3.237143188645706 } diff --git a/examples/gui_adapter/planning_configuration.json b/examples/gui_adapter/planning_configuration.json index 30db669bdf9ca4acfae612868ce8ecf238905945..9c04569473fd56579e6e0bdf565ee88702aba341 100644 --- a/examples/gui_adapter/planning_configuration.json +++ b/examples/gui_adapter/planning_configuration.json @@ -10,7 +10,7 @@ }, "payload":{ "message_type": "planning_configuration", - "planning_config_ID": 3, + "planning_config_ID": 1, "exclusion_zones": [ { "geometry_coordinates": [ @@ -75,8 +75,9 @@ "platforms": [ { "operator": "hydrosurv", - "model": "reav", - "platform_ID": "reav-60-1", + "model": "reav60", + "platform_ID": "usvdecibel", + "active": true, "emergency": { "target_waypoint_latitude": 50.33611100020795, "target_waypoint_longitude": -4.189772466767039, @@ -87,6 +88,11 @@ "max_velocity": 0.9, "min_velocity": 0.1, "target_altitude": 0.0, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "additional_data": {} } ] @@ -100,6 +106,7 @@ "operator": "planet-ocean", "platform_ID": "ecosub-1", "model": "ecosub", + "active": true, "beacon_ID": 10021, "emergency": { "target_waypoint_latitude": 50.32933594228737, @@ -112,6 +119,11 @@ "min_velocity": 0.1, "target_altitude": 15.0, "turning_radius": 1.5, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "scan_sensor": { "sensor_type": "SIDESCAN", "swath_width": 38.0, @@ -127,6 +139,7 @@ "operator": "planet-ocean", "platform_ID": "ecosub-2", "model": "ecosub", + "active": true, "beacon_ID": 10021, "emergency": { "target_waypoint_latitude": 50.32775207068519, @@ -139,6 +152,11 @@ "min_velocity": 0.1, "target_altitude": 15.0, "turning_radius": 1.5, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "scan_sensor": { "sensor_type": "SIDESCAN", "swath_width": 38.0, @@ -154,6 +172,7 @@ "operator": "planet-ocean", "platform_ID": "ecosub-3", "model": "ecosub", + "active": true, "beacon_ID": 10021, "emergency": { "target_waypoint_latitude": 50.326744124905844, @@ -166,6 +185,11 @@ "min_velocity": 0.1, "target_altitude": 15.0, "turning_radius": 1.5, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "scan_sensor": { "sensor_type": "SIDESCAN", "swath_width": 38.0, @@ -181,6 +205,7 @@ "operator": "planet-ocean", "platform_ID": "ecosub-4", "model": "ecosub", + "active": true, "beacon_ID": 10021, "emergency": { "target_waypoint_latitude": 50.32616814629094, @@ -215,7 +240,8 @@ "operator": "noc", "platform_ID": "ah-1", "model": "autosub", - "beacon_ID":2407, + "active": true, + "beacon_ID": 2407, "emergency": { "target_waypoint_latitude": 50.3342284629413, "target_waypoint_longitude": -4.19759350502369, @@ -227,6 +253,11 @@ "min_velocity": 0.1, "target_altitude": 15.0, "turning_radius": 1.5, + "endurance_relative_to_water_speed": { + "min_battery_rating": 2.25, + "max_battery_rating": 1.23, + "avg_battery_rating": 1.9 + }, "scan_sensor": { "sensor_type": "SIDESCAN", "swath_width": 38.0, diff --git a/examples/hydrosurv_adapter/acknowledgement.json b/examples/hydrosurv_adapter/acknowledgement.json index 0c130c46fc818d5fd913ed703c04e9341872b3c1..23c1028b712c08f0015b8db8ccdf1a1896684a51 100644 --- a/examples/hydrosurv_adapter/acknowledgement.json +++ b/examples/hydrosurv_adapter/acknowledgement.json @@ -4,14 +4,14 @@ "timestamp": "2022-11-16T00:00:00Z", "version": 1, "source": "hydrosurv_adapter", - "destination": "soar.hydrosurv.reav-60.reav-60-1.from_platform.acknowledgement", + "destination": "soar.hydrosurv.reav60.usvdecibel.from_platform.acknowledgement", "delivery_type": "publish", "encoded": false }, "payload":{ "message_type": "acknowledgement", "autonomy_engine_plan_ID": 1, - "platform_ID": "reav-60-1", + "platform_ID": "usvdecibel", "approved": false } } \ No newline at end of file diff --git a/examples/hydrosurv_adapter/mission_plan.json b/examples/hydrosurv_adapter/mission_plan.json index ec17a5e0e25ecd0bad0540e2700e03610ea782dd..774a9b996079ddc6ff2a1f68d1ae08f06b3cb3ff 100644 --- a/examples/hydrosurv_adapter/mission_plan.json +++ b/examples/hydrosurv_adapter/mission_plan.json @@ -4,13 +4,13 @@ "timestamp": "2022-11-16T00:00:00Z", "version": 2, "source": "autonomy_engine", - "destination": "soar.hydrosurv.reav-60.reav-60-1.to_platform.mission_plan", + "destination": "soar.hydrosurv.reav60.usvdecibel.to_platform.mission_plan", "delivery_type": "publish", "encoded": false }, "payload":{ "message_type": "mission_plan", - "platform_ID": "reav-60-1", + "platform_ID": "usvdecibel", "autonomy_engine_plan_ID": 1, "plan": [ { diff --git a/examples/hydrosurv_adapter/platform_status.json b/examples/hydrosurv_adapter/platform_status.json index 72c30dd2857c30db3994a9b61fc781915f668e94..082649aee6831b8c6feb2f4d4989fc1e228f8990 100644 --- a/examples/hydrosurv_adapter/platform_status.json +++ b/examples/hydrosurv_adapter/platform_status.json @@ -4,7 +4,7 @@ "timestamp": "2022-11-16T00:00:00Z", "version": 2, "source": "hydrosurv_adapter", - "destination": "soar.hydrosurv.reav-60.reav-60-1.from_platform.platform_status", + "destination": "soar.hydrosurv.reav60.usvdecibel.from_platform.platform_status", "delivery_type": "publish", "encoded": false }, @@ -19,7 +19,7 @@ "longitude": -10.122, "mission_plan_ID": 1, "mission_track_ID": 4, - "platform_ID": "reav-60-1", + "platform_ID": "usvdecibel", "platform_state": "ABORT", "platform_timestamp": "2022-12-21T00:00:00Z", "speed_over_ground": 4.5, diff --git a/formats/mission_plan.py b/formats/mission_plan.py index 004376b3d534bbf2f45e56cc01aa39f4296a0d4d..f62e823239d1106de2ebec06a331138e54f19fe3 100644 --- a/formats/mission_plan.py +++ b/formats/mission_plan.py @@ -11,6 +11,18 @@ action_schema = { "type": "string", "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", }, "start_point_latitude": { diff --git a/formats/planning_configuration.py b/formats/planning_configuration.py index 1e8dd5b194cca53c290efc14d861c2ee7de0b4a8..6a16e4272451365426cdd29874361db193bba0de 100644 --- a/formats/planning_configuration.py +++ b/formats/planning_configuration.py @@ -8,7 +8,7 @@ emergency_schema = { "properties": { "safe_command": { "type": "string", - "enum": ["go_home", "abort_now", "stop_mission"], + "enum": ["go_home", "abort_now", "stop_now", "surface_now"], "description": "Command/Action that is native to respective" + " partner's platform/C2", "example": "go_home", @@ -40,6 +40,33 @@ emergency_schema = { ], } +endurance_relative_water_speed_schema = { + "type": "object", + "properties": { + "min_battery_rating": { + "type": "number", + "format": "float", + "description": "Battery endurance rating during maximum speed usage (m/s)", + "example": 3.32, + }, + "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_schema = { "type": "object", @@ -50,6 +77,12 @@ scan_sensor_schema = { "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", @@ -96,6 +129,11 @@ platform_schema = { + "associated to this platform", "example": 2407, }, + "active": { + "type": "boolean", + "description": "If platform is active = True, and inactive = False", + "example": True, + }, "emergency": emergency_schema, "min_altitude": { "type": "number", @@ -127,6 +165,7 @@ platform_schema = { "description": "Turning radius of platform (in metres)", "example": 1.0, }, + "endurance_relative_to_water_speed": endurance_relative_water_speed_schema, "scan_sensor": scan_sensor_schema, "additional_data": { "description": "Any addition fields/data to be added here", @@ -137,11 +176,8 @@ platform_schema = { "required": [ "operator", "platform_ID", + "active", "model", - "emergency", - "min_altitude", - "min_velocity", - "max_velocity", ], } diff --git a/project/soar/swagger.json b/project/soar/swagger.json index e99a8438b8cde2fb7ee15d4c516a1289fcd2e55d..c9b04015ac06f15fe76fa101612f34484a980104 100644 --- a/project/soar/swagger.json +++ b/project/soar/swagger.json @@ -126,6 +126,18 @@ "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" }, @@ -487,6 +499,11 @@ "description":"Squad consists of these platforms", "items":{ "properties":{ + "active":{ + "description":"If platform is active = True, and inactive = False", + "example":true, + "type":"boolean" + }, "additional_data":{ "description":"Any addition fields/data to be added here", "example":{ @@ -507,7 +524,8 @@ "enum":[ "go_home", "abort_now", - "stop_mission" + "stop_now", + "surface_now" ], "example":"go_home", "type":"string" @@ -538,6 +556,29 @@ ], "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, @@ -598,6 +639,12 @@ "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" @@ -618,11 +665,8 @@ "required":[ "operator", "platform_ID", - "model", - "emergency", - "min_altitude", - "min_velocity", - "max_velocity" + "active", + "model" ], "type":"object" }, diff --git a/tests/fixtures/schemas.py b/tests/fixtures/schemas.py index 632a5ea64f2a22e7682ba46b35458dd92d7b19da..2aba8e7fa1282d43f447b058e04cbcd6de3742f9 100644 --- a/tests/fixtures/schemas.py +++ b/tests/fixtures/schemas.py @@ -250,7 +250,7 @@ emergency_schema = { "properties": { "safe_command": { "type": "string", - "enum": ["go_home", "abort_now", "stop_mission"], + "enum": ["go_home", "abort_now", "stop_now", "surface_now"], "description": "Command/Action that is native to respective" + " partner's platform/C2", "example": "go_home", diff --git a/tests/fixtures/swagger.json b/tests/fixtures/swagger.json index 3ef4b1572566192ca35435f5f4f85a3d03a40eb5..c9b04015ac06f15fe76fa101612f34484a980104 100644 --- a/tests/fixtures/swagger.json +++ b/tests/fixtures/swagger.json @@ -1,888 +1,1065 @@ { - "components":{ - "schemas":{ - "MESSAGE":{ - "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" - ], - "type":"object" - }, - "acknowledgement":{ - "properties":{ - "approved":{ - "description":"Human-in-the-loop approval.1 - Plan approved; 0 - Plan Rejected", - "type":"boolean" - }, - "autonomy_engine_plan_ID":{ - "description":"Mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", - "example":1, - "type":"integer" - }, - "message_type":{ - "description":"Type of message", - "enum":[ - "acknowledgement" - ], - "example":"acknowledgement", - "type":"string" - }, - "platform_ID":{ - "description":"Unique identifier for this platform", - "example":"reav-x-1", - "type":"string" - } - }, - "required":[ - "message_type", - "autonomy_engine_plan_ID", - "platform_ID", - "approved" - ], - "type":"object" - }, - "header":{ - "discriminator":{ - "propertyName":"message_type" - }, - "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":{ - "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" - }, - "mission_plan":{ - "properties":{ - "autonomy_engine_plan_ID":{ - "description":"Unique identifier for this plangenerated by the Autonomy Engine", - "example":3, - "type":"integer" - }, - "emergency":{ - "default":false, - "description":"To indicate if this is an emergency. true = emergency and false = no emergency", - "example":false, - "type":"boolean" - }, - "message_type":{ - "description":"Type of message", - "enum":[ - "mission_plan" - ], - "example":"mission_plan", - "type":"string" - }, - "plan":{ - "items":{ - "properties":{ - "action":{ - "description":"Autonomy Engine's action from `move`, `payload`, `dive`, `send_hits`, `scanline`, `scanpoint`.", - "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":{ - "description":"Start point, x-coordinate", - "example":-4.187143188645706, - "format":"float", - "type":"number" - }, - "start_point_longitude":{ - "description":"Start point, y-coordinate", - "example":50.37072283932642, - "format":"float", - "type":"number" - }, - "target_waypoint_latitude":{ - "description":"Target waypoint, x-coordinate", - "example":-4.187143188645706, - "format":"float", - "type":"number" - }, - "target_waypoint_longitude":{ - "description":"Target waypoint, y-coordinate", - "example":50.37072283932642, - "format":"float", - "type":"number" - }, - "timeout":{ - "description":"Timeout set to perform action", - "example":1800.0, - "format":"float", - "type":"number" - } - }, - "required":[ - "target_waypoint_latitude", - "target_waypoint_longitude" - ], - "type":"object" - }, - "type":"array" - }, - "platform_ID":{ - "description":"Unique identifier for this platform", - "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":[ - "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 - } - }, - "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 x-coordinate of point of interest", - "example":178.2, - "format":"float", - "type":"number" - }, - "longitude":{ - "description":"Identified y-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" - }, - "observation_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":[ - "observation_encoded" - ], - "example":"observation_encoded", - "type":"string" - }, - "mime_type":{ - "description":"MIME type", - "example":"application/gzip", - "type":"string" - } - }, - "required":[ - "data", - "is_binary" - ], - "type":"object" - }, - "payload":{ - "discriminator":{ - "mapping":{ - "acknowledgement":"#/components/schemas/acknowledgement", - "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" - }, - "propertyName":"message_type" - }, - "oneOf":[ - { - "$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" - } - ] - }, - "planning_configuration":{ - "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":{ - "description":"Type of message", - "enum":[ - "planning_configuration" - ], - "example":"planning_configuration", - "type":"string" - }, - "planning_config_ID":{ - "description":"Unique identifier tagged to version of this configuration plan", - "example":3, - "type":"integer" - }, - "region_of_interest":{ - "description":"Region of interest for the entire operation", - "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" - }, - "squads":{ - "items":{ - "properties":{ - "no_of_platforms":{ - "description":"Number of platforms", - "example":3, - "type":"integer" - }, - "platforms":{ - "description":"Squad consists of these platforms", - "items":{ - "properties":{ - "additional_data":{ - "description":"Any addition fields/data to be added here", - "example":{ - "new_sensor_a":"test_sensor", - "range":10.0 - }, - "type":"object" - }, - "beacon_ID":{ - "description":"Unique identifier (number) for the beacon associated to this platform", - "example":9407, - "type":"number" - }, - "emergency":{ - "properties":{ - "safe_command":{ - "description":"Command/Action that is native to respective partner's platform/C2", - "enum":[ - "go_home", - "abort_now", - "stop_mission" - ], - "example":"go_home", - "type":"string" - }, - "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":{ - "description":"X-coordinate safe place for respective platform", - "example":-7.432, - "format":"float", - "type":"number" - }, - "target_waypoint_longitude":{ - "description":"Y-coordinate safe place for respective platform", - "example":50.365, - "format":"float", - "type":"number" - } - }, - "required":[ - "target_waypoint_latitude", - "target_waypoint_longitude", - "target_depth" - ], - "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" - } - }, - "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" - } - }, - "required":[ - "operator", - "platform_ID", - "model", - "emergency", - "min_altitude", - "min_velocity", - "max_velocity" - ], - "type":"object" - }, - "type":"array" - }, - "squad_ID":{ - "description":"Identifier of given squad", - "example":23, - "type":"integer" - }, - "squad_mission_type":{ - "description":"Mission of given squad: `tracking`, `survey`, `inspection`", - "enum":[ - "tracking", - "survey", - "inspection" - ], - "example":"survey", - "type":"string" - } - }, - "required":[ - "squad_ID", - "no_of_platforms", - "platforms", - "squad_mission_type" - ], - "type":"object" - }, - "type":"array" - } - }, - "required":[ - "message_type", - "planning_config_ID", - "squads", - "exclusion_zones", - "region_of_interest" - ], - "type":"object" - }, - "platform_status":{ - "properties":{ - "altitude":{ - "description":"Target altitude in metres", - "example":20.0, - "format":"float", - "type":"number" - }, - "autonomy_engine_plan_ID":{ - "description":"Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", - "example":1, - "type":"integer" - }, - "battery_remaining_capacity":{ - "description":"Battery remaining % provided by respective C2", - "example":80.2, - "format":"float", - "type":"number" - }, - "depth":{ - "default":0.0, - "description":"Target depth in metres", - "example":50.0, - "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 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 in decimal degrees.", - "example":-10.122, - "format":"float", - "type":"number" - }, - "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":{ - "description":"Unique identifier for this platform", - "example":"reav-x-1", - "type":"string" - }, - "platform_state":{ - "description":"Current state executed by platform. E.g. STOP, IDLE, ABORT.", - "example":"ABORT", - "type":"string" - }, - "platform_timestamp":{ - "description":"Timestamp for onboard platform status message", - "example":"2022-12-21T00:00:00Z", - "format":"date-time", - "type":"string" - }, - "range_to_go":{ - "description":"Estimated distance to reach next waypoint", - "example":124.3, - "format":"float", - "type":"number" - }, - "sensor_config":{ - "description":"Scanning sensor on platform available to be controlled by the Autonomy Engine", - "properties":{ - "additional_data":{ - "description":"Any addition fields/data to be added here", - "example":{ - "payload":[ - 1.2, - 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":[ - "message_type", - "platform_ID", - "status_source", - "platform_timestamp", - "latitude", - "longitude" - ], - "type":"object" - }, - "platform_status_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":[ - "platform_status_encoded" - ], - "example":"platform_status_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":{ - - } + "components":{ + "schemas":{ + "MESSAGE":{ + "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" + ], + "type":"object" + }, + "acknowledgement":{ + "properties":{ + "approved":{ + "description":"Human-in-the-loop approval.1 - Plan approved; 0 - Plan Rejected", + "type":"boolean" + }, + "autonomy_engine_plan_ID":{ + "description":"Mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", + "example":1, + "type":"integer" + }, + "message_type":{ + "description":"Type of message", + "enum":[ + "acknowledgement" + ], + "example":"acknowledgement", + "type":"string" + }, + "platform_ID":{ + "description":"Unique identifier for this platform", + "example":"reav-x-1", + "type":"string" + } + }, + "required":[ + "message_type", + "autonomy_engine_plan_ID", + "platform_ID", + "approved" + ], + "type":"object" + }, + "header":{ + "discriminator":{ + "propertyName":"message_type" + }, + "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":{ + "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" + }, + "mission_plan":{ + "properties":{ + "autonomy_engine_plan_ID":{ + "description":"Unique identifier for this plangenerated by the Autonomy Engine", + "example":3, + "type":"integer" + }, + "emergency":{ + "default":false, + "description":"To indicate if this is an emergency. true = emergency and false = no emergency", + "example":false, + "type":"boolean" + }, + "message_type":{ + "description":"Type of message", + "enum":[ + "mission_plan" + ], + "example":"mission_plan", + "type":"string" + }, + "plan":{ + "items":{ + "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" + }, + "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":{ + "description":"Start point, y-coordinate", + "example":50.37072283932642, + "format":"float", + "type":"number" + }, + "start_point_longitude":{ + "description":"Start point, x-coordinate", + "example":-4.187143188645706, + "format":"float", + "type":"number" + }, + "target_waypoint_latitude":{ + "description":"Target waypoint, y-coordinate", + "example":50.37072283932642, + "format":"float", + "type":"number" + }, + "target_waypoint_longitude":{ + "description":"Target waypoint, x-coordinate", + "example":-4.187143188645706, + "format":"float", + "type":"number" + }, + "timeout":{ + "description":"Timeout set to perform action", + "example":1800.0, + "format":"float", + "type":"number" + } + }, + "required":[ + "target_waypoint_latitude", + "target_waypoint_longitude" + ], + "type":"object" + }, + "type":"array" + }, + "platform_ID":{ + "description":"Unique identifier for this platform", + "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":[ + "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 + } + }, + "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" + }, + "observation_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":[ + "observation_encoded" + ], + "example":"observation_encoded", + "type":"string" + }, + "mime_type":{ + "description":"MIME type", + "example":"application/gzip", + "type":"string" + } + }, + "required":[ + "data", + "is_binary" + ], + "type":"object" + }, + "payload":{ + "discriminator":{ + "mapping":{ + "acknowledgement":"#/components/schemas/acknowledgement", + "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/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":{ + "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":{ + "description":"Type of message", + "enum":[ + "planning_configuration" + ], + "example":"planning_configuration", + "type":"string" + }, + "planning_config_ID":{ + "description":"Unique identifier tagged to version of this configuration plan", + "example":3, + "type":"integer" + }, + "region_of_interest":{ + "description":"Region of interest for the entire operation", + "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" + }, + "squads":{ + "items":{ + "properties":{ + "no_of_platforms":{ + "description":"Number of platforms", + "example":3, + "type":"integer" + }, + "platforms":{ + "description":"Squad consists of these platforms", + "items":{ + "properties":{ + "active":{ + "description":"If platform is active = True, and inactive = False", + "example":true, + "type":"boolean" + }, + "additional_data":{ + "description":"Any addition fields/data to be added here", + "example":{ + "new_sensor_a":"test_sensor", + "range":10.0 + }, + "type":"object" + }, + "beacon_ID":{ + "description":"Unique identifier (number) for the beacon associated to this platform", + "example":2407, + "type":"number" + }, + "emergency":{ + "properties":{ + "safe_command":{ + "description":"Command/Action that is native to respective partner's platform/C2", + "enum":[ + "go_home", + "abort_now", + "stop_now", + "surface_now" + ], + "example":"go_home", + "type":"string" + }, + "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":{ + "description":"Y-coordinate safe place for respective platform", + "example":50.365, + "format":"float", + "type":"number" + }, + "target_waypoint_longitude":{ + "description":"X-coordinate safe place for respective platform", + "example":-7.432, + "format":"float", + "type":"number" + } + }, + "required":[ + "target_waypoint_latitude", + "target_waypoint_longitude", + "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" + } + }, + "required":[ + "operator", + "platform_ID", + "active", + "model" + ], + "type":"object" + }, + "type":"array" + }, + "squad_ID":{ + "description":"Identifier of given squad", + "example":23, + "type":"integer" + }, + "squad_mission_type":{ + "description":"Mission of given squad: `tracking`, `survey`, `inspection`", + "enum":[ + "tracking", + "survey", + "inspection" + ], + "example":"survey", + "type":"string" + } + }, + "required":[ + "squad_ID", + "no_of_platforms", + "platforms", + "squad_mission_type" + ], + "type":"object" + }, + "type":"array" + } + }, + "required":[ + "message_type", + "planning_config_ID", + "squads", + "exclusion_zones", + "region_of_interest" + ], + "type":"object" + }, + "platform_status":{ + "properties":{ + "altitude":{ + "description":"Target altitude in metres", + "example":20.0, + "format":"float", + "type":"number" + }, + "autonomy_engine_plan_ID":{ + "description":"Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform", + "example":1, + "type":"integer" + }, + "battery_remaining_capacity":{ + "description":"Battery remaining % provided by respective C2", + "example":80.2, + "format":"float", + "type":"number" + }, + "depth":{ + "default":0.0, + "description":"Target depth in metres", + "example":50.0, + "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":[ + "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":{ + "description":"Unique identifier for this platform", + "example":"reav-x-1", + "type":"string" + }, + "platform_state":{ + "description":"Current state executed by platform. E.g. STOP, IDLE, ABORT.", + "example":"ABORT", + "type":"string" + }, + "platform_timestamp":{ + "description":"Timestamp for onboard platform status message", + "example":"2022-12-21T00:00:00Z", + "format":"date-time", + "type":"string" + }, + "range_to_go":{ + "description":"Estimated distance to reach next waypoint", + "example":124.3, + "format":"float", + "type":"number" + }, + "sensor_config":{ + "description":"Scanning sensor on platform available to be controlled by the Autonomy Engine", + "properties":{ + "additional_data":{ + "description":"Any addition fields/data to be added here", + "example":{ + "payload":[ + 1.2, + 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":[ + "message_type", + "platform_ID", + "status_source", + "platform_timestamp", + "latitude", + "longitude" + ], + "type":"object" + }, + "platform_status_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":[ + "platform_status_encoded" + ], + "example":"platform_status_encoded", + "type":"string" + }, + "mime_type":{ + "description":"MIME type", + "example":"application/gzip", + "type":"string" + } + }, + "required":[ + "data", + "is_binary" + ], + "type":"object" + }, + "survey":{ + "properties":{ + "latitude_A":{ + "description":"Latitude of point A(intersection of normal)from waypoint A to survey line", + "example":178.2, + "format":"float", + "type":"number" + }, + "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":{ + "description":"Latitude of point D(intersection of normal)from waypoint D to survey line", + "example":178.2, + "format":"float", + "type":"number" + }, + "latitude_E":{ + "description":"Latitude of point E(intersection of normal)from waypoint E to survey line", + "example":178.2, + "format":"float", + "type":"number" + }, + "longitude_A":{ + "description":"Longitude of point A(intersection of normal)from waypoint A to survey line", + "example":-10.122, + "format":"float", + "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" + }, + "longitude_C":{ + "description":"Longitude of point C(intersection of normal)from waypoint C to survey line", + "example":-10.122, + "format":"float", + "type":"number" + }, + "longitude_D":{ + "description":"Longitude of point D(intersection of normal)from waypoint D to survey line", + "example":-10.122, + "format":"float", + "type":"number" + }, + "longitude_E":{ + "description":"Longitude of point E(intersection of normal)from waypoint E to survey line", + "example":-10.122, + "format":"float", + "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