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
611b7b21
Commit
611b7b21
authored
2 years ago
by
Trishna Saeharaseelan
Browse files
Options
Download
Email Patches
Plain Diff
fix: spec validation errors
parent
89576e08
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
649 additions
and
811 deletions
+649
-811
formats/mission_plan.py
formats/mission_plan.py
+1
-1
formats/planning_configuration.py
formats/planning_configuration.py
+2
-5
formats/platform_status.py
formats/platform_status.py
+140
-149
generate_schema_config.py
generate_schema_config.py
+5
-5
project/soar/soar_protocol.json
project/soar/soar_protocol.json
+501
-651
No files found.
formats/mission_plan.py
View file @
611b7b21
...
...
@@ -86,5 +86,5 @@ mission_plan_schema = {
"items"
:
action_schema
,
},
},
"required"
:
[
"message_type"
,
"plan_ID"
,
"platform_ID"
,
"plan"
],
"required"
:
[
"message_type"
,
"
autonomy_engine_
plan_ID"
,
"platform_ID"
,
"plan"
],
}
This diff is collapsed.
Click to expand it.
formats/planning_configuration.py
View file @
611b7b21
...
...
@@ -33,7 +33,6 @@ emergency_schema = {
"example"
:
10
,
},
"additional_data"
:
{
"type"
:
"null"
,
"description"
:
"Any addition fields/data to be added here"
,
"example"
:
{},
},
...
...
@@ -78,8 +77,7 @@ platform_schema = {
"description"
:
"Maximum altitude set for squad."
,
"example"
:
0.9
,
},
"additional_data"
:
{
"type"
:
"null"
,
"additional_specs"
:
{
"description"
:
"Any addition fields/data to be added here"
,
"example"
:
{
"swath_width"
:
10.0
,
"scan_type"
:
"DVL"
},
},
...
...
@@ -152,7 +150,6 @@ squad_metadata_schema = {
"platforms"
,
"squad_mission_type"
,
"squad_state"
,
"exclusion_zones"
,
],
}
...
...
@@ -182,7 +179,7 @@ planning_configuration_schema = {
},
"required"
:
[
"message_type"
,
"config_ID"
,
"
planning_
config_ID"
,
"squads"
,
"exclusion_zones"
,
],
...
...
This diff is collapsed.
Click to expand it.
formats/platform_status.py
View file @
611b7b21
...
...
@@ -18,12 +18,10 @@ sensor_schema = {
"example"
:
True
,
},
"additional_data"
:
{
"type"
:
"null"
,
"description"
:
"Any addition fields/data to be added here"
,
"example"
:
{
"payload"
:
[
1.2
,
434
]},
},
},
"required"
:
[],
}
platform_status_message_schema
=
{
...
...
@@ -34,156 +32,149 @@ platform_status_message_schema = {
"description"
:
"Type of message"
,
"example"
:
"platform_status"
,
},
"platform_ID"
:
{
"type"
:
"integer"
,
"description"
:
"Identifier for platform"
,
"example"
:
1
,
},
"status_source"
:
{
"type"
:
"string"
,
"enum"
:
[
"usbl"
,
"onboard_platform"
],
"description"
:
"Indicate if this status message is from the"
+
" platform or USBL"
,
"example"
:
"usbl"
,
},
"transmission_mode"
:
{
"type"
:
"string"
,
"enum"
:
[
"acoustics"
,
"iridium"
,
"wifi"
,
"starlink"
],
"description"
:
"Mode in which status message was transmitted"
+
" when on the surface (i.e. iridium/wifi) or underwater"
+
" (i.e. acoustics)"
,
"example"
:
"wifi"
,
},
"platform_timestamp"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
,
"decription"
:
"Timestamp for onboard platform status message"
,
"example"
:
"2022-12-21T00:00:00Z"
,
},
"active"
:
{
"type"
:
"boolean"
,
"description"
:
"When a platform is in deployment (executing a"
+
" mission plan) this should be True"
,
"example"
:
True
,
},
"platform_state"
:
{
# TODO: Define enum with potential STATES of each platform
"type"
:
"string"
,
"description"
:
"Current state executed by platform. E.g. "
+
"STOP, IDLE, ABORT."
,
"example"
:
"ABORT"
,
},
"autonomy_engine_plan_ID"
:
{
"type"
:
"integer"
,
"description"
:
"Last mission plan ID (according to Autonomy"
+
" Engine's mission plan number sent) executed by platform"
,
"example"
:
1
,
},
"latitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Latitude in decimal degrees."
,
"example"
:
178.2
,
},
"longitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Longitude in decimal degrees."
,
"example"
:
-
10.122
,
},
"depth"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target depth in metres"
,
"example"
:
50
,
"default"
:
0
,
},
"altitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target altitude in metres"
,
"example"
:
20
,
},
"mission_track_ID"
:
{
"type"
:
"integer"
,
"description"
:
"Track number - stage in mission (e.g. "
+
"4 --> Waypoint 3 to Waypoint 4)"
,
"example"
:
4
,
},
"mission_action_ID"
:
{
"type"
:
"integer"
,
"description"
:
""
,
# TODO: Add description
"example"
:
1
,
},
"range_to_go"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Estimated distance to reach next waypoint"
,
"example"
:
124.3
,
},
"speed_over_ground"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
""
,
# TODO: Add description
"example"
:
124.3
,
},
"water_current_velocity"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
""
,
# TODO: Add description
"example"
:
124.3
,
},
"thrust_applied"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
""
,
# TODO: Add description
"example"
:
124.3
,
},
"heading"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Angular distance relative to north, usually 000°"
+
" at north, clockwise through 359°, in degrees"
,
"example"
:
124.3
,
},
"health_status"
:
{
"type"
:
"string"
,
"description"
:
"Health status extracted by respective platform "
+
"if any diagnosis is available to check sensors"
,
"example"
:
"Warning"
,
},
"localisation_error"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Localisation error at last USBL update."
,
"example"
:
0.000129
,
},
"usbl_fix_seconds_ago"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"USBL Fix received x second ago."
,
"example"
:
10.0
,
},
"battery_remaining_capacity"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Battery remaining % provided by respective C2"
,
"example"
:
80.2
,
},
"current_pitch"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Current pitch of platform"
,
"example"
:
-
4.0
,
},
# "platform_ID": {
# "type": "integer",
# "description": "Identifier for platform",
# "example": 1,
# },
# "status_source": {
# "type": "string",
# "enum": ["usbl", "onboard_platform"],
# "description": "Indicate if this status message is from the"
# + " platform or USBL",
# "example": "usbl",
# },
# "transmission_mode": {
# "type": "string",
# "enum": ["acoustics", "iridium", "wifi", "starlink"],
# "description": "Mode in which status message was transmitted"
# + " when on the surface (e.g. iridium/wifi) or underwater"
# + " (e.g. acoustics)",
# "example": "wifi",
# },
# "platform_timestamp": {
# "type": "string",
# "format": "date-time",
# "description": "Timestamp for onboard platform status message",
# "example": "2022-12-21T00:00:00Z",
# },
# "platform_state": {
# "type": "string", # TODO: Define enum with potential STATES of each platform
# "description": "Current state executed by platform. E.g. "
# + "STOP, IDLE, ABORT.",
# "example": "ABORT",
# },
# "autonomy_engine_plan_ID": {
# "type": "integer",
# "description": "Last mission plan ID (according to Autonomy"
# + " Engine's mission plan number sent) executed by platform",
# "example": 1,
# },
# "latitude": {
# "type": "number",
# "format": "float",
# "description": "Latitude in decimal degrees.",
# "example": 178.2,
# },
# "longitude": {
# "type": "number",
# "format": "float",
# "description": "Longitude in decimal degrees.",
# "example": -10.122,
# },
# "depth": {
# "type": "number",
# "format": "float",
# "description": "Target depth in metres",
# "example": 50,
# "default": 0,
# },
# "altitude": {
# "type": "number",
# "format": "float",
# "description": "Target altitude in metres",
# "example": 20,
# },
# "mission_track_ID": {
# "type": "integer",
# "description": "Track number - stage in mission (e.g. "
# + "4 --> Waypoint 3 to Waypoint 4)",
# "example": 4,
# },
# "mission_action_ID": {
# "type": "integer",
# "description": "", # TODO: Add description
# "example": 1,
# },
# "range_to_go": {
# "type": "number",
# "format": "float",
# "description": "Estimated distance to reach next waypoint",
# "example": 124.3,
# },
# "speed_over_ground": {
# "type": "number",
# "format": "float",
# "description": "", # TODO: Add description
# "example": 124.3,
# },
# "water_current_velocity": {
# "type": "number",
# "format": "float",
# "description": "", # TODO: Add description
# "example": 124.3,
# },
# "thrust_applied": {
# "type": "number",
# "format": "float",
# "description": "", # TODO: Add description
# "example": 124.3,
# },
# "heading": {
# "type": "number",
# "format": "float",
# "description": "Angular distance relative to north, usually 000°"
# + " at north, clockwise through 359°, in degrees",
# "example": 124.3,
# },
# "health_status": {
# "type": "string",
# "description": "Health status extracted by respective platform "
# + "if any diagnosis is available to check sensors",
# "example": "Warning",
# },
# "localisation_error": {
# "type": "number",
# "format": "float",
# "description": "Localisation error at last USBL update.",
# "example": 0.000129,
# },
# "usbl_fix_seconds_ago": {
# "type": "number",
# "format": "float",
# "description": "USBL Fix received x second ago.",
# "example": 10.0,
# },
# "battery_remaining_capacity": {
# "type": "number",
# "format": "float",
# "description": "Battery remaining % provided by respective C2",
# "example": 80.2,
# },
# "current_pitch": {
# "type": "number",
# "format": "float",
# "description": "Current pitch of platform",
# "example": -4.0,
# },
"sensor_config"
:
sensor_schema
,
},
"required"
:
[
"message_type"
,
"platform_ID"
,
"status_source"
,
"platform_timestamp"
,
"latitude"
,
"longitude"
,
#
"platform_ID",
#
"status_source",
#
"platform_timestamp",
#
"latitude",
#
"longitude",
],
}
This diff is collapsed.
Click to expand it.
generate_schema_config.py
View file @
611b7b21
...
...
@@ -46,11 +46,11 @@ swagger_config = {
"discriminator"
:
{
"propertyName"
:
"message_type"
,
"mapping"
:{
"
M
ission
P
lan"
:
"#/components/schemas/mission_plan"
,
"
O
bservation"
:
"#/components/schemas/observation"
,
"
P
lanning
C
onfiguration"
:
"#/components/schemas/planning_configuration"
,
"
P
latform
S
tatus"
:
"#/components/schemas/platform_status"
,
"
A
cknowledgement"
:
"#/components/schemas/acknowledgement"
,
"
m
ission
_p
lan"
:
"#/components/schemas/mission_plan"
,
"
o
bservation"
:
"#/components/schemas/observation"
,
"
p
lanning
_c
onfiguration"
:
"#/components/schemas/planning_configuration"
,
"
p
latform
_s
tatus"
:
"#/components/schemas/platform_status"
,
"
a
cknowledgement"
:
"#/components/schemas/acknowledgement"
,
},
},
"oneOf"
:[
...
...
This diff is collapsed.
Click to expand it.
project/soar/soar_protocol.json
View file @
611b7b21
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