From 36a44ffffa1ef83469221230cdf99bbcf03f72fe Mon Sep 17 00:00:00 2001 From: Trishna Saeharaseelan <trishna.saeharaseelan@noc.ac.uk> Date: Wed, 25 Jan 2023 21:28:26 +0800 Subject: [PATCH] refactor: examples and platform_ID type to string --- .../mission_plan_AH1.json | 58 +++++++ .../mission_plan_ECOSUB.json | 58 +++++++ .../mission_plan_HYDROSURV.json | 26 +++ .../planning_configuration.json | 161 ++++++++++++++++++ examples/ecosub_adapter/mission_plan.json | 58 +++++++ examples/ecosub_adapter/observation.json | 28 +++ .../platform_status-from_usbl_example.json | 21 +++ examples/ecosub_adapter/platform_status.json | 44 +++++ .../sample_decoded_ecosub_status.txt | 0 examples/ecosub_c2/mission_plan.json | 54 ------ examples/ecosub_c2/observation.json | 24 --- .../platform_status-from_usbl_example.json | 17 -- examples/ecosub_c2/platform_status.json | 40 ----- .../planning_configuration.json | 16 +- .../hydrosurv_adapter/acknowledgement.json | 24 +-- examples/hydrosurv_adapter/mission_plan.json | 26 +-- .../hydrosurv_adapter/platform_status.json | 52 +++--- formats/mission_plan.py | 4 +- formats/observation.py | 6 +- formats/planning_configuration.py | 6 +- formats/platform_status.py | 6 +- project/soar/swagger.json | 22 +-- 22 files changed, 543 insertions(+), 208 deletions(-) create mode 100644 examples/autonomy_engine_adapter/mission_plan_AH1.json create mode 100644 examples/autonomy_engine_adapter/mission_plan_ECOSUB.json create mode 100644 examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json create mode 100644 examples/autonomy_engine_adapter/planning_configuration.json create mode 100644 examples/ecosub_adapter/mission_plan.json create mode 100644 examples/ecosub_adapter/observation.json create mode 100644 examples/ecosub_adapter/platform_status-from_usbl_example.json create mode 100644 examples/ecosub_adapter/platform_status.json rename examples/{ecosub_c2 => ecosub_adapter}/sample_decoded_ecosub_status.txt (100%) delete mode 100644 examples/ecosub_c2/mission_plan.json delete mode 100644 examples/ecosub_c2/observation.json delete mode 100644 examples/ecosub_c2/platform_status-from_usbl_example.json delete mode 100644 examples/ecosub_c2/platform_status.json rename examples/{gui => gui_adapter}/planning_configuration.json (94%) diff --git a/examples/autonomy_engine_adapter/mission_plan_AH1.json b/examples/autonomy_engine_adapter/mission_plan_AH1.json new file mode 100644 index 0000000..f6289c4 --- /dev/null +++ b/examples/autonomy_engine_adapter/mission_plan_AH1.json @@ -0,0 +1,58 @@ +{ + "header": { + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "autonomy_engine", + "destination": "noc_c2", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "mission_plan", + "platform_ID": "5-ah1", + "autonomy_engine_mission_plan_ID": 1, + "plan": [ + { + "action": "move", + "flight_style": "go to waypoint", + "latitude_waypoint": -3.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": null, + "depth": 0.0, + "activate_payload": false, + "send_environmental_data": false + }, + { + "action": "dive", + "flight_style": "dive to depth", + "latitude_waypoint": -3.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": 10, + "depth": null, + "activate_payload": false, + "send_environmental_data": false + }, + { + "action": "scanline", + "flight_style": "go to waypoint", + "latitude_waypoint": -0.237143188645706, + "longitude_waypoint": 60.00000000000000, + "altitude": 10, + "depth": null, + "activate_payload": true, + "send_environmental_data": false + }, + { + "action": "climb", + "flight_style": "go to surface", + "latitude_waypoint": -0.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": null, + "depth": 0, + "activate_payload": false, + "send_environmental_data": true + } + ] + } +} \ No newline at end of file diff --git a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json new file mode 100644 index 0000000..92ff09c --- /dev/null +++ b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json @@ -0,0 +1,58 @@ +{ + "header": { + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "autonomy_engine", + "destination": "ecosub_c2", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "mission_plan", + "platform_ID": "ecosub-5", + "autonomy_engine_mission_plan_ID": 1, + "plan": [ + { + "action": "move", + "flight_style": "go to waypoint", + "latitude_waypoint": -3.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": null, + "depth": 0.0, + "activate_payload": false, + "send_environmental_data": false + }, + { + "action": "dive", + "flight_style": "dive to depth", + "latitude_waypoint": -3.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": 10, + "depth": null, + "activate_payload": false, + "send_environmental_data": false + }, + { + "action": "scanline", + "flight_style": "go to waypoint", + "latitude_waypoint": -0.237143188645706, + "longitude_waypoint": 60.00000000000000, + "altitude": 10, + "depth": null, + "activate_payload": true, + "send_environmental_data": false + }, + { + "action": "climb", + "flight_style": "go to surface", + "latitude_waypoint": -0.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": null, + "depth": 0, + "activate_payload": false, + "send_environmental_data": true + } + ] + } +} \ No newline at end of file diff --git a/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json b/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json new file mode 100644 index 0000000..6cc34fd --- /dev/null +++ b/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json @@ -0,0 +1,26 @@ +{ + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "autonomy_engine", + "destination": "hydrosurv_adapter", + "delivery_type": "publish", + "encoded": false, + "message_type": "mission_plan", + "platform_ID": "reav-60-1", + "autonomy_engine_plan_ID": 1, + "plan": [ + { + "latitude_waypoint": -4.187143188645706, + "longitude_waypoint": 50.37072283932642 + }, + { + "latitude_waypoint": -3.187143188645706, + "longitude_waypoint": 51.37072283932642 + }, + { + "latitude_waypoint": -3.237143188645706, + "longitude_waypoint": 52.37072283932642 + } + ] +} \ No newline at end of file diff --git a/examples/autonomy_engine_adapter/planning_configuration.json b/examples/autonomy_engine_adapter/planning_configuration.json new file mode 100644 index 0000000..06078de --- /dev/null +++ b/examples/autonomy_engine_adapter/planning_configuration.json @@ -0,0 +1,161 @@ +{ + "header":{ + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "ecosub_c2", + "destination": "autonomy_engine", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "platform_status", + "planning_config_ID": 3, + "exclusion_zones": [ + { + "geometry_coordinates": [ + [ + [ + -4.187143188645706, + 50.37072283932642 + ], + [ + -4.202697005964865, + 50.368816892405874 + ], + [ + -4.203156724702808, + 50.365640144076906 + ], + [ + -4.19449868846155, + 50.362267670845654 + ] + ] + ] + } + ], + "squads": [ + { + "squad_ID": 1, + "no_of_platforms": 1, + "squad_mission_type": "tracking", + "squad_state": false, + "platforms": [ + { + "model": "reav", + "platform_ID": "reav-60-1", + "serial": "reav-60", + "emergency": { + "additional_data": {}, + "latitude_waypoint": -7.432, + "longitude_waypoint": 50.365, + "safe_command": "go_home", + "target_depth": 10 + }, + "max_velocity": 0.9, + "min_altitude": 15.2, + "min_velocity": 0.1, + "additional_data": {} + } + ], + "region_of_interest": { + "geometry_coordinates": [ + [ + [ + -4.187143188645706, + 50.37072283932642 + ], + [ + -4.202697005964865, + 50.368816892405874 + ], + [ + -4.203156724702808, + 50.365640144076906 + ], + [ + -4.19449868846155, + 50.362267670845654 + ] + ] + ] + } + }, + { + "squad_ID": 2, + "no_of_platforms": 3, + "squad_mission_type": "survey", + "squad_state": true, + "platforms": [ + { + "platform_ID": "ecosub-1", + "serial": "ecosub-2", + "model": "ecosub", + "emergency": { + "additional_data": {}, + "latitude_waypoint": -7.432, + "longitude_waypoint": 50.365, + "safe_command": "go_home", + "target_depth": 10.0 + }, + "max_velocity": 0.9, + "min_altitude": 15.2, + "min_velocity": 0.1, + "additional_data": { + "scan_type": "DVL", + "swath_width": 10 + } + }, + { + "platform_ID": "ecosub-2", + "serial": "ecosubxyz-5", + "model": "ecosub", + "emergency": { + "additional_data": {}, + "latitude_waypoint": -0.432, + "longitude_waypoint": 20.365, + "safe_command": "go_home", + "target_depth": 0.0 + }, + "max_velocity": 0.9, + "min_altitude": 15.2, + "min_velocity": 0.1, + "additional_data": { + "scan_type": "DVL", + "swath_width": 10 + } + } + ], + "region_of_interest": {} + }, + { + "squad_ID": 3, + "no_of_platforms": 1, + "squad_mission_type": "inspection", + "squad_state": false, + "platforms": [ + { + "platform_ID": "ah-1", + "serial": "autosubhover-1", + "model": "autosub", + "emergency": { + "additional_data": {}, + "latitude_waypoint": 20.432, + "longitude_waypoint": 50.365, + "safe_command": "safety_abort", + "target_depth": 0.0 + }, + "max_velocity": 0.9, + "min_altitude": 15.2, + "min_velocity": 0.1, + "additional_data": { + "scan_type": "MBES" + } + } + ], + "region_of_interest": {} + } + ] + } +} \ No newline at end of file diff --git a/examples/ecosub_adapter/mission_plan.json b/examples/ecosub_adapter/mission_plan.json new file mode 100644 index 0000000..0a0dfdb --- /dev/null +++ b/examples/ecosub_adapter/mission_plan.json @@ -0,0 +1,58 @@ +{ + "header": { + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "autonomy_engine", + "destination": "ecosub_c2", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "mission_plan", + "platform_ID": "ecosub-2", + "autonomy_engine_mission_plan_ID": 1, + "plan": [ + { + "action": "move", + "flight_style": "go to waypoint", + "latitude_waypoint": -3.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": null, + "depth": 0.0, + "activate_payload": false, + "send_environmental_data": false + }, + { + "action": "dive", + "flight_style": "dive to depth", + "latitude_waypoint": -3.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": 10, + "depth": null, + "activate_payload": false, + "send_environmental_data": false + }, + { + "action": "scanline", + "flight_style": "go to waypoint", + "latitude_waypoint": -0.237143188645706, + "longitude_waypoint": 60.00000000000000, + "altitude": 10, + "depth": null, + "activate_payload": true, + "send_environmental_data": false + }, + { + "action": "climb", + "flight_style": "go to surface", + "latitude_waypoint": -0.237143188645706, + "longitude_waypoint": 52.37072283932642, + "altitude": null, + "depth": 0, + "activate_payload": false, + "send_environmental_data": true + } + ] + } +} \ No newline at end of file diff --git a/examples/ecosub_adapter/observation.json b/examples/ecosub_adapter/observation.json new file mode 100644 index 0000000..8eb0571 --- /dev/null +++ b/examples/ecosub_adapter/observation.json @@ -0,0 +1,28 @@ +{ + "header":{ + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "ecosub_c2", + "destination": "autonomy_engine", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "observation", + "platform_ID": "ecosub-2", + "points_of_interest": [ + { + "latitude": 178.2, + "longitude": -10.122, + "quality_of_point": 0.98 + }, + { + "latitude": 50.1382, + "longitude": -11.122, + "quality_of_point": 0.50 + } + ], + "region_surveyed": "" + } +} \ No newline at end of file diff --git a/examples/ecosub_adapter/platform_status-from_usbl_example.json b/examples/ecosub_adapter/platform_status-from_usbl_example.json new file mode 100644 index 0000000..6721a35 --- /dev/null +++ b/examples/ecosub_adapter/platform_status-from_usbl_example.json @@ -0,0 +1,21 @@ +{ + "header":{ + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "hermes", + "destination": "autonomy_engine", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "platform_status", + "platform_ID": "ecosub-5", + "platform_timestamp": "2022-12-21T00:00:00Z", + "status_source": "usbl", + "latitude": 178.2, + "longitude": -10.122, + "depth": 50, + "altitude": 20 + } +} diff --git a/examples/ecosub_adapter/platform_status.json b/examples/ecosub_adapter/platform_status.json new file mode 100644 index 0000000..7820d55 --- /dev/null +++ b/examples/ecosub_adapter/platform_status.json @@ -0,0 +1,44 @@ +{ + "header":{ + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "ecosub_c2", + "destination": "autonomy_engine", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "platform_status", + "platform_ID": "ecosub-2", + "platform_timestamp": "2022-12-21T00:00:00Z", + "status_source": "onboard_platform", + "autonomy_engine_plan_ID": 1, + "battery_remaining_capacity": 80.2, + "active": true, + "platform_state": "ABORT", + "mission_action_ID": 1, + "mission_track_ID": 4, + "latitude": 178.2, + "longitude": -10.122, + "depth": 50, + "altitude": 20, + "heading": 90.0, + "health_status": "Warning", + "localisation_error": null, + "usbl_fix_seconds_ago": null, + "range_to_go": 124.3, + "sensor_config": { + "sensor_ID": 22, + "serial": "sidescan-2x", + "sensor_on": true, + "additional_data": { + "whiskers_on": true + } + }, + "current_pitch": -4, + "speed_over_ground": 4.3, + "thrust_applied": 124.3, + "water_current_velocity": 124.3 + } +} diff --git a/examples/ecosub_c2/sample_decoded_ecosub_status.txt b/examples/ecosub_adapter/sample_decoded_ecosub_status.txt similarity index 100% rename from examples/ecosub_c2/sample_decoded_ecosub_status.txt rename to examples/ecosub_adapter/sample_decoded_ecosub_status.txt diff --git a/examples/ecosub_c2/mission_plan.json b/examples/ecosub_c2/mission_plan.json deleted file mode 100644 index 322a08f..0000000 --- a/examples/ecosub_c2/mission_plan.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", - "timestamp": "2022-11-16T00:00:00Z", - "version": 2, - "source": "autonomy_engine", - "destination": "ecosub_c2", - "delivery_type": "publish", - "encoded": false, - "message_type": "mission_plan", - "platform_ID": 1, - "autonomy_engine_mission_plan_ID": 1, - "plan": [ - { - "action": "move", - "flight_style": "go to waypoint", - "latitude_waypoint": -3.237143188645706, - "longitude_waypoint": 52.37072283932642, - "altitude": null, - "depth": 0.0, - "activate_payload": false, - "send_environmental_data": false - }, - { - "action": "dive", - "flight_style": "dive to depth", - "latitude_waypoint": -3.237143188645706, - "longitude_waypoint": 52.37072283932642, - "altitude": 10, - "depth": null, - "activate_payload": false, - "send_environmental_data": false - }, - { - "action": "scanline", - "flight_style": "go to waypoint", - "latitude_waypoint": -0.237143188645706, - "longitude_waypoint": 60.00000000000000, - "altitude": 10, - "depth": null, - "activate_payload": true, - "send_environmental_data": false - }, - { - "action": "climb", - "flight_style": "go to surface", - "latitude_waypoint": -0.237143188645706, - "longitude_waypoint": 52.37072283932642, - "altitude": null, - "depth": 0, - "activate_payload": false, - "send_environmental_data": true - } - ] -} \ No newline at end of file diff --git a/examples/ecosub_c2/observation.json b/examples/ecosub_c2/observation.json deleted file mode 100644 index ad76317..0000000 --- a/examples/ecosub_c2/observation.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", - "timestamp": "2022-11-16T00:00:00Z", - "version": 2, - "source": "ecosub_c2", - "destination": "autonomy_engine", - "delivery_type": "publish", - "encoded": false, - "message_type": "observation", - "platform_ID": 3, - "points_of_interest": [ - { - "latitude": 178.2, - "longitude": -10.122, - "quality_of_point": 0.98 - }, - { - "latitude": 50.1382, - "longitude": -11.122, - "quality_of_point": 0.50 - } - ], - "region_surveyed": "" -} \ No newline at end of file diff --git a/examples/ecosub_c2/platform_status-from_usbl_example.json b/examples/ecosub_c2/platform_status-from_usbl_example.json deleted file mode 100644 index 8394283..0000000 --- a/examples/ecosub_c2/platform_status-from_usbl_example.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", - "timestamp": "2022-11-16T00:00:00Z", - "version": 2, - "source": "hermes", - "destination": "autonomy_engine", - "delivery_type": "publish", - "encoded": false, - "message_type": "platform_status", - "platform_ID": 1, - "platform_timestamp": "2022-12-21T00:00:00Z", - "status_source": "usbl", - "latitude": 178.2, - "longitude": -10.122, - "depth": 50, - "altitude": 20 -} diff --git a/examples/ecosub_c2/platform_status.json b/examples/ecosub_c2/platform_status.json deleted file mode 100644 index 2ea2a37..0000000 --- a/examples/ecosub_c2/platform_status.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", - "timestamp": "2022-11-16T00:00:00Z", - "version": 2, - "source": "ecosub_c2", - "destination": "autonomy_engine", - "delivery_type": "publish", - "encoded": false, - "message_type": "platform_status", - "platform_ID": 1, - "platform_timestamp": "2022-12-21T00:00:00Z", - "status_source": "onboard_platform", - "autonomy_engine_plan_ID": 1, - "battery_remaining_capacity": 80.2, - "active": true, - "platform_state": "ABORT", - "mission_action_ID": 1, - "mission_track_ID": 4, - "latitude": 178.2, - "longitude": -10.122, - "depth": 50, - "altitude": 20, - "heading": 90.0, - "health_status": "Warning", - "localisation_error": null, - "usbl_fix_seconds_ago": null, - "range_to_go": 124.3, - "sensor_config": { - "sensor_ID": 22, - "serial": "sidescan-2x", - "sensor_on": true, - "additional_data": { - "whiskers_on": true - } - }, - "current_pitch": -4, - "speed_over_ground": 4.3, - "thrust_applied": 124.3, - "water_current_velocity": 124.3 -} diff --git a/examples/gui/planning_configuration.json b/examples/gui_adapter/planning_configuration.json similarity index 94% rename from examples/gui/planning_configuration.json rename to examples/gui_adapter/planning_configuration.json index 7b3467b..adff68c 100644 --- a/examples/gui/planning_configuration.json +++ b/examples/gui_adapter/planning_configuration.json @@ -1,11 +1,14 @@ { + "header":{ "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", "timestamp": "2022-11-16T00:00:00Z", "version": 2, "source": "ecosub_c2", "destination": "autonomy_engine", "delivery_type": "publish", - "encoded": false, + "encoded": false + }, + "payload":{ "message_type": "platform_status", "planning_config_ID": 3, "exclusion_zones": [ @@ -41,7 +44,7 @@ "platforms": [ { "model": "reav", - "platform_ID": 23, + "platform_ID": "reav-60-1", "serial": "reav-60", "emergency": { "additional_data": {}, @@ -86,7 +89,7 @@ "squad_state": true, "platforms": [ { - "platform_ID": 23, + "platform_ID": "ecosub-2", "serial": "ecosub-2", "model": "ecosub", "emergency": { @@ -105,7 +108,7 @@ } }, { - "platform_ID": 10, + "platform_ID": "ecosub-5", "serial": "ecosub-5", "model": "ecosub", "emergency": { @@ -133,7 +136,7 @@ "squad_state": false, "platforms": [ { - "platform_ID": 23, + "platform_ID": "139-ah-1", "serial": "ah-1", "model": "autosub", "emergency": { @@ -154,4 +157,5 @@ "region_of_interest": {} } ] - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/examples/hydrosurv_adapter/acknowledgement.json b/examples/hydrosurv_adapter/acknowledgement.json index a9deaf6..c5290f5 100644 --- a/examples/hydrosurv_adapter/acknowledgement.json +++ b/examples/hydrosurv_adapter/acknowledgement.json @@ -1,12 +1,16 @@ { - "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", - "timestamp": "2022-11-16T00:00:00Z", - "version": 1, - "source": "hydrosurv_adapter", - "destination": "autonomy_engine", - "delivery_type": "publish", - "encoded": false, - "message_type": "acknowledgement", - "acknowledged_message_ID": "11111111-7bc8-11ed-a1eb-0242ac999999", - "status": "c2_received" + "header":{ + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 1, + "source": "hydrosurv_adapter", + "destination": "autonomy_engine", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "acknowledgement", + "acknowledged_message_ID": "11111111-7bc8-11ed-a1eb-0242ac999999", + "status": "c2_received" + } } \ No newline at end of file diff --git a/examples/hydrosurv_adapter/mission_plan.json b/examples/hydrosurv_adapter/mission_plan.json index f10b821..f5c1c0d 100644 --- a/examples/hydrosurv_adapter/mission_plan.json +++ b/examples/hydrosurv_adapter/mission_plan.json @@ -1,15 +1,18 @@ { - "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", - "timestamp": "2022-11-16T00:00:00Z", - "version": 2, - "source": "autonomy_engine", - "destination": "hydrosurv_adapter", - "delivery_type": "publish", - "encoded": false, - "message_type": "mission_plan", - "platform_ID": 5, - "autonomy_engine_plan_ID": 1, - "plan": [ + "header":{ + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "autonomy_engine", + "destination": "hydrosurv_adapter", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "mission_plan", + "platform_ID": "reav-60-1", + "autonomy_engine_plan_ID": 1, + "plan": [ { "latitude_waypoint": -4.187143188645706, "longitude_waypoint": 50.37072283932642 @@ -23,4 +26,5 @@ "longitude_waypoint": 52.37072283932642 } ] + } } \ No newline at end of file diff --git a/examples/hydrosurv_adapter/platform_status.json b/examples/hydrosurv_adapter/platform_status.json index 13d7aa2..cbfb2c6 100644 --- a/examples/hydrosurv_adapter/platform_status.json +++ b/examples/hydrosurv_adapter/platform_status.json @@ -1,26 +1,30 @@ { - "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", - "timestamp": "2022-11-16T00:00:00Z", - "version": 2, - "source": "hydrosurv_adapter", - "destination": "autonomy_engine", - "delivery_type": "publish", - "encoded": false, - "message_type": "platform_status", - "autonomy_engine_plan_ID": 1, - "active": true, - "status_source": "onboard_platform", - "battery_remaining_capacity": 80.2, - "heading": 310.0, - "health_status": "Lost Connection", - "latitude": 178.2, - "longitude": -10.122, - "mission_action_ID": 1, - "mission_track_ID": 4, - "platform_ID": 1, - "platform_state": "ABORT", - "platform_timestamp": "2022-12-21T00:00:00Z", - "speed_over_ground": 4.5, - "range_to_go": null, - "thrust_applied": null + "header":{ + "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd", + "timestamp": "2022-11-16T00:00:00Z", + "version": 2, + "source": "hydrosurv_adapter", + "destination": "autonomy_engine", + "delivery_type": "publish", + "encoded": false + }, + "payload":{ + "message_type": "platform_status", + "autonomy_engine_plan_ID": 1, + "active": true, + "status_source": "onboard_platform", + "battery_remaining_capacity": 80.2, + "heading": 310.0, + "health_status": "Lost Connection", + "latitude": 178.2, + "longitude": -10.122, + "mission_action_ID": 1, + "mission_track_ID": 4, + "platform_ID": "reav-60-1", + "platform_state": "ABORT", + "platform_timestamp": "2022-12-21T00:00:00Z", + "speed_over_ground": 4.5, + "range_to_go": null, + "thrust_applied": null + } } \ No newline at end of file diff --git a/formats/mission_plan.py b/formats/mission_plan.py index 1195e99..1d3b21e 100644 --- a/formats/mission_plan.py +++ b/formats/mission_plan.py @@ -77,9 +77,9 @@ mission_plan_schema = { "example": 3, }, "platform_ID": { - "type": "integer", + "type": "string", "description": "Unique identifier for this platform", - "example": 1, + "example": "reav-x-1", }, "plan": { "type": "array", diff --git a/formats/observation.py b/formats/observation.py index 3a49727..1da57a8 100644 --- a/formats/observation.py +++ b/formats/observation.py @@ -38,9 +38,9 @@ observation_schema = { "example": "observation", }, "platform_ID": { - "type": "integer", - "description": "ID of platform to sending observations", - "example": 2, + "type": "string", + "description": "Unique identifier for this platform", + "example": "reav-x-1", }, "points_of_interest": { "type": "array", diff --git a/formats/planning_configuration.py b/formats/planning_configuration.py index ae2e99b..eb6f114 100644 --- a/formats/planning_configuration.py +++ b/formats/planning_configuration.py @@ -45,9 +45,9 @@ platform_schema = { "type": "object", "properties": { "platform_ID": { - "type": "integer", - "description": "Identifier for platform", - "example": 23, + "type": "string", + "description": "Unique identifier for this platform", + "example": "reav-x-1", }, "serial": { "type": "string", diff --git a/formats/platform_status.py b/formats/platform_status.py index 07908ee..8e0ff33 100644 --- a/formats/platform_status.py +++ b/formats/platform_status.py @@ -33,9 +33,9 @@ platform_status_message_schema = { "example": "platform_status", }, "platform_ID": { - "type": "integer", - "description": "Identifier for platform", - "example": 1, + "type": "string", + "description": "Unique identifier for this platform", + "example": "reav-x-1", }, "status_source": { "type": "string", diff --git a/project/soar/swagger.json b/project/soar/swagger.json index d43099d..4f7d6a6 100644 --- a/project/soar/swagger.json +++ b/project/soar/swagger.json @@ -174,8 +174,8 @@ }, "platform_ID": { "description": "Unique identifier for this platform", - "example": 1, - "type": "integer" + "example": "reav-x-1", + "type": "string" } }, "required": [ @@ -200,9 +200,9 @@ "type": "string" }, "platform_ID": { - "description": "ID of platform to sending observations", - "example": 2, - "type": "integer" + "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.", @@ -408,9 +408,9 @@ "type": "string" }, "platform_ID": { - "description": "Identifier for platform", - "example": 23, - "type": "integer" + "description": "Unique identifier for this platform", + "example": "reav-x-1", + "type": "string" }, "serial": { "description": "platform serial number", @@ -581,9 +581,9 @@ "type": "integer" }, "platform_ID": { - "description": "Identifier for platform", - "example": 1, - "type": "integer" + "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.", -- GitLab