Verified Commit 5e0ee51a authored by Dan Jones's avatar Dan Jones
Browse files

refactor: change geo data to geojson refs

parent 10735293
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z", "timestamp": "2022-11-16T00:00:00Z",
"version": 2, "version": 2,
"source": "gui", "source": "gui",
"destination": "soar.all.all.all.from_platform.planning_configuration", "destination": "",
"delivery_type": "broadcast", "delivery_type": "broadcast",
"encoded": false "encoded": false
}, },
...@@ -13,58 +13,64 @@ ...@@ -13,58 +13,64 @@
"planning_config_ID": 1, "planning_config_ID": 1,
"exclusion_zones": [ "exclusion_zones": [
{ {
"geometry_coordinates": [ "geometry": {
[ "type": "Polygon",
"coordinates": [
[ [
-4.1777839187560915, [
50.34173405662855 -4.1777839187560915,
], 50.34173405662855
[ ],
-4.1777839187560915, [
50.33820949229701 -4.1777839187560915,
], 50.33820949229701
[ ],
-4.143667777943875, [
50.33820949229701 -4.143667777943875,
], 50.33820949229701
[ ],
-4.143667777943875, [
50.34173405662855 -4.143667777943875,
], 50.34173405662855
[ ],
-4.1777839187560915, [
50.34173405662855 -4.1777839187560915,
50.34173405662855
]
] ]
] ]
] }
} }
], ],
"region_of_interest": [ "region_of_interest": [
{ {
"geometry_coordinates": [ "geometry": {
[ "type": "Polygon",
"coordinates": [
[ [
-4.1777839187560915, [
50.34173405662855 -4.1777839187560915,
], 50.34173405662855
[ ],
-4.1777839187560915, [
50.33820949229701 -4.1777839187560915,
], 50.33820949229701
[ ],
-4.143667777943875, [
50.33820949229701 -4.143667777943875,
], 50.33820949229701
[ ],
-4.143667777943875, [
50.34173405662855 -4.143667777943875,
], 50.34173405662855
[ ],
-4.1777839187560915, [
50.34173405662855 -4.1777839187560915,
50.34173405662855
]
] ]
] ]
] }
} }
], ],
"squads": [ "squads": [
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"timestamp": "2022-11-16T00:00:00Z", "timestamp": "2022-11-16T00:00:00Z",
"version": 2, "version": 2,
"source": "gui", "source": "gui",
"destination": "soar.all.all.all.from_platform.planning_configuration", "destination": "",
"delivery_type": "publish", "delivery_type": "broadcast",
"encoded": false "encoded": false
}, },
"payload":{ "payload":{
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
"planning_config_ID": 1, "planning_config_ID": 1,
"exclusion_zones": [ "exclusion_zones": [
{ {
"geometry_coordinates": [ "type": "Polygon",
"coordinates": [
[ [
[ [
-4.1777839187560915, -4.1777839187560915,
...@@ -41,7 +42,8 @@ ...@@ -41,7 +42,8 @@
], ],
"region_of_interest": [ "region_of_interest": [
{ {
"geometry_coordinates": [ "type": "Polygon",
"coordinates": [
[ [
[ [
-4.1777839187560915, -4.1777839187560915,
......
...@@ -13,30 +13,12 @@ emergency_schema = { ...@@ -13,30 +13,12 @@ emergency_schema = {
+ " partner's platform/C2", + " partner's platform/C2",
"example": "go_home", "example": "go_home",
}, },
"target_waypoint_latitude": { "target_waypoint": {
"type": "number", "$ref": "https://geojson.org/schema/Point.json",
"format": "float", }
"description": "Y-coordinate safe place for respective platform",
"example": 50.365,
},
"target_waypoint_longitude": {
"type": "number",
"format": "float",
"description": "X-coordinate safe place for respective platform",
"example": -7.432,
},
"target_depth": {
"type": "number",
"format": "float",
"description": "Z-coordinate safe place for respective platform"
+ " . If platform to NOT stay at depth, key in `0.0`",
"example": 10.0,
},
}, },
"required": [ "required": [
"target_waypoint_latitude", "target_waypoint",
"target_waypoint_longitude",
"target_depth",
], ],
} }
...@@ -181,16 +163,6 @@ platform_schema = { ...@@ -181,16 +163,6 @@ platform_schema = {
], ],
} }
region_schema = {
"type": "object",
"properties": {
"geometry": {
"$ref": "https://geojson.org/schema/Polygon.json",
},
},
"description": "GeoJSON Polygon",
}
squad_metadata_schema = { squad_metadata_schema = {
"type": "object", "type": "object",
"properties": { "properties": {
...@@ -242,12 +214,16 @@ planning_configuration_schema = { ...@@ -242,12 +214,16 @@ planning_configuration_schema = {
}, },
"region_of_interest": { "region_of_interest": {
"type": "array", "type": "array",
"items": region_schema, "items": {
"$ref": "https://geojson.org/schema/Polygon.json",
},
"description": "Region of interest for the entire operation", "description": "Region of interest for the entire operation",
}, },
"exclusion_zones": { "exclusion_zones": {
"type": "array", "type": "array",
"items": region_schema, "items": {
"$ref": "https://geojson.org/schema/Polygon.json",
},
"description": "Exclusion zones for all platforms", "description": "Exclusion zones for all platforms",
}, },
"squads": { "squads": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment