From 627c99cd3cf15da3f8f112bd7e40e2bca03a4ae1 Mon Sep 17 00:00:00 2001
From: Trishna Saeharaseelan <trishna.saeharaseelan@noc.ac.uk>
Date: Tue, 14 Mar 2023 14:42:30 +0000
Subject: [PATCH] refactor(mission plan): remove send environmental data where
 observation message captures this

---
 .../mission_plan_AH1.json                        | 12 ++++--------
 .../mission_plan_ECOSUB.json                     | 12 ++++--------
 examples/ecosub_adapter/mission_plan.json        | 16 ++++------------
 formats/mission_plan.py                          |  6 ------
 project/soar/swagger.json                        |  5 -----
 tests/fixtures/schemas.py                        |  6 ------
 tests/fixtures/swagger.json                      |  5 -----
 7 files changed, 12 insertions(+), 50 deletions(-)

diff --git a/examples/autonomy_engine_adapter/mission_plan_AH1.json b/examples/autonomy_engine_adapter/mission_plan_AH1.json
index 2c7d2dd..7a62cda 100644
--- a/examples/autonomy_engine_adapter/mission_plan_AH1.json
+++ b/examples/autonomy_engine_adapter/mission_plan_AH1.json
@@ -21,8 +21,7 @@
         "target_waypoint_latitude": -3.237143188645706,
         "target_waypoint_longitude": 52.37072283932642,
         "depth": 0.0,
-        "activate_payload": false,
-        "send_environmental_data": false
+        "activate_payload": false
       },
       {
         "action": "dive",
@@ -32,8 +31,7 @@
         "target_waypoint_latitude": -3.337143188645706,
         "target_waypoint_longitude": 56.37072283932642,
         "altitude": 10,
-        "activate_payload": false,
-        "send_environmental_data": false
+        "activate_payload": false
       },
       {
         "action": "scanline",
@@ -43,8 +41,7 @@
         "target_waypoint_latitude": -0.237143188645706,
         "target_waypoint_longitude": 60.00000000000000,
         "altitude": 10,
-        "activate_payload": true,
-        "send_environmental_data": false
+        "activate_payload": true
       },
       {
         "action": "climb",
@@ -54,8 +51,7 @@
         "target_waypoint_latitude": -0.237143188645706,
         "target_waypoint_longitude": 52.37072283932642,
         "depth": 0.0,
-        "activate_payload": false,
-        "send_environmental_data": true
+        "activate_payload": false
       }
     ]
   }
diff --git a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
index c400cb0..1e48c9c 100644
--- a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
+++ b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
@@ -20,8 +20,7 @@
         "target_waypoint_latitude": -3.237143188645706,
         "target_waypoint_longitude": 52.37072283932642,
         "depth": 0.0,
-        "activate_payload": false,
-        "send_environmental_data": false
+        "activate_payload": false
       },
       {
         "action": "dive",
@@ -30,8 +29,7 @@
         "target_waypoint_latitude": -3.337143188645706,
         "target_waypoint_longitude": 56.37072283932642,
         "altitude": 10,
-        "activate_payload": false,
-        "send_environmental_data": false
+        "activate_payload": false
       },
       {
         "action": "scanline",
@@ -40,8 +38,7 @@
         "target_waypoint_latitude": -0.237143188645706,
         "target_waypoint_longitude": 60.00000000000000,
         "altitude": 10,
-        "activate_payload": true,
-        "send_environmental_data": false
+        "activate_payload": true
       },
       {
         "action": "climb",
@@ -50,8 +47,7 @@
         "target_waypoint_latitude": -0.237143188645706,
         "target_waypoint_longitude": 52.37072283932642,
         "depth": 0.0,
-        "activate_payload": false,
-        "send_environmental_data": true
+        "activate_payload": false
       }
     ]
   }
diff --git a/examples/ecosub_adapter/mission_plan.json b/examples/ecosub_adapter/mission_plan.json
index a3828b1..1e48c9c 100644
--- a/examples/ecosub_adapter/mission_plan.json
+++ b/examples/ecosub_adapter/mission_plan.json
@@ -15,47 +15,39 @@
     "plan": [
       {
         "action": "move",
-        "flight_style": "go to waypoint",
         "start_point_latitude": -3.007143188645706,
         "start_point_longitude": 50.37072283932642,
         "target_waypoint_latitude": -3.237143188645706,
         "target_waypoint_longitude": 52.37072283932642,
         "depth": 0.0,
-        "activate_payload": false,
-        "send_environmental_data": false
+        "activate_payload": false
       },
       {
         "action": "dive",
-        "flight_style": "dive to depth",
         "start_point_latitude": -3.237143188645706,
         "start_point_longitude": 52.37072283932642,
         "target_waypoint_latitude": -3.337143188645706,
         "target_waypoint_longitude": 56.37072283932642,
         "altitude": 10,
-        "activate_payload": false,
-        "send_environmental_data": false
+        "activate_payload": false
       },
       {
         "action": "scanline",
-        "flight_style": "go to waypoint",
         "start_point_latitude": -3.337143188645706,
         "start_point_longitude": 56.37072283932642,
         "target_waypoint_latitude": -0.237143188645706,
         "target_waypoint_longitude": 60.00000000000000,
         "altitude": 10,
-        "activate_payload": true,
-        "send_environmental_data": false
+        "activate_payload": true
       },
       {
         "action": "climb",
-        "flight_style": "go to surface",
         "start_point_latitude": -0.237143188645706,
         "start_point_longitude": 60.00000000000000,
         "target_waypoint_latitude": -0.237143188645706,
         "target_waypoint_longitude": 52.37072283932642,
         "depth": 0.0,
-        "activate_payload": false,
-        "send_environmental_data": true
+        "activate_payload": false
       }
     ]
   }
diff --git a/formats/mission_plan.py b/formats/mission_plan.py
index 7936788..1b8290d 100644
--- a/formats/mission_plan.py
+++ b/formats/mission_plan.py
@@ -55,12 +55,6 @@ action_schema = {
             + "Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`",
             "example": True,
         },
-        "send_environmental_data": {
-            "type": "boolean",
-            "description": "To trigger the platform to send list of"
-            + "  observations if any found",
-            "example": False,
-        },
     },
     "required": [
         "target_waypoint_latitude",
diff --git a/project/soar/swagger.json b/project/soar/swagger.json
index fc743b6..0de8b7d 100644
--- a/project/soar/swagger.json
+++ b/project/soar/swagger.json
@@ -136,11 +136,6 @@
                           "format":"float",
                           "type":"number"
                        },
-                       "send_environmental_data":{
-                          "description":"To trigger the platform to send list of  observations if any found",
-                          "example":false,
-                          "type":"boolean"
-                       },
                        "start_point_latitude":{
                           "description":"Start point, x-coordinate",
                           "example":-4.187143188645706,
diff --git a/tests/fixtures/schemas.py b/tests/fixtures/schemas.py
index 0994486..53406b8 100644
--- a/tests/fixtures/schemas.py
+++ b/tests/fixtures/schemas.py
@@ -133,12 +133,6 @@ action_schema = {
             + "Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`",
             "example": True,
         },
-        "send_environmental_data": {
-            "type": "boolean",
-            "description": "To trigger the platform to send list of"
-            + "  observations if any found",
-            "example": False,
-        },
     },
     "required": [
         "target_waypoint_latitude",
diff --git a/tests/fixtures/swagger.json b/tests/fixtures/swagger.json
index f95b94e..9029ada 100644
--- a/tests/fixtures/swagger.json
+++ b/tests/fixtures/swagger.json
@@ -146,11 +146,6 @@
                   "example": 50.37072283932642,
                   "format": "float",
                   "type": "number"
-                },
-                "send_environmental_data": {
-                  "description": "To trigger the platform to send list of  observations if any found",
-                  "example": false,
-                  "type": "boolean"
                 }
               },
               "required": [
-- 
GitLab