Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-message-format
Commits
e15001f0
Verified
Commit
e15001f0
authored
7 months ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
refactor: add primitives at squad level
parent
ee5e43ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
186 additions
and
26 deletions
+186
-26
examples/mas-dt/planning_configuration.json
examples/mas-dt/planning_configuration.json
+125
-0
formats/planning_configuration.py
formats/planning_configuration.py
+31
-24
project/soar/swagger.json
project/soar/swagger.json
+30
-2
No files found.
examples/mas-dt/planning_configuration.json
0 → 100644
View file @
e15001f0
{
"header"
:{
"message_ID"
:
"b427003c-0000-11aa-a1eb-bvcdfghjgfdd"
,
"timestamp"
:
"2022-11-16T00:00:00Z"
,
"version"
:
2
,
"source"
:
"noc-c2"
,
"destination"
:
""
,
"delivery_type"
:
"broadcast"
,
"encoded"
:
false
},
"payload"
:{
"message_type"
:
"planning_configuration"
,
"planning_config_ID"
:
1
,
"primitives"
:
[
{
"instruction"
:
"stay_outside"
,
"feature"
:
{
"type"
:
"Feature"
,
"properties"
:
{
"name"
:
"The Rock"
,
"type"
:
"exclusion_zone"
},
"geometry"
:
{
"type"
:
"Polygon"
,
"coordinates"
:
[
[
[
-4.1777839187560915
,
50.34173405662855
],
[
-4.1777839187560915
,
50.33820949229701
],
[
-4.143667777943875
,
50.33820949229701
],
[
-4.143667777943875
,
50.34173405662855
],
[
-4.1777839187560915
,
50.34173405662855
]
]
]
}
}
},
{
"instruction"
:
"stay_inside"
,
"feature"
:
{
"type"
:
"Feature"
,
"properties"
:
{
"name"
:
"Survey Zone Charlie"
,
"type"
:
"operating area"
},
"geometry"
:
{
"type"
:
"Polygon"
,
"coordinates"
:
[
[
[
-4.1777839187560915
,
50.34173405662855
],
[
-4.1777839187560915
,
50.33820949229701
],
[
-4.143667777943875
,
50.33820949229701
],
[
-4.143667777943875
,
50.34173405662855
],
[
-4.1777839187560915
,
50.34173405662855
]
]
]
}
}
}
],
"squads"
:
[
{
"squad_ID"
:
1
,
"no_of_platforms"
:
1
,
"squad_mission_type"
:
"profiling"
,
"platforms"
:
[
{
"operator"
:
"noc"
,
"model"
:
"slocum"
,
"platform_ID"
:
"unit_xxx"
,
"active"
:
true
}
],
"primitives"
:
[
{
"instruction"
:
"navigate_to"
,
"feature"
:
{
"type"
:
"Feature"
,
"properties"
:
{
"name"
:
"Target a"
,
"type"
:
"target"
},
"geometry"
:
{
"type"
:
"Point"
,
"coordinates"
:
[
-4.183181
,
50.335942
]
}
}
}
]
}
]
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
formats/planning_configuration.py
View file @
e15001f0
...
...
@@ -180,6 +180,28 @@ platform_schema = {
],
}
primitive_schema
=
{
"type"
:
"object"
,
"properties"
:
{
"instruction"
:
{
"type"
:
"string"
,
"enum"
:
[
"stay_inside"
,
"stay_outside"
,
"navigate_to"
,
"follow"
,
"repeat"
,
"cover"
,
],
"description"
:
"How the associated feature should be used"
,
},
"feature"
:
{
"$ref"
:
"https://geojson.org/schema/Feature.json"
,
},
},
"required"
:
[
"feature"
],
}
squad_metadata_schema
=
{
"type"
:
"object"
,
"properties"
:
{
...
...
@@ -200,11 +222,17 @@ squad_metadata_schema = {
},
"squad_mission_type"
:
{
"type"
:
"string"
,
"enum"
:
[
"tracking"
,
"survey"
,
"inspection"
],
"enum"
:
[
"tracking"
,
"survey"
,
"inspection"
,
"profiling"
],
"description"
:
"Mission of given squad: `tracking`, `survey`"
+
", `inspection`"
,
"example"
:
"survey"
,
},
"primitives"
:
{
"type"
:
"array"
,
"items"
:
primitive_schema
,
"description"
:
"Squad primitives "
+
"- includes platform group navigation instructions"
,
},
},
"required"
:
[
"squad_ID"
,
...
...
@@ -214,28 +242,6 @@ squad_metadata_schema = {
],
}
primitive_schema
=
{
"type"
:
"object"
,
"properties"
:
{
"instruction"
:
{
"type"
:
"string"
,
"enum"
:
[
"stay_inside"
,
"stay_outside"
,
"navigate_to"
,
"follow"
,
"repeat"
,
"cover"
,
],
"description"
:
"How the associated feature should be used"
,
},
"feature"
:
{
"$ref"
:
"https://geojson.org/schema/Feature.json"
,
},
},
"required"
:
[
"feature"
],
}
planning_configuration_schema
=
{
"type"
:
"object"
,
"properties"
:
{
...
...
@@ -254,7 +260,8 @@ planning_configuration_schema = {
"primitives"
:
{
"type"
:
"array"
,
"items"
:
primitive_schema
,
"description"
:
"Specification primitives"
,
"description"
:
"Specification primitives "
+
"- campaign-wide such as operating area and obstacles"
,
},
"squads"
:
{
"type"
:
"array"
,
...
...
This diff is collapsed.
Click to expand it.
project/soar/swagger.json
View file @
e15001f0
...
...
@@ -1794,7 +1794,7 @@
"type"
:
"integer"
},
"primitives"
:
{
"description"
:
"Specification primitives"
,
"description"
:
"Specification primitives
- campaign-wide such as operating area and obstacles
"
,
"items"
:
{
"properties"
:
{
"feature"
:
{
...
...
@@ -2004,6 +2004,33 @@
},
"type"
:
"array"
},
"primitives"
:
{
"description"
:
"Squad primitives - includes platform group navigation instructions"
,
"items"
:
{
"properties"
:
{
"feature"
:
{
"$ref"
:
"#/components/schemas/geojson.org.schema.Feature.json"
},
"instruction"
:
{
"description"
:
"How the associated feature should be used"
,
"enum"
:
[
"stay_inside"
,
"stay_outside"
,
"navigate_to"
,
"follow"
,
"repeat"
,
"cover"
],
"type"
:
"string"
}
},
"required"
:
[
"feature"
],
"type"
:
"object"
},
"type"
:
"array"
},
"squad_ID"
:
{
"description"
:
"Identifier of given squad"
,
"example"
:
23
,
...
...
@@ -2014,7 +2041,8 @@
"enum"
:
[
"tracking"
,
"survey"
,
"inspection"
"inspection"
,
"profiling"
],
"example"
:
"survey"
,
"type"
:
"string"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment