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
58f07b32
Verified
Commit
58f07b32
authored
7 months ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
refactor: move waypoint_status schema
parent
a0ae5a20
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
102 deletions
+104
-102
formats/platform_status.py
formats/platform_status.py
+0
-101
formats/waypoint_status.py
formats/waypoint_status.py
+102
-0
generate_schema_config.py
generate_schema_config.py
+2
-1
No files found.
formats/platform_status.py
View file @
58f07b32
...
...
@@ -275,104 +275,3 @@ platform_status_schema = {
"platform_timestamp"
,
],
}
waypoint_status_schema
=
{
"type"
:
"object"
,
"properties"
:
{
"message_type"
:
{
"type"
:
"string"
,
"description"
:
"Type of message"
,
"example"
:
"waypoint_status"
,
"enum"
:
[
"waypoint_status"
],
},
"status_source"
:
{
"type"
:
"string"
,
"enum"
:
[
"onboard_platform"
,
"simulated"
,
"autonomy"
],
"description"
:
"Indicate if this status message is from the"
+
" platform or USBL"
,
"example"
:
"usbl"
,
},
},
"allOf"
:
[
platform_status_core_fields_schema
],
"oneOf"
:
[
{
"type"
:
"object"
,
"properties"
:
{
"position"
:
{
"$ref"
:
"https://geojson.org/schema/Point.json"
,
},
"waypoint"
:
{
"$ref"
:
"https://geojson.org/schema/Point.json"
,
},
},
"required"
:
[
"waypoint"
,
],
},
{
"type"
:
"object"
,
"properties"
:
{
"latitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Latitude (Y-coordinate) in decimal degrees."
,
"example"
:
178.2
,
},
"longitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Longitude (X-coordinate) in decimal degrees."
,
"example"
:
-
10.122
,
},
"depth"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target depth in metres"
,
"example"
:
50.0
,
"default"
:
0.0
,
},
"altitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target altitude in metres"
,
"example"
:
20.0
,
},
"waypoint_latitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Latitude (Y-coordinate) in decimal degrees."
,
"example"
:
178.2
,
},
"waypoint_longitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Longitude (X-coordinate) in decimal degrees."
,
"example"
:
-
10.122
,
},
"waypoint_depth"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target depth in metres"
,
"example"
:
50.0
,
"default"
:
0.0
,
},
"waypoint_altitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target altitude in metres"
,
"example"
:
20.0
,
},
},
"required"
:
[
"waypoint_latitude"
,
"waypoint_longitude"
,
],
},
],
"required"
:
[
"message_type"
,
"platform_ID"
,
"status_source"
,
"platform_timestamp"
,
],
}
This diff is collapsed.
Click to expand it.
formats/waypoint_status.py
0 → 100644
View file @
58f07b32
from
formats.platform_status
import
platform_status_core_fields_schema
waypoint_status_schema
=
{
"type"
:
"object"
,
"properties"
:
{
"message_type"
:
{
"type"
:
"string"
,
"description"
:
"Type of message"
,
"example"
:
"waypoint_status"
,
"enum"
:
[
"waypoint_status"
],
},
"status_source"
:
{
"type"
:
"string"
,
"enum"
:
[
"onboard_platform"
,
"simulated"
,
"autonomy"
],
"description"
:
"Indicate if this status message is from the"
+
" platform or USBL"
,
"example"
:
"usbl"
,
},
},
"allOf"
:
[
platform_status_core_fields_schema
],
"oneOf"
:
[
{
"type"
:
"object"
,
"properties"
:
{
"position"
:
{
"$ref"
:
"https://geojson.org/schema/Point.json"
,
},
"waypoint"
:
{
"$ref"
:
"https://geojson.org/schema/Point.json"
,
},
},
"required"
:
[
"waypoint"
,
],
},
{
"type"
:
"object"
,
"properties"
:
{
"latitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Latitude (Y-coordinate) in decimal degrees."
,
"example"
:
178.2
,
},
"longitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Longitude (X-coordinate) in decimal degrees."
,
"example"
:
-
10.122
,
},
"depth"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target depth in metres"
,
"example"
:
50.0
,
"default"
:
0.0
,
},
"altitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target altitude in metres"
,
"example"
:
20.0
,
},
"waypoint_latitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Latitude (Y-coordinate) in decimal degrees."
,
"example"
:
178.2
,
},
"waypoint_longitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Longitude (X-coordinate) in decimal degrees."
,
"example"
:
-
10.122
,
},
"waypoint_depth"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target depth in metres"
,
"example"
:
50.0
,
"default"
:
0.0
,
},
"waypoint_altitude"
:
{
"type"
:
"number"
,
"format"
:
"float"
,
"description"
:
"Target altitude in metres"
,
"example"
:
20.0
,
},
},
"required"
:
[
"waypoint_latitude"
,
"waypoint_longitude"
,
],
},
],
"required"
:
[
"message_type"
,
"platform_ID"
,
"status_source"
,
"platform_timestamp"
,
],
}
This diff is collapsed.
Click to expand it.
generate_schema_config.py
View file @
58f07b32
...
...
@@ -6,7 +6,8 @@ from formats.observation import observation_schema
from
formats.observation_encoded
import
observation_encoded_schema
from
formats.payload
import
payload_schema
from
formats.planning_configuration
import
planning_configuration_schema
from
formats.platform_status
import
platform_status_schema
,
waypoint_status_schema
from
formats.platform_status
import
platform_status_schema
from
formats.waypoint_status
import
waypoint_status_schema
from
formats.platform_status_encoded
import
platform_status_encoded_schema
from
formats.survey
import
survey_schema
from
formats.survey_encoded
import
survey_encoded_schema
...
...
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