From 866527c1efbe452b250ba9b7376179204c43a739 Mon Sep 17 00:00:00 2001
From: Trishna Saeharaseelan <trishna.saeharaseelan@noc.ac.uk>
Date: Tue, 14 Mar 2023 14:38:47 +0000
Subject: [PATCH] refactor(mission plan): remove flight style

---
 .../autonomy_engine_adapter/mission_plan_ECOSUB.json |  4 ----
 examples/gui_adapter/planning_configuration.json     |  4 ----
 formats/mission_plan.py                              |  6 ------
 formats/planning_configuration.py                    |  6 ------
 project/soar/swagger.json                            | 11 -----------
 tests/fixtures/schemas.py                            | 12 ------------
 tests/fixtures/swagger.json                          | 11 -----------
 7 files changed, 54 deletions(-)

diff --git a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
index a3828b1..c400cb0 100644
--- a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
+++ b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
@@ -15,7 +15,6 @@
     "plan": [
       {
         "action": "move",
-        "flight_style": "go to waypoint",
         "start_point_latitude": -3.007143188645706,
         "start_point_longitude": 50.37072283932642,
         "target_waypoint_latitude": -3.237143188645706,
@@ -26,7 +25,6 @@
       },
       {
         "action": "dive",
-        "flight_style": "dive to depth",
         "start_point_latitude": -3.237143188645706,
         "start_point_longitude": 52.37072283932642,
         "target_waypoint_latitude": -3.337143188645706,
@@ -37,7 +35,6 @@
       },
       {
         "action": "scanline",
-        "flight_style": "go to waypoint",
         "start_point_latitude": -3.337143188645706,
         "start_point_longitude": 56.37072283932642,
         "target_waypoint_latitude": -0.237143188645706,
@@ -48,7 +45,6 @@
       },
       {
         "action": "climb",
-        "flight_style": "go to surface",
         "start_point_latitude": -0.237143188645706,
         "start_point_longitude": 60.00000000000000,
         "target_waypoint_latitude": -0.237143188645706,
diff --git a/examples/gui_adapter/planning_configuration.json b/examples/gui_adapter/planning_configuration.json
index a5da880..ab0de23 100644
--- a/examples/gui_adapter/planning_configuration.json
+++ b/examples/gui_adapter/planning_configuration.json
@@ -45,7 +45,6 @@
           {
             "model": "reav",
             "platform_ID": "reav-60-1",
-            "serial": "reav-60",
             "emergency": {
               "target_waypoint_latitude": -7.432,
               "target_waypoint_longitude": 50.365,
@@ -88,7 +87,6 @@
         "platforms": [
           {
             "platform_ID": "ecosub-2",
-            "serial": "ecosub-2",
             "model": "ecosub",
             "emergency": {
               "target_waypoint_latitude": -7.432,
@@ -106,7 +104,6 @@
           },
           {
             "platform_ID": "ecosub-5",
-            "serial": "ecosub-5",
             "model": "ecosub",
             "emergency": {
               "additional_data": {},
@@ -133,7 +130,6 @@
         "platforms": [
           {
             "platform_ID": "139-ah-1",
-            "serial": "ah-1",
             "model": "autosub",
             "emergency": {
               "additional_data": {},
diff --git a/formats/mission_plan.py b/formats/mission_plan.py
index b0e6688..7936788 100644
--- a/formats/mission_plan.py
+++ b/formats/mission_plan.py
@@ -13,12 +13,6 @@ action_schema = {
             + " `dive`, `send_hits`, `scanline`, `scanpoint`.",
             "example": "move",
         },
-        "flight_style": {
-            "type": "string",
-            "description": "Platform-specific modes/flight styles to perform"
-            + " next action",
-            "example": "orbit",
-        },
         "start_point_latitude": {
             "type": "number",
             "format": "float",
diff --git a/formats/planning_configuration.py b/formats/planning_configuration.py
index 872798e..27a3154 100644
--- a/formats/planning_configuration.py
+++ b/formats/planning_configuration.py
@@ -53,11 +53,6 @@ platform_schema = {
             "description": "Unique identifier for this platform",
             "example": "reav-x-1",
         },
-        "serial": {
-            "type": "string",
-            "description": "platform serial number",
-            "example": "reav-60",
-        },
         "model": {
             "type": "string",
             "example": "reav",
@@ -89,7 +84,6 @@ platform_schema = {
     },
     "required": [
         "platform_ID",
-        "serial",
         "model",
         "emergency",
         "min_altitude",
diff --git a/project/soar/swagger.json b/project/soar/swagger.json
index cbfe13a..fc743b6 100644
--- a/project/soar/swagger.json
+++ b/project/soar/swagger.json
@@ -136,11 +136,6 @@
                           "format":"float",
                           "type":"number"
                        },
-                       "flight_style":{
-                          "description":"Platform-specific modes/flight styles to perform next action",
-                          "example":"orbit",
-                          "type":"string"
-                       },
                        "send_environmental_data":{
                           "description":"To trigger the platform to send list of  observations if any found",
                           "example":false,
@@ -420,16 +415,10 @@
                                    "description":"Unique identifier for this platform",
                                    "example":"reav-x-1",
                                    "type":"string"
-                                },
-                                "serial":{
-                                   "description":"platform serial number",
-                                   "example":"reav-60",
-                                   "type":"string"
                                 }
                              },
                              "required":[
                                 "platform_ID",
-                                "serial",
                                 "model",
                                 "emergency",
                                 "min_altitude",
diff --git a/tests/fixtures/schemas.py b/tests/fixtures/schemas.py
index 6b59532..0994486 100644
--- a/tests/fixtures/schemas.py
+++ b/tests/fixtures/schemas.py
@@ -91,12 +91,6 @@ action_schema = {
             + " `dive`, `send_hits`, `scanline`, `scanpoint`.",
             "example": "move",
         },
-        "flight_style": {
-            "type": "string",
-            "description": "Platform-specific modes/flight styles to perform"
-            + " next action",
-            "example": "orbit",
-        },
         "start_point_latitude": {
             "type": "number",
             "format": "float",
@@ -294,11 +288,6 @@ platform_schema = {
             "description": "Unique identifier for this platform",
             "example": "reav-x-1",
         },
-        "serial": {
-            "type": "string",
-            "description": "platform serial number",
-            "example": "reav-60",
-        },
         "model": {
             "type": "string",
             "example": "reav",
@@ -329,7 +318,6 @@ platform_schema = {
     },
     "required": [
         "platform_ID",
-        "serial",
         "model",
         "emergency",
         "min_altitude",
diff --git a/tests/fixtures/swagger.json b/tests/fixtures/swagger.json
index 1dd1d92..f95b94e 100644
--- a/tests/fixtures/swagger.json
+++ b/tests/fixtures/swagger.json
@@ -135,11 +135,6 @@
                   "format": "float",
                   "type": "number"
                 },
-                "flight_style": {
-                  "description": "Platform-specific modes/flight styles to perform next action",
-                  "example": "orbit",
-                  "type": "string"
-                },
                 "target_waypoint_latitude": {
                   "description": "Next waypoint, x-coordinate",
                   "example": -4.187143188645706,
@@ -401,16 +396,10 @@
                         "description": "Unique identifier for this platform",
                         "example": "reav-x-1",
                         "type": "string"
-                      },
-                      "serial": {
-                        "description": "platform serial number",
-                        "example": "reav-60",
-                        "type": "string"
                       }
                     },
                     "required": [
                       "platform_ID",
-                      "serial",
                       "model",
                       "emergency",
                       "min_altitude",
-- 
GitLab